From 6565967e150bf77c301b9a10dc5d3db3fa7dc385 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 5 Mar 1997 00:15:42 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 66 ++++++++++++++++++++++++++++++++++++++++++++++ lisp/article.el | 7 ++--- lisp/gnus-art.el | 3 ++- lisp/gnus-async.el | 8 +++--- lisp/gnus-msg.el | 10 ++++--- lisp/gnus-score.el | 27 ++++++++++--------- lisp/gnus-sum.el | 9 ++++--- lisp/gnus-topic.el | 4 ++- lisp/gnus.el | 2 +- lisp/nnheader.el | 38 +++++++++++++++++++++++--- lisp/nnmail.el | 6 ++++- lisp/nntp.el | 14 +++++----- lisp/nnweb.el | 4 +-- texi/ChangeLog | 4 +++ texi/gnus.texi | 10 +++++-- 15 files changed, 168 insertions(+), 44 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b859ec772..b966d5b72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,69 @@ +Sun Nov 10 06:31:36 1996 Lars Magne Ingebrigtsen + + * gnus.el: Red Gnus v0.59 is released. + +Sun Nov 10 06:09:37 1996 Lars Magne Ingebrigtsen + + * nntp.el (nntp-decode-text): Erased everything. + + * article.el (article-remove-trailing-blank-lines): Would + infloop. + +Sun Nov 10 06:06:31 1996 Lars Magne Ingebrigtsen + + * gnus.el: Red Gnus v0.58 is released. + +Sun Nov 10 06:02:51 1996 Alexandre Oliva + + * nntp.el (nntp-possibly-change-group): Bind callback function to + nil. + +Sun Nov 10 05:35:25 1996 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-remove-topic): Remove from alist. + + * gnus-score.el (gnus-score-string): Didn't trace fuzzies and + words. + +Sat Nov 9 18:14:42 1996 Lars Magne Ingebrigtsen + + * nnweb.el (nnweb-set-hashtb): Typo. + (nnweb-read-overview): Typo. + + * nnheader.el (nnheader-skeleton-replace): New macro. + (nnheader-replace-string): Use it. + (nnheader-replace-regexp): Use it. + (nnheader-strip-cr): Use it. + + * nntp.el (nntp-retrieve-headers): Be faster. + (nntp-decode-text): Use faster algorithm. + + * nnheader.el (nnheader-replace-string): New function. + +Sat Nov 9 17:22:16 1996 Hrvoje Niksic + + * article.el (gnus-emphasis-alist): Doc fix. + +Sat Nov 9 16:27:27 1996 Per Abrahamsen + + * nnmail.el (nnmail-split-it): Fix bug in abbrev handling. + +Sat Nov 9 05:59:02 1996 Lars Magne Ingebrigtsen + + * nnweb.el (nnweb-set-hashtb): Typo. + + * article.el (gnus-emphasis-alist): One ' too many. + + * gnus-async.el (gnus-async-prefetch-article): Only message when + in the summary buffer. + + * gnus-msg.el (gnus-post-news): Handle `newsgroup' param. + (gnus-debug): Be `defcustom' aware. + +Sat Nov 9 05:41:27 1996 Lars Magne Ingebrigtsen + + * gnus.el: Red Gnus v0.57 is released. + Fri Nov 8 22:56:59 1996 Per Abrahamsen * gnus.el: Added customize support. diff --git a/lisp/article.el b/lisp/article.el index b6dee0016..d2f1b511d 100644 --- a/lisp/article.el +++ b/lisp/article.el @@ -130,7 +130,7 @@ asynchronously. The compressed face will be piped to this command." ("\\*/" "/\\*" bold-italic) ("_\\*/" "/\\*_" underline-bold-italic)))) `(("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" - 2 3 'gnus-emphasis-underline) + 2 3 gnus-emphasis-underline) ,@(mapcar (lambda (spec) (list @@ -140,7 +140,7 @@ asynchronously. The compressed face will be piped to this command." "Alist that says how to fontify certain phrases. Each item looks like this: - (\"_\\\\([[\\w+\\\\)_\" 0 1 'underline) + (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline) The first element is a regular expression to be matched. The second is a number that says what regular expression grouping used to find @@ -456,7 +456,8 @@ always hide." (delete-region (point) (progn - (while (looking-at "^[ \t]*$") + (while (and (not (bobp)) + (looking-at "^[ \t]*$")) (forward-line -1)) (forward-line 1) (point)))))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 866860dec..7acd3b951 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -675,9 +675,10 @@ If variable `gnus-use-long-file-name' is non-nil, it is ["Remove carriage return" gnus-article-remove-cr t] ["Remove quoted-unreadable" gnus-article-de-quoted-unreadable t])) + (when nil (define-key gnus-article-mode-map (vector 'menu-bar (car gnus-summary-article-menu)) - gnus-summary-article-menu) + gnus-summary-article-menu)) (run-hooks 'gnus-article-menu-hook))) diff --git a/lisp/gnus-async.el b/lisp/gnus-async.el index 88ae8fda4..ed6f47101 100644 --- a/lisp/gnus-async.el +++ b/lisp/gnus-async.el @@ -151,7 +151,8 @@ It should return non-nil if the article is to be prefetched." (when next (gnus-async-with-semaphore (pop gnus-async-fetch-list))) - (let ((do-fetch next)) + (let ((do-fetch next) + (do-message t)) ;(eq major-mode 'gnus-summary-mode))) (when (and (gnus-group-asynchronous-p group) (gnus-buffer-live-p summary) (or (not next) @@ -194,8 +195,9 @@ It should return non-nil if the article is to be prefetched." group article mark summary next)) (nntp-server-buffer (get-buffer gnus-async-prefetch-article-buffer))) - (gnus-message 7 "Prefetching article %d in group %s" - article group) + (when do-message + (gnus-message 7 "Prefetching article %d in group %s" + article group)) (gnus-request-article article group)))))))))) (defun gnus-make-async-article-function (group article mark summary next) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index c16d59f13..c3cabbd74 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -358,16 +358,19 @@ header line with the old Message-ID." (t 'message)) (let* ((group (or group gnus-newsgroup-name)) (pgroup group) - to-address to-group mailing-list to-list) + to-address to-group mailing-list to-list + newsgroup-p) (when group (setq to-address (gnus-group-find-parameter group 'to-address) to-group (gnus-group-find-parameter group 'to-group) to-list (gnus-group-find-parameter group 'to-list) + newsgroup-p (gnus-group-find-parameter group 'newsgroup) mailing-list (when gnus-mailing-list-groups (string-match gnus-mailing-list-groups group)) group (gnus-group-real-name group))) (if (or (and to-group (gnus-news-group-p to-group)) + newsgroup-p force-news (and (gnus-news-group-p (or pgroup gnus-newsgroup-name) @@ -380,7 +383,7 @@ header line with the old Message-ID." (if post (message-news (or to-group group)) (set-buffer gnus-article-copy) - (message-followup (if force-news nil to-group))) + (message-followup (if (or newsgroup-p force-news) nil to-group))) ;; The is mail. (if post (progn @@ -798,7 +801,8 @@ The source file has to be in the Emacs load path." (goto-char (point-min)) (while (setq expr (ignore-errors (read (current-buffer)))) (ignore-errors - (and (eq (car expr) 'defvar) + (and (or (eq (car expr) 'defvar) + (eq (car expr) 'defcustom)) (stringp (nth 3 expr)) (or (not (boundp (nth 1 expr))) (not (equal (eval (nth 2 expr)) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index f4f439af9..d2d301244 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1858,10 +1858,10 @@ SCORE is the score to add." (cond ;; Fuzzy matches. We save these for later. ((= dmt ?f) - (push entries fuzzies)) + (push (cons entries alist) fuzzies)) ;; Word matches. Save these for even later. ((= dmt ?w) - (push entries words)) + (push (cons entries alist) words)) ;; Exact matches. ((= dmt ?e) ;; Do exact matching. @@ -1930,7 +1930,7 @@ SCORE is the score to add." (when fuzzies ;; Simplify the entire buffer for easy matching. (gnus-simplify-buffer-fuzzy) - (while (setq kill (cadar fuzzies)) + (while (setq kill (cadaar fuzzies)) (let* ((match (nth 0 kill)) (type (nth 3 kill)) (score (or (nth 1 kill) gnus-score-interactive-default-score)) @@ -1948,7 +1948,8 @@ SCORE is the score to add." (while (setq art (pop arts)) (setcdr art (+ score (cdr art))) (push (cons - (car-safe (rassq alist gnus-score-cache)) kill) + (car-safe (rassq (cdar fuzzies) gnus-score-cache)) + kill) gnus-score-trace)) ;; Found a match, update scores. (while (setq art (pop arts)) @@ -1961,12 +1962,12 @@ SCORE is the score to add." ) ;; Match, update date. ((and found gnus-update-score-entry-dates) - (gnus-score-set 'touched '(t) alist) + (gnus-score-set 'touched '(t) (cdar fuzzies)) (setcar (nthcdr 2 kill) now)) ;; Old entry, remove. ((and expire (< date expire)) - (gnus-score-set 'touched '(t) alist) - (setcdr (car fuzzies) (cddar fuzzies)))) + (gnus-score-set 'touched '(t) (cdar fuzzies)) + (setcdr (caar fuzzies) (cddaar fuzzies)))) (setq fuzzies (cdr fuzzies))))) (when words @@ -1974,7 +1975,7 @@ SCORE is the score to add." (let ((hashtb (gnus-make-hashtable (* 10 (count-lines (point-min) (point-max)))))) (gnus-enter-score-words-into-hashtb hashtb) - (while (setq kill (cadar words)) + (while (setq kill (cadaar words)) (let* ((score (or (nth 1 kill) gnus-score-interactive-default-score)) (date (nth 2 kill)) found) @@ -1984,7 +1985,9 @@ SCORE is the score to add." (if trace (while (setq art (pop arts)) (setcdr art (+ score (cdr art))) - (push (cons (car-safe (rassq alist gnus-score-cache)) kill) + (push (cons + (car-safe (rassq (cdar words) gnus-score-cache)) + kill) gnus-score-trace)) ;; Found a match, update scores. (while (setq art (pop arts)) @@ -1996,12 +1999,12 @@ SCORE is the score to add." ) ;; Match, update date. ((and found gnus-update-score-entry-dates) - (gnus-score-set 'touched '(t) alist) + (gnus-score-set 'touched '(t) (cdar words)) (setcar (nthcdr 2 kill) now)) ;; Old entry, remove. ((and expire (< date expire)) - (gnus-score-set 'touched '(t) alist) - (setcdr (car words) (cddar words)))) + (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 7443ee839..2bc9ef98a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -150,9 +150,10 @@ This variable will only be used if the value of :type 'string) (defcustom gnus-summary-goto-unread t - "*If non-nil, marking commands will go to the next unread article. -If `never', \\\\[gnus-summary-next-page] will go to the next article, -whether it is read or not." + "*If t, marking commands will go to the next unread article. +If `never', commands that usually go to the next unread article, will +go to the next article, whether it is read or not. +If nil, only the marking commands will go to the next (un)read article." :group 'gnus-summary :type '(choice (const :tag "off" nil) (const never) @@ -1771,7 +1772,7 @@ increase the score of each group you read." ["Uuencode and post" gnus-uu-post-news t] ["Followup via news" gnus-summary-followup-to-mail t] ["Followup via news and yank" - gnus-summary-followup-with-original-to-mail t] + gnus-summary-followup-to-mail-with-original t] ;;("Draft" ;;["Send" gnus-summary-send-draft t] ;;["Send bounced" gnus-resend-bounced-mail t]) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index f0e7e3306..cf4f601e5 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -446,7 +446,9 @@ articles in the topic and its subtopics." (list (if insert 'visible 'invisible) (if hide 'hide nil) (cadddr data)))) - (unless total-remove + (if total-remove + (setq gnus-topic-alist + (delq (assoc topic gnus-topic-alist) gnus-topic-alist)) (gnus-topic-insert-topic topic in-level))))) (defun gnus-topic-insert-topic (topic &optional level) diff --git a/lisp/gnus.el b/lisp/gnus.el index 98cf0149d..a43bcd193 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -42,7 +42,7 @@ "Score and kill file handling." :group 'gnus ) -(defconst gnus-version-number "0.57" +(defconst gnus-version-number "0.60" "Version number for this version of Gnus.") (defconst gnus-version (format "Red Gnus v%s" gnus-version-number) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 6a9198e74..a51e80bc3 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -568,9 +568,7 @@ If FILE is t, return the buffer contents as a string." (defun nnheader-fold-continuation-lines () "Fold continuation lines in the current buffer." - (goto-char (point-min)) - (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) - (replace-match " " t t))) + (nnheader-replace-regexp "\\(\r?\n[ \t]+\\)+" " ")) (defun nnheader-translate-file-chars (file) (if (null nnheader-file-name-translation-alist) @@ -758,6 +756,40 @@ find-file-hooks, etc. (pop files)) (nreverse out))) +(defmacro nnheader-skeleton-replace (from &optional to regexp) + `(let ((new (generate-new-buffer " *nnheader replace*")) + (cur (current-buffer)) + (start (point-min))) + (set-buffer new) + (buffer-disable-undo (current-buffer)) + (set-buffer cur) + (goto-char (point-min)) + (while (,(if regexp 're-search-forward 'search-forward) + ,from nil t) + (insert-buffer-substring + cur start (prog1 (match-beginning 0) (set-buffer new))) + (goto-char (point-max)) + ,(when to `(insert ,to)) + (set-buffer cur) + (setq start (point))) + (insert-buffer-substring + cur start (prog1 (point-max) (set-buffer new))) + (copy-to-buffer cur (point-min) (point-max)) + (kill-buffer (current-buffer)) + (set-buffer cur))) + +(defun nnheader-replace-string (from to) + "Do a fast replacement of FROM to TO from point to point-max." + (nnheader-skeleton-replace from to)) + +(defun nnheader-replace-regexp (from to) + "Do a fast regexp replacement of FROM to TO from point to point-max." + (nnheader-skeleton-replace from to t)) + +(defun nnheader-strip-cr () + "Strip all \r's from the current buffer." + (nnheader-skeleton-replace "\r")) + (fset 'nnheader-run-at-time 'run-at-time) (fset 'nnheader-cancel-timer 'cancel-timer) (fset 'nnheader-cancel-function-timers 'cancel-function-timers) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index daf7e5574..2fc05415b 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1019,7 +1019,11 @@ See the documentation for the variable `nnmail-split-fancy' for documentation." ;; Someone might want to do a \N sub on this match, so get the ;; correct match positions. (goto-char (match-end 0)) - (re-search-backward (nth 1 split) (match-end 1)) + (let ((value (nth 1 split))) + (re-search-backward (if (symbolp value) + (cdr (assq value nnmail-split-abbrev-alist)) + value) + (match-end 1))) (nnmail-split-it (nth 2 split)))) ;; Not in cache, compute a regexp for the field/value pair. diff --git a/lisp/nntp.el b/lisp/nntp.el index a90d8c128..0debdd7f5 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -239,9 +239,7 @@ server there that you can connect to. See also `nntp-open-connection-function'" ;; Now all of replies are received. Fold continuation lines. (nnheader-fold-continuation-lines) ;; Remove all "\r"'s. - (goto-char (point-min)) - (while (search-forward "\r" nil t) - (replace-match "" t t)) + (nnheader-strip-cr) (copy-to-buffer nntp-server-buffer (point-min) (point-max)) 'headers)))) @@ -745,15 +743,15 @@ It will prompt for a password." (when group (let ((entry (nntp-find-connection-entry nntp-server-buffer))) (when (not (equal group (caddr entry))) - (nntp-request-group group) - (save-excursion - (set-buffer nntp-server-buffer) - (erase-buffer)))))) + (let ((nnheader-callback-function nil)) + (nntp-request-group group) + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer))))))) (defun nntp-decode-text (&optional cr-only) "Decode the text in the current buffer." (goto-char (point-min)) - ;; Remove \R's. (while (search-forward "\r" nil t) (delete-char -1)) (unless cr-only diff --git a/lisp/nnweb.el b/lisp/nnweb.el index 04d158eab..5162cff1e 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -211,7 +211,7 @@ (setq header (nnheader-parse-nov)) (forward-line 1) (push (list (mail-header-number header) - header (nnheader-header-xref header)) + header (mail-header-xref header)) nnweb-articles) (nnweb-set-hashtb header (car nnweb-articles))))))) @@ -223,7 +223,7 @@ (nnheader-insert-nov (cadr (pop articles))))))) (defun nnweb-set-hashtb (header data) - (gnus-sethastb (nnweb-identifier (mail-header-xrefs header)) + (gnus-sethash (nnweb-identifier (mail-header-xref header)) data nnweb-hashtb)) (defun nnweb-get-hashtb (url) diff --git a/texi/ChangeLog b/texi/ChangeLog index 64e15bd68..6994d1e81 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +Sat Nov 9 06:04:22 1996 Lars Magne Ingebrigtsen + + * gnus.texi (Group Parameters): Addition. + Fri Nov 8 04:01:06 1996 Lars Magne Ingebrigtsen * gnus.texi (Article Fontisizing): New. diff --git a/texi/gnus.texi b/texi/gnus.texi index de6924d3c..7bc8a3b83 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Red Gnus 0.57 Manual +@settitle Red Gnus 0.60 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -287,7 +287,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Red Gnus 0.57 Manual +@title Red Gnus 0.60 Manual @author by Lars Magne Ingebrigtsen @page @@ -1882,6 +1882,12 @@ broken behavior. So there! Elements like @code{(to-group . "some.group.name")} means that all posts in that group will be sent to @code{some.group.name}. +@item newsgroup +@cindex newsgroup +If this symbol is present in the group parameter list, Gnus will treat +all responses as if they were responses to news articles. This can be +useful if you have a mail group that's really a mirror of a news group. + @item gcc-self @cindex gcc-self If this symbol is present in the group parameter list and set to -- 2.25.1