From: morioka Date: Fri, 26 Jun 1998 17:30:44 +0000 (+0000) Subject: Sync up with gnus-5_6_16. X-Git-Tag: gnus-6_7_4~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5284980642c4d005cc2d2c795b6aeec28155317a;p=elisp%2Fgnus.git- Sync up with gnus-5_6_16. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7da8130..902f8d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,64 @@ +Fri Jun 26 15:46:05 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.16 is released. + +Fri Jun 26 15:36:25 1998 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-delete-assq): Removed. + (gnus-delete-assoc): Ditto. + + * gnus.el: Use throughout. + + * gnus-util.el (gnus-pull): New macro. + +1998-06-26 Simon Josefsson + + * gnus-sum.el (gnus-get-newsgroup-headers): parse Chars: headers + +Fri Jun 26 13:45:24 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-update-marks): Use it. + + * gnus-util.el (gnus-delete-alist): New function. + + * gnus-sum.el (gnus-update-marks): Don't save list of cached + articles. + + * message.el (message-mode-menu): Include kill-buffer. + + * nnmail.el (nnmail-purge-split-history): Use it. + + * gnus-util.el (gnus-delete-if): New function. + + * nnmail.el (nnmail-article-group): Use gnus-remove-duplicates. + +Fri Jun 26 13:45:09 1998 Richard Stallman + + * gnus-util.el (gnus-remove-duplicates): New function. + +Fri Jun 26 13:30:42 1998 Kevin Christian + + * gnus-score.el (gnus-score-string): Do updating of scores after + fuzzies. + +Fri Jun 26 07:26:03 1998 Lars Magne Ingebrigtsen + + * message.el (message-mode): Don't do the intern dance. + +Fri Jun 26 07:13:49 1998 Richard Stallman + + * message.el (message-mode): Adaptive fill changes. + +Fri Jun 26 04:29:44 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-mode-line-format-alist): Allow article + score. + + * gnus-score.el (gnus-score-load-file): Would ignore all score + files without un-advanced rules. + + * gnus-ems.el ((fboundp 'split-string)): Use it where it exists. + Fri Jun 26 04:23:12 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.15 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 11c72f7..7b64fdf 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -3060,14 +3060,6 @@ specified by `gnus-button-alist'." (match-string 3 address) "nntp"))))))) -(defun gnus-split-string (string pattern) - "Return a list of substrings of STRING which are separated by PATTERN." - (let (parts (start 0)) - (while (string-match pattern string start) - (setq parts (cons (substring string start (match-beginning 0)) parts) - start (match-end 0))) - (nreverse (cons (substring string start) parts)))) - (defun gnus-url-parse-query-string (query &optional downcase) (let (retval pairs cur key val) (setq pairs (gnus-split-string query "&")) diff --git a/lisp/gnus-demon.el b/lisp/gnus-demon.el index 594bc9f..1f33930 100644 --- a/lisp/gnus-demon.el +++ b/lisp/gnus-demon.el @@ -97,9 +97,7 @@ time Emacs has been idle for IDLE `gnus-demon-timestep's." (defun gnus-demon-remove-handler (function &optional no-init) "Remove the handler FUNCTION from the list of handlers." - (setq gnus-demon-handlers - (delq (assq function gnus-demon-handlers) - gnus-demon-handlers)) + (gnus-pull function gnus-demon-handlers) (unless no-init (gnus-demon-init))) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 24b240a..7328093 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -315,6 +315,16 @@ (goto-char (point-min)) (sit-for 0)))))) +(if (fboundp 'split-string) + (fset 'gnus-split-string 'split-string) + (defun gnus-split-string (string pattern) + "Return a list of substrings of STRING which are separated by PATTERN." + (let (parts (start 0)) + (while (string-match pattern string start) + (setq parts (cons (substring string start (match-beginning 0)) parts) + start (match-end 0))) + (nreverse (cons (substring string start) parts))))) + (provide 'gnus-ems) ;; Local Variables: diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index d4bfd54..a92c5ff 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -3333,7 +3333,7 @@ and the second element is the address." (if force (if (null articles) (setcar (nthcdr 3 info) - (delq (assq type (car marked)) (car marked))) + (gnus-delete-alist type (car marked))) (setcdr m (gnus-compress-sequence articles t))) (setcdr m (gnus-compress-sequence (sort (nconc (gnus-uncompress-range (cdr m)) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 08bf0f0..4d81005 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1089,9 +1089,13 @@ SCORE is the score to add." found) (while a ;; Downcase all header names. - (when (stringp (caar a)) + (cond + ((stringp (caar a)) (setcar (car a) (downcase (caar a))) (setq found t)) + ;; Advanced scoring. + ((consp (caar a)) + (setq found t))) (pop a)) ;; If there are actual scores in the alist, we add it to the ;; return value of this function. @@ -1307,7 +1311,7 @@ SCORE is the score to add." (and (file-exists-p file) (not (file-writable-p file)))) () - (setq score (setcdr entry (delq (assq 'touched score) score))) + (setq score (setcdr entry (gnus-delete-alist 'touched score))) (erase-buffer) (let (emacs-lisp-mode-hook) (if (string-match @@ -1861,7 +1865,7 @@ SCORE is the score to add." (while (setq art (pop articles)) (setq this (aref (car art) gnus-score-index)) (if simplify - (setq this (gnus-map-function gnus-simplify-subject-functions this))) + (setq this (gnus-map-function gnus-simplify-subject-functions this))) (if (equal last this) ;; O(N*H) cons-cells used here, where H is the number of ;; headers. @@ -1894,7 +1898,7 @@ SCORE is the score to add." (mt (aref (symbol-name type) 0)) (case-fold-search (not (memq mt '(?R ?S ?E ?F)))) (dmt (downcase mt)) - ; Assume user already simplified regexp and fuzzies + ; Assume user already simplified regexp and fuzzies (match (if (and simplify (not (memq dmt '(?f ?r)))) (gnus-map-function gnus-simplify-subject-functions @@ -1908,10 +1912,12 @@ SCORE is the score to add." (cond ;; Fuzzy matches. We save these for later. ((= dmt ?f) - (push (cons entries alist) fuzzies)) + (push (cons entries alist) fuzzies) + (setq entries (cdr entries))) ;; Word matches. Save these for even later. ((= dmt ?w) - (push (cons entries alist) words)) + (push (cons entries alist) words) + (setq entries (cdr entries))) ;; Exact matches. ((= dmt ?e) ;; Do exact matching. @@ -1936,7 +1942,26 @@ SCORE is the score to add." gnus-score-trace)) (while (setq art (pop arts)) (setcdr art (+ score (cdr art))))))) - (forward-line 1))) + (forward-line 1)) + ;; Update expiry date + (if trace + (setq entries (cdr entries)) + (cond + ;; Permanent entry. + ((null date) + (setq entries (cdr entries))) + ;; We have a match, so we update the date. + ((and found gnus-update-score-entry-dates) + (gnus-score-set 'touched '(t) alist) + (setcar (nthcdr 2 kill) now) + (setq entries (cdr entries))) + ;; This entry has expired, so we remove it. + ((and expire (< date expire)) + (gnus-score-set 'touched '(t) alist) + (setcdr entries (cddr entries))) + ;; No match; go to next entry. + (t + (setq entries (cdr entries)))))) ;; Regexp and substring matching. (t (goto-char (point-min)) @@ -1955,26 +1980,26 @@ SCORE is the score to add." gnus-score-trace)) (while (setq art (pop arts)) (setcdr art (+ score (cdr art))))) - (forward-line 1)))) - ;; Update expiry date - (if trace - (setq entries (cdr entries)) - (cond - ;; Permanent entry. - ((null date) - (setq entries (cdr entries))) - ;; We have a match, so we update the date. - ((and found gnus-update-score-entry-dates) - (gnus-score-set 'touched '(t) alist) - (setcar (nthcdr 2 kill) now) - (setq entries (cdr entries))) - ;; This entry has expired, so we remove it. - ((and expire (< date expire)) - (gnus-score-set 'touched '(t) alist) - (setcdr entries (cddr entries))) - ;; No match; go to next entry. - (t - (setq entries (cdr entries)))))))) + (forward-line 1)) + ;; Update expiry date + (if trace + (setq entries (cdr entries)) + (cond + ;; Permanent entry. + ((null date) + (setq entries (cdr entries))) + ;; We have a match, so we update the date. + ((and found gnus-update-score-entry-dates) + (gnus-score-set 'touched '(t) alist) + (setcar (nthcdr 2 kill) now) + (setq entries (cdr entries))) + ;; This entry has expired, so we remove it. + ((and expire (< date expire)) + (gnus-score-set 'touched '(t) alist) + (setcdr entries (cddr entries))) + ;; No match; go to next entry. + (t + (setq entries (cdr entries)))))))))) ;; Find fuzzy matches. (when fuzzies @@ -2006,18 +2031,19 @@ SCORE is the score to add." (setcdr art (+ score (cdr art)))))) (forward-line 1)) ;; Update expiry date - (cond - ;; Permanent. - ((null date) - ) - ;; Match, update date. - ((and found gnus-update-score-entry-dates) - (gnus-score-set 'touched '(t) (cdar fuzzies)) - (setcar (nthcdr 2 kill) now)) - ;; Old entry, remove. - ((and expire (< date expire)) - (gnus-score-set 'touched '(t) (cdar fuzzies)) - (setcdr (caar fuzzies) (cddaar fuzzies)))) + (if (not trace) + (cond + ;; Permanent. + ((null date) + ) + ;; Match, update date. + ((and found gnus-update-score-entry-dates) + (gnus-score-set 'touched '(t) (cdar fuzzies)) + (setcar (nthcdr 2 kill) now)) + ;; Old entry, remove. + ((and expire (< date expire)) + (gnus-score-set 'touched '(t) (cdar fuzzies)) + (setcdr (caar fuzzies) (cddaar fuzzies))))) (setq fuzzies (cdr fuzzies))))) (when words @@ -2043,18 +2069,19 @@ SCORE is the score to add." (while (setq art (pop arts)) (setcdr art (+ score (cdr art)))))) ;; Update expiry date - (cond - ;; Permanent. - ((null date) - ) - ;; Match, update date. - ((and found gnus-update-score-entry-dates) - (gnus-score-set 'touched '(t) (cdar words)) - (setcar (nthcdr 2 kill) now)) - ;; Old entry, remove. - ((and expire (< date expire)) - (gnus-score-set 'touched '(t) (cdar words)) - (setcdr (caar words) (cddaar words)))) + (if (not trace) + (cond + ;; Permanent. + ((null date) + ) + ;; Match, update date. + ((and found gnus-update-score-entry-dates) + (gnus-score-set 'touched '(t) (cdar words)) + (setcar (nthcdr 2 kill) now)) + ;; Old entry, remove. + ((and expire (< date expire)) + (gnus-score-set 'touched '(t) (cdar words)) + (setcdr (caar words) (cddaar words))))) (setq words (cdr words)))))) nil)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c64afeb..7e1cd53 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -513,6 +513,7 @@ with some simple extensions: %G Group name %p Unprefixed group name %A Current article number +%z Current article score %V Gnus version %U Number of unread articles in the group %e Number of unselected articles in the group @@ -874,6 +875,7 @@ variable (string, integer, character, etc).") (?d (length gnus-newsgroup-dormant) ?d) (?t (length gnus-newsgroup-marked) ?d) (?r (length gnus-newsgroup-reads) ?d) + (?z (gnus-summary-article-score gnus-tmp-article-number) ?d) (?E gnus-newsgroup-expunged-tally ?d) (?s (gnus-current-score-file-nondirectory) ?s))) @@ -4086,7 +4088,8 @@ If READ-ALL is non-nil, all articles in the group are selected." (defun gnus-update-marks () "Enter the various lists of marked articles into the newsgroup info list." - (let ((types gnus-article-mark-lists) + (let ((types (gnus-delete-alist 'cached + (copy-sequence gnus-article-mark-lists))) (info (gnus-get-info gnus-newsgroup-name)) (uncompressed '(score bookmark killed)) type list newmarked symbol) @@ -4359,7 +4362,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." (subst-char-in-region (point-min) (point-max) ?\t ? t) (gnus-run-hooks 'gnus-parse-headers-hook) (let ((case-fold-search t) - in-reply-to header p lines) + in-reply-to header p lines chars) (goto-char (point-min)) ;; Search to the beginning of the next header. Error messages ;; do not begin with 2 or 3. @@ -4448,7 +4451,12 @@ The resulting hash table is returned, or nil if no Xrefs were found." (setq ref ref2)))) (setq ref nil)))) ;; Chars. - 0 + (progn + (goto-char p) + (if (search-forward "\nchars: " nil t) + (if (numberp (setq chars (ignore-errors (read cur)))) + chars 0) + 0)) ;; Lines. (progn (goto-char p) @@ -7645,9 +7653,7 @@ returned." (push article gnus-newsgroup-dormant)) (t (push article gnus-newsgroup-unreads))) - (setq gnus-newsgroup-reads - (delq (assq article gnus-newsgroup-reads) - gnus-newsgroup-reads)) + (gnus-pull article gnus-newsgroup-reads) ;; See whether the article is to be put in the cache. (and gnus-use-cache @@ -7788,9 +7794,7 @@ marked." (push article gnus-newsgroup-dormant)) (t (push article gnus-newsgroup-unreads))) - (setq gnus-newsgroup-reads - (delq (assq article gnus-newsgroup-reads) - gnus-newsgroup-reads)) + (gnus-pull article gnus-newsgroup-reads) t))) (defalias 'gnus-summary-mark-as-unread-forward diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 15e036b..20961be 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -348,7 +348,7 @@ If TOPIC, start with that topic." (when (atom param) (setq param (cons param t))) ;; Override any old versions of this param. - (setq out (delq (assq (car param) out) out)) + (gnus-pull (car param) out) (push param out))) ;; Return the resulting parameter list. out)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 1665191..126aefd 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -603,14 +603,6 @@ Bind `print-quoted' and `print-readably' to t while printing." ;; Write the buffer. (write-region (point-min) (point-max) file nil 'quietly)) -(defmacro gnus-delete-assq (key list) - `(let ((listval (eval ,list))) - (setq ,list (delq (assq ,key listval) listval)))) - -(defmacro gnus-delete-assoc (key list) - `(let ((listval ,list)) - (setq ,list (delq (assoc ,key listval) listval)))) - (defun gnus-delete-file (file) "Delete FILE if it exists." (when (file-exists-p file) @@ -933,6 +925,35 @@ ARG is passed to the first function." (set-buffer gnus-group-buffer) (eq major-mode 'gnus-group-mode)))) +(defun gnus-remove-duplicates (list) + (let (new (tail list)) + (while tail + (or (member (car tail) new) + (setq new (cons (car tail) new))) + (setq tail (cdr tail))) + (nreverse new))) + +(defun gnus-delete-if (predicate list) + "Delete elements from LIST that satisfy PREDICATE." + (let (out) + (while list + (when (funcall predicate (car list)) + (push (car list) out)) + (pop list)) + (nreverse out))) + +(defun gnus-delete-alist (key alist) + "Delete all entries in ALIST that have a key eq to KEY." + (let (entry) + (while (setq entry (assq key alist)) + (setq alist (delq entry alist))) + alist)) + +(defmacro gnus-pull (key alist) + "Modify ALIST to be without KEY." + (unless (symbolp alist) + (error "Not a symbol: %s" alist)) + `(setq ,alist (delq (assq ,key ,alist) ,alist))) (provide 'gnus-util) diff --git a/lisp/gnus.el b/lisp/gnus.el index 64a39fe..5fecd6b 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -250,11 +250,11 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "6.7.3" +(defconst gnus-version-number "6.7.4" "Version number for this version of gnus.") (defconst gnus-version - (format "Semi-gnus %s (based on Gnus 5.6.15; for SEMI 1.8)" + (format "Semi-gnus %s (based on Gnus 5.6.16; for SEMI 1.8)" gnus-version-number) "Version string for this version of gnus.") @@ -2462,7 +2462,7 @@ also examines the topic parameters." (when params (setq params (delq name params)) (while (assq name params) - (setq params (delq (assq name params) params))) + (gnus-pull name params)) (gnus-info-set-params info params)))))) (defun gnus-group-add-score (group &optional score) diff --git a/lisp/lpath.el b/lisp/lpath.el index b4b458c..c8ee274 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -35,7 +35,7 @@ make-char-table set-char-table-range font-create-object x-color-values widget-make-intangible error-message-string w3-form-encode-xwfu gnus-mule-get-coding-system - decode-coding-string)) + decode-coding-string mail-aliases-setup)) (maybe-bind '(global-face-data mark-active transient-mark-mode mouse-selection-click-count mouse-selection-click-count-buffer buffer-display-table @@ -58,7 +58,8 @@ set-glyph-property event-glyph glyph-property event-point device-on-window-system-p make-gui-button Info-goto-node pp-to-string color-name - gnus-mule-get-coding-system decode-coding-string))) + gnus-mule-get-coding-system decode-coding-string + mail-aliases-setup))) (setq load-path (cons "." load-path)) (require 'custom) diff --git a/lisp/message.el b/lisp/message.el index 2b63157..d81eee8 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1241,7 +1241,8 @@ Return the number of headers removed." ["Spellcheck" ispell-message t] "----" ["Send Message" message-send-and-exit t] - ["Abort Message" message-dont-send t])) + ["Abort Message" message-dont-send t] + ["Kill Message" message-kill-buffer t])) (easy-menu-define message-mode-field-menu message-mode-map "" @@ -1314,19 +1315,18 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." facemenu-remove-face-function t) (make-local-variable 'paragraph-separate) (make-local-variable 'paragraph-start) + ;; `-- ' precedes the signature. `-----' appears at the start of the + ;; lines that delimit forwarded messages. + ;; Lines containing just >= 3 dashes, perhaps after whitespace, + ;; are also sometimes used and should be separators. (setq paragraph-start (concat (regexp-quote mail-header-separator) - "$\\|[ \t]*[-_][-_][-_]+$\\|" - "-- $\\|" + "$\\|[ \t]*[a-z0-9A-Z]*>+[ \t]*$\\|[ \t]*$\\|" + "-- $\\|---+$\\|" + page-delimiter ;;!!! Uhm... shurely this can't be right? - "[> " (regexp-quote message-yank-prefix) "]+$\\|" - paragraph-start)) - (setq paragraph-separate - (concat (regexp-quote mail-header-separator) - "$\\|[ \t]*[-_][-_][-_]+$\\|" - "-- $\\|" - "[> " (regexp-quote message-yank-prefix) "]+$\\|" - paragraph-separate)) + "[> " (regexp-quote message-yank-prefix) "]+$\\|")) + (setq paragraph-separate paragraph-start) (make-local-variable 'message-reply-headers) (setq message-reply-headers nil) (make-local-variable 'message-newsreader) @@ -1346,7 +1346,7 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (when (eq message-mail-alias-type 'abbrev) (if (fboundp 'mail-abbrevs-setup) (mail-abbrevs-setup) - (funcall (intern "mail-aliases-setup")))) + (mail-aliases-setup))) (message-set-auto-save-file-name) (unless (string-match "XEmacs" emacs-version) (set (make-local-variable 'font-lock-defaults) diff --git a/lisp/nndoc.el b/lisp/nndoc.el index 96b45d5..0092ac0 100644 --- a/lisp/nndoc.el +++ b/lisp/nndoc.el @@ -616,9 +616,7 @@ as the last checked definition, if t or `first', add as the first definition, and if any other symbol, add after that symbol in the alist." ;; First remove any old instances. - (setq nndoc-type-alist - (delq (assq (car definition) nndoc-type-alist) - nndoc-type-alist)) + (gnus-pull (car definition) nndoc-type-alist) ;; Then enter the new definition in the proper place. (cond ((or (null position) (eq position 'last)) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5ae4d74..e761868 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -25,7 +25,7 @@ ;;; Code: -(require 'cl) +(eval-when-compile (require 'cl)) (require 'nnheader) (require 'timezone) @@ -1096,7 +1096,7 @@ FUNC will be called with the group name to determine the article number." "Error in `nnmail-split-methods'; using `bogus' mail group") (sit-for 1) '("bogus"))))) - (setq split (remove-duplicates split :test 'equal)) + (setq split (gnus-remove-duplicates split)) ;; The article may be "cross-posted" to `junk'. What ;; to do? Just remove the `junk' spec. Don't really ;; see anything else to do... @@ -1758,8 +1758,8 @@ If ARGS, PROMPT is used as an argument to `format'." (let ((history nnmail-split-history) prev) (while history - (setcar history (delete-if (lambda (e) (string= (car e) group)) - (car history))) + (setcar history (gnus-delete-if (lambda (e) (string= (car e) group)) + (car history))) (pop history)) (setq nnmail-split-history (delq nil nnmail-split-history)))) diff --git a/lisp/nnweb.el b/lisp/nnweb.el index 9c4251d..321508c 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -206,7 +206,7 @@ (deffoo nnweb-request-delete-group (group &optional force server) (nnweb-possibly-change-server group server) - (gnus-delete-assoc group nnweb-group-alist) + (gnus-pull group nnweb-group-alist) (gnus-delete-file (nnweb-overview-file group)) t) diff --git a/texi/message.texi b/texi/message.texi index 069ee96..a6d998a 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.15 Manual +@settitle Message 5.6.16 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 5.6.15 Manual +@title Message 5.6.16 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Message 5.6.15. Message is distributed with +This manual corresponds to Message 5.6.16. Message is distributed with the Gnus distribution bearing the same version number as this manual has.