From 50bd4dd4a8515913815e4ce7cd18775c92c3534a Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 4 Mar 1997 09:13:03 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 57 ++++++++++++++++++++++++++++++++ lisp/gnus-cite.el | 2 +- lisp/gnus-picon.el | 16 ++++----- lisp/gnus-uu.el | 10 +++--- lisp/gnus-vis.el | 5 ++- lisp/gnus.el | 82 ++++++++++++++++++++++++++++------------------ lisp/message.el | 15 ++++++--- lisp/nnfolder.el | 1 + lisp/nnheader.el | 6 +++- lisp/nnmail.el | 7 ++-- lisp/nnmbox.el | 1 + lisp/nnmh.el | 1 + lisp/nnml.el | 6 ++-- lisp/nnsoup.el | 10 +++--- lisp/nnspool.el | 2 +- texi/ChangeLog | 8 +++++ texi/gnus.texi | 4 ++- 17 files changed, 172 insertions(+), 61 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8f1f47bf..167434c8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,62 @@ +Mon Apr 29 02:24:14 1996 Lars Magne Ingebrigtsen + + * message.el (message-check-news-syntax): Better `empty' check. + (message-checksum): Better checksums. + +Sun Apr 28 14:40:04 1996 Lars Magne Ingebrigtsen + + * message.el (message-ignored-bounced-headers): New default. + + * nnsoup.el (nnsoup-store-reply): Generate in mail buffer. + +Sun Apr 28 13:12:48 1996 Wes Hardaker + + * gnus-picon.el: Moved variables. + +Sun Apr 28 11:58:51 1996 Lars Magne Ingebrigtsen + + * nnml.el (nnml-active-number): Change group. + + * gnus.el (gnus-group-sort-by-rank): Reverse logic. + + * message.el (message-font-lock-keywords): New default. + + * gnus-cite.el (gnus-article-hide-citation-in-followups): Didn't + work. + + * gnus.el: Autoload gnus-article-hide-citation-in-followups. + + * nnml.el (nnml-active-number): Bugged out. + + * gnus-uu.el (gnus-uu-grab-articles): Override + `gnus-summary-display-article-function'. + + * gnus.el (gnus-summary-move-article): Didn't use proper defaults + when copying. + +Sun Apr 28 11:40:44 1996 ISO-2022-JP + + * nnheader.el (nnheader-insert-raw-file-contents): Ner alias. + +Sun Apr 28 11:19:58 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-read-save-file-name): Use different prompt when + mulitple matches. + +Wed Apr 24 23:21:21 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-summary-mode): Make gnus-summary-mark-positions + local. + + * gnus-vis.el (gnus-header-button-alist): Buttonize urls in + headers. + + * gnus-uu.el (gnus-uu-part-number): Check more. + Wed Apr 24 04:04:54 1996 Lars Magne Ingebrigtsen + * gnus.el: September Gnus v0.79 is released. + * message.el (message-syntax-checks): Doc fix. Wed Apr 24 05:08:10 1996 Lars Magne Ingebrigtsen diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index 1ab9ab065..182e914df 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -397,7 +397,7 @@ See also the documentation for `gnus-article-highlight-citation'." (let ((article (cdr gnus-article-current))) (unless (save-excursion (set-buffer gnus-summary-buffer) - (gnus-root-id (mail-header-id + (gnus-root-id (mail-header-references (gnus-summary-article-header article)))) (gnus-article-hide-citation))))) diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 34ffd7068..85c1c5dae 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -102,6 +102,14 @@ see http://www.cs.indiana.edu/picons/ftp/index.html" ) Some people may want to add \"unknown\" to this list." ) +(defvar gnus-picons-x-face-file-name + (format "/tmp/picon-xface.%s.xbm" (user-login-name)) + "The name of the file in which to store the converted X-face header.") + +(defvar gnus-picons-convert-x-face (format "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | pbmtoxbm > %s" gnus-picons-x-face-file-name) + "Command to convert the x-face header into a xbm file." +) + (defvar gnus-group-annotations nil) (defvar gnus-article-annotations nil) (defvar gnus-x-face-annotations nil) @@ -137,14 +145,6 @@ Some people may want to add \"unknown\" to this list." ((stringp variable) variable))) -(defvar gnus-picons-x-face-file-name - (format "/tmp/picon-xface.%s.xbm" (user-login-name)) - "The name of the file in which to store the converted X-face header.") - -(defvar gnus-picons-convert-x-face (format "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | pbmtoxbm > %s" gnus-picons-x-face-file-name) - "Command to convert the x-face header into a xbm file." -) - (defun gnus-picons-article-display-x-face () "Display the x-face header bitmap in the 'gnus-picons-display-where buffer." ;; delete any old ones. diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index 77f7d3f31..0a8982979 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1126,6 +1126,7 @@ The headers will be included in the sequence they are matched.") (articles process-function &optional sloppy limit no-errors) (let ((state 'first) has-been-begin article result-file result-files process-state + gnus-summary-display-article-function article-series files) (while (and articles @@ -1260,10 +1261,11 @@ The headers will be included in the sequence they are matched.") (make-symbolic-link to-file file))))) (defun gnus-uu-part-number (article) - (let ((subject (mail-header-subject (gnus-summary-article-header article)))) - (if (string-match "[0-9]+ */[0-9]+\\|[0-9]+ * of *[0-9]+" - subject) - (substring subject (match-beginning 0) (match-end 0)) + (let* ((header (gnus-summary-article-header article)) + (subject (and header (mail-header-subject header)))) + (if (and subject + (string-match "[0-9]+ */[0-9]+\\|[0-9]+ * of *[0-9]+" subject)) + (match-string 0 subject) ""))) (defun gnus-uu-uudecode-sentinel (process event) diff --git a/lisp/gnus-vis.el b/lisp/gnus-vis.el index 0910bd8c0..348e8cc02 100644 --- a/lisp/gnus-vis.el +++ b/lisp/gnus-vis.el @@ -241,7 +241,10 @@ variable it the real callback function.") ("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" 0 t gnus-button-mailto 0) - ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0)) + ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) + ("^[^:]+:" ,gnus-button-url-regexp 0 t gnus-button-url 0) + ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t + gnus-button-message-id 3)) "Alist of headers and regexps to match buttons in article heads. This alist is very similar to `gnus-button-alist', except that each diff --git a/lisp/gnus.el b/lisp/gnus.el index 733f9beb4..2ad3e7844 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1713,7 +1713,7 @@ variable (string, integer, character, etc).") "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") -(defconst gnus-version "September Gnus v0.79" +(defconst gnus-version "September Gnus v0.80" "Version number for this version of Gnus.") (defvar gnus-info-nodes @@ -2021,7 +2021,8 @@ Thank you for your help in stamping out bugs. ("gnus-srvr" gnus-browse-foreign-server) ("gnus-cite" :interactive t gnus-article-highlight-citation gnus-article-hide-citation-maybe - gnus-article-hide-citation gnus-article-fill-cited-article) + gnus-article-hide-citation gnus-article-fill-cited-article + gnus-article-hide-citation-in-followups) ("gnus-kill" gnus-kill gnus-apply-kill-file-internal gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author gnus-execute gnus-expunge) @@ -2554,20 +2555,22 @@ Thank you for your help in stamping out bugs. (gnus-visual nil) (spec gnus-summary-line-format-spec) pos) - (gnus-set-work-buffer) - (let ((gnus-summary-line-format-spec spec)) - (gnus-summary-insert-line - [0 "" "" "" "" "" 0 0 ""] 0 nil 128 t nil "" nil 1) - (goto-char (point-min)) - (setq pos (list (cons 'unread (and (search-forward "\200" nil t) - (- (point) 2))))) - (goto-char (point-min)) - (push (cons 'replied (and (search-forward "\201" nil t) (- (point) 2))) - pos) - (goto-char (point-min)) - (push (cons 'score (and (search-forward "\202" nil t) (- (point) 2))) - pos) - (setq gnus-summary-mark-positions pos))))) + (save-excursion + (gnus-set-work-buffer) + (let ((gnus-summary-line-format-spec spec)) + (gnus-summary-insert-line + [0 "" "" "" "" "" 0 0 ""] 0 nil 128 t nil "" nil 1) + (goto-char (point-min)) + (setq pos (list (cons 'unread (and (search-forward "\200" nil t) + (- (point) 2))))) + (goto-char (point-min)) + (push (cons 'replied (and (search-forward "\201" nil t) + (- (point) 2))) + pos) + (goto-char (point-min)) + (push (cons 'score (and (search-forward "\202" nil t) (- (point) 2))) + pos))) + (setq gnus-summary-mark-positions pos)))) (defun gnus-update-group-mark-positions () (save-excursion @@ -5922,7 +5925,7 @@ If REVERSE, sort in reverse order." (level2 (gnus-info-level info2))) (or (< level1 level2) (and (= level1 level2) - (< (gnus-info-score info1) (gnus-info-score info2)))))) + (> (gnus-info-score info1) (gnus-info-score info2)))))) ;; Group catching up. @@ -7082,6 +7085,7 @@ The following commands are available: (setq gnus-newsgroup-name group) (make-local-variable 'gnus-summary-line-format) (make-local-variable 'gnus-summary-line-format-spec) + (make-local-variable 'gnus-summary-mark-positions) (run-hooks 'gnus-summary-mode-hook)) (defun gnus-summary-make-display-table () @@ -11233,9 +11237,9 @@ and `request-accept' functions." (error "The current group does not support article editing"))) (let ((articles (gnus-summary-work-articles n)) (prefix (gnus-group-real-prefix gnus-newsgroup-name)) - (names '((move "move" "Moving") - (copy "copy" "Copying") - (crosspost "crosspost" "Crossposting"))) + (names '((move "Move" "Moving") + (copy "Copy" "Copying") + (crosspost "Crosspost" "Crossposting"))) (copy-buf (save-excursion (nnheader-set-temp-buffer " *copy article*"))) art-group to-method new-xref article to-groups) @@ -11247,7 +11251,8 @@ and `request-accept' functions." (setq to-newsgroup (gnus-read-move-group-name (cadr (assq action names)) - gnus-current-move-group articles prefix)) + (symbol-value (intern (format "gnus-current-%s-group" action))) + articles prefix)) (set (intern (format "gnus-current-%s-group" action)) to-newsgroup)) (setq to-method (or select-method (gnus-find-method-for-group to-newsgroup))) @@ -12887,8 +12892,20 @@ save those articles instead." (defun gnus-read-move-group-name (prompt default articles prefix) "Read a group name." (let* ((split-name (gnus-get-split-value gnus-move-split-methods)) + group-map + (dum (mapatoms + (lambda (g) + (and (boundp g) + (symbol-name g) + (memq 'respool + (assoc (symbol-name + (car (gnus-find-method-for-group + (symbol-name g)))) + gnus-valid-select-methods)) + (push (list (symbol-name g)) group-map))) + gnus-active-hashtb)) (prom - (format "Where do you want to %s %s?" + (format "%s %s to:" prompt (if (> (length articles) 1) (format "these %d articles" (length articles)) @@ -12897,10 +12914,10 @@ save those articles instead." (cond ((null split-name) (gnus-completing-read default prom - gnus-active-hashtb nil nil prefix + group-map nil nil prefix 'gnus-group-history)) ((= 1 (length split-name)) - (gnus-completing-read (car split-name) prom gnus-active-hashtb + (gnus-completing-read (car split-name) prom group-map nil nil nil 'gnus-group-history)) (t @@ -12938,14 +12955,15 @@ save those articles instead." (concat gnus-article-save-directory (car split-name)))) ;; A list of splits was found. (t - (setq split-name (mapcar (lambda (el) (list el)) - (nreverse split-name))) - (let ((result (completing-read - (concat prompt " ") split-name nil nil))) - (concat gnus-article-save-directory - (if (string= result "") - (caar split-name) - result))))))) + (setq split-name (nreverse split-name)) + (let (result) + (let ((file-name-history (nconc split-name file-name-history))) + (setq result + (read-file-name + (concat prompt " (`M-p' for defaults) ") + gnus-article-save-directory + (car split-name)))) + (car (push result file-name-history))))))) ;; If we have read a directory, we append the default file name. (when (file-directory-p file) (setq file (concat (file-name-as-directory file) diff --git a/lisp/message.el b/lisp/message.el index 4e69ee1dd..41167cf5a 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -49,7 +49,7 @@ mailbox format.") If this variable is nil, no such courtesy message will be added.") ;;;###autoload -(defvar message-ignored-bounced-headers "^\\(Received\\):" +(defvar message-ignored-bounced-headers "^\\(Received\\|Return-Path\\):" "*Regexp that matches headers to be removed in resent bounced mail.") ;;;###autoload @@ -342,7 +342,7 @@ actually occur.") (defvar message-font-lock-keywords (let* ((cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-"))) (list '("^To:" . font-lock-function-name-face) - '("^B?CC:\\|^Reply-To:" . font-lock-keyword-face) + '("^[GBF]?[Cc][Cc]:\\|^Reply-To:" . font-lock-keyword-face) '("^\\(Subject:\\)[ \t]*\\(.+\\)?" (1 font-lock-comment-face) (2 font-lock-type-face nil t)) (list (concat "^\\(" (regexp-quote mail-header-separator) "\\)$") @@ -1404,8 +1404,12 @@ the user from the mailer." (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$")) (forward-line 1) - (or (re-search-forward "[^ \n\t]" nil t) - (y-or-n-p "Empty article. Really post?")))) + (let ((b (point))) + (or (re-search-forward message-signature-separator nil t) + (goto-char (point-max))) + (beginning-of-line) + (or (re-search-backward "[^ \n\t]" b t) + (y-or-n-p "Empty article. Really post? "))))) ;; Check for control characters. (or (message-check-element 'control-chars) (save-excursion @@ -1451,6 +1455,9 @@ the user from the mailer." "Return a \"checksum\" for the current buffer." (let ((sum 0)) (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "$")) (while (not (eobp)) (setq sum (logxor sum (following-char))) (forward-char 1))) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index c0ec8ccce..c6bfaed39 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -534,6 +534,7 @@ it.") (setq save-list group-art-list) (nnmail-insert-lines) (nnmail-insert-xref group-art-list) + (run-hooks 'nnmail-prepare-save-mail-hook) (run-hooks 'nnfolder-prepare-save-mail-hook) ;; Insert the mail into each of the destination groups. diff --git a/lisp/nnheader.el b/lisp/nnheader.el index fac3458c5..8e0caedc1 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -140,7 +140,8 @@ on your system, you could say something like: (defun nnheader-parse-head () (let ((case-fold-search t) - end ref in-reply-to lines p cur) + (cur (current-buffer)) + end ref in-reply-to lines p) (goto-char (point-min)) ;; Search to the beginning of the next header. Error messages ;; do not begin with 2 or 3. @@ -529,7 +530,10 @@ without formatting." (and (listp form) (eq (car form) 'lambda)))) (fset 'nnheader-find-file-noselect 'find-file-noselect) +(fset 'nnheader-insert-raw-file-contents 'insert-file-contents) (provide 'nnheader) +(run-hooks 'nnheader-load-hook) + ;;; nnheader.el ends here diff --git a/lisp/nnmail.el b/lisp/nnmail.el index b99ac4071..02cd4d070 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -265,6 +265,9 @@ parameter. It should return nil, `warn' or `delete'.") (copy-syntax-table (standard-syntax-table)) "Syntax table used by `nnmail-split-fancy'.") +(defvar nnmail-prepare-save-mail-hook nil + "Hook called before saving mail.") + (defconst nnmail-version "nnmail 1.0" @@ -280,7 +283,7 @@ parameter. It should return nil, `warn' or `delete'.") (set-buffer nntp-server-buffer) (erase-buffer) (condition-case () - (progn (insert-file-contents file) t) + (progn (nnheader-insert-raw-file-contents file) t) (file-error nil))) (defun nnmail-group-pathname (group dir &optional file) @@ -692,7 +695,7 @@ FUNC will be called with the buffer narrowed to each mail." (set-buffer (get-buffer-create " *nnmail incoming*")) (buffer-disable-undo (current-buffer)) (erase-buffer) - (insert-file-contents incoming) + (nnheader-insert-raw-file-contents incoming) (unless (zerop (buffer-size)) (goto-char (point-min)) (save-excursion (run-hooks 'nnmail-prepare-incoming-hook)) diff --git a/lisp/nnmbox.el b/lisp/nnmbox.el index 37237eab7..ba4c8b950 100644 --- a/lisp/nnmbox.el +++ b/lisp/nnmbox.el @@ -446,6 +446,7 @@ (nnmail-insert-lines) (nnmail-insert-xref group-art) (nnmbox-insert-newsgroup-line group-art) + (run-hooks 'nnmail-prepare-save-mail-hook) (run-hooks 'nnmbox-prepare-save-mail-hook) group-art)) diff --git a/lisp/nnmh.el b/lisp/nnmh.el index 8a8f78d46..dbb4d9f4d 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -394,6 +394,7 @@ (unless noinsert (nnmail-insert-lines) (nnmail-insert-xref group-art)) + (run-hooks 'nnmail-prepare-save-mail-hook) (run-hooks 'nnmh-prepare-save-mail-hook) (goto-char (point-min)) (while (looking-at "From ") diff --git a/lisp/nnml.el b/lisp/nnml.el index c064db225..0b14610e9 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -33,7 +33,7 @@ (require 'nnheader) (require 'nnmail) (require 'nnoo) -(eval-when-compile (require 'cl)) +(require 'cl) (nnoo-declare nnml) @@ -544,6 +544,7 @@ all. This may very well take some time.") chars nov-line) (setq chars (nnmail-insert-lines)) (nnmail-insert-xref group-art) + (run-hooks 'nnmail-prepare-save-mail-hook) (run-hooks 'nnml-prepare-save-mail-hook) (goto-char (point-min)) (while (looking-at "From ") @@ -584,6 +585,7 @@ all. This may very well take some time.") (unless active ;; Perhaps the active file was corrupt? See whether ;; there are any articles in this group. + (nnml-possibly-change-directory group) (unless nnml-article-file-alist (setq nnml-article-file-alist (sort @@ -592,7 +594,7 @@ all. This may very well take some time.") (setq active (if nnml-article-file-alist (cons (caar nnml-article-file-alist) - (car (last nnml-article-file-alist))) + (caar (last nnml-article-file-alist))) (cons 1 0))) (setq nnml-group-alist (cons (list group active) nnml-group-alist))) (setcdr active (1+ (cdr active))) diff --git a/lisp/nnsoup.el b/lisp/nnsoup.el index a5b25d2cc..e59519c19 100644 --- a/lisp/nnsoup.el +++ b/lisp/nnsoup.el @@ -601,6 +601,11 @@ The SOUP packet file name will be inserted at the %s.") (mailbuf (current-buffer))) (unwind-protect (save-excursion + (save-restriction + (message-narrow-to-headers) + (if (equal kind "mail") + (message-generate-headers message-required-mail-headers) + (message-generate-headers message-required-news-headers))) (set-buffer tembuf) (erase-buffer) (insert-buffer-substring mailbuf) @@ -608,10 +613,7 @@ The SOUP packet file name will be inserted at the %s.") (save-restriction (message-narrow-to-headers) ;; Remove some headers. - (message-remove-header message-ignored-mail-headers t) - (if (equal kind "mail") - (message-generate-headers message-required-mail-headers) - (message-generate-headers message-required-news-headers))) + (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. (or (= (preceding-char) ?\n) diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 637fdf2da..e7f70f155 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -466,7 +466,7 @@ there.") (set-buffer nntp-server-buffer) (erase-buffer) (condition-case () - (progn (insert-file-contents file) t) + (progn (nnheader-insert-raw-file-contents file) t) (file-error nil))) (defun nnspool-possibly-change-directory (group) diff --git a/texi/ChangeLog b/texi/ChangeLog index 60580336d..2ffba96c0 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,11 @@ +Wed Apr 24 23:41:21 1996 Lars Magne Ingebrigtsen + + * gnus.texi (Archived Messages): Addition. + +Wed Apr 24 23:41:21 1996 Lars Magne Ingebrigtsen + + * gnus.texi (Archived Messages): Addition. + Wed Apr 17 19:10:17 1996 Lars Magne Ingebrigtsen * gnus.texi (posting): Update to use message. diff --git a/texi/gnus.texi b/texi/gnus.texi index ca5588246..e08a8fa32 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -6710,6 +6710,7 @@ String to be inserted at the end of the message buffer. If @code{t} (which is the default), the @code{message-signature-file} file will be inserted instead. If a function, the result from the function will be used instead. If a form, the result from the form will be used instead. +If this variable is @code{nil}, no signature will be inserted at all. @item message-signature-file File containing the signature to be inserted at the end of the buffer. @@ -7228,7 +7229,8 @@ spell-checking via the @code{ispell} package: Gnus provides a few different methods for storing the mail you send. The default method is to use the @dfn{archive virtual server} to store -the mail. +the mail. If you want to disable this completely, you should set +@code{gnus-message-archive-group} to @code{nil}. @vindex gnus-message-archive-method @code{gnus-message-archive-method} says what virtual server Gnus is to -- 2.25.1