Commit b69cac0b authored by David Byers's avatar David Byers
Browse files

Visa FAQ när man återser presentation.

Skriv ut err-stat i felmeddelanden.
parent c667309d
2001-05-22 David Byers <davby@ida.liu.se>
* commands1.el (kom-review-presentation): Print FAQs as if they
were comments.
(lyskom-print-comment-like-aux): New function.
(lyskom-insert-comment-like-aux): New function.
(lyskom-insert-deferred-comment-like-aux): New function.
2001-05-21 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-report-command-answer): Report error
status.
2001-05-21 Joel Rosdahl <joel@rosdahl.net>
* debian/control (Maintainer): Changed maintainer address.
......
......@@ -36,7 +36,7 @@
# makefile too!
#
CLIENTVERSION = 0.46.2-BETA-1
CLIENTVERSION = 0.46.2-BETA-2
DOCFILES=NEWS-0.46 NEWS-0.46.1
DEBIANCLIENTVERSION = $(shell echo $(CLIENTVERSION) | tr - .)
......
......@@ -228,6 +228,7 @@ return non-nil if the item is to be included in the list."
(def-aux-item faq-text 14
(info . lyskom-aux-item-info)
(text-header-line . (faq-in-text faq-in-text-by))
(status-print . lyskom-status-print-faq-text))
(def-aux-item creating-software 15
......
......@@ -169,7 +169,99 @@
(if (/= (conf-stat->presentation conf-stat) 0)
(lyskom-view-text (conf-stat->presentation conf-stat))
(lyskom-format-insert 'has-no-presentation
conf-stat)))))
conf-stat))
(lyskom-traverse faq (lyskom-get-aux-item
(conf-stat->aux-items conf-stat)
14)
(lyskom-print-comment-like-aux faq conf-stat)))))
(defun lyskom-print-comment-like-aux (item object)
(let* ((text-no (string-to-int (aux-item->data item)))
(text-stat (if kom-deferred-printing
(cache-get-text-stat text-no)
(blocking-do 'get-text-stat text-no))))
(cond ((or text-stat (not kom-deferred-printing))
(lyskom-insert-comment-like-aux item text-no text-stat object))
(t (let ((defer-info (lyskom-create-defer-info
'get-text-stat
text-no
'lyskom-insert-deferred-comment-like-aux
(point-max-marker)
(length lyskom-defer-indicator)
nil ; Filled in later
(list item object text-no))))
(lyskom-format-insert "%#1s\n" lyskom-defer-indicator)
(lyskom-defer-insertion defer-info))))))
(defun lyskom-insert-comment-like-aux (item text-no text-stat object)
(let* ((author (if text-stat (text-stat->author text-stat) nil))
(mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat)
17)))
(mx-author (car (lyskom-get-aux-item (text-stat->aux-items text-stat)
16)))
(formats (lyskom-aux-item-definition-field item 'text-header-line))
content-type
)
(if (and mx-from
(setq content-type
(car (lyskom-get-aux-item (text-stat->aux-items
text-stat) 1))))
(progn (string-match "^\\(\\S-+\\)" (aux-item->data content-type))
(setq content-type (format "(%s) "
(aux-item->data content-type))))
(setq content-type ""))
(setq author (or (lyskom-format-mx-author mx-from mx-author) author))
(lyskom-format-insert (cond ((not (listp formats)) formats)
((<= (length formats) 1) (car formats))
(author (elt formats 1))
(t (elt formats 0)))
text-no
author
content-type
(lyskom-aux-item-terminating-button item
object))
(lyskom-insert "\n")))
;;; FIXME: This contains code that duplicates the code in
;;; lyskom-insert-deferred-header-comm. That's a BAD THING.
(defun lyskom-insert-deferred-comment-like-aux (text-stat defer-info)
(let* ((author (if text-stat (text-stat->author text-stat) nil))
(item (elt (defer-info->data defer-info) 0))
(object (elt (defer-info->data defer-info) 1))
(text-no (elt (defer-info->data defer-info) 2))
(mx-from (car (lyskom-get-aux-item (text-stat->aux-items text-stat)
17)))
(mx-author (car (lyskom-get-aux-item (text-stat->aux-items text-stat)
16)))
(formats (lyskom-aux-item-definition-field item 'text-header-line))
content-type
)
(if (and mx-from
(setq content-type
(car (lyskom-get-aux-item (text-stat->aux-items
text-stat) 1))))
(progn (string-match "^\\(\\S-+\\)" (aux-item->data content-type))
(setq content-type (format "(%s) "
(aux-item->data content-type))))
(setq content-type ""))
(setq author (or (lyskom-format-mx-author mx-from mx-author) author))
(set-defer-info->format defer-info
(cond ((not (listp formats)) formats)
((<= (length formats) 1) (car formats))
(author (elt formats 1))
(t (elt formats 0))))
(lyskom-replace-deferred defer-info
text-no
author
content-type
(lyskom-aux-item-terminating-button item
object))))
......
......@@ -1026,7 +1026,7 @@ Send a bug report.\n")
(unread-letters . "unread letters")
(bad-text-no-prefix . "Unable to translate prefix `%s' to a text number")
(error-code . "Error code %#2d: %#1s.\n")
(error-code . "Error code %#2d/%#3S: %#1s.\n")
(error-in-kom-do-when-done . "The variable kom-do-when-done has an erroneous value.
You should set it to a better value.\n")
(extended-command . "LysKOM: ")
......@@ -1333,7 +1333,9 @@ On since %#8s%#9s")
(changed-faq-for-conf-failed . "Unable to change FAQ for %#1M to text %#3n.
%#2?b%[Text %#2n is still the FAQ.
%]%[%]%#4s")
(faq-in-text . "FAQ in text %#1n %#3s%#4s")
(faq-in-text-by . "FAQ in text %#1n %#3sby %#2P %#4s")
(too-many-languages . "Cannot code that many character sets. Send uncoded? ")
(too-many-content-types . "Cannot figure out what content type you want. Simplify the text.")
......
......@@ -138,7 +138,8 @@
(lyskom-insert-string 'nope)
(lyskom-format-insert 'error-code
(lyskom-get-error-text (or errno lyskom-errno))
(or errno lyskom-errno)))
(or errno lyskom-errno)
(if errno "" lyskom-err-stat)))
answer)
(defun lyskom-current-error ()
......
......@@ -1024,7 +1024,7 @@ Skicka en bugrapport.\n")
(unread-letters . "olsta brev")
(bad-text-no-prefix . "Kan inte verstta prefix `%s' till inlggsnummer")
(error-code . "Felkod %#2d: %#1s.\n")
(error-code . "Felkod %#2d/%#3S: %#1s.\n")
(error-in-kom-do-when-done . "Variabeln kom-do-when-done har ett felaktigt vrde.
Du br stta den till ett bttre vrde.\n")
(extended-command . "LysKOM: ")
......@@ -1331,6 +1331,9 @@ Uppkopplad sedan %#8s%#9s")
(changed-faq-for-conf-failed . "Kunde inte ndra FAQ fr %#1M till text %#3n.
%#2?b%[Text %#2n r fortfarande FAQ.
%]%[%]%#4s")
(faq-in-text . "FAQ i text %#1n %#3s%#4s")
(faq-in-text-by . "FAQ i text %#1n %#3sav %#2P %#4s")
(too-many-languages . "Fr mnga teckenuppsttningar fr att koda. Skicka in okodat? ")
(too-many-content-types . "Kan inte avgra innehllstyp. Frenkla inlgget.")
......
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