From 8285bf10634a5adcf2a54df0650b2aca16d8e4ff Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 5 Mar 1997 00:27:06 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 68 +++++++++++++++++ lisp/Makefile | 3 + lisp/article.el | 3 +- lisp/dgnushack.el | 10 --- lisp/gnus-art.el | 20 ++--- lisp/gnus-cache.el | 5 ++ lisp/gnus-group.el | 17 +++-- lisp/gnus-salt.el | 7 +- lisp/gnus-srvr.el | 2 +- lisp/gnus-start.el | 4 +- lisp/gnus-sum.el | 46 +++++++----- lisp/gnus-topic.el | 9 ++- lisp/gnus-util.el | 5 ++ lisp/gnus-uu.el | 177 ++++++++++++++++++++++++++++++--------------- lisp/gnus-win.el | 28 +++++-- lisp/gnus-xmas.el | 3 + lisp/gnus.el | 2 +- lisp/nnmail.el | 8 +- lisp/nntp.el | 27 +++---- lisp/nnvirtual.el | 37 ++++------ lisp/nnweb.el | 1 + texi/gnus.texi | 6 +- 22 files changed, 329 insertions(+), 159 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 63ec8c025..6a6ddaf86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,71 @@ +Sat Nov 16 11:32:43 1996 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-next-article): Ignore non-keyboard + events before starting to walk. + + * gnus-topic.el (gnus-topic-prepare-topic): Insert topics that + have 0 unread if there is anything under. + + * gnus-sum.el (gnus-summary-move-article): Do `B B' properly. + + * gnus-topic.el (gnus-topic-parameters): Return nil on + non-existant topics. + + * nntp.el (nntp-possibly-change-group): Would nix out async buffer + when switching groups. + + * gnus-sum.el (gnus-summary-expire-articles): Update info before + expiring. + + * article.el (article-strip-leading-blank-lines): Would strip too + much. + + * gnus-sum.el (gnus-summary-mode): Update specs after running + hook. + + * gnus-util.el (gnus-boundp): New function. + + * gnus-start.el (gnus-get-new-news-hook): Default to updating + display-time, if present. + +Fri Nov 15 13:59:16 1996 Steven L Baur + + * gnus-xmas.el (gnus-xmas-define): Better fix for dealing with + scroll-in-place, which will be preloaded in XEmacs 19.15. + + * gnus-art.el (gnus-article-prev-page): Guard scroll-(up|down) + against scroll-in-place package. + (gnus-article-next-page): Ditto. + + * gnus-salt.el (gnus-pick-next-page): Ditto. + +Fri Nov 15 21:40:12 1996 Lars Magne Ingebrigtsen + + * nnweb.el (gnus): Required. + + * gnus-group.el (gnus-group-clear-data-on-native-groups): Offer to + move cache. + + * gnus-cache.el (gnus-cache-move-cache): New command. + + * nnvirtual.el (nnvirtual-create-mapping): Handle groups with no + articles. + + * gnus-group.el (gnus-group-insert-group-line-info): Compute the + right number for dead groups. + + * nnvirtual.el: Complete-first-sentence-in-first-line-of-doc fix. + +Thu Nov 14 10:20:44 1996 Per Abrahamsen + + * gnus-win.el: Added customize support. + + * gnus-uu.el: Added customize support. + +Thu Nov 14 17:50:12 1996 Lars Magne Ingebrigtsen + + * gnus.el: Red Gnus v0.62 is released. + Thu Nov 14 12:25:23 1996 Lars Magne Ingebrigtsen * gnus.el (gnus-article-display-hook): Add diff --git a/lisp/Makefile b/lisp/Makefile index 10dc29d75..a3ffbbdae 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -6,6 +6,9 @@ total: rm -f *.elc ; $(EMACS) $(FLAGS) -f dgnushack-compile all: + rm -f *.elc ; $(EMACS) $(FLAGS) -f dgnushack-compile + +clever: $(EMACS) $(FLAGS) -f dgnushack-compile some: diff --git a/lisp/article.el b/lisp/article.el index 0950d939f..c2869b384 100644 --- a/lisp/article.el +++ b/lisp/article.el @@ -648,7 +648,8 @@ always hide." "Remove all blank lines from the beginning of the article." (interactive) (save-excursion - (let (buffer-read-only) + (let ((inhibit-point-motion-hooks t) + buffer-read-only) (goto-char (point-min)) (when (search-forward "\n\n" nil t) (while (and (not (eobp)) diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index ac4ef6771..fefa1a492 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -37,16 +37,6 @@ (defalias 'efs-re-read-dir 'ignore) (defalias 'ange-ftp-re-read-dir 'ignore) -(fset 'orig-require (symbol-function 'require)) - -(defun require (package &optional file) - "Avoid loading .elc files." - (let ((filename (concat (symbol-name package) ".el"))) - (condition-case err - (orig-require package filename) - (error - (orig-require package))))) - (eval-and-compile (unless (string-match "XEmacs" emacs-version) (fset 'get-popup-menu-response 'ignore) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 46247fe35..62b91c7ac 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1063,11 +1063,12 @@ Argument LINES specifies lines to be scrolled up." (gnus-narrow-to-page 1) ;Go to next page. nil) ;; More in this page. - (condition-case () - (scroll-up lines) - (end-of-buffer - ;; Long lines may cause an end-of-buffer error. - (goto-char (point-max)))) + (let ((scroll-in-place nil)) + (condition-case () + (scroll-up lines) + (end-of-buffer + ;; Long lines may cause an end-of-buffer error. + (goto-char (point-max))))) (move-to-window-line 0) nil)) @@ -1083,10 +1084,11 @@ Argument LINES specifies lines to be scrolled down." (gnus-narrow-to-page -1) ;Go to previous page. (goto-char (point-max)) (recenter -1)) - (prog1 - (ignore-errors - (scroll-down lines)) - (move-to-window-line 0)))) + (let ((scroll-in-place nil)) + (prog1 + (ignore-errors + (scroll-down lines)) + (move-to-window-line 0))))) (defun gnus-article-refer-article () "Read article specified by message-id around point." diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 142872654..a9b387d7f 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -642,6 +642,11 @@ If LOW, update the lower bound instead." (let ((nnml-generate-active-function 'identity)) (nnml-generate-nov-databases-1 dir))) +(defun gnus-cache-move-cache (dir) + "Move the cache tree to somewhere else." + (interactive "DMove the cache tree to: ") + (rename-file gnus-cache-directory dir)) + (provide 'gnus-cache) ;;; gnus-cache.el ends here diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index a91e7b3e3..81af8ece0 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1177,7 +1177,10 @@ If REGEXP, only list groups matching REGEXP." (if (member group gnus-zombie-list) gnus-level-zombie gnus-level-killed) nil (if (setq active (gnus-active group)) - (- (1+ (cdr active)) (car active)) 0) + (if (zerop (cdr active)) + 0 + (- (1+ (cdr active)) (car active))) + 0) nil)))) (defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level @@ -2479,7 +2482,10 @@ If REVERSE, sort in reverse order." (when (gnus-group-native-p (gnus-info-group info)) (gnus-info-clear-data info))) (gnus-get-unread-articles) - (gnus-dribble-enter "")))) + (gnus-dribble-enter "") + (when (gnus-y-or-n-p + "Move the cache away to avoid problems in the future? ") + (call-interactively 'gnus-cache-move-cache))))) (defun gnus-info-clear-data (info) "Clear all marks and read ranges from INFO." @@ -2565,7 +2571,8 @@ or nil if no action could be taken." (when all (gnus-add-marked-articles group 'tick nil nil 'force) (gnus-add-marked-articles group 'dormant nil nil 'force)) - (run-hooks 'gnus-group-catchup-group-hook) + (let ((gnus-newsgroup-name group)) + (run-hooks 'gnus-group-catchup-group-hook)) num)))) (defun gnus-group-expire-articles (&optional n) @@ -3137,8 +3144,8 @@ This command may read the active file." (when (and level (> (prefix-numeric-value level) gnus-level-killed)) (gnus-get-killed-groups)) - (gnus-group-prepare-flat (or level gnus-level-subscribed) - all (or lowest 1) regexp) + (gnus-group-prepare-flat + (or level gnus-level-subscribed) all (or lowest 1) regexp) (goto-char (point-min)) (gnus-group-position-point)) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 7c3dfee2c..9b4d238e9 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -265,9 +265,10 @@ This must be bound to a button-down mouse event." (defun gnus-pick-next-page () "Go to the next page. If at the end of the buffer, start reading articles." (interactive) - (condition-case nil - (scroll-up) - (end-of-buffer (gnus-pick-start-reading)))) + (let ((scroll-in-place nil)) + (condition-case nil + (scroll-up) + (end-of-buffer (gnus-pick-start-reading))))) ;;; ;;; gnus-binary-mode diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index d981834d6..421466362 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -626,7 +626,7 @@ buffer. (defun gnus-browse-read-group (&optional no-article) "Enter the group at the current line." (interactive) - (let ((group (gnus-browse-group-name))) + (let ((group (gnus-group-real-name (gnus-browse-group-name)))) (unless (gnus-group-read-ephemeral-group group gnus-browse-current-method nil (cons (current-buffer) 'browse)) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 2f3dc6a64..120eb76b7 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -336,7 +336,9 @@ This hook is called after Gnus is connected to the NNTP server." :group 'gnus-start :type 'hook) -(defcustom gnus-get-new-news-hook nil +(defcustom gnus-get-new-news-hook + (when (gnus-boundp 'display-time-timer) + '(display-time-event-handler)) "A hook run just before Gnus checks for new news." :group 'gnus-start :type 'hook) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index e2b586d9a..98ec38069 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2017,11 +2017,11 @@ The following commands are available: (make-local-variable 'gnus-summary-line-format) (make-local-variable 'gnus-summary-line-format-spec) (make-local-variable 'gnus-summary-mark-positions) - (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) - (gnus-update-summary-mark-positions) (gnus-make-local-hook 'post-command-hook) (gnus-add-hook 'post-command-hook 'gnus-clear-inboxes-moved nil t) - (run-hooks 'gnus-summary-mode-hook)) + (run-hooks 'gnus-summary-mode-hook) + (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) + (gnus-update-summary-mark-positions)) (defun gnus-summary-make-local-variables () "Make all the local summary buffer variables." @@ -2424,10 +2424,8 @@ This is all marks except unread, ticked, dormant, and expirable." (let ((gnus-replied-mark 129) (gnus-score-below-mark 130) (gnus-score-over-mark 130) - (thread nil) - (gnus-visual nil) (spec gnus-summary-line-format-spec) - pos) + thread gnus-visual pos) (save-excursion (gnus-set-work-buffer) (let ((gnus-summary-line-format-spec spec)) @@ -5334,8 +5332,9 @@ If BACKWARD, the previous article is selected instead of the next." "exiting")) (gnus-summary-next-group nil group backward))) (t - (gnus-summary-walk-group-buffer - gnus-newsgroup-name cmd unread backward))))))) + (when (numberp last-input-event) + (gnus-summary-walk-group-buffer + gnus-newsgroup-name cmd unread backward)))))))) (defun gnus-summary-walk-group-buffer (from-group cmd unread backward) (let ((keystrokes '((?\C-n (gnus-group-next-unread-group 1)) @@ -6524,14 +6523,19 @@ and `request-accept' functions." to-newsgroup select-method (not articles)))) ;; Crosspost the article. ((eq action 'crosspost) - (let ((xref (mail-header-xref (gnus-summary-article-header article)))) - (setq new-xref (concat gnus-newsgroup-name ":" article)) - (if (and xref (not (string= xref ""))) - (progn - (when (string-match "^Xref: " xref) - (setq xref (substring xref (match-end 0)))) - (setq new-xref (concat xref " " new-xref))) - (setq new-xref (concat (system-name) " " new-xref))) + (let ((xref (message-tokenize-header + (mail-header-xref (gnus-summary-article-header article)) + " "))) + (setq new-xref (concat (gnus-group-real-name gnus-newsgroup-name) + ":" article)) + (unless xref + (setq xref (list (system-name)))) + (setq new-xref + (concat + (mapconcat 'identity + (delete "Xref:" (delete new-xref xref)) + " ") + new-xref)) (save-excursion (set-buffer copy-buf) (gnus-request-article-this-buffer article gnus-newsgroup-name) @@ -6603,8 +6607,7 @@ and `request-accept' functions." (set-buffer copy-buf) (gnus-request-article-this-buffer article gnus-newsgroup-name) (nnheader-replace-header - "xref" (concat new-xref " " (gnus-group-prefixed-name - (car art-group) to-method) + "xref" (concat new-xref " " (car art-group) ":" (cdr art-group))) (gnus-request-replace-article article gnus-newsgroup-name (current-buffer))))) @@ -6743,7 +6746,12 @@ This will be the case if the article has both been mailed and posted." ;; This backend supports expiry. (let* ((total (gnus-group-total-expirable-p gnus-newsgroup-name)) (expirable (if total - (gnus-list-of-read-articles gnus-newsgroup-name) + (progn + ;; We need to update the info for + ;; this group for `gnus-list-of-read-articles' + ;; to give us the right answer. + (gnus-summary-update-info) + (gnus-list-of-read-articles gnus-newsgroup-name)) (setq gnus-newsgroup-expirable (sort gnus-newsgroup-expirable '<)))) (expiry-wait (if now 'immediate diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index ffccff003..5da0b0692 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -286,9 +286,8 @@ with some simple extensions. (defun gnus-topic-parameters (topic) "Return the parameters for TOPIC." (let ((top (gnus-topic-find-topology topic))) - (unless top - (error "No such topic: %s" topic)) - (nth 3 (cadr top)))) + (when top + (nth 3 (cadr top))))) (defun gnus-topic-set-parameters (topic parameters) "Set the topic parameters of TOPIC to PARAMETERS." @@ -391,6 +390,7 @@ articles in the topic and its subtopics." (beg (progn (beginning-of-line) (point))) (topicl (reverse topicl)) (all-entries entries) + (point-max (point-max)) (unread 0) (topic (car type)) info entry end active) @@ -428,7 +428,8 @@ articles in the topic and its subtopics." ;; Insert the topic line. (when (and (not silent) (or gnus-topic-display-empty-topics - (not (zerop unread)))) + (not (zerop unread)) + (/= point-max (point-max)))) (gnus-extent-start-open (point)) (gnus-topic-insert-topic-line (car type) visiblep diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 8c96631cb..1b927e1b9 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -36,6 +36,11 @@ (require 'timezone) (require 'message) +(defun gnus-boundp (variable) + "Return non-nil if VARIABLE is bound and non-nil." + (and (boundp variable) + (symbol-value variable))) + (defmacro gnus-eval-in-buffer-window (buffer &rest forms) "Pop to BUFFER, evaluate FORMS, and then return to the original window." (let ((tempvar (make-symbol "GnusStartBufferWindow")) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index 1b043851a..5dbdcd0bd 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -31,9 +31,13 @@ (require 'message) (require 'gnus-msg) +(defgroup gnus-extract nil + "Extracting encoded files." + :group 'gnus) + ;; Default viewing action rules -(defvar gnus-uu-default-view-rules +(defcustom gnus-uu-default-view-rules '(("\\.te?xt$\\|\\.doc$\\|read.*me\\|\\.c?$\\|\\.h$\\|\\.bat$\\|\\.asm$\\|makefile" "cat %s | sed s/\r//g") ("\\.pas$" "cat %s | sed s/\r//g") ("\\.[1-9]$" "groff -mandoc -Tascii %s | sed s/\b.//g") @@ -51,7 +55,7 @@ ("\\.\\(flc\\|fli\\|rle\\|iff\\|pfx\\|avi\\|sme\\|rpza\\|dl\\|qt\\|rsrc\\|mov\\)$" "xanim") ("\\.\\(tar\\|arj\\|zip\\|zoo\\|arc\\|gz\\|Z\\|lzh\\|ar\\|lha\\)$" "gnus-uu-archive")) - "*Default actions to be taken when the user asks to view a file. + "Default actions to be taken when the user asks to view a file. To change the behaviour, you can either edit this variable or set `gnus-uu-user-view-rules' to something useful. @@ -78,22 +82,28 @@ variable gnus-uu first consults when trying to decide how to view a file. If this variable contains no matches, gnus-uu examines the default rule variable provided in this package. If gnus-uu finds no match here, it uses `gnus-uu-user-view-rules-end' to try to make a -match.") +match." + :group 'gnus-extract + :type '(repeat (group regexp (string :tag "Command")))) -(defvar gnus-uu-user-view-rules nil - "*Variable detailing what actions are to be taken to view a file. +(defcustom gnus-uu-user-view-rules nil + "What actions are to be taken to view a file. See the documentation on the `gnus-uu-default-view-rules' variable for -details.") +details." + :group 'gnus-extract + :type '(repeat (group regexp (string :tag "Command")))) -(defvar gnus-uu-user-view-rules-end +(defcustom gnus-uu-user-view-rules-end '(("" "file")) - "*Variable saying what actions are to be taken if no rule matched the file name. + "What actions are to be taken if no rule matched the file name. See the documentation on the `gnus-uu-default-view-rules' variable for -details.") +details." + :group 'gnus-extract + :type '(repeat (group regexp (string :tag "Command")))) ;; Default unpacking commands -(defvar gnus-uu-default-archive-rules +(defcustom gnus-uu-default-archive-rules '(("\\.tar$" "tar xf") ("\\.zip$" "unzip -o") ("\\.ar$" "ar x") @@ -102,20 +112,25 @@ details.") ("\\.\\(lzh\\|lha\\)$" "lha x") ("\\.Z$" "uncompress") ("\\.gz$" "gunzip") - ("\\.arc$" "arc -x"))) + ("\\.arc$" "arc -x")) + "See `gnus-uu-user-archive-rules'." + :group 'gnus-extract + :type '(repeat (group regexp (string :tag "Command")))) (defvar gnus-uu-destructive-archivers (list "uncompress" "gunzip")) -(defvar gnus-uu-user-archive-rules nil - "*A list that can be set to override the default archive unpacking commands. +(defcustom gnus-uu-user-archive-rules nil + "A list that can be set to override the default archive unpacking commands. To use, for instance, 'untar' to unpack tar files and 'zip -x' to unpack zip files, say the following: (setq gnus-uu-user-archive-rules '((\"\\\\.tar$\" \"untar\") - (\"\\\\.zip$\" \"zip -x\")))") + (\"\\\\.zip$\" \"zip -x\")))" + :group 'gnus-extract + :type '(repeat (group regexp (string :tag "Command")))) -(defvar gnus-uu-ignore-files-by-name nil +(defcustom gnus-uu-ignore-files-by-name nil "*A regular expression saying what files should not be viewed based on name. If, for instance, you want gnus-uu to ignore all .au and .wav files, you could say something like @@ -123,9 +138,12 @@ you could say something like (setq gnus-uu-ignore-files-by-name \"\\\\.au$\\\\|\\\\.wav$\") Note that this variable can be used in conjunction with the -`gnus-uu-ignore-files-by-type' variable.") +`gnus-uu-ignore-files-by-type' variable." + :group 'gnus-extract + :type '(choice (const :tag "off" nil) + (regexp :format "%v"))) -(defvar gnus-uu-ignore-files-by-type nil +(defcustom gnus-uu-ignore-files-by-type nil "*A regular expression saying what files that shouldn't be viewed, based on MIME file type. If, for instance, you want gnus-uu to ignore all audio files and all mpegs, you could say something like @@ -133,7 +151,10 @@ you could say something like (setq gnus-uu-ignore-files-by-type \"audio/\\\\|video/mpeg\") Note that this variable can be used in conjunction with the -`gnus-uu-ignore-files-by-name' variable.") +`gnus-uu-ignore-files-by-name' variable." + :group 'gnus-extract + :type '(choice (const :tag "off" nil) + (regexp :format "%v"))) ;; Pseudo-MIME support @@ -178,66 +199,95 @@ Note that this variable can be used in conjunction with the ;; Various variables users may set -(defvar gnus-uu-tmp-dir "/tmp/" +(defcustom gnus-uu-tmp-dir "/tmp/" "*Variable saying where gnus-uu is to do its work. -Default is \"/tmp/\".") +Default is \"/tmp/\"." + :group 'gnus-extract + :type 'directory) -(defvar gnus-uu-do-not-unpack-archives nil +(defcustom gnus-uu-do-not-unpack-archives nil "*Non-nil means that gnus-uu won't peek inside archives looking for files to display. -Default is nil.") +Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-ignore-default-view-rules nil +(defcustom gnus-uu-ignore-default-view-rules nil "*Non-nil means that gnus-uu will ignore the default viewing rules. -Only the user viewing rules will be consulted. Default is nil.") +Only the user viewing rules will be consulted. Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-grabbed-file-functions nil - "*Functions run on each file after successful decoding. +(defcustom gnus-uu-grabbed-file-functions nil + "Functions run on each file after successful decoding. They will be called with the name of the file as the argument. Likely functions you can use in this list are `gnus-uu-grab-view' -and `gnus-uu-grab-move'.") +and `gnus-uu-grab-move'." + :group 'gnus-extract + :options '(gnus-uu-grab-view gnus-uu-grab-move) + :type 'hook) -(defvar gnus-uu-ignore-default-archive-rules nil +(defcustom gnus-uu-ignore-default-archive-rules nil "*Non-nil means that gnus-uu will ignore the default archive unpacking commands. -Only the user unpacking commands will be consulted. Default is nil.") +Only the user unpacking commands will be consulted. Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-kill-carriage-return t +(defcustom gnus-uu-kill-carriage-return t "*Non-nil means that gnus-uu will strip all carriage returns from articles. -Default is t.") +Default is t." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-view-with-metamail nil +(defcustom gnus-uu-view-with-metamail nil "*Non-nil means that files will be viewed with metamail. The gnus-uu viewing functions will be ignored and gnus-uu will try to guess at a content-type based on file name suffixes. Default -it nil.") +it nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-unmark-articles-not-decoded nil +(defcustom gnus-uu-unmark-articles-not-decoded nil "*Non-nil means that gnus-uu will mark articles that were unsuccessfully decoded as unread. -Default is nil.") +Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-correct-stripped-uucode nil +(defcustom gnus-uu-correct-stripped-uucode nil "*Non-nil means that gnus-uu will *try* to fix uuencoded files that have had trailing spaces deleted. -Default is nil.") +Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-save-in-digest nil +(defcustom gnus-uu-save-in-digest nil "*Non-nil means that gnus-uu, when asked to save without decoding, will save in digests. If this variable is nil, gnus-uu will just save everything in a file without any embellishments. The digesting almost conforms to RFC1153 - no easy way to specify any meaningful volume and issue numbers were found, -so I simply dropped them.") +so I simply dropped them." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-digest-headers +(defcustom gnus-uu-digest-headers '("^Date:" "^From:" "^To:" "^Cc:" "^Subject:" "^Message-ID:" "^Keywords:" "^Summary:" "^References:") - "*List of regexps to match headers included in digested messages. -The headers will be included in the sequence they are matched.") + "List of regexps to match headers included in digested messages. +The headers will be included in the sequence they are matched." + :group 'gnus-extract + :type '(repeat regexp)) -(defvar gnus-uu-save-separate-articles nil - "*Non-nil means that gnus-uu will save articles in separate files.") +(defcustom gnus-uu-save-separate-articles nil + "*Non-nil means that gnus-uu will save articles in separate files." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-be-dangerous 'ask +(defcustom gnus-uu-be-dangerous 'ask "*Specifies what to do if unusual situations arise during decoding. If nil, be as conservative as possible. If t, ignore things that -didn't work, and overwrite existing files. Otherwise, ask each time.") +didn't work, and overwrite existing files. Otherwise, ask each time." + :group 'gnus-extract + :type '(choice (const :tag "conservative" nil) + (const :tag "ask" ask) + (const :tag "liberal" t))) ;; Internal variables @@ -1676,37 +1726,50 @@ didn't work, and overwrite existing files. Otherwise, ask each time.") ;; parameters: PATH-NAME and FILE-NAME. (E.g. "/home/gaga/spiral.jpg" ;; and "spiral.jpg", respectively.) The function should return nil if ;; the encoding wasn't successful. -(defvar gnus-uu-post-encode-method 'gnus-uu-post-encode-uuencode +(defcustom gnus-uu-post-encode-method 'gnus-uu-post-encode-uuencode "Function used for encoding binary files. There are three functions supplied with gnus-uu for encoding files: `gnus-uu-post-encode-uuencode', which does straight uuencoding; `gnus-uu-post-encode-mime', which encodes with base64 and adds MIME headers; and `gnus-uu-post-encode-mime-uuencode', which encodes with -uuencode and adds MIME headers.") - -(defvar gnus-uu-post-include-before-composing nil +uuencode and adds MIME headers." + :group 'gnus-extract + :type '(radio (function-item gnus-uu-post-encode-uuencode) + (function-item gnus-uu-post-encode-mime) + (function-item gnus-uu-post-encode-mime-uuencode) + (function :tag "Other"))) + +(defcustom gnus-uu-post-include-before-composing nil "Non-nil means that gnus-uu will ask for a file to encode before you compose the article. If this variable is t, you can either include an encoded file with -\\[gnus-uu-post-insert-binary-in-article] or have one included for you when you post the article.") +\\[gnus-uu-post-insert-binary-in-article] or have one included for you when you post the article." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-post-length 990 +(defcustom gnus-uu-post-length 990 "Maximum length of an article. The encoded file will be split into how many articles it takes to -post the entire file.") +post the entire file." + :group 'gnus-extract + :type 'integer) -(defvar gnus-uu-post-threaded nil +(defcustom gnus-uu-post-threaded nil "Non-nil means that gnus-uu will post the encoded file in a thread. This may not be smart, as no other decoder I have seen are able to follow threads when collecting uuencoded articles. (Well, I have seen one package that does that - gnus-uu, but somehow, I don't think that -counts...) Default is nil.") +counts...) Default is nil." + :group 'gnus-extract + :type 'boolean) -(defvar gnus-uu-post-separate-description t +(defcustom gnus-uu-post-separate-description t "Non-nil means that the description will be posted in a separate article. The first article will typically be numbered (0/x). If this variable is nil, the description the user enters will be included at the beginning of the first article, which will be numbered (1/x). Default -is t.") +is t." + :group 'gnus-extract + :type 'boolean) (defvar gnus-uu-post-binary-separator "--binary follows this line--") (defvar gnus-uu-post-message-id nil) diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index 489898c95..a0ceabbe9 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -27,20 +27,32 @@ (require 'gnus) -(defvar gnus-use-full-window t - "*If non-nil, use the entire Emacs screen.") +(defgroup gnus-windows nil + "Window configuration." + :group 'gnus) + +(defcustom gnus-use-full-window t + "*If non-nil, use the entire Emacs screen." + :group 'gnus-windows + :type 'boolean) (defvar gnus-window-configuration nil "Obsolete variable. See `gnus-buffer-configuration'.") -(defvar gnus-window-min-width 2 - "*Minimum width of Gnus buffers.") +(defcustom gnus-window-min-width 2 + "*Minimum width of Gnus buffers." + :group 'gnus-windows + :type 'integer) -(defvar gnus-window-min-height 1 - "*Minimum height of Gnus buffers.") +(defcustom gnus-window-min-height 1 + "*Minimum height of Gnus buffers." + :group 'gnus-windows + :type 'integer) -(defvar gnus-always-force-window-configuration nil - "*If non-nil, always force the Gnus window configurations.") +(defcustom gnus-always-force-window-configuration nil + "*If non-nil, always force the Gnus window configurations." + :group 'gnus-windows + :type 'boolean) (defvar gnus-buffer-configuration '((group diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index b53540351..fddc12f91 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -392,6 +392,9 @@ call it with the value of the `gnus-data' text property." (when (< emacs-minor-version 14) (fset 'gnus-set-text-properties 'gnus-xmas-set-text-properties)) + (when (fboundp 'turn-off-scroll-in-place) + (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place)) + (unless (boundp 'standard-display-table) (setq standard-display-table nil)) diff --git a/lisp/gnus.el b/lisp/gnus.el index 886ee546e..e7654078a 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.62" +(defconst gnus-version-number "0.63" "Version number for this version of Gnus.") (defconst gnus-version (format "Red Gnus v%s" gnus-version-number) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 718ac0999..741d84f27 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -467,8 +467,8 @@ parameter. It should return nil, `warn' or `delete'.") (if (not (buffer-modified-p errors)) ;; No output => movemail won (progn - (or popmail - (set-file-modes tofile nnmail-default-file-modes)) + (unless popmail + (set-file-modes tofile nnmail-default-file-modes)) (push inbox nnmail-moved-inboxes)) (set-buffer errors) ;; There may be a warning about older revisions. We @@ -476,8 +476,8 @@ parameter. It should return nil, `warn' or `delete'.") (goto-char (point-min)) (if (search-forward "older revision" nil t) (progn - (or popmail - (set-file-modes tofile nnmail-default-file-modes)) + (unless popmail + (set-file-modes tofile nnmail-default-file-modes)) (push inbox nnmail-moved-inboxes)) ;; Probably a real error. (subst-char-in-region (point-min) (point-max) ?\n ?\ ) diff --git a/lisp/nntp.el b/lisp/nntp.el index 2fdbfcb1e..54394632d 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -466,17 +466,13 @@ It will prompt for a password." This function is supposed to be called from `nntp-server-opened-hook'. It will prompt for a password." (when (file-exists-p "~/.nntp-authinfo") - (save-excursion - (set-buffer (get-buffer-create " *authinfo*")) - (buffer-disable-undo (current-buffer)) - (erase-buffer) + (nnheader-temp-write nil (insert-file-contents "~/.nntp-authinfo") (goto-char (point-min)) (nntp-send-command "^.*\r?\n" "AUTHINFO USER" (user-login-name)) (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" - (buffer-substring (point) (progn (end-of-line) (point)))) - (kill-buffer (current-buffer))))) + (buffer-substring (point) (progn (end-of-line) (point))))))) ;;; Internal functions. @@ -745,14 +741,19 @@ It will prompt for a password." (unless connectionless (or (nntp-find-connection nntp-server-buffer) - (nntp-open-connection nntp-server-buffer))) + (nntp-open-connection nntp-server-buffer)))) - (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) + (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) + (if nnheader-callback-function + (progn + (goto-char (point-max)) + (forward-line -1) + (gnus-delete-line)) (erase-buffer))))))) (defun nntp-decode-text (&optional cr-only) diff --git a/lisp/nnvirtual.el b/lisp/nnvirtual.el index 58754266c..974ad9891 100644 --- a/lisp/nnvirtual.el +++ b/lisp/nnvirtual.el @@ -66,19 +66,16 @@ virtual group.") to virtual article number.") (defvoo nnvirtual-mapping-offsets nil - "Table indexed by component group to an offset to be applied to article -numbers in that group.") + "Table indexed by component group to an offset to be applied to article numbers in that group.") (defvoo nnvirtual-mapping-len 0 "Number of articles in this virtual group.") (defvoo nnvirtual-mapping-reads nil - "Compressed sequence of read articles on the virtual group as computed -from the unread status of individual component groups.") + "Compressed sequence of read articles on the virtual group as computed from the unread status of individual component groups.") (defvoo nnvirtual-mapping-marks nil - "Compressed marks alist for the virtual group as computed from the -marks of individual component groups.") + "Compressed marks alist for the virtual group as computed from the marks of individual component groups.") (defvoo nnvirtual-status-string "") @@ -339,8 +336,7 @@ marks of individual component groups.") (defun nnvirtual-update-xref-header (group article prefix system-name) - "Edit current NOV header in current buffer to have an xref to the -component group, and also server prefix any existing xref lines." + "Edit current NOV header in current buffer to have an xref to the component group, and also server prefix any existing xref lines." ;; Move to beginning of Xref field, creating a slot if needed. (beginning-of-line) (looking-at @@ -512,8 +508,7 @@ If UPDATE-P is not nil, call gnus-group-update-group on the components." ;;; unique reverse mapping. (defun nnvirtual-map-article (article) - "Return a cons of the component group and article corresponding to -the given virtual ARTICLE." + "Return a cons of the component group and article corresponding to the given virtual ARTICLE." (let ((table nnvirtual-mapping-table) entry group-pos) (while (and table @@ -534,8 +529,7 @@ the given virtual ARTICLE." (defun nnvirtual-reverse-map-article (group article) - "Return the virtual article number corresponding to the given -component GROUP and ARTICLE." + "Return the virtual article number corresponding to the given component GROUP and ARTICLE." (let ((table nnvirtual-mapping-table) (group-pos 0) entry) @@ -584,11 +578,12 @@ then it is left out of the result." (defun nnvirtual-partition-sequence (articles) - "Return an association list of component article numbers, indexed -by elements of nnvirtual-component-groups, based on the sequence -ARTICLES of virtual article numbers. ARTICLES should be sorted, -and can be a compressed sequence. If any of the article numbers has -no corresponding component article, then it is left out of the result." + "Return an association list of component article numbers. +These are indexed by elements of nnvirtual-component-groups, based on +the sequence ARTICLES of virtual article numbers. ARTICLES should be +sorted, and can be a compressed sequence. If any of the article +numbers has no corresponding component article, then it is left out of +the result." (when (numberp (cdr-safe articles)) (setq articles (list articles))) (let ((carticles (mapcar (lambda (g) (list g)) @@ -611,9 +606,9 @@ no corresponding component article, then it is left out of the result." (defun nnvirtual-create-mapping () - "Build the tables necessary to map between component (group, article) -to virtual article. Generate the set of read messages and marks for -the virtual group based on the marks on the component groups." + "Build the tables necessary to map between component (group, article) to virtual article. +Generate the set of read messages and marks for the virtual group +based on the marks on the component groups." (let ((cnt 0) (tot 0) (M 0) @@ -632,7 +627,7 @@ the virtual group based on the marks on the component groups." (setq active (gnus-activate-group g) min (car active) max (cdr active)) - (when (and active (>= max min)) + (when (and active (>= max min) (not (zerop max))) ;; store active information (push (list g (- max min -1) max) actives) ;; collect unread/mark info for later diff --git a/lisp/nnweb.el b/lisp/nnweb.el index f6549a2a3..2a2173d8b 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -31,6 +31,7 @@ (require 'nnoo) (require 'message) (require 'gnus-util) +(require 'gnus) (require 'w3) (require 'url) (ignore-errors diff --git a/texi/gnus.texi b/texi/gnus.texi index d03f8adf5..1b4d8a38a 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename gnus -@settitle Red Gnus 0.62 Manual +@settitle Red Gnus 0.63 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.62 Manual +@title Red Gnus 0.63 Manual @author by Lars Magne Ingebrigtsen @page @@ -323,6 +323,8 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. +This manual corresponds to Red Gnus 0.63 + @end ifinfo @iftex -- 2.25.1