From 0971c51f0ef1bab83646e8dc37581e251c604ce9 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 4 Mar 1997 19:15:53 +0000 Subject: [PATCH] *** empty log message *** --- lisp/ChangeLog | 29 +++++++++++++++++++++++++++++ lisp/custom.el | 2 +- lisp/gnus-msg.el | 1 + lisp/gnus-vis.el | 3 +-- lisp/gnus.el | 39 ++++++++++++++++++++++++++++++--------- lisp/nnheader.el | 4 ++-- lisp/nnheaderems.el | 11 ++++++++++- 7 files changed, 74 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d26150bc0..ef6077b56 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,34 @@ +Fri Jun 7 19:59:45 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-summary-save-article): Would set + `gnus-original-article-buffer' to a bogus value. + (gnus-header-value): Didn't understand continuation headers! + (gnus-get-newsgroup-headers): Use new value and pick out + references when `^'. + (gnus-number-to-header): New function. + (gnus-summary-refer-article): Didn't work when sparse articles + were in action. + +Fri Jun 7 17:19:21 1996 Christoph Wedler + + * nnheader.el (nnheader-insert-head): Use + `nnheader-insert-file-contents-literally'. + (nnheader-mail-file-mbox-p): Ditto. + +Fri Jun 7 14:05:28 1996 Jens Lautenbacher + + * custom.el ((string-match "XEmacs" emacs-version)): dito + + * gnus-vis.el (gnus-group-make-menu-bar): enable customize for XEmacs + +Fri Jun 7 19:20:22 1996 Richard Pieri + + * nnheaderems.el (nnheader-ms-strip-cr): New function. + Thu Jun 6 18:22:04 1996 Lars Magne Ingebrigtsen + * gnus.el: Gnus v5.2.10 is released. + * message.el (message-header-format-alist): Use `message-fill-address' for To and Cc. (message-fill-address): New function. diff --git a/lisp/custom.el b/lisp/custom.el index 1fa7f1cdb..d05c9b668 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -262,7 +262,7 @@ into the buffer visible in the event's window." (if (string-match "XEmacs" emacs-version) ;; XEmacs (disabled because it doesn't work) (and current-menubar - (add-menu-item '("Help") "Customize..." 'customize nil)) + (add-menu-item '("Help") "Customize..." 'customize t)) ;; Emacs 19.28 and earlier (global-set-key [ menu-bar help customize ] '("Customize..." . customize)) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 5260487f7..98b917537 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -154,6 +154,7 @@ the group.") (put 'gnus-setup-message 'lisp-indent-function 1) (put 'gnus-setup-message 'lisp-indent-hook 1) +(put 'gnus-setup-message 'edebug-form-spec '(form body)) ;;; Post news commands of Gnus group mode and summary mode diff --git a/lisp/gnus-vis.el b/lisp/gnus-vis.el index 41984d66b..17d9490ce 100644 --- a/lisp/gnus-vis.el +++ b/lisp/gnus-vis.el @@ -431,8 +431,7 @@ ticked: The number of ticked articles in the group. ["Send a bug report" gnus-bug t] ["Send a mail" gnus-group-mail t] ["Post an article..." gnus-group-post-news t] - ["Customize score file" gnus-score-customize - (not (string-match "XEmacs" emacs-version))] + ["Customize score file" gnus-score-customize t] ["Check for new news" gnus-group-get-new-news t] ["Activate all groups" gnus-activate-all-groups t] ["Delete bogus groups" gnus-group-check-bogus-groups t] diff --git a/lisp/gnus.el b/lisp/gnus.el index f366a958d..61cbeb512 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1728,7 +1728,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-number "5.2.10" +(defconst gnus-version-number "5.2.11" "Version number for this version of Gnus.") (defconst gnus-version (format "Gnus v%s" gnus-version-number) @@ -8150,6 +8150,15 @@ If NO-DISPLAY, don't generate a summary buffer." (gnus-data-compute-positions) (setq gnus-newsgroup-threads (nconc threads gnus-newsgroup-threads))))) +(defun gnus-number-to-header (number) + "Return the header for article NUMBER." + (let ((headers gnus-newsgroup-headers)) + (while (and headers + (not (= number (mail-header-number (car headers))))) + (pop headers)) + (when headers + (car headers)))) + (defun gnus-id-to-thread (id) "Return the (sub-)thread where ID appears." (gnus-gethash id gnus-newsgroup-dependencies)) @@ -9180,7 +9189,13 @@ The resulting hash table is returned, or nil if no Xrefs were found." (equal (nth 1 m1) (nth 1 m2))))))) (defsubst gnus-header-value () - (buffer-substring (match-end 0) (gnus-point-at-eol))) + (buffer-substring + (match-end 0) + (if (re-search-forward "^[^ \t]" nil t) + (progn + (backward-char 2) + (point)) + (gnus-point-at-eol)))) (defvar gnus-newsgroup-none-id 0) @@ -9250,10 +9265,10 @@ The resulting hash table is returned, or nil if no Xrefs were found." (progn (goto-char p) (if (search-forward "\nreferences: " nil t) - (prog1 - (gnus-header-value) - (setq end (match-end 0)) - (save-excursion + (progn + (setq end (point)) + (prog1 + (gnus-header-value) (setq ref (buffer-substring (progn @@ -11068,10 +11083,15 @@ Return how many articles were fetched." (setq message-id (concat "<" message-id))) (unless (string-match ">$" message-id) (setq message-id (concat message-id ">"))) - (let ((header (gnus-id-to-header message-id))) + (let* ((header (gnus-id-to-header message-id)) + (sparse (memq (mail-header-number header) gnus-newsgroup-sparse))) (if header - ;; The article is present in the buffer, to we just go to it. - (gnus-summary-goto-article (mail-header-number header) nil header) + (prog1 + ;; The article is present in the buffer, to we just go to it. + (gnus-summary-goto-article + (mail-header-number header) nil header) + (when sparse + (gnus-summary-update-article (mail-header-number header)))) ;; We fetch the article (let ((gnus-override-method (and (gnus-news-group-p gnus-newsgroup-name) @@ -12943,6 +12963,7 @@ The variable `gnus-default-article-saver' specifies the saver function." ;; !!! Magic! The saving functions all save ;; `gnus-original-article-buffer' (or so they think), ;; but we bind that variable to out save-buffer. + (set-buffer gnus-article-buffer) (let ((gnus-original-article-buffer save-buffer)) (setq file (funcall gnus-default-article-saver diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 8beef0f5d..966c403a2 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -296,7 +296,7 @@ on your system, you could say something like: (when (file-exists-p file) (if (eq nnheader-max-head-length t) ;; Just read the entire file. - (insert-file-contents-literally file) + (nnheader-insert-file-contents-literally file) ;; Read 1K blocks until we find a separator. (let ((beg 0) format-alist @@ -478,7 +478,7 @@ without formatting." (file-regular-p file)) (save-excursion (nnheader-set-temp-buffer " *mail-file-mbox-p*") - (insert-file-contents-literally file) + (nnheader-insert-file-contents-literally file) (goto-char (point-min)) (prog1 (looking-at message-unix-mail-delimiter) diff --git a/lisp/nnheaderems.el b/lisp/nnheaderems.el index a1cab6fb4..18c50b1aa 100644 --- a/lisp/nnheaderems.el +++ b/lisp/nnheaderems.el @@ -167,6 +167,13 @@ The buffer is not selected, just returned to the caller." (after-find-file error (not nowarn))))) buf))) +(defun nnheader-ms-strip-cr () + "Strip ^M from the end of all lines." + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\r$" nil t) + (delete-backward-char 1)))) + (eval-and-compile (cond ;; Do XEmacs function bindings. @@ -185,7 +192,9 @@ The buffer is not selected, just returned to the caller." (fset 'nnheader-find-file-noselect 'find-file-noselect) (fset 'nnheader-insert-file-contents-literally 'insert-file-contents-literally) - ))) + )) + (when (memq system-type '()) + (add-hook 'nnmail-prepare-incoming-hook 'nnheader-ms-strip-cr))) (provide 'nnheaderems) -- 2.25.1