Commit f9e0a4a5 authored by David Kågedal's avatar David Kågedal
Browse files

Div. fixar och ett formatteringsexperiment.

parent 5c38837d
No preview for this file type
......@@ -153,7 +153,7 @@
;;; ]terse det kommenterade - View commented text
;;; Author: Inge Wallin
;;; Modified by: David K}gedal
(defun kom-view-commented-text ()
"View the commented text.
......@@ -161,48 +161,47 @@ If the current text is comment to (footnote to) several text then the first
text is shown and a REVIEW list is built to shown the other ones."
(interactive)
(lyskom-start-of-command 'kom-view-commented-text)
(if lyskom-current-text
(progn
(lyskom-tell-internat 'kom-tell-read)
(initiate-get-text-stat 'read 'lyskom-view-commented-text
lyskom-current-text))
(lyskom-insert-string 'have-to-read)
(unwind-protect
(if lyskom-current-text
(progn
(lyskom-tell-internat 'kom-tell-read)
(lyskom-view-commented-text
(blocking-do 'get-text-stat lyskom-current-text)))
(lyskom-insert-string 'have-to-read))
(lyskom-end-of-command)))
(defun lyskom-view-commented-text (text-stat)
"Handles the return from the initiate-get-text-stat, displays and builds list."
(unwind-protect
(let* ((misc-info-list (and text-stat
(text-stat->misc-info-list text-stat)))
(misc-infos (and misc-info-list
(append (lyskom-misc-infos-from-list 'COMM-TO
misc-info-list)
(lyskom-misc-infos-from-list 'FOOTN-TO
misc-info-list))))
(text-nos (and misc-infos
(mapcar
(function
(lambda (misc-info)
(if (equal (misc-info->type misc-info)
'COMM-TO)
(misc-info->comm-to misc-info)
(misc-info->footn-to misc-info))))
misc-infos))))
(if text-nos
(progn
(lyskom-format-insert 'review-text-no
(car text-nos))
(if (cdr text-nos)
(read-list-enter-read-info
(lyskom-create-read-info
'REVIEW nil (lyskom-get-current-priority)
(lyskom-create-text-list (cdr text-nos))
lyskom-current-text)
lyskom-reading-list t))
(lyskom-view-text (car text-nos)))
(lyskom-insert-string 'no-comment-to)))
(lyskom-end-of-command)))
(let* ((misc-info-list (and text-stat
(text-stat->misc-info-list text-stat)))
(misc-infos (and misc-info-list
(append (lyskom-misc-infos-from-list
'COMM-TO misc-info-list)
(lyskom-misc-infos-from-list
'FOOTN-TO misc-info-list))))
(text-nos (and misc-infos
(mapcar
(function
(lambda (misc-info)
(if (equal (misc-info->type misc-info)
'COMM-TO)
(misc-info->comm-to misc-info)
(misc-info->footn-to misc-info))))
misc-infos))))
(if text-nos
(progn
(lyskom-format-insert 'review-text-no
(car text-nos))
(if (cdr text-nos)
(read-list-enter-read-info
(lyskom-create-read-info
'REVIEW nil (lyskom-get-current-priority)
(lyskom-create-text-list (cdr text-nos))
lyskom-current-text)
lyskom-reading-list t))
(lyskom-view-text (car text-nos)))
(lyskom-insert-string 'no-comment-to))))
(defun lyskom-misc-infos-from-list (type list)
......@@ -1004,9 +1003,10 @@ TYPE is either 'pres or 'motd, depending on what should be changed."
(interactive)
(lyskom-start-of-command 'kom-unset-conf-motd)
(unwind-protect
(let ((conf-stat (lyskom-read-conf-stat
(lyskom-get-string 'who-to-remove-motd-for)
'all 'empty)))
(let ((conf-stat (or (lyskom-read-conf-stat
(lyskom-get-string 'who-to-remove-motd-for)
'all 'empty)
(blocking-do 'get-conf-stat lyskom-pers-no))))
(cond
((null conf-stat)
(lyskom-insert-string 'cant-get-conf-stat))
......
......@@ -517,9 +517,9 @@ means send the message to everybody."
;;; Author: Linus Tolke
(defun kom-set-unread ()
(defun kom-set-unread (&optional arg)
"Set number of unread articles in current conference."
(interactive)
(interactive "P")
(lyskom-start-of-command 'kom-set-unread)
(unwind-protect
(if (zerop lyskom-current-conf)
......@@ -527,11 +527,15 @@ means send the message to everybody."
(let ((conf-stat (blocking-do 'get-conf-stat lyskom-current-conf)))
(if (null conf-stat) ;+++ annan errorhantering
(lyskom-insert "Error!\n") ;+++ Hrrrmmmmffff????
(let* ((n (lyskom-read-num-range
0 (conf-stat->no-of-texts conf-stat)
(lyskom-format 'only-last
(conf-stat->no-of-texts conf-stat)
(conf-stat->name conf-stat))))
(let* ((narg (prefix-numeric-value arg))
(n (if (and (<= 0 narg)
(<= narg (conf-stat->no-of-texts conf-stat)))
narg
(lyskom-read-num-range
0 (conf-stat->no-of-texts conf-stat)
(lyskom-format 'only-last
(conf-stat->no-of-texts conf-stat)
(conf-stat->name conf-stat)))))
(result (blocking-do 'set-unread
(conf-stat->conf-no conf-stat) n)))
(if (null result)
......@@ -1299,8 +1303,8 @@ current conference to another session."
(interactive)
(lyskom-start-of-command 'kom-show-user-area)
(let ((pers-stat (blocking-do 'get-pers-stat lyskom-pers-no)))
(lyskom-view-text 'main (pers-stat->user-area pers-stat)
nil nil nil nil nil nil)
(lyskom-view-text (pers-stat->user-area pers-stat)
nil nil nil nil nil)
(lyskom-run 'main 'lyskom-end-of-command)))
......
No preview for this file type
......@@ -53,12 +53,14 @@ also means modifying the lyskom-reading-list. The zero text-nos are skipped."
(membership->priority
(lyskom-member-p (conf-stat->conf-no conf-stat)))
(lyskom-create-text-list
(apply 'append
(mapcar
(function
(lambda (k)
(if (zerop k) nil (list k))))
list))))))
(delq 0 list)
;; (apply 'nconc
;; (mapcar
;; (function
;; (lambda (k)
;; (if (zerop k) nil (list k))))
;; list))
))))
(read-list-enter-read-info info lyskom-to-do-list)
(setq list nil)))))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment