Commit 85583bff authored by David Byers's avatar David Byers
Browse files

Fixed bug 457, 244.

Set content type on user area.
Fixed formatting problem with help.
Fixed prompt in kom-add-bcc.
Fixed settings menu for kom-server-priority-breaks.
parent abab5542
2002-06-12 David Byers <david.byers@swipnet.se>
Fix bug 457:
* aux-items.el (send-comments-to): Changed into to info.
(mx-reject-forward): Added text-name property.
* view-text.el (lyskom-view-text): Print unknown aux-items in
header, if there are any and we are doing noconversion.
* macros.el (lyskom-traverse-aux): Put progn around body or we can
only have one form in the body.
* view-text.el
(lyskom-view-text-convert-ISO-646-SE-to-ISO-8859-1): Use it.
(lyskom-view-text): Use it (two places).
(lyskom-filter-signature-hook): Use it.
(lyskom-view-text): When reviewing with noconversion, print
content-type and similar aux items.
* utilities.el (lyskom-viewing-noconversion): New function.
2002-06-11 David Byers <david.byers@swipnet.se>
* flags.el (lyskom-save-options): Set content-type p user-arean
till x-kom/user-area (dock utan charset).
Korrigera felaktig formattering av hjlpen:
* help.el (lyskom-help-format-p): Gjorde om point-marker till
point-max-marker s att formatteringen fungerar ven om point inte
fljer med till slutet av bufferten.
(lyskom-help-format-text-properties): Dito.
Fix bug 589:
* commands1.el (kom-add-bcc): Fixade s att prompten blir rtt:
* option-edit.el (lyskom-custom-variables): Add no-server-break to
options for kom-server-priority-breaks. Used to be no-break, which
is wrong.
2002-06-09 David Byers <david.byers@swipnet.se>
Fix bug 583:
......
......@@ -89,6 +89,11 @@
(apply (lyskom-aux-item-definition-field item method) args)
default))))
(defun lyskom-aux-item-has-call (item method)
"Return non-nil if aux-item ITEM has a defined method METHOD"
(when (lyskom-aux-item-p item)
(setq item (lyskom-find-aux-item-definition item)))
(lyskom-aux-item-definition-field item method))
(defun lyskom-aux-item-call (def method &rest args)
(apply 'lyskom-aux-item-try-call def method nil args))
......@@ -151,18 +156,20 @@ return non-nil if the item is to be included in the list."
;;; ======================================================================
(def-aux-item content-type 1
(text-print-when . never)
(text-name aux-content-type-name)
(parse . lyskom-parse-content-type)
(text-print . lyskom-print-content-type)
(info . lyskom-aux-item-info))
(def-aux-item fast-reply 2
(text-name aux-fast-reply-name)
(parse . nil)
(parse-data . lyskom-aux-item-decode-data)
(encode-data . lyskom-aux-item-encode-data)
(info . lyskom-aux-item-info))
(def-aux-item cross-reference 3
(text-name aux-cross-reference-name)
(status-print . lyskom-status-print-cross-reference)
(text-print-when . comment)
(parse . lyskom-parse-cross-reference)
......@@ -173,6 +180,7 @@ return non-nil if the item is to be included in the list."
(info . lyskom-aux-item-info))
(def-aux-item no-comments 4
(text-name aux-no-comments-name)
(text-print-when . footer)
(parse . lyskom-parse-no-comments)
(text-print . lyskom-print-no-comments)
......@@ -180,6 +188,7 @@ return non-nil if the item is to be included in the list."
(info . lyskom-aux-item-info))
(def-aux-item personal-comment 5
(text-name aux-personal-comment-name)
(text-print-when . footer)
(parse . lyskom-parse-personal-comments)
(text-print . lyskom-print-personal-comments)
......@@ -187,6 +196,7 @@ return non-nil if the item is to be included in the list."
(info . lyskom-aux-item-info))
(def-aux-item request-confirmation 6
(text-name aux-request-confirmation-name)
(text-print-when . header)
(parse . lyskom-parse-request-confirmation)
(text-print . lyskom-print-request-confirmation)
......@@ -195,19 +205,23 @@ return non-nil if the item is to be included in the list."
(read-action . lyskom-request-confirmation-action))
(def-aux-item read-confirm 7
(text-name aux-read-confirm-name)
(text-print-when . header)
(text-print . lyskom-print-read-confirm)
(info . lyskom-aux-item-info))
(def-aux-item redirect 8
(text-name aux-redirect-name)
(print . lyskom-print-redirect)
(info . lyskom-aux-item-info))
(def-aux-item x-face 9
(text-name aux-x-face-name)
(print . lyskom-print-xface)
(info . lyskom-aux-item-info))
(def-aux-item alternate-name 10
(text-name aux-alternate-name-name)
(text-print-when . header)
(text-print . lyskom-print-alternate-name)
(encode-data . lyskom-aux-item-encode-data)
......@@ -215,20 +229,25 @@ return non-nil if the item is to be included in the list."
(info . lyskom-aux-item-info))
(def-aux-item pgp-signature 11
(text-name aux-pgp-signature-name)
(info . lyskom-aux-item-info))
(def-aux-item pgp-public-key 12
(text-name aux-pgp-public-key-name)
(info . lyskom-aux-item-info))
(def-aux-item e-mail-address 13
(text-name aux-e-mail-address-name)
(info . lyskom-aux-item-info))
(def-aux-item faq-text 14
(text-name aux-faq-text-name)
(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
(text-name aux-creating-software-name)
(info . lyskom-aux-item-info)
(text-print-when . header)
(parse-data . lyskom-aux-item-decode-data)
......@@ -236,42 +255,55 @@ return non-nil if the item is to be included in the list."
(text-print . lyskom-print-creating-software))
(def-aux-item mx-author 16
(text-name aux-mx-author-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-from 17
(text-name aux-mx-from-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-reply-to 18
(text-name aux-mx-reply-to-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-to 19
(text-name aux-mx-to-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-cc 20
(text-name aux-mx-cc-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-date 21
(text-name aux-mx-date-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-message-id 22
(text-name aux-mx-message-id-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-in-reply-to 23
(text-name aux-mx-in-reply-to-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-misc 24
(text-name aux-mx-misc-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-allow-filter 25
(text-name aux-mx-allow-filter-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-reject-forward 26
(text-name aux-mx-reject-forward-name)
(info . lyskom-aux-item-info))
(def-aux-item notify-comments 27
(text-name aux-notify-comments-name)
(info . lyskom-aux-item-info))
(def-aux-item faq-for-conf 28
(text-name aux-faq-for-conf-name)
(text-print . lyskom-print-faq-for-conf)
(text-print-when . header)
(info . lyskom-aux-item-info)
......@@ -279,24 +311,30 @@ return non-nil if the item is to be included in the list."
(def-aux-item recommended-conf 29
(text-name aux-recommended-conf-name)
(status-print . lyskom-print-recommended-conf)
(info . lyskom-aux-item-info))
(def-aux-item allowed-content-type 30
(text-name aux-allowed-content-type-name)
(info . lyskom-aux-item-info))
(def-aux-item canonical-name 31
(text-name aux-canonical-name-name)
(info . lyskom-aux-item-info))
(def-aux-item mx-list-name 32
(text-name aux-mx-list-name-name)
(info . lyskom-aux-item-info)
(status-print . lyskom-print-mx-list-name))
(def-aux-item send-comments-to 33
(into . lyskom-print-aux-item-info)
(text-name aux-send-comments-to-name)
(info . lyskom-print-aux-item-info)
(status-print . lyskom-print-send-comments-to))
(def-aux-item world-readable 34
(text-name aux-world-readable-name)
(info . lyskom-aux-item-info)
(text-print . lyskom-print-world-readable)
(parse . lyskom-parse-world-readable)
......@@ -304,10 +342,12 @@ return non-nil if the item is to be included in the list."
(text-print-when . header))
(def-aux-item elisp-client-read-faq 10000
(text-name aux-elisp-client-read-faq-name)
(info . lyskom-aux-item-info)
(status-print . lyskom-print-elisp-client-read-faq))
(def-aux-item elisp-client-rejected-invitation 10001
(text-name aux-elisp-client-rejected-invitation-name)
(info . lyskom-aux-item-info)
(status-print . lyskom-print-elisp-client-rejected-invitation))
......@@ -326,7 +366,6 @@ return non-nil if the item is to be included in the list."
)
(defun lyskom-aux-item-info (item header)
(let ((def (lyskom-find-aux-item-definition item)))
......@@ -628,7 +667,7 @@ return non-nil if the item is to be included in the list."
(defun lyskom-print-creating-software (item &optional obj)
(when (or kom-show-creating-software
(eq lyskom-current-command 'kom-review-noconversion))
(lyskom-viewing-noconversion))
(concat
(lyskom-format 'creating-software-aux (aux-item->data item))
(lyskom-aux-item-terminating-button item obj))))
......
......@@ -3648,7 +3648,7 @@ footnotes) to it as read in the server."
(def-kom-command kom-add-bcc (text-no)
"Add a recipient to a text."
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-add-copy)))
(interactive (list (lyskom-read-text-no-prefix-arg 'text-to-add-bcc)))
(lyskom-add-helper text-no
'lyskom-last-added-bccrcpt
'who-to-add-bcc-q
......
......@@ -1741,6 +1741,47 @@ These variables are not registered as LysKOM variables and cannot be
read from the server. If the variables corresponds to settings that
have been removed, you can fix the problem by giving the command
\"Save variables\".\n\n")
(unknown-aux-item . "Oknd tillggsinformation")
(text-header-aux-item . "%#1s: <%#2d> \"%#3s\" %#4s")
(aux-content-type-name . "Content type")
(aux-fast-reply-name . "Remark")
(aux-cross-reference-name . "Reference")
(aux-no-comments-name . "Request for no comments")
(aux-personal-comment-name . "Request for personal replies")
(aux-request-confirmation-name . "Request for read confirmation")
(aux-read-confirm-name . "Read confirmation")
(aux-redirect-name . "Redirect")
(aux-x-face-name . "Picture")
(aux-alternate-name-name . "Alternate name")
(aux-pgp-signature-name . "PGP signature")
(aux-pgp-public-key-name . "PGP public key")
(aux-e-mail-address-name . "E-mail address")
(aux-faq-text-name . "FAQ in text")
(aux-creating-software-name . "Creating software")
(aux-mx-author-name . "E-mail author")
(aux-mx-from-name . "E-mail from")
(aux-mx-reply-to-name . "E-mail reply to")
(aux-mx-to-name . "E-mail to")
(aux-mx-cc-name . "E-mail CC")
(aux-mx-date-name . "E-mail date")
(aux-mx-message-id-name . "E-mail message ID")
(aux-mx-in-reply-to-name . "E-mail in reply to")
(aux-mx-misc-name . "E-mail headers")
(aux-mx-allow-filter-name . "E-mail allow-filter")
(aux-mx-reject-forward-name . "E-mail reject-forward")
(aux-notify-comments-name . "Notify me about comments")
(aux-faq-for-conf-name . "FAQ for conference")
(aux-recommended-conf-name . "Conference recommendation")
(aux-allowed-content-type-name . "Allowed content type")
(aux-canonical-name-name . "Canonical name")
(aux-mx-list-name-name . "Mailing list name")
(aux-send-comments-to-name . "Send comments to")
(aux-world-readable-name . "World-readable")
(aux-elisp-client-read-faq-name . "Read FAQ")
(aux-elisp-client-rejected-invitation-name . "Rejected invitation")
))
......
......@@ -131,7 +131,8 @@
(set-buffer kombuf)
(lyskom-message "%s" start-message)
(initiate-create-text
'options 'lyskom-save-options-2
'options
'lyskom-save-options-2
(cons 'raw-text
(apply 'lyskom-format-objects
(apply 'lyskom-format-objects
......@@ -147,7 +148,12 @@
(cons 'STRING (cons 'raw-text (cdr el))))
lyskom-other-clients-user-areas)))
(lyskom-create-misc-list)
nil
(list
(lyskom-create-aux-item
0 1 nil nil
(lyskom-create-aux-item-flags nil nil nil nil nil nil nil nil)
0
"x-kom/user-area"))
kombuf
done-message
error-message))))
......
......@@ -111,7 +111,8 @@
el)))))))
(defun lyskom-help-format-text-properties (data props)
(let ((start (point-marker)))
(let ((start (point-max-marker)))
(set-marker-insertion-type start nil)
(lyskom-traverse el (lyskom-help-data-get-data data)
(lyskom-do-help-format el))
(add-text-properties start (point-max) props)
......@@ -202,7 +203,8 @@
(t (lyskom-insert (format "[%S]" id))))))
(defun lyskom-help-format-p (data)
(let ((start (point-marker)))
(let ((start (point-max-marker)))
(set-marker-insertion-type start nil)
(lyskom-traverse el (lyskom-help-data-get-data data)
(lyskom-do-help-format el))
(save-excursion
......
......@@ -86,7 +86,7 @@ Value returned is always nil."
(setq (, atom) (car (, seq)))
(if (not (aux-item-flags->deleted
(aux-item->flags (, atom))))
(,@ body))
(progn (,@ body)))
(setq (, seq) (cdr (, seq))))))))
......
......@@ -575,7 +575,7 @@ customize buffer but do not save them to the server."
(const (after-conf-server-break after-conf))
(const (after-conf-letters-server-break after-conf-letters))
(const (when-done-server-break when-done))
(const (no-break nil)))))
(const (no-server-break nil)))))
(kom-login-hook (repeat (command nil :tag command)
:indent 4))
(kom-do-when-done (repeat (choice ((command nil :tag command)
......
......@@ -493,7 +493,7 @@ i svensk datorhistoria. L
(client-statistics-line . " %4#2d %#1s")
(who-to-add-q . "Vilket mte/person vill du addera som mottagare? ")
(who-to-add-copy-q . "Vilket mte/person vill du addera som kopiemottagare? ")
(who-to-add-bcc-q . "Vilket mte/person vill du addera som mottagare en dold kopia till? ")
(who-to-add-bcc-q . "Vilket mte/person vill du addera som mottagare av en dold kopia? ")
(really-add-as-recpt-q . "Skall framtida kommentarer till inlgget ocks skickas till %#1M? ")
(who-to-sub-q . "Vilket mte/person vill du subtrahera som mottagare? ")
(who-to-move-from-q . "Frn vilket mte vill du flytta texten? ")
......@@ -1754,7 +1754,48 @@ Variablerna
inte lsas frn servern. Om ngon av variablerna motsvarar en
instllning som har tagits bort s kan du tgrda genom att ge
kommandot \"Spara variabler\".\n\n")
))
(unknown-aux-item . "Oknd tillggsinformation")
(text-header-aux-item . "%#1s: <%#2d> \"%#3s\" %#4s")
(aux-content-type-name . "Innehllstyp")
(aux-fast-reply-name . "Anmrkning")
(aux-cross-reference-name . "Referens")
(aux-no-comments-name . "Begran om inga kommentarer")
(aux-personal-comment-name . "Begran om personliga svar")
(aux-request-confirmation-name . "Begran om lsbekrftelse")
(aux-read-confirm-name . "Lsbekrftelse")
(aux-redirect-name . "Omdirigering")
(aux-x-face-name . "Bild")
(aux-alternate-name-name . "Alternativt namn")
(aux-pgp-signature-name . "PGP-signatur")
(aux-pgp-public-key-name . "Publik PGP-nyckel")
(aux-e-mail-address-name . "E-postadress")
(aux-faq-text-name . "FAQ i text")
(aux-creating-software-name . "Skapande klient")
(aux-mx-author-name . "E-mailfrfattare")
(aux-mx-from-name . "E-mail frn")
(aux-mx-reply-to-name . "E-mail svar snds till")
(aux-mx-to-name . "E-mail till")
(aux-mx-cc-name . "E-mail CC")
(aux-mx-date-name . "E-maildatum")
(aux-mx-message-id-name . "E-mail-meddelande-ID")
(aux-mx-in-reply-to-name . "E-mail svar till")
(aux-mx-misc-name . "E-mailheader")
(aux-mx-allow-filter-name . "E-mail allow-filter")
(aux-mx-reject-forward-name . "E-mail reject-forward")
(aux-notify-comments-name . "Meddela kommentarer")
(aux-faq-for-conf-name . "FAQ fr mte")
(aux-recommended-conf-name . "Mtesrekommendation")
(aux-allowed-content-type-name . "Tillten innehllstyp")
(aux-canonical-name-name . "Kanoniskt namn")
(aux-mx-list-name-name . "E-maillistnamn")
(aux-send-comments-to-name . "Snd kommentarer till")
(aux-world-readable-name . "Lsbart utan inloggning")
(aux-elisp-client-read-faq-name . "Lst FAQ")
(aux-elisp-client-rejected-invitation-name . "Avvisad inbjudan")
))
(lyskom-language-var local lyskom-month-names sv
'(("jan" . 1) ("januari" . 1)
......@@ -2594,8 +2635,8 @@ kommandot \"Spara variabler\".\n\n")
(ar-reply-text . "Svarstext")
(express-break . "Omedelbart efter de har skapats")
(break . "Efter aktuell kommentarskedja ")
(no-break . "Efter aktuellt mte ")
(break . "Efter aktuell kommentarskedja")
(no-break . "Efter aktuellt mte")
(express-server-break . "Omedelbart")
(express-server-letters-break . "Omedelbart om det kommer brev")
......
......@@ -1443,6 +1443,14 @@ in the 20th century")
))
;;; ================================================================
;;; Check noconversion
(defun lyskom-viewing-noconversion ()
"Return non-nil if we are reviewing in noconversion mode."
(eq 'kom-review-noconversion lyskom-current-command))
;;; ================================================================
;;; Read membership types
......
......@@ -229,26 +229,21 @@ Note that this function must not be called asynchronously."
;; Insert aux-items that go in the header.
(let ((text nil))
(lyskom-traverse-aux aux
(text-stat->aux-items text-stat)
(when (and
(or (eq (lyskom-aux-item-definition-field aux
'text-print-when)
'header)
(and (eq (lyskom-aux-item-definition-field aux
'text-print-when)
'comment)
(not kom-reading-puts-comments-in-pointers-last)
))
(setq text
(lyskom-aux-item-call
aux
'text-print
aux
text-stat)))
(lyskom-insert text)
(lyskom-insert "\n"))))
(lyskom-traverse-aux aux (text-stat->aux-items text-stat)
(let ((tpw (lyskom-aux-item-definition-field aux 'text-print-when)))
(when (or (and (lyskom-viewing-noconversion) (not (eq tpw 'footer)))
(eq tpw 'header)
(and (eq tpw 'comment) (not kom-reading-puts-comments-in-pointers-last)))
(lyskom-insert
(or (lyskom-aux-item-call aux 'text-print aux text-stat)
(lyskom-format 'text-header-aux-item
(lyskom-get-string
(or (car (lyskom-aux-item-definition-field aux 'text-name))
'unknown-aux-item))
(aux-item->tag aux)
(aux-item->data aux)
(lyskom-aux-item-terminating-button aux text-stat))))
(lyskom-insert "\n"))))
;; If the text is marked, insert line saying so.
......@@ -304,7 +299,7 @@ Note that this function must not be called asynchronously."
(other-fast-replies nil))
(lyskom-traverse-aux aux (text-stat->aux-items text-stat)
(when (eq (aux-item->tag aux) 2)
(if (or (eq lyskom-current-command 'kom-review-noconversion)
(if (or (lyskom-viewing-noconversion)
(not (eq (text-stat->author text-stat)
(aux-item->creator aux))))
(setq other-fast-replies
......@@ -393,7 +388,7 @@ Note that this function must not be called asynchronously."
(defun lyskom-filter-signature-hook ()
"Filter out the signature of imported mail messages. Most useful
when put in your `kom-view-text-hook'."
(unless (eq 'kom-review-noconversion lyskom-current-command)
(unless (lyskom-viewing-noconversion)
(when (lyskom-text-is-mail-p lyskom-view-text-text-stat)
(let* ((body (text->text-mass lyskom-view-text-text))
(sign (string-match "^-- $" body)))
......@@ -410,8 +405,7 @@ or we are reviewing without conversion. In other words, the characters
to put in your `kom-view-text-hook'."
;; First the hard part - should we patch the text
;; in the text object?
(unless (or (equal lyskom-current-command
'kom-review-noconversion)
(unless (or (lyskom-viewing-noconversion)
(lyskom-text-is-mail-p lyskom-view-text-text-stat))
;; Yes, modify the text from the text-object (stored in mod)
(let* ((mod (aref (cdr lyskom-view-text-text) 1))
......
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