From aa0b1b6421fe57d8dc5ec0d13e30dc992edf175b Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 8 Jan 2003 06:13:19 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 13 +++++++++++++ lisp/gnus-spec.el | 10 +++++----- lisp/message.el | 15 ++++++++++----- lisp/spam.el | 7 ++++--- texi/ChangeLog | 5 +++++ texi/gnus-ja.texi | 7 +++++-- texi/gnus.texi | 7 +++++-- 7 files changed, 47 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54ec47e..0e63f28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2003-01-07 Teodor Zlatanov + + * spam.el (spam-check-ifile): fixed the spam-ifile-all-categories + logic, finally + +2003-01-08 Lars Magne Ingebrigtsen + + * gnus-spec.el (gnus-parse-format): %C is a complex format. + (gnus-parse-format): Change to %~. + + * message.el (message-generate-headers): Don't generate optional + empty headers. + 2003-01-07 Reiner Steib * message.el (message-cross-post-default) diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el index 237505e..d35fc99 100644 --- a/lisp/gnus-spec.el +++ b/lisp/gnus-spec.el @@ -440,14 +440,14 @@ characters when given a pad value." ;; them will have the balloon-help text property. (let ((case-fold-search nil)) (if (string-match - "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=" + "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=\\|%[-0-9]*~" format) (gnus-parse-complex-format format spec-alist) ;; This is a simple format. (gnus-parse-simple-format format spec-alist insert)))) (defun gnus-parse-complex-format (format spec-alist) - (let (found-C) + (let ((cursor-spec nil)) (save-excursion (gnus-set-work-buffer) (insert format) @@ -476,9 +476,9 @@ characters when given a pad value." ;; Convert point position commands. (goto-char (point-min)) (let ((case-fold-search nil)) - (while (re-search-forward "%\\([-0-9]+\\)?C" nil t) + (while (re-search-forward "%\\([-0-9]+\\)?~" nil t) (replace-match "\"(point)\"" t t) - (setq found-C t))) + (setq cursor-spec t))) ;; Convert TAB commands. (goto-char (point-min)) (while (re-search-forward "%\\([-0-9]+\\)=" nil t) @@ -486,7 +486,7 @@ characters when given a pad value." ;; Convert the buffer into the spec. (goto-char (point-min)) (let ((form (read (current-buffer)))) - (if found-C + (if cursor-spec `(let (gnus-position) ,@(gnus-complex-form-to-spec form spec-alist) (if gnus-position diff --git a/lisp/message.el b/lisp/message.el index 00402ca..a7433e0 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -5194,6 +5194,7 @@ Headers already prepared in the buffer are not modified." (User-Agent (message-make-user-agent)) (Expires (message-make-expires)) (case-fold-search t) + (optionalp nil) header value elem) ;; First we remove any old generated headers. (let ((headers message-deletable-headers)) @@ -5215,7 +5216,8 @@ Headers already prepared in the buffer are not modified." (setq elem (pop headers)) (if (consp elem) (if (eq (car elem) 'optional) - (setq header (cdr elem)) + (setq header (cdr elem) + optionalp t) (setq header (car elem))) (setq header elem)) (when (or (not (re-search-forward @@ -5231,7 +5233,7 @@ Headers already prepared in the buffer are not modified." ;; The header was found. We insert a space after the ;; colon, if there is none. (if (/= (char-after) ? ) (insert " ") (forward-char 1)) - ;; Find out whether the header is empty... + ;; Find out whether the header is empty. (looking-at "[ \t]*\n[^ \t]"))) ;; So we find out what value we should insert. (setq value @@ -5288,9 +5290,12 @@ Headers already prepared in the buffer are not modified." ;; The value of this header was empty, so we clear ;; totally and insert the new value. (delete-region (point) (gnus-point-at-eol)) - (insert value) - (when (bolp) - (delete-char -1))) + ;; If the header is optional, and the header was + ;; empty, we can't insert it anyway. + (unless optionalp + (insert value) + (when (bolp) + (delete-char -1)))) ;; Add the deletable property to the headers that require it. (and (memq header message-deletable-headers) (progn (beginning-of-line) (looking-at "[^:]+: ")) diff --git a/lisp/spam.el b/lisp/spam.el index 475f579..e0a463b 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -522,10 +522,11 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (if (not (eobp)) (setq category (buffer-substring (point) (spam-point-at-eol)))) (when (not (zerop (length category))) ; we need a category here - (unless spam-ifile-all-categories + (if spam-ifile-all-categories + (setq return category) + ;; else, if spam-ifile-all-categories is not set... (when (string-equal spam-ifile-spam-category category) - (setq return spam-split-group)) - (setq return category))))) ; always accept the ifile category + (setq return spam-split-group)))))) ; always accept the ifile category return)) (defun spam-ifile-register-with-ifile (article-string category) diff --git a/texi/ChangeLog b/texi/ChangeLog index 9337a23..032d883 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2003-01-08 Lars Magne Ingebrigtsen + + * gnus.texi (Optional Back End Functions): Addition. + (Positioning Point): Changed to %~. + 2003-01-08 Simon Josefsson * gnus.texi (MIME Commands): Add. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index ecfd7e7..251bab4 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -19207,8 +19207,8 @@ gnus $B$ODL>o$[$H$s$I$N%P%C%U%!$G!"%]%$%s%H$r3F9T$N$"$i$+$8$a7h$a$i$l$?>l(B $B$-$^$9!#$=$N4X?t$O(B @code{gnus-goto-colon} $B$H8F$P$l$F$$$^$9!#(B $B$G$b!"$b$7$"$J$?$,9T$K%3%m%s$r4^$a$?$/$J$$$J$i$P!"$3$l$r07$&$?$a$N$*$=$i(B -$B$/:G$b$,(B @code{car} $B$G!"$=$N5-;v$N0\F0@h$N5-;vHV9f$,(B @code{cdr} $B$G$"$k(B cons $B%;%k$rJV$7$^$9!#(B +$B$=$N%0%k!<%W$O!"%P%C%/%(%s%I$,$=$N%0%k!<%W$X$N5-;v$N<}G<$rMW5a$9$kA0$KB8(B +$B:_$7$J$1$l$^$J$j$^$;$s!#(B + $BJV$5$l$k7k2L$N%G!<%?$O$"$j$^$;$s!#(B @item (nnchoke-request-accept-article GROUP &optional SERVER LAST) diff --git a/texi/gnus.texi b/texi/gnus.texi index eddacf0..f607b0d 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -19617,8 +19617,8 @@ You can redefine the function that moves the point to the colon. The function is called @code{gnus-goto-colon}. But perhaps the most convenient way to deal with this, if you don't want -to have a colon in your line, is to use the @samp{%C} specifier. If you -put a @samp{%C} somewhere in your format line definition, Gnus will +to have a colon in your line, is to use the @samp{%~} specifier. If you +put a @samp{%~} somewhere in your format line definition, Gnus will place point there. @@ -24818,6 +24818,9 @@ optimizations. The function should return a cons where the @code{car} is the group name and the @code{cdr} is the article number that the article was entered as. +The group should exist before the backend is asked to accept the +article for that group. + There should be no data returned. -- 1.7.10.4