From: ichikawa Date: Sun, 16 Aug 1998 02:59:20 +0000 (+0000) Subject: Sync up with gnus-5.6.36 X-Git-Tag: gnus-6_8_12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38ed487631a0ea688641903a0d021b0541eb3260;p=elisp%2Fgnus.git- Sync up with gnus-5.6.36 --- diff --git a/ChangeLog b/ChangeLog index 3504095..12077ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-08-16 Tatsuya Ichikawa + + * lisp/gnus.el (gnus-version-number): Update to 6.8.12. + + * Sync up with Gnus 5.6.36. + 1998-08-15 Yoshiki Hayashi * texi/gnus-ja.texi: Update. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f81b8bd..5435e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,84 @@ +Fri Aug 14 23:03:51 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.36 is released. + +1998-08-14 21:49:22 Lars Magne Ingebrigtsen + + * gnus.el (load): Push onto list. + + * gnus-group.el (gnus-group-get-new-news-this-group): Store active + info. + +Fri Aug 14 21:41:59 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.35 is released. + +1998-08-14 00:00:15 Lars Magne Ingebrigtsen + + * gnus-srvr.el (gnus-server-scan-server): Error better. + + * nndir.el: Make independent of nnmh. + Revert. + + * message.el (message-remove-text-with-property): New function. + (message-fix-before-sending): Check for invisible text. + + * gnus.el (load): Create the Gnus buffer even when no splash. + + * gnus-msg.el (gnus-setup-message): Add buffer to list. + + * gnus-win.el (gnus-remove-some-windows): Use new buffer system. + (gnus-delete-windows-in-gnusey-frames): Ditto. + + * gnus.el (gnus-add-buffer): New function. + +1998-08-13 23:38:21 Lars Magne Ingebrigtsen + + * gnus-xmas.el (gnus-buffer-list): Removed. + + * gnus.el (gnus-buffers): New variable. + (gnus-get-buffer-create): New function; used throughout. + (gnus-buffers): New function. + + * gnus-msg.el (gnus-configure-posting-styles): Go to eoh + reliably. + + * message.el (message-goto-eoh): New command. + +1998-08-13 23:13:53 Simon Josefsson + + * gnus-msg.el (gnus-setup-message): use message-setup-hook + instead + (gnus-configure-posting-styles): new posting-style 'body + (gnus-configure-posting-styles): insert headers immediately + +1998-08-13 13:05:36 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-summary-increase-score): Change thread to + "r". + + * gnus-sum.el (gnus-summary-scroll-down): New command and + keystroke. + + * gnus-agent.el (gnus-agent-expire): Check that directories + exist. + +1998-08-12 20:56:41 Simon Josefsson + + * gnus-cache.el (gnus-uncacheable-groups): doc change + (gnus-cacheable-groups): new variable + (gnus-cache-possibly-enter-article): use it + +1998-08-12 22:30:16 Lars Magne Ingebrigtsen + + * nntp.el (nntp-encode-text): Too much text. + +1998-08-12 21:58:50 Matt Pharr + + * message.el (message-make-forward-subject-function): New + variable. + (message-wash-forwarded-subjects): Ditto. + Wed Aug 12 21:09:58 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.34 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 69265c8..f3409ec 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -107,7 +107,7 @@ If nil, only read articles will be expired." (gnus-agent-read-servers) (gnus-category-read) (setq gnus-agent-overview-buffer - (get-buffer-create " *Gnus agent overview*")) + (gnus-get-buffer-create " *Gnus agent overview*")) (add-hook 'gnus-group-mode-hook 'gnus-agent-mode) (add-hook 'gnus-summary-mode-hook 'gnus-agent-mode) (add-hook 'gnus-server-mode-hook 'gnus-agent-mode)) @@ -573,7 +573,7 @@ the actual number of articles toggled is returned." (defun gnus-agent-open-history () (save-excursion (push (cons (gnus-agent-method) - (set-buffer (get-buffer-create + (set-buffer (gnus-get-buffer-create (format " *Gnus agent %s history*" (gnus-agent-method))))) gnus-agent-history-buffers) @@ -715,7 +715,7 @@ the actual number of articles toggled is returned." gnus-agent-group-alist)) (setcdr alist (cons (cons (cdar crosses) t) (cdr alist))) (save-excursion - (set-buffer (get-buffer-create (format " *Gnus agent overview %s*" + (set-buffer (gnus-get-buffer-create (format " *Gnus agent overview %s*" group))) (when (= (point-max) (point-min)) (push (cons group (current-buffer)) gnus-agent-buffer-alist) @@ -1064,8 +1064,7 @@ The following commands are available: (defun gnus-category-setup-buffer () (unless (get-buffer gnus-category-buffer) (save-excursion - (set-buffer (get-buffer-create gnus-category-buffer)) - (gnus-add-current-to-buffer-list) + (set-buffer (gnus-get-buffer-create gnus-category-buffer)) (gnus-category-mode)))) (defun gnus-category-prepare () @@ -1273,7 +1272,7 @@ The following commands are available: history overview file histories elem art nov-file low info unreads marked article) (save-excursion - (setq overview (get-buffer-create " *expire overview*")) + (setq overview (gnus-get-buffer-create " *expire overview*")) (while (setq gnus-command-method (pop methods)) (let ((expiry-hashtb (gnus-make-hashtable 1023))) (gnus-agent-open-history) @@ -1349,6 +1348,7 @@ The following commands are available: (delete-file file)) ;; Schedule the history line for nuking. (push (cdr elem) histories))) + (gnus-make-directory (file-name-directory nov-file)) (write-region (point-min) (point-max) nov-file nil 'silent) ;; Delete the unwanted entries in the alist. (setq gnus-agent-article-alist diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 68d11dd..682e3aa 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1922,23 +1922,20 @@ commands: (gnus-set-global-variables))) ;; Init original article buffer. (save-excursion - (set-buffer (get-buffer-create gnus-original-article-buffer)) + (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) (buffer-disable-undo (current-buffer)) (setq major-mode 'gnus-original-article-mode) - (gnus-add-current-to-buffer-list) (make-local-variable 'gnus-original-article)) (if (get-buffer name) (save-excursion (set-buffer name) (buffer-disable-undo (current-buffer)) (setq buffer-read-only t) - (gnus-add-current-to-buffer-list) (unless (eq major-mode 'gnus-article-mode) (gnus-article-mode)) (current-buffer)) (save-excursion - (set-buffer (get-buffer-create name)) - (gnus-add-current-to-buffer-list) + (set-buffer (gnus-get-buffer-create name)) (gnus-article-mode) (make-local-variable 'gnus-summary-buffer) (current-buffer))))) @@ -2522,11 +2519,10 @@ If given a prefix, show the hidden text instead." (save-excursion (if (get-buffer gnus-original-article-buffer) (set-buffer gnus-original-article-buffer) - (set-buffer (get-buffer-create gnus-original-article-buffer)) + (set-buffer (gnus-get-buffer-create gnus-original-article-buffer)) (buffer-disable-undo (current-buffer)) (setq major-mode 'gnus-original-article-mode) - (setq buffer-read-only t) - (gnus-add-current-to-buffer-list)) + (setq buffer-read-only t)) (let (buffer-read-only) (erase-buffer) (insert-buffer-substring gnus-article-buffer)) diff --git a/lisp/gnus-bcklg.el b/lisp/gnus-bcklg.el index d9934e5..d370673 100644 --- a/lisp/gnus-bcklg.el +++ b/lisp/gnus-bcklg.el @@ -41,10 +41,9 @@ "Return the backlog buffer." (or (get-buffer gnus-backlog-buffer) (save-excursion - (set-buffer (get-buffer-create gnus-backlog-buffer)) + (set-buffer (gnus-get-buffer-create gnus-backlog-buffer)) (buffer-disable-undo (current-buffer)) (setq buffer-read-only t) - (gnus-add-current-to-buffer-list) (get-buffer gnus-backlog-buffer)))) (defun gnus-backlog-setup () diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 3ba956d..552167d 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -50,11 +50,26 @@ :group 'gnus-cache :type '(set (const ticked) (const dormant) (const unread) (const read))) +(defcustom gnus-cacheable-groups nil + "*Groups that match this regexp will be cached. + +If you only want to cache your nntp groups, you could set this +variable to \"^nntp\". + +If a group matches both gnus-cacheable-groups and gnus-uncacheable-groups +it's not cached." + :group 'gnus-cache + :type '(choice (const :tag "off" nil) + regexp)) + (defcustom gnus-uncacheable-groups nil "*Groups that match this regexp will not be cached. If you want to avoid caching your nnml groups, you could set this -variable to \"^nnml\"." +variable to \"^nnml\". + +If a group matches both gnus-cacheable-groups and gnus-uncacheable-groups +it's not cached." :group 'gnus-cache :type '(choice (const :tag "off" nil) regexp)) @@ -139,7 +154,9 @@ variable to \"^nnml\"." (when (and number (> number 0) ; Reffed article. (or force - (and (or (not gnus-uncacheable-groups) + (and (or (not gnus-cacheable-groups) + (string-match gnus-cacheable-groups group)) + (or (not gnus-uncacheable-groups) (not (string-match gnus-uncacheable-groups group))) (gnus-cache-member-of-class @@ -371,7 +388,7 @@ Returns the list of articles removed." (save-excursion (setq gnus-cache-buffer (cons group - (set-buffer (get-buffer-create " *gnus-cache-overview*")))) + (set-buffer (gnus-get-buffer-create " *gnus-cache-overview*")))) (buffer-disable-undo (current-buffer)) ;; Insert the contents of this group's cache overview. (erase-buffer) @@ -459,7 +476,7 @@ Returns the list of articles removed." articles))) (defun gnus-cache-braid-nov (group cached &optional file) - (let ((cache-buf (get-buffer-create " *gnus-cache*")) + (let ((cache-buf (gnus-get-buffer-create " *gnus-cache*")) beg end) (gnus-cache-save-buffers) (save-excursion @@ -491,7 +508,7 @@ Returns the list of articles removed." (kill-buffer cache-buf))) (defun gnus-cache-braid-heads (group cached) - (let ((cache-buf (get-buffer-create " *gnus-cache*"))) + (let ((cache-buf (gnus-get-buffer-create " *gnus-cache*"))) (save-excursion (set-buffer cache-buf) (buffer-disable-undo (current-buffer)) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 1bd882d..6e25832 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -186,8 +186,8 @@ DOC is a documentation string for the parameter.") (unless (setq info (gnus-get-info group)) (error "Killed group; can't be edited")) ;; Ready. - (kill-buffer (get-buffer-create "*Gnus Customize*")) - (switch-to-buffer (get-buffer-create "*Gnus Customize*")) + (kill-buffer (gnus-get-buffer-create "*Gnus Customize*")) + (switch-to-buffer (gnus-get-buffer-create "*Gnus Customize*")) (gnus-custom-mode) (make-local-variable 'gnus-custom-group) (setq gnus-custom-group group) @@ -544,8 +544,8 @@ eh?"))) ,(nth 1 entry))) gnus-score-parameters))) ;; Ready. - (kill-buffer (get-buffer-create "*Gnus Customize*")) - (switch-to-buffer (get-buffer-create "*Gnus Customize*")) + (kill-buffer (gnus-get-buffer-create "*Gnus Customize*")) + (switch-to-buffer (gnus-get-buffer-create "*Gnus Customize*")) (gnus-custom-mode) (make-local-variable 'gnus-custom-score-alist) (setq gnus-custom-score-alist scores) diff --git a/lisp/gnus-eform.el b/lisp/gnus-eform.el index ff35a42..6a93242 100644 --- a/lisp/gnus-eform.el +++ b/lisp/gnus-eform.el @@ -88,9 +88,8 @@ It is a slightly enhanced emacs-lisp-mode. Call EXIT-FUNC on exit. Display DOCUMENTATION in the beginning of the buffer." (let ((winconf (current-window-configuration))) - (set-buffer (get-buffer-create gnus-edit-form-buffer)) + (set-buffer (gnus-get-buffer-create gnus-edit-form-buffer)) (gnus-configure-windows 'edit-form) - (gnus-add-current-to-buffer-list) (gnus-edit-form-mode) (setq gnus-prev-winconf winconf) (setq gnus-edit-form-done-function exit-func) diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index 7ded205..203c863 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -287,7 +287,7 @@ (let ((dir (nnheader-find-etc-directory "gnus")) pixmap file height beg i) (save-excursion - (switch-to-buffer (get-buffer-create gnus-group-buffer)) + (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer)) (let ((buffer-read-only nil)) (erase-buffer) (when (and dir diff --git a/lisp/gnus-gl.el b/lisp/gnus-gl.el index c4fd928..93ef915 100644 --- a/lisp/gnus-gl.el +++ b/lisp/gnus-gl.el @@ -234,7 +234,7 @@ If this times out we give up and assume that something has died..." ) (defun bbb-connect-to-bbbd (host port) (unless grouplens-bbb-buffer (setq grouplens-bbb-buffer - (get-buffer-create (format " *BBBD trace: %s*" host))) + (gnus-get-buffer-create (format " *BBBD trace: %s*" host))) (save-excursion (set-buffer grouplens-bbb-buffer) (make-local-variable 'bbb-read-point) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index f36e177..10a9bd9 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -816,9 +816,8 @@ The following commands are available: (or level gnus-group-default-list-level gnus-level-subscribed)))) (defun gnus-group-setup-buffer () - (set-buffer (get-buffer-create gnus-group-buffer)) + (set-buffer (gnus-get-buffer-create gnus-group-buffer)) (unless (eq major-mode 'gnus-group-mode) - (gnus-add-current-to-buffer-list) (gnus-group-mode) (when gnus-carpal (gnus-carpal-setup-buffer 'group)))) @@ -2914,17 +2913,19 @@ If N is negative, this group and the N-1 previous groups will be checked." (ret (if (numberp n) (- n (length groups)) 0)) (beg (unless n (point))) - group) + group method) (while (setq group (pop groups)) (gnus-group-remove-mark group) ;; Bypass any previous denials from the server. - (gnus-remove-denial (gnus-find-method-for-group group)) + (gnus-remove-denial (setq method (gnus-find-method-for-group group))) (if (gnus-activate-group group (if dont-scan nil 'scan)) (progn (gnus-get-unread-articles-in-group (gnus-get-info group) (gnus-active group) t) (unless (gnus-virtual-group-p group) (gnus-close-group group)) + (gnus-agent-save-group-info + method (gnus-group-real-name group) (gnus-active group)) (gnus-group-update-group group)) (if (eq (gnus-server-status (gnus-find-method-for-group group)) 'denied) @@ -3161,16 +3162,13 @@ The hook gnus-suspend-gnus-hook is called before actually suspending." (interactive) (gnus-run-hooks 'gnus-suspend-gnus-hook) ;; Kill Gnus buffers except for group mode buffer. - (let* ((group-buf (get-buffer gnus-group-buffer)) - ;; Do this on a separate list in case the user does a ^G before we finish - (gnus-buffer-list - (delete group-buf (delete gnus-dribble-buffer - (append gnus-buffer-list nil))))) - (while gnus-buffer-list - (gnus-kill-buffer (pop gnus-buffer-list))) + (let* ((group-buf (get-buffer gnus-group-buffer))) + (apply (lambda (buf) + (unless (equal buf group-buf) + (kill-buffer buf))) + (gnus-buffers)) (gnus-kill-gnus-frames) (when group-buf - (setq gnus-buffer-list (list group-buf)) (bury-buffer group-buf) (delete-windows-on group-buf t)))) diff --git a/lisp/gnus-kill.el b/lisp/gnus-kill.el index 40d94d4..4672116 100644 --- a/lisp/gnus-kill.el +++ b/lisp/gnus-kill.el @@ -406,7 +406,6 @@ Returns the number of articles marked as read." () (gnus-message 6 "Processing kill file %s..." (car kill-files)) (find-file (car kill-files)) - (gnus-add-current-to-buffer-list) (goto-char (point-min)) (if (consp (ignore-errors (read (current-buffer)))) @@ -566,7 +565,7 @@ COMMAND must be a lisp expression or a string representing a key sequence." (not (consp (cdadr (nth 2 object)))))) (concat "\n" (gnus-prin1-to-string object)) (save-excursion - (set-buffer (get-buffer-create "*Gnus PP*")) + (set-buffer (gnus-get-buffer-create "*Gnus PP*")) (buffer-disable-undo (current-buffer)) (erase-buffer) (insert (format "\n(%S %S\n '(" (nth 0 object) (nth 1 object))) diff --git a/lisp/gnus-mh.el b/lisp/gnus-mh.el index 3960408..fa01f5a 100644 --- a/lisp/gnus-mh.el +++ b/lisp/gnus-mh.el @@ -64,7 +64,7 @@ Optional argument FOLDER specifies folder name." (funcall gnus-folder-save-name gnus-newsgroup-name gnus-current-headers gnus-newsgroup-last-folder) t)))) - (errbuf (get-buffer-create " *Gnus rcvstore*")) + (errbuf (gnus-get-buffer-create " *Gnus rcvstore*")) ;; Find the rcvstore program. (exec-path (if mh-lib (cons mh-lib exec-path) exec-path))) (gnus-eval-in-buffer-window gnus-original-article-buffer diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 5486bb3..7c2a71f 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -189,7 +189,7 @@ Thank you for your help in stamping out bugs. (copy-sequence message-header-setup-hook))) (add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc) (add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc) - (add-hook 'message-mode-hook 'gnus-configure-posting-styles) + (add-hook 'message-setup-hook 'gnus-configure-posting-styles) (unwind-protect (progn ,@forms) @@ -199,6 +199,7 @@ Thank you for your help in stamping out bugs. (cons ,group ,article)) (make-local-variable 'gnus-newsgroup-name) (gnus-run-hooks 'gnus-message-setup-hook)) + (gnus-add-buffer) (gnus-configure-windows ,config t) (set-buffer-modified-p nil)))) @@ -350,10 +351,8 @@ header line with the old Message-ID." ;; this copy is in the buffer gnus-article-copy. ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used ;; this buffer should be passed to all mail/news reply/post routines. - (setq gnus-article-copy (get-buffer-create " *gnus article copy*")) + (setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*")) (buffer-disable-undo gnus-article-copy) - (or (memq gnus-article-copy gnus-buffer-list) - (push gnus-article-copy gnus-buffer-list)) (let ((article-buffer (or article-buffer gnus-article-buffer)) end beg contents) (if (not (and (get-buffer article-buffer) @@ -806,7 +805,7 @@ The source file has to be in the Emacs load path." (sit-for 0) ;; Go through all the files looking for non-default values for variables. (save-excursion - (set-buffer (get-buffer-create " *gnus bug info*")) + (set-buffer (gnus-get-buffer-create " *gnus bug info*")) (buffer-disable-undo (current-buffer)) (while files (erase-buffer) @@ -1049,6 +1048,7 @@ this is a reply." variable nil) ;; We find the variable that is to be modified. (if (and (not (stringp (car attribute))) + (not (eq 'body (car attribute))) (not (setq variable (cdr (assq (car attribute) gnus-posting-style-alist))))) (message "Couldn't find attribute %s" (car attribute)) @@ -1065,19 +1065,20 @@ this is a reply." ((listp value) (eval value)))) (if variable - (progn - ;; This is an ordinary variable. - (make-local-variable variable) - (set variable value-value)) - ;; This is a header to be added to the headers when - ;; posting. - (when value-value - (make-local-variable 'message-required-mail-headers) - (make-local-variable 'message-required-news-headers) - (push (cons (car attribute) value-value) - message-required-mail-headers) - (push (cons (car attribute) value-value) - message-required-news-headers))))))))) + ;; This is an ordinary variable. + (set (make-local-variable variable) value-value) + ;; This is either a body or a header to be inserted in the + ;; message + (when value-value + (let ((attr (car attribute))) + (if (eq 'body attr) + (save-excursion + (goto-char (point-max)) + (insert value-value)) + (save-excursion + (message-goto-eoh) + (insert (if (stringp attr) attr (symbol-name attr)) + ": " value-value "\n")))))))))))) ;;; Allow redefinition of functions. diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index be64979..a3b5418 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -184,7 +184,7 @@ arguments necessary for the job.") (defun gnus-get-buffer-name (variable) "Returns the buffer name associated with the contents of a variable." - (let ((buf (get-buffer-create (gnus-window-to-buffer-helper + (let ((buf (gnus-get-buffer-create (gnus-window-to-buffer-helper (cdr (assq variable gnus-window-to-buffer)))))) (and buf @@ -211,10 +211,9 @@ arguments necessary for the job.") (save-excursion (if (get-buffer name) (set-buffer name) - (set-buffer (get-buffer-create name)) + (set-buffer (gnus-get-buffer-create name)) (buffer-disable-undo) (setq buffer-read-only t) - (gnus-add-current-to-buffer-list) (add-hook 'gnus-summary-prepare-exit-hook 'gnus-picons-kill-buffer)) (current-buffer)))) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index d3c5ccf..43c9d91 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -557,9 +557,8 @@ Two predefined functions are available: (defun gnus-get-tree-buffer () "Return the tree buffer properly initialized." (save-excursion - (set-buffer (get-buffer-create gnus-tree-buffer)) + (set-buffer (gnus-get-buffer-create gnus-tree-buffer)) (unless (eq major-mode 'gnus-tree-mode) - (gnus-add-current-to-buffer-list) (gnus-tree-mode)) (current-buffer))) @@ -981,11 +980,10 @@ The following commands are available: (if (get-buffer buffer) () (save-excursion - (set-buffer (get-buffer-create buffer)) + (set-buffer (gnus-get-buffer-create buffer)) (gnus-carpal-mode) (setq gnus-carpal-attached-buffer (intern (format "gnus-%s-buffer" type))) - (gnus-add-current-to-buffer-list) (let ((buttons (symbol-value (intern (format "gnus-carpal-%s-buffer-buttons" type)))) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index d444146..4bdbcb6 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -505,7 +505,7 @@ used as score." (?l "lines" nil nil number) (?d "date" nil nil date) (?f "followup" nil nil string) - (?h "thread" nil nil string))) + (?r "thread" nil nil string))) (char-to-type '((?s s "substring" string) (?e e "exact string" string) @@ -671,7 +671,7 @@ used as score." (defun gnus-score-insert-help (string alist idx) (setq gnus-score-help-winconf (current-window-configuration)) (save-excursion - (set-buffer (get-buffer-create "*Score Help*")) + (set-buffer (gnus-get-buffer-create "*Score Help*")) (buffer-disable-undo (current-buffer)) (delete-windows-on (current-buffer)) (erase-buffer) @@ -1403,7 +1403,7 @@ SCORE is the score to add." gnus-scores-articles)))) (save-excursion - (set-buffer (get-buffer-create "*Headers*")) + (set-buffer (gnus-get-buffer-create "*Headers*")) (buffer-disable-undo (current-buffer)) (when (gnus-buffer-live-p gnus-summary-buffer) (message-clone-locals gnus-summary-buffer)) @@ -2289,7 +2289,6 @@ SCORE is the score to add." 1 "No score rules apply to the current article (default score %d)." gnus-summary-default-score) (set-buffer "*Score Trace*") - (gnus-add-current-to-buffer-list) (while trace (insert (format "%S -> %s\n" (cdar trace) (if (caar trace) @@ -2335,7 +2334,6 @@ SCORE is the score to add." (while rules (insert (format "%-5d: %s\n" (caar rules) (cdar rules))) (pop rules)) - (gnus-add-current-to-buffer-list) (goto-char (point-min)) (gnus-configure-windows 'score-words)))) @@ -2506,7 +2504,7 @@ GROUP using BNews sys file syntax." (trans (cdr (assq ?: nnheader-file-name-translation-alist))) ofiles not-match regexp) (save-excursion - (set-buffer (get-buffer-create "*gnus score files*")) + (set-buffer (gnus-get-buffer-create "*gnus score files*")) (buffer-disable-undo (current-buffer)) ;; Go through all score file names and create regexp with them ;; as the source. diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 0d95f4c..08f8176 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -133,7 +133,7 @@ If N is nil and any articles have been marked with the process mark, move those articles instead." (interactive "P") (let* ((articles (gnus-summary-work-articles n)) - (tmp-buf (get-buffer-create "*soup work*")) + (tmp-buf (gnus-get-buffer-create "*soup work*")) (area (gnus-soup-area gnus-newsgroup-name)) (prefix (gnus-soup-area-prefix area)) headers) @@ -512,7 +512,7 @@ Return whether the unpacking was successful." ".MSG")) (msg-buf (and (file-exists-p msg-file) (nnheader-find-file-noselect msg-file))) - (tmp-buf (get-buffer-create " *soup send*")) + (tmp-buf (gnus-get-buffer-create " *soup send*")) beg end) (cond ((/= (gnus-soup-encoding-format diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 5c2cc4f..e925ef1 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -195,7 +195,7 @@ The following commands are available: "Initialize the server buffer." (unless (get-buffer gnus-server-buffer) (save-excursion - (set-buffer (get-buffer-create gnus-server-buffer)) + (set-buffer (gnus-get-buffer-create gnus-server-buffer)) (gnus-server-mode) (when gnus-carpal (gnus-carpal-setup-buffer 'server))))) @@ -466,9 +466,12 @@ The following commands are available: (defun gnus-server-scan-server (server) "Request a scan from the current server." (interactive (list (gnus-server-server-name))) - (gnus-message 3 "Scanning %s...done" server) - (gnus-request-scan nil (gnus-server-to-method server)) - (gnus-message 3 "Scanning %s...done" server)) + (let ((method (gnus-server-to-method server))) + (if (not (gnus-get-function method 'request-scan)) + (error "Server %s can't scan" (car method)) + (gnus-message 3 "Scanning %s..." server) + (gnus-request-scan nil method) + (gnus-message 3 "Scanning %s...done" server)))) (defun gnus-server-read-server (server) "Browse a server." @@ -568,8 +571,7 @@ The following commands are available: 1 "Couldn't request list: %s" (gnus-status-message method)) nil) (t - (get-buffer-create gnus-browse-buffer) - (gnus-add-current-to-buffer-list) + (gnus-get-buffer-create gnus-browse-buffer) (when gnus-carpal (gnus-carpal-setup-buffer 'browse)) (gnus-configure-windows 'browse) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 0695619..536ea29 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -584,6 +584,7 @@ the first newsgroup." (defvar gnus-newsgroup-unreads) (defvar nnoo-state-alist) (defvar gnus-current-select-method) + (defun gnus-clear-system () "Clear all variables and buffers." ;; Clear Gnus variables. @@ -627,8 +628,9 @@ the first newsgroup." (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil)))) (gnus-kill-buffer nntp-server-buffer) ;; Kill Gnus buffers. - (while gnus-buffer-list - (gnus-kill-buffer (pop gnus-buffer-list))) + (let ((buffers (gnus-buffers))) + (when buffers + (mapcar 'kill-buffer buffers))) ;; Remove Gnus frames. (gnus-kill-gnus-frames)) @@ -660,8 +662,8 @@ prompt the user for the name of an NNTP server to use." (> arg 0) (max (car gnus-group-list-mode) arg)))) - (gnus-splash) (gnus-clear-system) + (gnus-splash) (gnus-run-hooks 'gnus-before-startup-hook) (nnheader-init-server-buffer) (setq gnus-slave slave) @@ -778,9 +780,8 @@ prompt the user for the name of an NNTP server to use." (let ((dribble-file (gnus-dribble-file-name))) (save-excursion (set-buffer (setq gnus-dribble-buffer - (get-buffer-create + (gnus-get-buffer-create (file-name-nondirectory dribble-file)))) - (gnus-add-current-to-buffer-list) (erase-buffer) (setq buffer-file-name dribble-file) (auto-save-mode t) @@ -2265,13 +2266,12 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-gnus-to-newsrc-format) (gnus-message 8 "Saving %s...done" gnus-current-startup-file)) ;; Save .newsrc.eld. - (set-buffer (get-buffer-create " *Gnus-newsrc*")) + (set-buffer (gnus-get-buffer-create " *Gnus-newsrc*")) (make-local-variable 'version-control) (setq version-control 'never) (setq buffer-file-name (concat gnus-current-startup-file ".eld")) (setq default-directory (file-name-directory buffer-file-name)) - (gnus-add-current-to-buffer-list) (buffer-disable-undo (current-buffer)) (erase-buffer) (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file) @@ -2414,7 +2414,7 @@ If FORCE is non-nil, the .newsrc file is read." () ; There are no slave files to read. (gnus-message 7 "Reading slave newsrcs...") (save-excursion - (set-buffer (get-buffer-create " *gnus slave*")) + (set-buffer (gnus-get-buffer-create " *gnus slave*")) (buffer-disable-undo (current-buffer)) (setq slave-files (sort (mapcar (lambda (file) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 82bf146..f15a1f0 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1151,7 +1151,7 @@ increase the score of each group you read." [delete] gnus-summary-prev-page [backspace] gnus-summary-prev-page "\r" gnus-summary-scroll-up - "\e\r" gnus-summary-scroll-down + "\M-\r" gnus-summary-scroll-down "n" gnus-summary-next-unread-article "p" gnus-summary-prev-unread-article "N" gnus-summary-next-article @@ -1358,6 +1358,7 @@ increase the score of each group you read." [delete] gnus-summary-prev-page "p" gnus-summary-prev-page "\r" gnus-summary-scroll-up + "\M-\r" gnus-summary-scroll-down "<" gnus-summary-beginning-of-article ">" gnus-summary-end-of-article "b" gnus-summary-beginning-of-article @@ -2278,8 +2279,7 @@ marks of articles." (setq gnus-summary-buffer (current-buffer)) (not gnus-newsgroup-prepared)) ;; Fix by Sudish Joseph - (setq gnus-summary-buffer (set-buffer (get-buffer-create buffer))) - (gnus-add-current-to-buffer-list) + (setq gnus-summary-buffer (set-buffer (gnus-get-buffer-create buffer))) (gnus-summary-mode group) (when gnus-carpal (gnus-carpal-setup-buffer 'summary)) @@ -5789,6 +5789,12 @@ Argument LINES specifies lines to be scrolled up (or down if negative)." (gnus-summary-recenter) (gnus-summary-position-point)) +(defun gnus-summary-scroll-down (lines) + "Scroll down (or up) one line current article. +Argument LINES specifies lines to be scrolled down (or up if negative)." + (interactive "p") + (gnus-summary-scroll-up (- lines))) + (defun gnus-summary-next-same-subject () "Select next article which has the same subject as current one." (interactive) @@ -7179,7 +7185,7 @@ latter case, they will be copied into the relevant groups." (not (file-regular-p file)) (error "Can't read %s" file)) (save-excursion - (set-buffer (get-buffer-create " *import file*")) + (set-buffer (gnus-get-buffer-create " *import file*")) (buffer-disable-undo (current-buffer)) (erase-buffer) (nnheader-insert-file-contents file) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 826c8ec..4e437f5 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -540,7 +540,7 @@ Timezone package is used." (progn (set-buffer gnus-work-buffer) (erase-buffer)) - (set-buffer (get-buffer-create gnus-work-buffer)) + (set-buffer (gnus-get-buffer-create gnus-work-buffer)) (kill-all-local-variables) (buffer-disable-undo (current-buffer)))) @@ -723,8 +723,7 @@ with potentially long computations." (setq filename (expand-file-name filename)) (setq rmail-default-rmail-file filename) (let ((artbuf (current-buffer)) - (tmpbuf (get-buffer-create " *Gnus-output*")) - (coding-system-for-write 'binary)) + (tmpbuf (gnus-get-buffer-create " *Gnus-output*"))) (save-excursion (or (get-file-buffer filename) (file-exists-p filename) @@ -772,7 +771,7 @@ with potentially long computations." "Append the current article to a mail file named FILENAME." (setq filename (expand-file-name filename)) (let ((artbuf (current-buffer)) - (tmpbuf (get-buffer-create " *Gnus-output*"))) + (tmpbuf (gnus-get-buffer-create " *Gnus-output*"))) (save-excursion ;; Create the file, if it doesn't exist. (when (and (not (get-file-buffer filename)) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index dca97f0..f937bbe 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -517,8 +517,8 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (gnus-setup-message 'forward (setq gnus-uu-digest-from-subject nil) (gnus-uu-decode-save n file) - (setq buf (switch-to-buffer (get-buffer-create " *gnus-uu-forward*"))) - (gnus-add-current-to-buffer-list) + (setq buf (switch-to-buffer + (gnus-get-buffer-create " *gnus-uu-forward*"))) (erase-buffer) (insert-file file) (let ((fs gnus-uu-digest-from-subject)) @@ -834,10 +834,10 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (eq in-state 'first-and-last)) (progn (setq state (list 'begin)) - (save-excursion (set-buffer (get-buffer-create "*gnus-uu-body*")) + (save-excursion (set-buffer (gnus-get-buffer-create "*gnus-uu-body*")) (erase-buffer)) (save-excursion - (set-buffer (get-buffer-create "*gnus-uu-pre*")) + (set-buffer (gnus-get-buffer-create "*gnus-uu-pre*")) (erase-buffer) (insert (format "Date: %s\nFrom: %s\nSubject: %s Digest\n\nTopics:\n" @@ -970,7 +970,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (if (not (re-search-forward gnus-uu-postscript-end-string nil t)) (setq state (list 'wrong-type)) (setq end-char (point)) - (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) + (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name)) (insert-buffer-substring process-buffer start-char end-char) (setq file-name (concat gnus-uu-work-dir (cdr gnus-article-current) ".ps")) @@ -1025,7 +1025,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." ;; finally just replaces the next to last number with "[0-9]+". (let ((count 2)) (save-excursion - (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) + (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name)) (buffer-disable-undo (current-buffer)) (erase-buffer) (insert (regexp-quote string)) @@ -1126,7 +1126,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (let ((out-list string-list) string) (save-excursion - (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) + (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name)) (buffer-disable-undo (current-buffer)) (while string-list (erase-buffer) @@ -1419,7 +1419,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (setq gnus-uu-uudecode-process (start-process "*uudecode*" - (get-buffer-create gnus-uu-output-buffer-name) + (gnus-get-buffer-create gnus-uu-output-buffer-name) shell-file-name shell-command-switch (format "cd %s %s uudecode" gnus-uu-work-dir gnus-shell-command-separator)))) @@ -1485,7 +1485,7 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (setq start-char (point)) (call-process-region start-char (point-max) shell-file-name nil - (get-buffer-create gnus-uu-output-buffer-name) nil + (gnus-get-buffer-create gnus-uu-output-buffer-name) nil shell-command-switch (concat "cd " gnus-uu-work-dir " " gnus-shell-command-separator " sh")))) @@ -1548,13 +1548,13 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (setq command (format "cd %s ; %s" dir (gnus-uu-command action file-path))) (save-excursion - (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) + (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name)) (erase-buffer)) (gnus-message 5 "Unpacking: %s..." (gnus-uu-command action file-path)) (if (= 0 (call-process shell-file-name nil - (get-buffer-create gnus-uu-output-buffer-name) + (gnus-get-buffer-create gnus-uu-output-buffer-name) nil shell-command-switch command)) (message "") (gnus-message 2 "Error during unpacking of archive") @@ -1912,7 +1912,7 @@ If no file has been included, the user will be asked for a file." (unwind-protect (if (save-excursion (set-buffer (setq uubuf - (get-buffer-create uuencode-buffer-name))) + (gnus-get-buffer-create uuencode-buffer-name))) (erase-buffer) (funcall gnus-uu-post-encode-method file-path file-name)) (insert-buffer-substring uubuf) @@ -1945,7 +1945,7 @@ If no file has been included, the user will be asked for a file." (setq end-binary (point-max)) (save-excursion - (set-buffer (setq uubuf (get-buffer-create encoded-buffer-name))) + (set-buffer (setq uubuf (gnus-get-buffer-create encoded-buffer-name))) (erase-buffer) (insert-buffer-substring post-buf beg-binary end-binary) (goto-char (point-min)) @@ -1977,7 +1977,7 @@ If no file has been included, the user will be asked for a file." (setq i 1) (setq beg 1) (while (not (> i parts)) - (set-buffer (get-buffer-create send-buffer-name)) + (set-buffer (gnus-get-buffer-create send-buffer-name)) (erase-buffer) (insert header) (when (and threaded gnus-uu-post-message-id) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index 803d2ea..c41fbae 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -319,7 +319,7 @@ See the Gnus manual for an explanation of the syntax used.") (t (cdr (assq type gnus-window-to-buffer)))))) (unless buffer (error "Illegal buffer type: %s" type)) - (switch-to-buffer (get-buffer-create + (switch-to-buffer (gnus-get-buffer-create (gnus-window-to-buffer-helper buffer))) (when (memq 'frame-focus split) (setq gnus-window-frame-focus window)) @@ -453,13 +453,7 @@ See the Gnus manual for an explanation of the syntax used.") (defun gnus-delete-windows-in-gnusey-frames () "Do a `delete-other-windows' in all frames that have Gnus windows." - (let ((buffers - (mapcar - (lambda (elem) - (let ((buf (gnus-window-to-buffer-helper (cdr elem)))) - (if (not (null buf)) - (get-buffer buf)))) - gnus-window-to-buffer))) + (let ((buffers (gnus-buffers))) (mapcar (lambda (frame) (unless (eq (cdr (assq 'minibuffer @@ -523,39 +517,22 @@ should have point." (nth 1 (window-edges window))) (defun gnus-remove-some-windows () - (let ((buffers gnus-window-to-buffer) + (let ((buffers (gnus-buffers)) buf bufs lowest-buf lowest) (save-excursion ;; Remove windows on all known Gnus buffers. - (while buffers - (and (setq buf (gnus-window-to-buffer-helper (cdar buffers))) - (get-buffer-window buf) - (progn - (push buf bufs) - (pop-to-buffer buf) - (when (or (not lowest) - (< (gnus-window-top-edge) lowest)) - (setq lowest (gnus-window-top-edge)) - (setq lowest-buf buf)))) - (setq buffers (cdr buffers))) - ;; Remove windows on *all* summary buffers. - (walk-windows - (lambda (win) - (let ((buf (window-buffer win))) - (when (string-match "^\\*\\(Dead \\)?Summary" (buffer-name buf)) - (push buf bufs) - (pop-to-buffer buf) - (when (or (not lowest) - (< (gnus-window-top-edge) lowest)) - (setq lowest-buf buf) - (setq lowest (gnus-window-top-edge))))))) + (while (setq buf (pop buffers)) + (when (get-buffer-window buf) + (push buf bufs) + (pop-to-buffer buf) + (when (or (not lowest) + (< (gnus-window-top-edge) lowest)) + (setq lowest (gnus-window-top-edge) + lowest-buf buf)))) (when lowest-buf (pop-to-buffer lowest-buf) (switch-to-buffer nntp-server-buffer)) - (while bufs - (when (not (eq (car bufs) lowest-buf)) - (delete-windows-on (car bufs))) - (setq bufs (cdr bufs)))))) + (mapcar (lambda (b) (delete-windows-on b t)) bufs)))) (provide 'gnus-win) diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index 9d3d239..00fc583 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -90,7 +90,6 @@ asynchronously. The compressed face will be piped to this command." (defvar gnus-active-hashtb) (defvar gnus-article-buffer) (defvar gnus-auto-center-summary) -(defvar gnus-buffer-list) (defvar gnus-current-headers) (defvar gnus-level-killed) (defvar gnus-level-zombie) diff --git a/lisp/gnus.el b/lisp/gnus.el index 82e1f48..19b7ab4 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.8.11" +(defconst gnus-version-number "6.8.12" "Version number for this version of gnus.") (defconst gnus-version - (format "Semi-gnus %s (based on Gnus 5.6.34; for SEMI 1.8, FLIM 1.8/1.9)" + (format "Semi-gnus %s (based on Gnus 5.6.36; for SEMI 1.8, FLIM 1.8/1.9)" gnus-version-number) "Version string for this version of gnus.") @@ -602,6 +602,33 @@ be set in `.emacs' instead." "Face used for normal interest read articles.") +;;; +;;; Gnus buffers +;;; + +(defvar gnus-buffers nil) + +(defun gnus-get-buffer-create (name) + "Do the same as `get-buffer-create', but store the created buffer." + (or (get-buffer name) + (car (push (get-buffer-create name) gnus-buffers)))) + +(defun gnus-add-buffer () + "Add the current buffer to the list of Gnus buffers." + (push (current-buffer) gnus-buffers)) + +(defun gnus-buffers () + "Return a list of live Gnus buffers." + (while (and gnus-buffers + (not (buffer-name (car gnus-buffers)))) + (pop gnus-buffers)) + (let ((buffers gnus-buffers)) + (while (cdr buffers) + (if (buffer-name (cadr buffers)) + (pop buffers) + (setcdr buffers (cddr buffers))))) + gnus-buffers) + ;;; Splash screen. (defvar gnus-group-buffer "*Group*") @@ -622,7 +649,7 @@ be set in `.emacs' instead." (defun gnus-splash () (save-excursion - (switch-to-buffer (get-buffer-create gnus-group-buffer)) + (switch-to-buffer (gnus-get-buffer-create gnus-group-buffer)) (let ((buffer-read-only nil)) (erase-buffer) (unless gnus-inhibit-startup-message @@ -690,9 +717,10 @@ be set in `.emacs' instead." (eval-when (load) (let ((command (format "%s" this-command))) - (when (and (string-match "gnus" command) - (not (string-match "gnus-other-frame" command))) - (gnus-splash)))) + (if (and (string-match "gnus" command) + (not (string-match "gnus-other-frame" command))) + (gnus-splash) + (gnus-get-buffer-create gnus-group-buffer)))) ;;; Do the rest. @@ -755,7 +783,7 @@ used to 899, you would say something along these lines: (or (getenv "NNTPSERVER") (and (file-readable-p gnus-nntpserver-file) (save-excursion - (set-buffer (get-buffer-create " *gnus nntp*")) + (set-buffer (gnus-get-buffer-create " *gnus nntp*")) (buffer-disable-undo (current-buffer)) (insert-file-contents gnus-nntpserver-file) (let ((name (buffer-string))) @@ -1468,9 +1496,6 @@ want." (defvar gnus-article-buffer "*Article*") (defvar gnus-server-buffer "*Server*") -(defvar gnus-buffer-list nil - "Gnus buffers that should be killed on exit.") - (defvar gnus-slave nil "Whether this Gnus is a slave or not.") @@ -1933,6 +1958,7 @@ This restriction may disappear in later versions of Gnus." ;;; Gnus Utility Functions ;;; + (defmacro gnus-string-or (&rest strings) "Return the first element of STRINGS that is a non-blank string. STRINGS will be evaluated in normal `or' order." @@ -1947,11 +1973,6 @@ STRINGS will be evaluated in normal `or' order." (setq strings nil))) string)) -;; Add the current buffer to the list of buffers to be killed on exit. -(defun gnus-add-current-to-buffer-list () - (or (memq (current-buffer) gnus-buffer-list) - (push (current-buffer) gnus-buffer-list))) - (defun gnus-version (&optional arg) "Version number of this version of Gnus. If ARG, insert string at point." diff --git a/lisp/message.el b/lisp/message.el index d9f2334..8eca692 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -307,6 +307,27 @@ If t, use `message-user-organization-file'." :group 'message-forwarding :type 'regexp) +(defcustom message-make-forward-subject-function + 'message-forward-subject-author-subject + "*A list of functions that are called to generate a subject header for forwarded messages. +The subject generated by the previous function is passed into each +successive function. + +The provided functions are: + +* message-forward-subject-author-subject (Source of article (author or + newsgroup)), in brackets followed by the subject +* message-forward-subject-fwd (Subject of article with 'Fwd:' prepended + to it." + :group 'message-forwarding + :type '(radio (function-item message-forward-subject-author-subject) + (function-item message-forward-subject-fwd))) + +(defcustom message-wash-forwarded-subjects nil + "*If non-nil, try to remove as much old cruft as possible from the subject of messages before generating the new subject of a forward." + :group 'message-forwarding + :type 'boolean) + (defcustom message-ignored-resent-headers "^Return-receipt" "*All headers that match this regexp will be deleted when resending a message." :group 'message-interface @@ -408,6 +429,7 @@ might set this variable to '(\"-f\" \"you@some.where\")." (defvar gnus-select-method) (defcustom message-post-method (cond ((and (boundp 'gnus-post-method) + (listp gnus-post-method) gnus-post-method) gnus-post-method) ((boundp 'gnus-select-method) @@ -1428,6 +1450,12 @@ C-c C-r message-caesar-buffer-body (rot13 the message body)." (goto-char (point-min)) (search-forward (concat "\n" mail-header-separator "\n") nil t)) +(defun message-goto-eoh () + "Move point to the end of the headers." + (interactive) + (message-goto-body) + (forward-line -2)) + (defun message-goto-signature () "Move point to the beginning of the message signature. If there is no signature in the article, go to the end and @@ -1954,7 +1982,12 @@ the user from the mailer." ;; Make sure there's a newline at the end of the message. (goto-char (point-max)) (unless (bolp) - (insert "\n"))) + (insert "\n")) + ;; Delete all invisible text. + (when (text-property-any (point-min) (point-max) 'invisible t) + (put-text-property (point-min) (point-max) 'invisible nil) + (unless (yes-or-no-p "Invisible text found and made visible; continue posting?") + (error "Invisible text found and made visible")))) (defun message-add-action (action &rest types) "Add ACTION to be performed when doing an exit of type TYPES." @@ -3725,8 +3758,57 @@ header line with the old Message-ID." (insert-file-contents file-name nil))) (t (error "message-recover cancelled"))))) +;;; Washing Subject: + +(defun message-wash-subject (subject) + "Remove junk like \"Re:\", \"(fwd)\", etc. that was added to the subject by previous forwarders, replyers, etc." + (nnheader-temp-write nil + (insert-string subject) + (goto-char (point-min)) + ;; strip Re/Fwd stuff off the beginning + (while (re-search-forward + "\\([Rr][Ee]:\\|[Ff][Ww][Dd]:\\|[Ff][Ww]:\\)" nil t) + (replace-match "")) + + ;; and gnus-style forwards [foo@bar.com] subject + (goto-char (point-min)) + (while (re-search-forward "\\[[^ \t]*\\(@\\|\\.\\)[^ \t]*\\]" nil t) + (replace-match "")) + + ;; and off the end + (goto-char (point-max)) + (while (re-search-backward "([Ff][Ww][Dd])" nil t) + (replace-match "")) + + ;; and finally, any whitespace that was left-over + (goto-char (point-min)) + (while (re-search-forward "^[ \t]+" nil t) + (replace-match "")) + (goto-char (point-max)) + (while (re-search-backward "[ \t]+$" nil t) + (replace-match "")) + + (buffer-string))) + ;;; Forwarding messages. +(defun message-forward-subject-author-subject (subject) + "Generate a subject for a forwarded message. +The form is: [Source] Subject, where if the original message was mail, +Source is the sender, and if the original message was news, Source is +the list of newsgroups is was posted to." + (concat "[" + (or (message-fetch-field + (if (message-news-p) "newsgroups" "from")) + "(nowhere)") + "] " subject)) + +(defun message-forward-subject-fwd (subject) + "Generate a subject for a forwarded message. +The form is: Fwd: Subject, where Subject is the original subject of +the message." + (concat "Fwd: " subject)) + (defun message-make-forward-subject () "Return a Subject header suitable for the message in the current buffer." (save-excursion diff --git a/lisp/nndir.el b/lisp/nndir.el index c4c7509..a3b5eae 100644 --- a/lisp/nndir.el +++ b/lisp/nndir.el @@ -89,7 +89,7 @@ (nnoo-map-functions nndir (nnml-retrieve-headers 0 nndir-current-group 0 0) (nnml-request-article 0 nndir-current-group 0 0) - (nnml-request-group nndir-current-group 0 0) + (nnmh-request-group nndir-current-group 0 0) (nnml-close-group nndir-current-group 0) (nnml-request-list (nnoo-current-server 'nndir) nndir-directory) (nnml-request-newsgroups (nnoo-current-server 'nndir) nndir-directory)) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index a03c195..c40f62c 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1154,7 +1154,7 @@ FUNC will be called with the group name to determine the article number." (let ((trace (nreverse nnmail-split-trace)) (restore (current-buffer))) (nnheader-set-temp-buffer "*Split Trace*") - (gnus-add-current-to-buffer-list) + (gnus-add-buffer) (while trace (insert (car trace) "\n") (setq trace (cdr trace))) diff --git a/lisp/nntp.el b/lisp/nntp.el index 5b6545f..3528e33 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -400,7 +400,7 @@ server there that you can connect to. See also (if (re-search-forward "\n\\.\r?\n" nil t) t nil)) - ;; A result that startx with a 3xx or 4xx code is terminated + ;; A result that starts with a 3xx or 4xx code is terminated ;; by a newline. ((looking-at "[34]") (if (search-forward "\n" nil t) @@ -585,7 +585,7 @@ server there that you can connect to. See also (nnheader-message 6 "NNTP: Receiving articles...done")) ;; Now we have all the responses. We go through the results, - ;; washes it and copies it over to the server buffer. + ;; wash it and copy it over to the server buffer. (set-buffer nntp-server-buffer) (erase-buffer) (setq last-point (point-min)) @@ -1001,10 +1001,7 @@ password contained in '~/.nntp-authinfo'." (while (not (eobp)) (end-of-line) (delete-char 1) - (insert nntp-end-of-line)) - (forward-char -1) - (unless (eq (char-after (1- (point))) ?\r) - (insert "\r")))) + (insert nntp-end-of-line)))) (defun nntp-retrieve-headers-with-xover (articles &optional fetch-old) (set-buffer nntp-server-buffer) diff --git a/texi/ChangeLog b/texi/ChangeLog index 735b586..99e2d27 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,24 @@ +1998-08-14 01:31:36 Simon Josefsson + + * gnus.texi (Posting Styles): New 'body style. + +1998-08-13 21:17:00 Lars Magne Ingebrigtsen + + * gnus.texi (Paging the Article): Addition. + +1998-08-13 00:13:47 Simon Josefsson + + * gnus.texi (Mail Group Commands): Typo. + +1998-08-12 21:28:09 Simon Josefsson + + * gnus.texi (Article Caching): gnus-cacheable-groups. + (Newest Features): remove gnus-cacheable-groups. + +1998-08-12 22:01:12 Lars Magne Ingebrigtsen + + * message.texi (Forwarding): Addition. + 1998-08-11 20:33:53 Justin Zaglio * gnus.texi (Group Maintenance): Fix. diff --git a/texi/Makefile.in b/texi/Makefile.in index a7fbb47..eb05e11 100644 --- a/texi/Makefile.in +++ b/texi/Makefile.in @@ -88,25 +88,25 @@ psout: latexboth: rm -f gnus-manual-a4.ps.gz gnus-manual-standard.ps.gz make latexps - mv /local/tmp/larsi/gnus.ps /local/tmp/larsi/gnus-manual-a4.ps - gzip /local/tmp/larsi/gnus-manual-a4.ps + mv gnus.ps gnus-manual-a4.ps + gzip gnus-manual-a4.ps sed 's/,a4paper/,letterpaper/' gnus.latexi > gnus-standard.latexi mv gnus-standard.latexi gnus.latexi - make latexps - mv /local/tmp/larsi/gnus.ps /local/tmp/larsi/gnus-manual-standard.ps - gzip /local/tmp/larsi/gnus-manual-standard.ps + make latexps PAPERTYPE=letter + mv gnus.ps gnus-manual-standard.ps + gzip gnus-manual-standard.ps out: - cp /local/tmp/larsi/gnus-manual-standard.ps.gz \ - /local/tmp/larsi/gnus-manual-a4.ps.gz \ + cp gnus-manual-standard.ps.gz \ + gnus-manual-a4.ps.gz \ /local/ftp/pub/emacs/gnus/manual - mv /local/tmp/larsi/gnus-manual-standard.ps.gz \ - /local/tmp/larsi/gnus-manual-a4.ps.gz \ + mv gnus-manual-standard.ps.gz \ + gnus-manual-a4.ps.gz \ /hom/larsi/www_docs/www.gnus.org/documents veryclean: make clean - rm -f gnus.dvi gnus.ps + rm -f gnus.dvi gnus.ps texi2latex.elc distclean: make clean diff --git a/texi/gnus.texi b/texi/gnus.texi index fba5b08..99cb929 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -3705,6 +3705,12 @@ Scroll the current article back one page (@code{gnus-summary-prev-page}). Scroll the current article one line forward (@code{gnus-summary-scroll-up}). +@item M-RET +@kindex M-RET (Summary) +@findex gnus-summary-scroll-down +Scroll the current article one line backward +(@code{gnus-summary-scroll-down}). + @item A g @itemx g @kindex A g (Summary) @@ -5302,13 +5308,17 @@ to score unwanted articles down and have them marked as read. They will not then be downloaded by this command. @vindex gnus-uncacheable-groups -It is likely that you do not want caching on some groups. For instance, +@vindex gnus-cacheable-groups +It is likely that you do not want caching on all groups. For instance, if your @code{nnml} mail is located under your home directory, it makes no sense to cache it somewhere else under your home directory. Unless you -feel that it's neat to use twice as much space. To limit the caching, -you could set the @code{gnus-uncacheable-groups} regexp to -@samp{^nnml}, for instance. This variable is @code{nil} by -default. +feel that it's neat to use twice as much space. + +To limit the caching, you could set @code{gnus-cacheable-groups} to a +regexp of groups to cache, @samp{^nntp} for instance, or set the +@code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance. +Both variables are @code{nil} by default. If a group matches both +variables, the group is not cached. @findex gnus-cache-generate-nov-databases @findex gnus-cache-generate-active @@ -7215,7 +7225,7 @@ name, a @code{From} header and a @code{Subject} header. @item B r @kindex B r (Summary) @findex gnus-summary-respool-article -Respool the mail article (@code{gnus-summary-move-article}). +Respool the mail article (@code{gnus-summary-respool-article}). @code{gnus-summary-respool-default-method} will be used as the default select method when respooling. This variable is @code{nil} by default, which means that the current group select method will be used instead. @@ -8379,9 +8389,10 @@ to @dfn{match}. Each style may contain a arbitrary amount of @dfn{attributes}. Each attribute consists of a @var{(name . value)} pair. The attribute name can be one of @code{signature}, @code{signature-file}, -@code{organization}, @code{address} or @code{name}. The attribute name -can also be a string. In that case, this will be used as a header name, -and the value will be inserted in the headers of the article. +@code{organization}, @code{address}, @code{name} or @code{body}. The +attribute name can also be a string. In that case, this will be used as +a header name, and the value will be inserted in the headers of the +article. The attribute value can be a string (used verbatim), a function (the return value will be used), a variable (its value will be used) or a @@ -8403,6 +8414,7 @@ So here's a new example: (posting-from-work-p (signature-file "~/.work-signature") (address "user@@bar.foo") + (body "You are fired.\n\nSincerely, your boss.") (organization "Important Work, Inc")) ("^nn.+:" (signature-file "~/.mail-signature")))) @@ -17612,9 +17624,6 @@ Mac, MS (etc) characters into ISO 8859-1. numbers and match on the age of the article. @item - gnus-cacheable-groups - -@item @example > > > If so, I've got one gripe: It seems that when I fire up gnus 5.2.25 > > > under xemacs-19.14, it's creating a new frame, but is erasing the @@ -17782,6 +17791,10 @@ summary buffer for each article. Implement gnus-batch-brew-soup. @item +Group parameters and summary commands for un/subscribing to mailing +lists. + +@item Solve the halting problem. @c TODO diff --git a/texi/message.texi b/texi/message.texi index 398285f..1fb2dfe 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -267,6 +267,24 @@ forwarded message will be inserted first in the new mail. @vindex message-included-forward-headers Regexp matching header lines to be included in forwarded messages. +@item message-make-forward-subject-function +@vindex message-make-forward-subject-function +A list of functions that are called to generate a subject header for +forwarded messages. The subject generated by the previous function is +passed into each successive function. + +The provided functions are: + +@table @code +@item message-forward-subject-author-subject +@findex message-forward-subject-author-subject +Source of article (author or newsgroup), in brackets followed by the +subject. + +@item message-forward-subject-fwd +Subject of article with @samp{Fwd:} prepended to it. +@end table + @end table