From: yamaoka Date: Wed, 19 May 2004 22:28:25 +0000 (+0000) Subject: Synch to No Gnus 200405192047. X-Git-Tag: t-gnus-6_17_4-quimby-~918 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3802d16ae9998b9ef5d90ac96923a002f3ef7146;p=elisp%2Fgnus.git- Synch to No Gnus 200405192047. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba9da03..a1e61ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,47 @@ +2004-05-19 Ben Menasha + + * nnmh.el (nnmh-request-list-1): Don't check the link count + before descending. (small patch) + +2004-05-19 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-inews-make-draft-meta-information): Fix quote + stuff. + + * gnus-start.el (gnus-subscribe-hierarchical-interactive): Match + on real group name. + + * gnus-art.el (gnus-signature-limit): Doc fix. + + * gnus-msg.el (gnus-inews-make-draft): Quote list. + + * pgg-pgp.el (pgg-pgp-verify-region): Clean up. + +2004-05-19 Michael Schierl + + * pgg-pgp.el (pgg-pgp-verify-region): Default when signature + isn't a string. + +2004-05-19 Lars Magne Ingebrigtsen + + * gnus-draft.el (gnus-draft-send): Bind + rfc2047-encode-encoded-words. + + * rfc2047.el (rfc2047-encode-region): Encode =? strings. + (rfc2047-encodable-p): Say that =? needs encoding. + (rfc2047-encode-encoded-words): New variable. + + * gnus-group.el (gnus-group-select-group): Doc fix. + + * gnus-draft.el (gnus-draft-setup): Mark all replied as replied. + + * gnus-group.el (gnus-group-mode): Set show-trailing-whitespace + to nil. + + * gnus-cache.el (gnus-cache-possibly-enter-article): Use it. + + * nnheader.el (nnheader-get-lines-and-char): New function. + 2004-05-19 Reiner Steib * gnus-msg.el (gnus-summary-followup-with-original): Document diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index a3ca2d0..018c846 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -246,7 +246,9 @@ that number. If it is a floating point number, no signature may be longer (in lines) than that number. If it is a function, the function will be called without any parameters, and if it returns nil, there is no signature in the buffer. If it is a string, it will be used as a -regexp. If it matches, the text in question is not a signature." +regexp. If it matches, the text in question is not a signature. + +This can also be a list of the above values." :type '(choice (integer :value 200) (number :value 4.0) (function :value fun) @@ -3855,7 +3857,8 @@ commands: (make-local-variable 'gnus-article-ignored-charsets) (gnus-set-default-directory) (buffer-disable-undo) - (setq buffer-read-only t) + (setq buffer-read-only t + show-trailing-whitespace nil) (set-syntax-table gnus-article-mode-syntax-table) (gnus-run-hooks 'gnus-article-mode-hook)) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 1d5a81b..1054b3f 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -126,7 +126,8 @@ it's not cached." (overview-file (gnus-cache-file-name (car gnus-cache-buffer) ".overview"))) ;; write the overview only if it was modified - (when (and (buffer-live-p buffer) (buffer-modified-p buffer)) + (when (and (buffer-live-p buffer) + (buffer-modified-p buffer)) (with-current-buffer buffer (if (> (buffer-size) 0) ;; Non-empty overview, write it to a file. @@ -143,8 +144,8 @@ it's not cached." (delete-directory (file-name-directory overview-file)) (error))) - (gnus-cache-update-overview-total-fetched-for (car gnus-cache-buffer) - overview-file))) + (gnus-cache-update-overview-total-fetched-for + (car gnus-cache-buffer) overview-file))) ;; Kill the buffer -- it's either unmodified or saved. (gnus-kill-buffer buffer) (setq gnus-cache-buffer nil)))) @@ -155,7 +156,8 @@ it's not cached." (numberp article) (> article 0) ; This might be a dummy article. (vectorp headers)) - (let ((number article) file) + (let ((number article) + file lines-chars) ;; If this is a virtual group, we find the real group. (when (gnus-virtual-group-p group) (let ((result (nnvirtual-find-group-art @@ -185,9 +187,12 @@ it's not cached." (gnus-write-buffer-as-coding-system gnus-cache-write-file-coding-system file) (gnus-cache-update-file-total-fetched-for group file) + (setq lines-chars (nnheader-get-lines-and-char)) (nnheader-remove-body) (setq headers (nnheader-parse-naked-head)) (mail-header-set-number headers number) + (mail-header-set-lines headers (car lines-chars)) + (mail-header-set-chars headers (cadr lines-chars)) (gnus-cache-change-buffer group) (set-buffer (cdr gnus-cache-buffer)) (goto-char (point-max)) diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index c941bb3..40b76a8 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -146,6 +146,7 @@ message-setup-hook)) (gnus-agent-queue-mail (and (not is-queue) gnus-agent-queue-mail)) + (rfc2047-encode-encoded-words nil) type method move-to) (gnus-draft-setup article (or group "nndraft:queue")) ;; We read the meta-information that says how and where @@ -277,12 +278,13 @@ `(lambda (arg) (gnus-post-method arg ,(car ga)))) (unless (equal (cadr ga) "") - (message-add-action - `(progn - (gnus-add-mark ,(car ga) 'replied ,(cadr ga)) - (gnus-request-set-mark ,(car ga) (list (list (list ,(cadr ga)) - 'add '(reply))))) - 'send))))) + (dolist (article (cdr ga)) + (message-add-action + `(progn + (gnus-add-mark ,(car ga) 'replied ,article) + (gnus-request-set-mark ,(car ga) (list (list (list ,article) + 'add '(reply))))) + 'send)))))) (defun gnus-draft-article-sendable-p (article) "Say whether ARTICLE is sendable." diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index d89e51b..5532638 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1050,7 +1050,8 @@ The following commands are available: (use-local-map gnus-group-mode-map) (buffer-disable-undo) (setq truncate-lines t) - (setq buffer-read-only t) + (setq buffer-read-only t + show-trailing-whitespace nil) (gnus-set-default-directory) (gnus-update-format-specifications nil 'group 'group-mode) (gnus-update-group-mark-positions) @@ -1945,7 +1946,10 @@ group." No article is selected automatically. If the group is opened, just switch the summary buffer. If ALL is non-nil, already read articles become readable. -If ALL is a number, fetch this number of articles." +If ALL is a positive number, fetch this number of the latest +articles in the group. +If ALL is a negative number, fetch this number of the earliest +articles in the group." (interactive "P") (when (and (eobp) (not (gnus-group-group-name))) (forward-line -1)) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 34ab1be..7345f0a 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -396,10 +396,10 @@ Thank you for your help in stamping out bugs. ;;; Internal functions. -(defun gnus-inews-make-draft () +(defun gnus-inews-make-draft (articles) `(lambda () (gnus-inews-make-draft-meta-information - ,gnus-newsgroup-name ',gnus-article-reply))) + ,gnus-newsgroup-name ',@articles))) (defvar gnus-article-reply nil) (defmacro gnus-setup-message (config &rest forms) @@ -443,7 +443,7 @@ Thank you for your help in stamping out bugs. (not (string= ,group ""))) (push (cons (intern gnus-draft-meta-information-header) - (gnus-inews-make-draft)) + (gnus-inews-make-draft ,yanked)) message-required-headers)) (unwind-protect (progn @@ -462,12 +462,14 @@ Thank you for your help in stamping out bugs. (run-hooks 'post-command-hook) (set-buffer-modified-p nil)))) -(defun gnus-inews-make-draft-meta-information (group article) +(defun gnus-inews-make-draft-meta-information (group &rest articles) (concat "(\"" group "\" " - (if article (number-to-string - (if (listp article) - (car article) - article)) "\"\"") + (if articles (mapconcat + (lambda (elem) + (if (consp elem) + (car elem) + elem)) + articles " ")) ")")) ;;;###autoload diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 80a7fd3..00d02f5 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -503,19 +503,23 @@ Can be used to turn version control on or off." (defun gnus-subscribe-hierarchical-interactive (groups) (let ((groups (sort groups 'string<)) - prefixes prefix start ans group starts) + prefixes prefix start ans group starts real-group) (while groups (setq prefixes (list "^")) (while (and groups prefixes) - (while (not (string-match (car prefixes) (car groups))) + (while (not (string-match (car prefixes) + (gnus-group-real-name (car groups)))) (setq prefixes (cdr prefixes))) (setq prefix (car prefixes)) (setq start (1- (length prefix))) - (if (and (string-match "[^\\.]\\." (car groups) start) + (if (and (string-match "[^\\.]\\." (gnus-group-real-name (car groups)) + start) (cdr groups) (setq prefix - (concat "^" (substring (car groups) 0 (match-end 0)))) - (string-match prefix (cadr groups))) + (concat "^" (substring + (gnus-group-real-name (car groups)) + 0 (match-end 0)))) + (string-match prefix (gnus-group-real-name (cadr groups)))) (progn (push prefix prefixes) (message "Descend hierarchy %s? ([y]nsq): " @@ -527,16 +531,18 @@ Can be used to turn version control on or off." (substring prefix 1 (1- (length prefix))))) (cond ((= ans ?n) (while (and groups - (string-match prefix - (setq group (car groups)))) + (setq group (car groups) + real-group (gnus-group-real-name group)) + (string-match prefix real-group)) (push group gnus-killed-list) (gnus-sethash group group gnus-killed-hashtb) (setq groups (cdr groups))) (setq starts (cdr starts))) ((= ans ?s) (while (and groups - (string-match prefix - (setq group (car groups)))) + (setq group (car groups) + real-group (gnus-group-real-name group)) + (string-match prefix real-group)) (gnus-sethash group group gnus-killed-hashtb) (gnus-subscribe-alphabetically (car groups)) (setq groups (cdr groups))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 24b01ca..4d6c0b1 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2592,6 +2592,8 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) (tool-bar-add-item-from-menu 'gnus-uu-post-news "uu-post" gnus-summary-mode-map) (tool-bar-add-item-from-menu + 'gnus-uu-post-news "uu-post" gnus-summary-mode-map) + (tool-bar-add-item-from-menu 'gnus-summary-catchup "catchup" gnus-summary-mode-map) (tool-bar-add-item-from-menu 'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map) @@ -2723,7 +2725,8 @@ The following commands are available: (make-local-variable 'minor-mode-alist) (use-local-map gnus-summary-mode-map) (buffer-disable-undo) - (setq buffer-read-only t) ;Disable modification + (setq buffer-read-only t ;Disable modification + show-trailing-whitespace nil) (setq truncate-lines t) (setq selective-display t) (setq selective-display-ellipses t) ;Display `...' diff --git a/lisp/nnheader.el b/lisp/nnheader.el index eb7bdd0..5f09c3e 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1211,6 +1211,14 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')." (point-max))) (goto-char (point-min))) +(defun nnheader-get-lines-and-char () + "Return the number of lines and chars in the article body." + (goto-char (point-min)) + (if (not (re-search-forward "\n\r?\n" nil t)) + (list 0 0) + (list (count-lines (point) (point-max)) + (- (point-max) (point))))) + (defun nnheader-remove-body () "Remove the body from an article in this current buffer." (goto-char (point-min)) diff --git a/lisp/nnmh.el b/lisp/nnmh.el index 11a4f86..f630e0c 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -213,7 +213,6 @@ as unread by Gnus.") (setq dir (expand-file-name dir)) ;; Recurse down all directories. (let ((dirs (and (file-readable-p dir) - (> (nth 1 (file-attributes (file-chase-links dir))) 2) (nnheader-directory-files dir t nil t))) rdir) ;; Recurse down directories. diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 059d350..bdcc507 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -93,6 +93,9 @@ quoted-printable and base64 respectively.") (nil . ignore)) "Alist of RFC2047 encodings to encoding functions.") +(defvar rfc2047-encode-encoded-words t + "Whether encoded words should be encoded again.") + ;;; ;;; Functions for encoding RFC2047 messages ;;; @@ -235,8 +238,11 @@ The buffer may be narrowed." (require 'message) ; for message-posting-charset (let ((charsets (mm-find-mime-charset-region (point-min) (point-max)))) - (and charsets - (not (equal charsets (list (car message-posting-charset))))))) + (goto-char (point-min)) + (or (and rfc2047-encode-encoded-words + (search-forward "=?" nil t)) + (and charsets + (not (equal charsets (list (car message-posting-charset)))))))) ;; Use this syntax table when parsing into regions that may need ;; encoding. Double quotes are string delimiters, backslash is @@ -284,18 +290,23 @@ Dynamically bind `rfc2047-encoding-type' to change that." ;; is relevant for instance in Subject headers with `Re:' for ;; interoperability with non-MIME clients, and we might as ;; well avoid the tail too. - (progn + (let ((encodable-regexp + (if rfc2047-encode-encoded-words + "[^\000-\177]\\|=\\?" + "[^\000-\177]"))) (goto-char (point-min)) ;; Does it need encoding? - (skip-chars-forward "\000-\177") + (re-search-forward encodable-regexp (point-max) 'move) (unless (eobp) (skip-chars-backward "^ \n") ; beginning of space-delimited word - (rfc2047-encode (point) (progn - (goto-char e) - (skip-chars-backward "\000-\177") - (skip-chars-forward "^ \n") - ;; end of space-delimited word - (point))))) + (rfc2047-encode + (point) + (progn + (goto-char e) + (re-search-backward encodable-regexp (point-max) 'move) + (skip-chars-forward "^ \n") + ;; end of space-delimited word + (point))))) ;; `address-mime' case -- take care of quoted words, comments. (with-syntax-table rfc2047-syntax-table (let ((start) ; start of current token @@ -385,7 +396,7 @@ By default, the string is treated as containing addresses (see "Encode the word(s) in the region B to E. By default, the region is treated as containing addresses (see `rfc2047-encoding-type')." - (let* ((mime-charset (mm-find-mime-charset-region b e)) + (let* ((mime-charset (or (mm-find-mime-charset-region b e) (list 'us-ascii))) (cs (if (> (length mime-charset) 1) ;; Fixme: Instead of this, try to break region into ;; parts that can be encoded separately. diff --git a/texi/ChangeLog b/texi/ChangeLog index c0e7edc..2118f92 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2004-05-19 Andre Srinivasan + + * gnus.texi (Group Parameters): Added more on hooks. (Small + change.) + 2004-05-19 Reiner Steib * gnus.texi (Oort Gnus): Mention new behavior of `F' and `R' when diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index cc6c814..6d9c6de 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -3071,8 +3071,20 @@ nntp+news.gnus.org:gmane.text.docbook.apps これはもし必要であれば、グループ毎のフック関数としても使用できます。もし あるグループに入ったときにビープ音を鳴らしたければ、そのグループのパラメー タに @code{(dummy-variable (ding))} みたいなものを書いておくこともできま -す。@code{dummy-variable} という変数に @code{(ding)} の評価結果が設定さ -れますが、まあ、誰も気にしないでしょ? +す。@code{dummy-variable} という変数に (無意味な) @code{(ding)} の評価結 +果が設定されます。 + +あるいは、@var{variable} はそのグループに対してローカルになるので、この +様式は一時的にフックを変更するために使うことができます。例えば、以下のも +のがグループパラメータに追加されると、 + +@lisp +(gnus-summary-prepared-hook + '(lambda nil (local-set-key "d" (local-key-binding "n")))) +@end lisp + +そのグループに入ったときに @kbd{d} キーは記事に期限切れ消去の印を付けな +いようになります。 @end table グループパラメータの修正には @kbd{G p} か @kbd{G c} 命令を使ってくださ diff --git a/texi/gnus.texi b/texi/gnus.texi index cc53094..430d6d4 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -3060,11 +3060,23 @@ tag can be removed from the article subjects in the summary buffer for the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group parameters for the group. -This can also be used as a group-specific hook function, if you'd like. -If you want to hear a beep when you enter a group, you could put -something like @code{(dummy-variable (ding))} in the parameters of that -group. @code{dummy-variable} will be set to the result of the -@code{(ding)} form, but who cares? +This can also be used as a group-specific hook function. If you want to +hear a beep when you enter a group, you could put something like +@code{(dummy-variable (ding))} in the parameters of that group. +@code{dummy-variable} will be set to the (meaningless) result of the +@code{(ding)} form. + +Alternatively, since the VARIABLE becomes local to the group, this +pattern can be used to temporarily change a hook. For example, if the +following is added to a group parameter + +@lisp +(gnus-summary-prepared-hook + '(lambda nil (local-set-key "d" (local-key-binding "n")))) +@end lisp + +when the group is entered, the 'd' key will not mark the article as +expired. @end table