projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(spam-report-gmane-max-requests): New constant.
[gnus]
/
lisp
/
gnus-salt.el
diff --git
a/lisp/gnus-salt.el
b/lisp/gnus-salt.el
index
cd2aec8
..
b4bfbfe
100644
(file)
--- a/
lisp/gnus-salt.el
+++ b/
lisp/gnus-salt.el
@@
-1,17
+1,17
@@
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2001
-;;
Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1998, 1999, 2001
, 2002, 2003, 2004,
+;;
2005, 2006, 2007, 2008
Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; This file is part of GNU Emacs.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; GNU Emacs is free software
:
you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-19,9
+19,7
@@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-128,18
+126,16
@@
It accepts the same format specs that `gnus-summary-line-format' does."
;; Set up the menu.
(when (gnus-visual-p 'pick-menu 'menu)
(gnus-pick-make-menu-bar))
;; Set up the menu.
(when (gnus-visual-p 'pick-menu 'menu)
(gnus-pick-make-menu-bar))
- (add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map
- nil 'gnus-pick-mode)
+ (add-minor-mode 'gnus-pick-mode " Pick" gnus-pick-mode-map)
(gnus-run-hooks 'gnus-pick-mode-hook))))
(defun gnus-pick-setup-message ()
"Make Message do the right thing on exit."
(when (and (gnus-buffer-live-p gnus-summary-buffer)
(gnus-run-hooks 'gnus-pick-mode-hook))))
(defun gnus-pick-setup-message ()
"Make Message do the right thing on exit."
(when (and (gnus-buffer-live-p gnus-summary-buffer)
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
gnus-pick-mode))
(message-add-action
gnus-pick-mode))
(message-add-action
-
'
(gnus-configure-windows ,gnus-current-window-configuration t)
+
`
(gnus-configure-windows ,gnus-current-window-configuration t)
'send 'exit 'postpone 'kill)))
(defvar gnus-pick-line-number 1)
'send 'exit 'postpone 'kill)))
(defvar gnus-pick-line-number 1)
@@
-362,8
+358,7
@@
This must be bound to a button-down mouse event."
;; Set up the menu.
(when (gnus-visual-p 'binary-menu 'menu)
(gnus-binary-make-menu-bar))
;; Set up the menu.
(when (gnus-visual-p 'binary-menu 'menu)
(gnus-binary-make-menu-bar))
- (add-minor-mode 'gnus-binary-mode " Binary"
- gnus-binary-mode-map nil 'gnus-binary-mode)
+ (add-minor-mode 'gnus-binary-mode " Binary" gnus-binary-mode-map)
(gnus-run-hooks 'gnus-binary-mode-hook))))
(defun gnus-binary-display-article (article &optional all-header)
(gnus-run-hooks 'gnus-binary-mode-hook))))
(defun gnus-binary-display-article (article &optional all-header)
@@
-496,7
+491,7
@@
Two predefined functions are available:
(gnus-set-work-buffer)
(gnus-tree-node-insert (make-mail-header "") nil)
(setq gnus-tree-node-length (1- (point))))
(gnus-set-work-buffer)
(gnus-tree-node-insert (make-mail-header "") nil)
(setq gnus-tree-node-length (1- (point))))
- (gnus-run-hooks 'gnus-tree-mode-hook))
+ (gnus-run-
mode-
hooks 'gnus-tree-mode-hook))
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
(defun gnus-tree-read-summary-keys (&optional arg)
"Read a summary buffer key sequence and execute it."
@@
-526,8
+521,7
@@
Two predefined functions are available:
(interactive (list (gnus-tree-article-number)))
(let ((buf (current-buffer)))
(when article
(interactive (list (gnus-tree-article-number)))
(let ((buf (current-buffer)))
(when article
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
(gnus-summary-goto-article article))
(select-window (get-buffer-window buf)))))
(gnus-summary-goto-article article))
(select-window (get-buffer-window buf)))))
@@
-578,8
+572,7
@@
Two predefined functions are available:
(defun gnus-get-tree-buffer ()
"Return the tree buffer properly initialized."
(defun gnus-get-tree-buffer ()
"Return the tree buffer properly initialized."
- (save-excursion
- (set-buffer (gnus-get-buffer-create gnus-tree-buffer))
+ (with-current-buffer (gnus-get-buffer-create gnus-tree-buffer)
(unless (eq major-mode 'gnus-tree-mode)
(gnus-tree-mode))
(current-buffer)))
(unless (eq major-mode 'gnus-tree-mode)
(gnus-tree-mode))
(current-buffer)))
@@
-664,8
+657,7
@@
Two predefined functions are available:
"Highlight current line according to `gnus-summary-highlight'."
(let ((list gnus-summary-highlight)
face)
"Highlight current line according to `gnus-summary-highlight'."
(let ((list gnus-summary-highlight)
face)
- (save-excursion
- (set-buffer gnus-summary-buffer)
+ (with-current-buffer gnus-summary-buffer
(let* ((score (or (cdr (assq article gnus-newsgroup-scored))
gnus-summary-default-score 0))
(default gnus-summary-default-score)
(let* ((score (or (cdr (assq article gnus-newsgroup-scored))
gnus-summary-default-score 0))
(default gnus-summary-default-score)
@@
-692,8
+684,7
@@
Two predefined functions are available:
(defun gnus-generate-tree (thread)
"Generate a thread tree for THREAD."
(defun gnus-generate-tree (thread)
"Generate a thread tree for THREAD."
- (save-excursion
- (set-buffer (gnus-get-tree-buffer))
+ (with-current-buffer (gnus-get-tree-buffer)
(let ((buffer-read-only nil)
(gnus-tmp-indent 0))
(erase-buffer)
(let ((buffer-read-only nil)
(gnus-tmp-indent 0))
(erase-buffer)
@@
-816,14
+807,12
@@
Two predefined functions are available:
(defun gnus-possibly-generate-tree (article &optional force)
"Generate the thread tree for ARTICLE if it isn't displayed already."
(defun gnus-possibly-generate-tree (article &optional force)
"Generate the thread tree for ARTICLE if it isn't displayed already."
- (when (save-excursion
- (set-buffer gnus-summary-buffer)
+ (when (with-current-buffer gnus-summary-buffer
(and gnus-use-trees
gnus-show-threads
(vectorp (gnus-summary-article-header article))))
(save-excursion
(and gnus-use-trees
gnus-show-threads
(vectorp (gnus-summary-article-header article))))
(save-excursion
- (let ((top (save-excursion
- (set-buffer gnus-summary-buffer)
+ (let ((top (with-current-buffer gnus-summary-buffer
(gnus-cut-thread
(gnus-remove-thread
(mail-header-id
(gnus-cut-thread
(gnus-remove-thread
(mail-header-id
@@
-845,8
+834,7
@@
Two predefined functions are available:
(defun gnus-tree-perhaps-minimize ()
(when (and gnus-tree-minimize-window
(get-buffer gnus-tree-buffer))
(defun gnus-tree-perhaps-minimize ()
(when (and gnus-tree-minimize-window
(get-buffer gnus-tree-buffer))
- (save-excursion
- (set-buffer gnus-tree-buffer)
+ (with-current-buffer gnus-tree-buffer
(gnus-tree-minimize))))
(defun gnus-highlight-selected-tree (article)
(gnus-tree-minimize))))
(defun gnus-highlight-selected-tree (article)
@@
-873,14
+861,12
@@
Two predefined functions are available:
(gnus-horizontal-recenter)
(select-window selected))))
;; If we remove this save-excursion, it updates the wrong mode lines?!?
(gnus-horizontal-recenter)
(select-window selected))))
;; If we remove this save-excursion, it updates the wrong mode lines?!?
- (save-excursion
- (set-buffer gnus-tree-buffer)
+ (with-current-buffer gnus-tree-buffer
(gnus-set-mode-line 'tree))
(set-buffer buf)))
(defun gnus-tree-highlight-article (article face)
(gnus-set-mode-line 'tree))
(set-buffer buf)))
(defun gnus-tree-highlight-article (article face)
- (save-excursion
- (set-buffer (gnus-get-tree-buffer))
+ (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)
(let (region)
(when (setq region (gnus-tree-article-region article))
(gnus-put-text-property (car region) (cdr region) 'face face)
@@
-1009,14
+995,13
@@
The following commands are available:
(buffer-disable-undo)
(setq buffer-read-only t)
(make-local-variable 'gnus-carpal-attached-buffer)
(buffer-disable-undo)
(setq buffer-read-only t)
(make-local-variable 'gnus-carpal-attached-buffer)
- (gnus-run-hooks 'gnus-carpal-mode-hook))
+ (gnus-run-
mode-
hooks 'gnus-carpal-mode-hook))
(defun gnus-carpal-setup-buffer (type)
(let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
(if (get-buffer buffer)
()
(defun gnus-carpal-setup-buffer (type)
(let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type)))))
(if (get-buffer buffer)
()
- (save-excursion
- (set-buffer (gnus-get-buffer-create buffer))
+ (with-current-buffer (gnus-get-buffer-create buffer)
(gnus-carpal-mode)
(setq gnus-carpal-attached-buffer
(intern (format "gnus-%s-buffer" type)))
(gnus-carpal-mode)
(setq gnus-carpal-attached-buffer
(intern (format "gnus-%s-buffer" type)))