diff options
| author | Gnus developers | 2014-01-31 01:56:00 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2014-01-31 01:56:00 +0000 |
| commit | 4e2b87d871a623ec36206dff573bf76df8eca12d (patch) | |
| tree | 8e9adbe3a247ce8dd8fe6801afa4a27bb729320a /lisp/gnus | |
| parent | a1a04df94c2cdea0f24733aa9b1892ee7ba50b13 (diff) | |
| download | emacs-4e2b87d871a623ec36206dff573bf76df8eca12d.tar.gz emacs-4e2b87d871a623ec36206dff573bf76df8eca12d.zip | |
Misc bugfixes made in Gnus master
2014-01-31 Alex Schroeder <alex@gnu.org> (tiny change)
* gnus-tut.txt (Message-ID): Typo fix (bug#15556).
2014-01-31 Dave Abrahams <dave@boostpro.com>
* gnus-salt.el (gnus-tree-highlight-article): Don't move point around
in the summary buffer (bug#13769).
2014-01-31 Lars Ingebrigtsen <larsi@gnus.org>
* 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 <larsi@gnus.org>
* 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).
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 30 | ||||
| -rw-r--r-- | lisp/gnus/gnus-salt.el | 15 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 11 | ||||
| -rw-r--r-- | lisp/gnus/spam.el | 42 |
6 files changed, 75 insertions, 47 deletions
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 @@ | |||
| 1 | 2014-01-31 Dave Abrahams <dave@boostpro.com> | ||
| 2 | |||
| 3 | * gnus-salt.el (gnus-tree-highlight-article): Don't move point around | ||
| 4 | in the summary buffer (bug#13769). | ||
| 5 | |||
| 6 | 2014-01-31 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 7 | |||
| 8 | * gnus-art.el (gnus-article-setup-buffer): Refresh the summary buffer | ||
| 9 | name if we're using a single article buffer. Otherwise, it may point | ||
| 10 | to a killed buffer (bug#13756). | ||
| 11 | |||
| 12 | 2014-01-30 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 13 | |||
| 14 | * nnmail.el (nnmail-split-it): Instead of redoing the search to restore | ||
| 15 | the match data, just save and restore it explictly (bug#12375). | ||
| 16 | |||
| 17 | * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if | ||
| 18 | that's needed. | ||
| 19 | |||
| 20 | * spam.el (spam-initialize): Allow calling repeatedly, but only run the | ||
| 21 | the code once (bug#9069). | ||
| 22 | |||
| 1 | 2014-01-18 Steinar Bang <sb@dod.no> | 23 | 2014-01-18 Steinar Bang <sb@dod.no> |
| 2 | 24 | ||
| 3 | * gnus-setup.el (gnus-use-sendmail): We never use sendmail for mail | 25 | * 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: | |||
| 4549 | nil) | 4549 | nil) |
| 4550 | (error "Action aborted")) | 4550 | (error "Action aborted")) |
| 4551 | t))) | 4551 | t))) |
| 4552 | (with-current-buffer name | 4552 | (let ((summary gnus-summary-buffer)) |
| 4553 | (set (make-local-variable 'gnus-article-edit-mode) nil) | 4553 | (with-current-buffer name |
| 4554 | (gnus-article-stop-animations) | 4554 | (set (make-local-variable 'gnus-article-edit-mode) nil) |
| 4555 | (when gnus-article-mime-handles | 4555 | (gnus-article-stop-animations) |
| 4556 | (mm-destroy-parts gnus-article-mime-handles) | 4556 | (when gnus-article-mime-handles |
| 4557 | (setq gnus-article-mime-handles nil)) | 4557 | (mm-destroy-parts gnus-article-mime-handles) |
| 4558 | ;; Set it to nil in article-buffer! | 4558 | (setq gnus-article-mime-handles nil)) |
| 4559 | (setq gnus-article-mime-handle-alist nil) | 4559 | ;; Set it to nil in article-buffer! |
| 4560 | (buffer-disable-undo) | 4560 | (setq gnus-article-mime-handle-alist nil) |
| 4561 | (setq buffer-read-only t) | 4561 | (buffer-disable-undo) |
| 4562 | (unless (derived-mode-p 'gnus-article-mode) | 4562 | (setq buffer-read-only t) |
| 4563 | (gnus-article-mode)) | 4563 | (unless (derived-mode-p 'gnus-article-mode) |
| 4564 | (setq truncate-lines gnus-article-truncate-lines) | 4564 | (gnus-article-mode)) |
| 4565 | (current-buffer)) | 4565 | (set (make-local-variable 'gnus-summary-buffer) summary) |
| 4566 | (setq truncate-lines gnus-article-truncate-lines) | ||
| 4567 | (current-buffer))) | ||
| 4566 | (let ((summary gnus-summary-buffer)) | 4568 | (let ((summary gnus-summary-buffer)) |
| 4567 | (with-current-buffer (gnus-get-buffer-create name) | 4569 | (with-current-buffer (gnus-get-buffer-create name) |
| 4568 | (gnus-article-mode) | 4570 | (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." | |||
| 879 | (set-buffer buf)))) | 879 | (set-buffer buf)))) |
| 880 | 880 | ||
| 881 | (defun gnus-tree-highlight-article (article face) | 881 | (defun gnus-tree-highlight-article (article face) |
| 882 | (with-current-buffer (gnus-get-tree-buffer) | 882 | ;; The save-excursion here is apparently necessary because |
| 883 | (let (region) | 883 | ;; `set-window-point' somehow manages to alter the buffer position. |
| 884 | (when (setq region (gnus-tree-article-region article)) | 884 | (save-excursion |
| 885 | (gnus-put-text-property (car region) (cdr region) 'face face) | 885 | (with-current-buffer (gnus-get-tree-buffer) |
| 886 | (set-window-point | 886 | (let (region) |
| 887 | (gnus-get-buffer-window (current-buffer) t) (cdr region)))))) | 887 | (when (setq region (gnus-tree-article-region article)) |
| 888 | (gnus-put-text-property (car region) (cdr region) 'face face) | ||
| 889 | (set-window-point | ||
| 890 | (gnus-get-buffer-window (current-buffer) t) (cdr region))))))) | ||
| 888 | 891 | ||
| 889 | ;;; Allow redefinition of functions. | 892 | ;;; Allow redefinition of functions. |
| 890 | (gnus-ems-redefine) | 893 | (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." | |||
| 4024 | ;; The group was successfully selected. | 4024 | ;; The group was successfully selected. |
| 4025 | (t | 4025 | (t |
| 4026 | (gnus-set-global-variables) | 4026 | (gnus-set-global-variables) |
| 4027 | (when (boundp 'spam-install-hooks) | ||
| 4028 | (spam-initialize)) | ||
| 4027 | ;; Save the active value in effect when the group was entered. | 4029 | ;; Save the active value in effect when the group was entered. |
| 4028 | (setq gnus-newsgroup-active | 4030 | (setq gnus-newsgroup-active |
| 4029 | (gnus-copy-sequence | 4031 | (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." | |||
| 1430 | ;; Check the cache for the regexp for this split. | 1430 | ;; Check the cache for the regexp for this split. |
| 1431 | ((setq cached-pair (assq split nnmail-split-cache)) | 1431 | ((setq cached-pair (assq split nnmail-split-cache)) |
| 1432 | (let (split-result | 1432 | (let (split-result |
| 1433 | match-data | ||
| 1433 | (end-point (point-max)) | 1434 | (end-point (point-max)) |
| 1434 | (value (nth 1 split))) | 1435 | (value (nth 1 split))) |
| 1435 | (if (symbolp value) | 1436 | (if (symbolp value) |
| 1436 | (setq value (cdr (assq value nnmail-split-abbrev-alist)))) | 1437 | (setq value (cdr (assq value nnmail-split-abbrev-alist)))) |
| 1437 | (while (and (goto-char end-point) | 1438 | (while (and (goto-char end-point) |
| 1438 | (re-search-backward (cdr cached-pair) nil t)) | 1439 | (re-search-backward (cdr cached-pair) nil t)) |
| 1440 | (setq match-data (match-data)) | ||
| 1439 | (when nnmail-split-tracing | 1441 | (when nnmail-split-tracing |
| 1440 | (push split nnmail-split-trace)) | 1442 | (push split nnmail-split-trace)) |
| 1441 | (let ((split-rest (cddr split)) | 1443 | (let ((split-rest (cddr split)) |
| @@ -1464,12 +1466,9 @@ See the documentation for the variable `nnmail-split-fancy' for details." | |||
| 1464 | (setq split-rest (cddr split-rest)))) | 1466 | (setq split-rest (cddr split-rest)))) |
| 1465 | (when split-rest | 1467 | (when split-rest |
| 1466 | (goto-char end) | 1468 | (goto-char end) |
| 1467 | (let ((value (nth 1 split))) | 1469 | ;; Someone might want to do a \N sub on this match, so |
| 1468 | (if (symbolp value) | 1470 | ;; restore the match data. |
| 1469 | (setq value (cdr (assq value nnmail-split-abbrev-alist)))) | 1471 | (set-match-data match-data) |
| 1470 | ;; Someone might want to do a \N sub on this match, so get the | ||
| 1471 | ;; correct match positions. | ||
| 1472 | (re-search-backward value start-of-value)) | ||
| 1473 | (dolist (sp (nnmail-split-it (car split-rest))) | 1472 | (dolist (sp (nnmail-split-it (car split-rest))) |
| 1474 | (unless (member sp split-result) | 1473 | (unless (member sp split-result) |
| 1475 | (push sp split-result)))))) | 1474 | (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 | |||
| 2903 | installed through `spam-necessary-extra-headers'." | 2903 | installed through `spam-necessary-extra-headers'." |
| 2904 | (interactive) | 2904 | (interactive) |
| 2905 | 2905 | ||
| 2906 | (dolist (var symbols) | 2906 | (when spam-install-hooks |
| 2907 | (set var t)) | 2907 | (dolist (var symbols) |
| 2908 | 2908 | (set var t)) | |
| 2909 | (dolist (header (spam-necessary-extra-headers)) | 2909 | |
| 2910 | (add-to-list 'nnmail-extra-headers header) | 2910 | (dolist (header (spam-necessary-extra-headers)) |
| 2911 | (add-to-list 'gnus-extra-headers header)) | 2911 | (add-to-list 'nnmail-extra-headers header) |
| 2912 | 2912 | (add-to-list 'gnus-extra-headers header)) | |
| 2913 | (setq spam-install-hooks t) | 2913 | |
| 2914 | ;; TODO: How do we redo this every time the `spam' face is customized? | 2914 | ;; TODO: How do we redo this every time the `spam' face is customized? |
| 2915 | (push '((eq mark gnus-spam-mark) . spam) | 2915 | (push '((eq mark gnus-spam-mark) . spam) |
| 2916 | gnus-summary-highlight) | 2916 | gnus-summary-highlight) |
| 2917 | ;; Add hooks for loading and saving the spam stats | 2917 | ;; Add hooks for loading and saving the spam stats |
| 2918 | (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save) | 2918 | (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save) |
| 2919 | (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load) | 2919 | (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load) |
| 2920 | (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load) | 2920 | (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load) |
| 2921 | (add-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit) | 2921 | (add-hook 'gnus-summary-prepare-exit-hook 'spam-summary-prepare-exit) |
| 2922 | (add-hook 'gnus-summary-prepare-hook 'spam-summary-prepare) | 2922 | (add-hook 'gnus-summary-prepare-hook 'spam-summary-prepare) |
| 2923 | (add-hook 'gnus-get-new-news-hook 'spam-setup-widening) | 2923 | (add-hook 'gnus-get-new-news-hook 'spam-setup-widening) |
| 2924 | (add-hook 'gnus-summary-prepared-hook 'spam-find-spam)) | 2924 | (add-hook 'gnus-summary-prepared-hook 'spam-find-spam) |
| 2925 | ;; Don't install things more than once. | ||
| 2926 | (setq spam-install-hooks nil))) | ||
| 2925 | 2927 | ||
| 2926 | (defun spam-unload-hook () | 2928 | (defun spam-unload-hook () |
| 2927 | "Uninstall the spam.el hooks." | 2929 | "Uninstall the spam.el hooks." |
| @@ -2936,8 +2938,6 @@ installed through `spam-necessary-extra-headers'." | |||
| 2936 | 2938 | ||
| 2937 | (add-hook 'spam-unload-hook 'spam-unload-hook) | 2939 | (add-hook 'spam-unload-hook 'spam-unload-hook) |
| 2938 | 2940 | ||
| 2939 | (when spam-install-hooks | ||
| 2940 | (spam-initialize)) | ||
| 2941 | ;;}}} | 2941 | ;;}}} |
| 2942 | 2942 | ||
| 2943 | (provide 'spam) | 2943 | (provide 'spam) |