From da829bb5902e370cbc65abe42bf2e12a50f508d5 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 2 Dec 2001 22:32:58 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 25 +++++++++++++++ lisp/gnus-spec.el | 90 ++++++++++++++++++++++++++++------------------------- lisp/gnus-sum.el | 4 ++- lisp/message.el | 34 ++++++++++++++++++-- texi/ChangeLog | 5 +++ texi/gnus-ja.texi | 10 +++--- texi/gnus.texi | 9 +++--- 7 files changed, 122 insertions(+), 55 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1649cf..0fb6d70 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,28 @@ +2001-12-01 15:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-save-article): Nix + gnus-display-mime-function and gnus-article-prepare-hook. + + * gnus-spec.el (gnus-parse-complex-format): Properly handle %C at + the beginning of lines. + (gnus-complex-form-to-spec): Ditto. + +2001-12-01 08:00:00 ShengHuo ZHU + + * message.el (message-make-mft): Fix the m-s-a-file regexp. + From Paul Jarc . + +2001-11-30 21:00:00 ShengHuo ZHU + + * message.el: New variable message-subscribed-address-file; + use it in message-make-mft. From Paul Jarc . + +2001-11-30 12:00:00 ShengHuo ZHU + + * message.el (message-tab-body-function): Set to nil. + (message-tab): Use text-mode-map or global-map. + Suggested by Kai Gro,A_(Bjohann . + 2001-11-30 Simon Josefsson * gnus-agent.el (gnus-agent-fetch-headers): Use gnus-range-add diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index c6e0b69..60ee8a8 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -414,47 +414,53 @@ characters when given a pad value." (gnus-parse-simple-format format spec-alist insert)))) (defun gnus-parse-complex-format (format spec-alist) - (save-excursion - (gnus-set-work-buffer) - (insert format) - (goto-char (point-min)) - (while (re-search-forward "\"" nil t) - (replace-match "\\\"" nil t)) - (goto-char (point-min)) - (insert "(\"") - ;; Convert all font specs into font spec lists. - (while (re-search-forward "%\\([0-9]+\\)?\\([«»{}()]\\)" nil t) - (let ((number (if (match-beginning 1) - (match-string 1) "0")) - (delim (aref (match-string 2) 0))) - (if (or (= delim ?\() - (= delim ?\{) - (= delim ?\«)) - (replace-match (concat "\"(" - (cond ((= delim ?\() "mouse") - ((= delim ?\{) "face") - (t "balloon")) - " " number " \"") - t t) - (replace-match "\")\"")))) - (goto-char (point-max)) - (insert "\")") - ;; Convert point position commands. - (goto-char (point-min)) - (let ((case-fold-search nil)) - (while (re-search-forward "%\\([-0-9]+\\)?C" nil t) - (replace-match "\"(point)\"" t t))) - ;; Convert TAB commands. - (goto-char (point-min)) - (while (re-search-forward "%\\([-0-9]+\\)=" nil t) - (replace-match (format "\"(tab %s)\"" (match-string 1)) t t)) - ;; Convert the buffer into the spec. - (goto-char (point-min)) - (let ((form (read (current-buffer)))) - ;; If the first element is '(point), we just remove it. - (when (equal (car form) '(point)) - (pop form)) - (cons 'progn (gnus-complex-form-to-spec form spec-alist))))) + (let (found-C) + (save-excursion + (gnus-set-work-buffer) + (insert format) + (goto-char (point-min)) + (while (re-search-forward "\"" nil t) + (replace-match "\\\"" nil t)) + (goto-char (point-min)) + (insert "(\"") + ;; Convert all font specs into font spec lists. + (while (re-search-forward "%\\([0-9]+\\)?\\([«»{}()]\\)" nil t) + (let ((number (if (match-beginning 1) + (match-string 1) "0")) + (delim (aref (match-string 2) 0))) + (if (or (= delim ?\() + (= delim ?\{) + (= delim ?\«)) + (replace-match (concat "\"(" + (cond ((= delim ?\() "mouse") + ((= delim ?\{) "face") + (t "balloon")) + " " number " \"") + t t) + (replace-match "\")\"")))) + (goto-char (point-max)) + (insert "\")") + ;; Convert point position commands. + (goto-char (point-min)) + (let ((case-fold-search nil)) + (while (re-search-forward "%\\([-0-9]+\\)?C" nil t) + (replace-match "\"(point)\"" t t) + (setq found-C t))) + ;; Convert TAB commands. + (goto-char (point-min)) + (while (re-search-forward "%\\([-0-9]+\\)=" nil t) + (replace-match (format "\"(tab %s)\"" (match-string 1)) t t)) + ;; Convert the buffer into the spec. + (goto-char (point-min)) + (let ((form (read (current-buffer)))) + (if found-C + `(let (gnus-position) + ,@(gnus-complex-form-to-spec form spec-alist) + (if gnus-position + (gnus-put-text-property gnus-position (1+ gnus-position) + 'gnus-position t))) + `(progn + ,@(gnus-complex-form-to-spec form spec-alist))))))) (defun gnus-complex-form-to-spec (form spec-alist) (delq nil @@ -464,7 +470,7 @@ characters when given a pad value." ((stringp sform) (gnus-parse-simple-format sform spec-alist t)) ((eq (car sform) 'point) - `(gnus-put-text-property (1- (point)) (point) 'gnus-position t)) + '(setq gnus-position (point))) ((eq (car sform) 'tab) (gnus-spec-tab (cadr sform))) (t diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 0075f1f..1a9e778 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9953,7 +9953,9 @@ The variable `gnus-default-article-saver' specifies the saver function." (gnus-message 1 "Article %d is unsaveable" article)) ;; This is a real article. (save-window-excursion - (gnus-summary-select-article t nil nil article)) + (let ((gnus-display-mime-function nil) + (gnus-article-prepare-hook nil)) + (gnus-summary-select-article t nil nil article))) (save-excursion (set-buffer save-buffer) (erase-buffer) diff --git a/lisp/message.el b/lisp/message.el index 5844040..dacc08b 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -583,6 +583,13 @@ conjunction with `message-subscribed-regexps' and :group 'message-interface :type '(repeat sexp)) +(defcustom message-subscribed-address-file nil + "*A file containing addresses the user is subscribed to. +If nil, do not look at any files to determine list subscriptions. If +non-nil, each line of this file should be a mailing list address." + :group 'message-interface + :type 'string) + (defcustom message-subscribed-addresses nil "*Specifies a list of addresses the user is subscribed to. If nil, do not use any predefined list subscriptions. This list of @@ -3231,6 +3238,7 @@ This sub function is for exclusive use of `message-send-mail'." ;; Generate the Mail-Followup-To header if the header is not there... (if (and (or message-subscribed-regexps message-subscribed-addresses + message-subscribed-address-file message-subscribed-address-functions) (not (mail-fetch-field "mail-followup-to"))) (setq headers @@ -4394,9 +4402,25 @@ give as trustworthy answer as possible." (recipients (mapcar 'mail-strip-quoted-names (message-tokenize-header msg-recipients))) + (file-regexps + (if message-subscribed-address-file + (let (begin end item re) + (save-excursion + (with-temp-buffer + (insert-file-contents message-subscribed-address-file) + (while (not (eobp)) + (setq begin (point)) + (forward-line 1) + (setq end (point)) + (if (bolp) (setq end (1- end))) + (setq item (regexp-quote (buffer-substring begin end))) + (if re (setq re (concat re "\\|" item)) + (setq re (concat "\\`\\(" item)))) + (and re (list (concat re "\\)\\'")))))))) (mft-regexps (apply 'append message-subscribed-regexps (mapcar 'regexp-quote message-subscribed-addresses) + file-regexps (mapcar 'funcall message-subscribed-address-functions)))) (save-match-data @@ -5923,8 +5947,9 @@ which specify the range to operate on." :group 'message :type '(alist :key-type regexp :value-type function)) -(defcustom message-tab-body-function 'indent-relative - "*Function to execute when `message-tab' (TAB) is executed in the body." +(defcustom message-tab-body-function nil + "*Function to execute when `message-tab' (TAB) is executed in the body. +If nil, the function bound in `text-mode-map' or `global-map' is executed." :group 'message :type 'function) @@ -5938,7 +5963,10 @@ those headers." (let ((mail-abbrev-mode-regexp (caar alist))) (not (mail-abbrev-in-expansion-header-p)))) (setq alist (cdr alist))) - (funcall (or (cdar alist) message-tab-body-function)))) + (funcall (or (cdar alist) message-tab-body-function + (lookup-key text-mode-map "\t") + (lookup-key global-map "\t") + 'indent-relative)))) (defun message-expand-group () "Expand the group name under point." diff --git a/texi/ChangeLog b/texi/ChangeLog index 3655031..353e3f7 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2001-12-01 Simon Josefsson + + * gnus.texi (Group Line Specification, Summary Buffer Lines): + Cross reference Positioning Point. + 2001-11-25 09:00:00 ShengHuo ZHU * gnus.texi (Limiting): Addition. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index f0cbbe7..f16cb2a 100644 --- a/texi/gnus-ja.texi +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9!#(B($B$b$A$m$s!"$3$NF0:n$rJQ$($k$3$H$,$G$-$J$$$H$7$?$i(B Gnus $B$K$O$"$k(B $B$^$8$-$3$H$G$9!#4X?t(B @code{gnus-goto-colon} $B$r!"$"$J$?$,9%$-$J%+!<%=%k$N(B -$BF0$-$K$J$k$h$&$K!"?7$?$K=q$1$PNI$$$N$G$9!#(B) +$BF0$-$K$J$k$h$&$K!"?7$?$K=q$1$PNI$$$N$G$9!#(B) @xref{Positioning Point}$B!#(B $B=i4|CM$NJ8;zNs$O(B @samp{%U%R%z%I%(%[%4L: %-23,23n%]%) %s\n} $B$G$9!#(B diff --git a/texi/gnus.texi b/texi/gnus.texi index f71c2f3..8ed800d 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1709,10 +1709,10 @@ a @code{printf} specifications, for those of you who use (feh!) C. @samp{%M%S%5y: %(%g%)\n} is the value that produced those lines above. There should always be a colon on the line; the cursor always moves to -the colon after performing an operation. Nothing else is required---not -even the group name. All displayed text is just window dressing, and is -never examined by gnus. Gnus stores all real information it needs using -text properties. +the colon after performing an operation. @xref{Positioning +Point}. Nothing else is required---not even the group name. All +displayed text is just window dressing, and is never examined by Gnus. +Gnus stores all real information it needs using text properties. (Note that if you make a really strange, wonderful, spreadsheet-like layout, everybody will believe you are hard at work with the accounting @@ -4266,6 +4266,7 @@ the cursor always moves to the point position marker or the colon after performing an operation. (Of course, Gnus wouldn't be Gnus if it wasn't possible to change this. Just write a new function @code{gnus-goto-colon} which does whatever you like with the cursor.) +@xref{Positioning Point}. The default string is @samp{%U%R%z%I%(%[%4L: %-23,23n%]%) %s\n}. -- 1.7.10.4