From: Gnus developers Date: Fri, 31 Jan 2014 01:56:00 +0000 (+0000) Subject: Misc bugfixes made in Gnus master X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~225 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4e2b87d871a623ec36206dff573bf76df8eca12d;p=emacs.git Misc bugfixes made in Gnus master 2014-01-31 Alex Schroeder (tiny change) * gnus-tut.txt (Message-ID): Typo fix (bug#15556). 2014-01-31 Dave Abrahams * gnus-salt.el (gnus-tree-highlight-article): Don't move point around in the summary buffer (bug#13769). 2014-01-31 Lars Ingebrigtsen * gnus-art.el (gnus-article-setup-buffer): Refresh the summary buffer name if we're using a single article buffer. Otherwise, it may point to a killed buffer (bug#13756). 2014-01-30 Lars Ingebrigtsen * nnmail.el (nnmail-split-it): Instead of redoing the search to restore the match data, just save and restore it explictly (bug#12375). * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if that's needed. * spam.el (spam-initialize): Allow calling repeatedly, but only run the the code once (bug#9069). --- diff --git a/etc/ChangeLog b/etc/ChangeLog index 635f21d1621..f8d6cdcbdbf 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-01-31 Alex Schroeder (tiny change) + + * gnus-tut.txt (Message-ID): Typo fix (bug#15556). + 2014-01-16 Fabrice Niessen * themes/leuven-theme.el: Updates. (Bug#16442) diff --git a/etc/gnus-tut.txt b/etc/gnus-tut.txt index 4ffb51015ba..275fa5f5c1d 100644 --- a/etc/gnus-tut.txt +++ b/etc/gnus-tut.txt @@ -273,7 +273,7 @@ If you want to report a bug, please type `M-x gnus-bug'. This will give me a precise overview of your Gnus and Emacs version numbers, along with a look at all Gnus variables you have changed. -Du not expect a reply back, but your bug should be fixed in the next +Do not expect a reply back, but your bug should be fixed in the next version. If the bug persists, please re-submit your bug report. When a bug occurs, I need a recipe for how to trigger the bug. You diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ffd8adc33c3..b30afa601e6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,25 @@ +2014-01-31 Dave Abrahams + + * gnus-salt.el (gnus-tree-highlight-article): Don't move point around + in the summary buffer (bug#13769). + +2014-01-31 Lars Ingebrigtsen + + * gnus-art.el (gnus-article-setup-buffer): Refresh the summary buffer + name if we're using a single article buffer. Otherwise, it may point + to a killed buffer (bug#13756). + +2014-01-30 Lars Ingebrigtsen + + * nnmail.el (nnmail-split-it): Instead of redoing the search to restore + the match data, just save and restore it explictly (bug#12375). + + * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if + that's needed. + + * spam.el (spam-initialize): Allow calling repeatedly, but only run the + the code once (bug#9069). + 2014-01-18 Steinar Bang * gnus-setup.el (gnus-use-sendmail): We never use sendmail for mail diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 045d1650ed6..29d70aa1a86 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4549,20 +4549,22 @@ commands: nil) (error "Action aborted")) t))) - (with-current-buffer name - (set (make-local-variable 'gnus-article-edit-mode) nil) - (gnus-article-stop-animations) - (when gnus-article-mime-handles - (mm-destroy-parts gnus-article-mime-handles) - (setq gnus-article-mime-handles nil)) - ;; Set it to nil in article-buffer! - (setq gnus-article-mime-handle-alist nil) - (buffer-disable-undo) - (setq buffer-read-only t) - (unless (derived-mode-p 'gnus-article-mode) - (gnus-article-mode)) - (setq truncate-lines gnus-article-truncate-lines) - (current-buffer)) + (let ((summary gnus-summary-buffer)) + (with-current-buffer name + (set (make-local-variable 'gnus-article-edit-mode) nil) + (gnus-article-stop-animations) + (when gnus-article-mime-handles + (mm-destroy-parts gnus-article-mime-handles) + (setq gnus-article-mime-handles nil)) + ;; Set it to nil in article-buffer! + (setq gnus-article-mime-handle-alist nil) + (buffer-disable-undo) + (setq buffer-read-only t) + (unless (derived-mode-p 'gnus-article-mode) + (gnus-article-mode)) + (set (make-local-variable 'gnus-summary-buffer) summary) + (setq truncate-lines gnus-article-truncate-lines) + (current-buffer))) (let ((summary gnus-summary-buffer)) (with-current-buffer (gnus-get-buffer-create name) (gnus-article-mode) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 7358da4f95c..d5e27f45e2a 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -879,12 +879,15 @@ it in the environment specified by BINDINGS." (set-buffer buf)))) (defun gnus-tree-highlight-article (article face) - (with-current-buffer (gnus-get-tree-buffer) - (let (region) - (when (setq region (gnus-tree-article-region article)) - (gnus-put-text-property (car region) (cdr region) 'face face) - (set-window-point - (gnus-get-buffer-window (current-buffer) t) (cdr region)))))) + ;; The save-excursion here is apparently necessary because + ;; `set-window-point' somehow manages to alter the buffer position. + (save-excursion + (with-current-buffer (gnus-get-tree-buffer) + (let (region) + (when (setq region (gnus-tree-article-region article)) + (gnus-put-text-property (car region) (cdr region) 'face face) + (set-window-point + (gnus-get-buffer-window (current-buffer) t) (cdr region))))))) ;;; Allow redefinition of functions. (gnus-ems-redefine) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a1c0a0abdbf..d6c801fdd39 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -4024,6 +4024,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." ;; The group was successfully selected. (t (gnus-set-global-variables) + (when (boundp 'spam-install-hooks) + (spam-initialize)) ;; Save the active value in effect when the group was entered. (setq gnus-newsgroup-active (gnus-copy-sequence diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 2817b54020a..6c6025b3fd2 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1430,12 +1430,14 @@ See the documentation for the variable `nnmail-split-fancy' for details." ;; Check the cache for the regexp for this split. ((setq cached-pair (assq split nnmail-split-cache)) (let (split-result + match-data (end-point (point-max)) (value (nth 1 split))) (if (symbolp value) (setq value (cdr (assq value nnmail-split-abbrev-alist)))) (while (and (goto-char end-point) (re-search-backward (cdr cached-pair) nil t)) + (setq match-data (match-data)) (when nnmail-split-tracing (push split nnmail-split-trace)) (let ((split-rest (cddr split)) @@ -1464,12 +1466,9 @@ See the documentation for the variable `nnmail-split-fancy' for details." (setq split-rest (cddr split-rest)))) (when split-rest (goto-char end) - (let ((value (nth 1 split))) - (if (symbolp value) - (setq value (cdr (assq value nnmail-split-abbrev-alist)))) - ;; Someone might want to do a \N sub on this match, so get the - ;; correct match positions. - (re-search-backward value start-of-value)) + ;; Someone might want to do a \N sub on this match, so + ;; restore the match data. + (set-match-data match-data) (dolist (sp (nnmail-split-it (car split-rest))) (unless (member sp split-result) (push sp split-result)))))) diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index d06559676db..82f98c4294f 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -2903,25 +2903,27 @@ explicitly, and matters only if you need the extra headers installed through `spam-necessary-extra-headers'." (interactive) - (dolist (var symbols) - (set var t)) - - (dolist (header (spam-necessary-extra-headers)) - (add-to-list 'nnmail-extra-headers header) - (add-to-list 'gnus-extra-headers header)) - - (setq spam-install-hooks t) - ;; TODO: How do we redo this every time the `spam' face is customized? - (push '((eq mark gnus-spam-mark) . spam) - gnus-summary-highlight) - ;; Add hooks for loading and saving the spam stats - (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save) - (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load) - (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load) - (add-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit) - (add-hook 'gnus-summary-prepare-hook 'spam-summary-prepare) - (add-hook 'gnus-get-new-news-hook 'spam-setup-widening) - (add-hook 'gnus-summary-prepared-hook 'spam-find-spam)) + (when spam-install-hooks + (dolist (var symbols) + (set var t)) + + (dolist (header (spam-necessary-extra-headers)) + (add-to-list 'nnmail-extra-headers header) + (add-to-list 'gnus-extra-headers header)) + + ;; TODO: How do we redo this every time the `spam' face is customized? + (push '((eq mark gnus-spam-mark) . spam) + gnus-summary-highlight) + ;; Add hooks for loading and saving the spam stats + (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save) + (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load) + (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load) + (add-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit) + (add-hook 'gnus-summary-prepare-hook 'spam-summary-prepare) + (add-hook 'gnus-get-new-news-hook 'spam-setup-widening) + (add-hook 'gnus-summary-prepared-hook 'spam-find-spam) + ;; Don't install things more than once. + (setq spam-install-hooks nil))) (defun spam-unload-hook () "Uninstall the spam.el hooks." @@ -2936,8 +2938,6 @@ installed through `spam-necessary-extra-headers'." (add-hook 'spam-unload-hook 'spam-unload-hook) -(when spam-install-hooks - (spam-initialize)) ;;}}} (provide 'spam)