From 531e5812c44a54d0ad6cfe2809e81fbe6b711d13 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 18 Oct 2004 22:23:44 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-54 Update from CVS 2004-10-18 Reiner Steib * lisp/gnus/mml.el (mml-preview): Use `pop-to-buffer'. * lisp/gnus/message.el (message-goto-mail-followup-to): Insert after "To". (message-carefully-insert-headers): Add comment. * lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Add help texts. * lisp/gnus/gnus-art.el (gnus-button-alist): Improve `gnus-button-handle-library' entry. * lisp/gnus/gnus-art.el (gnus-button-alist): Fixed regexp for manual links. * lisp/gnus/gnus-group.el (gnus-group-get-new-news-this-group): Added doc-string. * lisp/gnus/gnus-start.el (gnus-activate-group): Added doc-string. * lisp/gnus/gnus-art.el (gnus-button-handle-man, gnus-button-alist): Try to handle manual section. * lisp/gnus/imap.el (imap-store-password): New variable. (imap-interactive-login): Use it. Suggested by Mark Plaksin . * lisp/gnus/gnus-art.el (gnus-button-alist, gnus-header-button-alist): Allow / in mailto URLs. * lisp/gnus/spam.el (spam-directory): Derive from `gnus-directory'. * lisp/gnus/gnus-sum.el (gnus-pick-line-number): Add autoload. --- lisp/gnus/ChangeLog | 33 +++++++++++++++++++++++++++++++++ lisp/gnus/gnus-art.el | 19 ++++++++++++------- lisp/gnus/gnus-group.el | 3 ++- lisp/gnus/gnus-start.el | 4 ++-- lisp/gnus/gnus-sum.el | 11 ++++++++--- lisp/gnus/imap.el | 12 +++++++++--- lisp/gnus/mail-source.el | 2 +- lisp/gnus/message.el | 3 ++- lisp/gnus/mml.el | 6 +++--- lisp/gnus/spam.el | 2 +- man/message.texi | 4 ++-- 11 files changed, 75 insertions(+), 24 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 70f43183e28..9a43b077ea7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,36 @@ +2004-10-18 Reiner Steib + + * mml.el (mml-preview): Use `pop-to-buffer'. + + * message.el (message-goto-mail-followup-to): Insert after "To". + (message-carefully-insert-headers): Add comment. + + * gnus-sum.el (gnus-summary-make-menu-bar): Add help texts. + + * gnus-art.el (gnus-button-alist): Improve + `gnus-button-handle-library' entry. + + * gnus-art.el (gnus-button-alist): Fixed regexp for manual links. + + * gnus-group.el (gnus-group-get-new-news-this-group): Added + doc-string. + + * gnus-start.el (gnus-activate-group): Added doc-string. + + * gnus-art.el (gnus-button-handle-man, gnus-button-alist): Try to + handle manual section. + + * imap.el (imap-store-password): New variable. + (imap-interactive-login): Use it. + Suggested by Mark Plaksin . + + * gnus-art.el (gnus-button-alist, gnus-header-button-alist): Allow + / in mailto URLs. + + * spam.el (spam-directory): Derive from `gnus-directory'. + + * gnus-sum.el (gnus-pick-line-number): Add autoload. + 2004-10-17 Richard M. Stallman * gnus-registry.el (gnus-registry-unload-hook): diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index d4dbe1319e0..7a365d81a2c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6122,7 +6122,7 @@ positives are possible." ("\\( \n\t]+\\)>" 0 (>= gnus-button-message-level 0) gnus-url-mailto 2) ;; RFC 2368 (The mailto URL scheme) - ("mailto:\\([-a-z.@_+0-9%=?&]+\\)" + ("\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)" 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) ("\\bmailto:\\([^ \n\t]+\\)" 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) @@ -6170,8 +6170,9 @@ positives are possible." ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1) ;; The following entries may lead to many false positives so don't enable - ;; them by default (use a high button level): - ("/\\([a-z][-a-z0-9]+\\.el\\)\\>" + ;; them by default (use a high button level). + ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" + ;; Exclude [.?] for URLs in gmane.emacs.cvs 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) ("`\\([a-z][-a-z0-9]+\\.el\\)'" 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) @@ -6204,16 +6205,16 @@ positives are possible." (gnus-button-url-regexp 0 (>= gnus-button-browse-level 0) browse-url 0) ;; man pages - ("\\b\\([a-z][a-z]+\\)([1-9])\\W" + ("\\b\\([a-z][a-z]+([1-9])\\)\\W" 0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3)) gnus-button-handle-man 1) ;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x) - ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W" + ("\\b\\([a-z][-_.a-z0-9]+([1-9])\\)\\W" 0 (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5)) gnus-button-handle-man 1) ;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm), ;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7) - ("\\b\\([a-z][-+_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W\\|\\b\\(X\\)([1-9])\\W" + ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W" 0 (>= gnus-button-man-level 5) gnus-button-handle-man 1) ;; MID or mail: To avoid too many false positives we don't try to catch ;; all kind of allowed MIDs or mail addresses. Domain part must contain @@ -6257,7 +6258,7 @@ variable it the real callback function." 0 (>= gnus-button-browse-level 0) browse-url 0) ("^[^:]+:" gnus-button-url-regexp 0 (>= gnus-button-browse-level 0) browse-url 0) - ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&]+\\)" + ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)" 0 (>= gnus-button-message-level 0) gnus-url-mailto 1) ("^[^:]+:" "\\(<\\(url: \\)?\\(nntp\\|news\\):\\([^>\n ]*\\)>\\)" 1 (>= gnus-button-message-level 0) gnus-button-message-id 4)) @@ -6602,6 +6603,10 @@ specified by `gnus-button-alist'." (defun gnus-button-handle-man (url) "Fetch a man page." + (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) + (when (eq gnus-button-man-handler 'woman) + (setq url (gnus-replace-in-string url "([1-9][X1a-z]*).*\\'" ""))) + (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url) (funcall gnus-button-man-handler url)) (defun gnus-button-handle-info-url (url) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 435acb1d6c2..bff4ba19a6f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -3599,7 +3599,8 @@ re-scanning. If ARG is non-nil and not a number, this will force (defun gnus-group-get-new-news-this-group (&optional n dont-scan) "Check for newly arrived news in the current group (and the N-1 next groups). The difference between N and the number of newsgroup checked is returned. -If N is negative, this group and the N-1 previous groups will be checked." +If N is negative, this group and the N-1 previous groups will be checked. +If DONT-SCAN is non-nil, scan non-activated groups as well." (interactive "P") (let* ((groups (gnus-group-process-prefix n)) (ret (if (numberp n) (- n (length groups)) 0)) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 86dfc5f30e4..ced7921437f 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1479,8 +1479,8 @@ newsgroup." (setcdr active (cdr cache-active)))))))) (defun gnus-activate-group (group &optional scan dont-check method) - ;; Check whether a group has been activated or not. - ;; If SCAN, request a scan of that group as well. + "Check whether a group has been activated or not. +If SCAN, request a scan of that group as well." (let ((method (or method (inline (gnus-find-method-for-group group)))) active) (and (inline (gnus-check-server method)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 6f6f728720b..38877a78192 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -44,6 +44,7 @@ (autoload 'gnus-cache-write-active "gnus-cache") (autoload 'gnus-mailing-list-insinuate "gnus-ml" nil t) (autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" nil t) +(autoload 'gnus-pick-line-number "gnus-salt" nil t) (autoload 'mm-uu-dissect "mm-uu") (autoload 'gnus-article-outlook-deuglify-article "deuglify" "Deuglify broken Outlook (Express) articles and redisplay." @@ -2238,8 +2239,12 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ["Pipe through a filter..." gnus-summary-pipe-output t] ["Add to SOUP packet" gnus-soup-add-article t] ["Print with Muttprint..." gnus-summary-muttprint t] - ["Print" gnus-summary-print-article t]) - ("Backend" + ["Print" gnus-summary-print-article + ,@(if (featurep 'xemacs) '(t) + '(:help "Generate and print a PostScript image"))]) + ("Copy, move,... (Backend)" + ,@(if (featurep 'xemacs) '(t) + '(:help "Copying, moving, expiring articles...")) ["Respool article..." gnus-summary-respool-article t] ["Move article..." gnus-summary-move-article (gnus-check-backend-function @@ -2330,7 +2335,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) `("Post" ["Send a message (mail or news)" gnus-summary-post-news ,@(if (featurep 'xemacs) '(t) - '(:help "Post an article"))] + '(:help "Compose a new message (mail or news)"))] ["Followup" gnus-summary-followup ,@(if (featurep 'xemacs) '(t) '(:help "Post followup to this article"))] diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 326c998c5d9..6ef8dfa5fe2 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -270,6 +270,11 @@ Shorter values mean quicker response, but is more CPU intensive." :type 'number :group 'imap) +(defcustom imap-store-password nil + "If non-nil, store session password without promting." + :group 'imap + :type 'boolean) + ;; Various variables. (defvar imap-fetch-data-hook nil @@ -827,9 +832,10 @@ Returns t if login was successful, nil otherwise." (progn (setq ret t imap-username user) - (if (and (not imap-password) - (y-or-n-p "Store password for this session? ")) - (setq imap-password passwd))) + (when (and (not imap-password) + (or imap-store-password + (y-or-n-p "Store password for this session? "))) + (setq imap-password passwd))) (message "Login failed...") (setq passwd nil) (setq imap-password nil) diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index b35cd1d0448..740f4c9c3a3 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -257,7 +257,7 @@ If non-nil, this maildrop will be checked periodically for new mail." :type 'file) (defcustom mail-source-directory message-directory - "Directory where files (if any) will be stored." + "Directory where incoming mail source files (if any) will be stored." :group 'mail-source :type 'directory) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 9e61e007a3e..585a72af549 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2629,7 +2629,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)." (defun message-goto-mail-followup-to () "Move point to the Mail-Followup-To header." (interactive) - (message-position-on-field "Mail-Followup-To" "From")) + (message-position-on-field "Mail-Followup-To" "To")) (defun message-goto-keywords () "Move point to the Keywords header." @@ -2739,6 +2739,7 @@ or in the synonym headers, defined by `message-header-synonyms'." ;; FIXME: Should compare only the address and not the full name. Comparison ;; should be done case-folded (and with `string=' rather than ;; `string-match'). + ;; (mail-strip-quoted-names "Foo Bar , bla@fasel (Bla Fasel)") (dolist (header headers) (let* ((header-name (symbol-name (car header))) (new-header (cdr header)) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 2deb69fe36c..8efaede70e0 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1077,9 +1077,9 @@ If RAW, don't highlight the article." (message-fetch-field "Newsgroups"))) message-posting-charset))) (message-options-set-recipient) - (switch-to-buffer (generate-new-buffer - (concat (if raw "*Raw MIME preview of " - "*MIME preview of ") (buffer-name)))) + (pop-to-buffer (generate-new-buffer + (concat (if raw "*Raw MIME preview of " + "*MIME preview of ") (buffer-name)))) (when (boundp 'gnus-buffers) (push (current-buffer) gnus-buffers)) (erase-buffer) diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 2b5f7be936b..1dc9058dd1f 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -78,7 +78,7 @@ (defgroup spam nil "Spam configuration.") -(defcustom spam-directory "~/News/spam/" +(defcustom spam-directory (nnheader-concat gnus-directory "spam/") "Directory for spam whitelists and blacklists." :type 'directory :group 'spam) diff --git a/man/message.texi b/man/message.texi index 25f1d12d33b..b4e20f84d80 100644 --- a/man/message.texi +++ b/man/message.texi @@ -224,11 +224,11 @@ only you can cancel your own messages, which is nice. The downside is that if you lose your @file{.emacs} file (which is where Gnus stores the secret cancel lock password (which is generated automatically the first time you use this feature)), you won't be -able to cancel your message. If you yourself want to manage a password, +able to cancel your message. If you want to manage a password yourself, you can put something like the following in your @file{~/.gnus.el} file: @lisp -(setq canlock-password "Salam Shalom" +(setq canlock-password "geheimnis" canlock-password-for-verify canlock-password) @end lisp -- 2.39.5