projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(auth-source-netrc-parse): Accept a number as the port spec, too.
[gnus]
/
lisp
/
gnus-bcklg.el
diff --git
a/lisp/gnus-bcklg.el
b/lisp/gnus-bcklg.el
index
f95fcee
..
d3fee35
100644
(file)
--- a/
lisp/gnus-bcklg.el
+++ b/
lisp/gnus-bcklg.el
@@
-1,26
+1,24
@@
;;; gnus-bcklg.el --- backlog functions for Gnus
;;; gnus-bcklg.el --- backlog functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-;;
Free Software Foundation, Inc.
+
+;;
Copyright (C) 1996-2011
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
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; 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:
@@
-41,8
+39,7
@@
(defun gnus-backlog-buffer ()
"Return the backlog buffer."
(or (get-buffer gnus-backlog-buffer)
(defun gnus-backlog-buffer ()
"Return the backlog buffer."
(or (get-buffer gnus-backlog-buffer)
- (save-excursion
- (set-buffer (gnus-get-buffer-create gnus-backlog-buffer))
+ (with-current-buffer (gnus-get-buffer-create gnus-backlog-buffer)
(buffer-disable-undo)
(setq buffer-read-only t)
(get-buffer gnus-backlog-buffer))))
(buffer-disable-undo)
(setq buffer-read-only t)
(get-buffer gnus-backlog-buffer))))
@@
-58,7
+55,7
@@
"Clear all backlog variables and buffers."
(interactive)
(when (get-buffer gnus-backlog-buffer)
"Clear all backlog variables and buffers."
(interactive)
(when (get-buffer gnus-backlog-buffer)
- (kill-buffer gnus-backlog-buffer))
+ (
gnus-
kill-buffer gnus-backlog-buffer))
(setq gnus-backlog-hashtb nil
gnus-backlog-articles nil))
(setq gnus-backlog-hashtb nil
gnus-backlog-articles nil))
@@
-77,8
+74,7
@@
(gnus-backlog-remove-oldest-article))
(push ident gnus-backlog-articles)
;; Insert the new article.
(gnus-backlog-remove-oldest-article))
(push ident gnus-backlog-articles)
;; Insert the new article.
- (save-excursion
- (set-buffer (gnus-backlog-buffer))
+ (with-current-buffer (gnus-backlog-buffer)
(let (buffer-read-only)
(goto-char (point-max))
(unless (bolp)
(let (buffer-read-only)
(goto-char (point-max))
(unless (bolp)
@@
-91,8
+87,7
@@
(gnus-error 3 "Article %d is blank" number))))))))
(defun gnus-backlog-remove-oldest-article ()
(gnus-error 3 "Article %d is blank" number))))))))
(defun gnus-backlog-remove-oldest-article ()
- (save-excursion
- (set-buffer (gnus-backlog-buffer))
+ (with-current-buffer (gnus-backlog-buffer)
(goto-char (point-min))
(if (zerop (buffer-size))
() ; The buffer is empty.
(goto-char (point-min))
(if (zerop (buffer-size))
() ; The buffer is empty.
@@
-115,8
+110,7
@@
beg end)
(when (memq ident gnus-backlog-articles)
;; It was in the backlog.
beg end)
(when (memq ident gnus-backlog-articles)
;; It was in the backlog.
- (save-excursion
- (set-buffer (gnus-backlog-buffer))
+ (with-current-buffer (gnus-backlog-buffer)
(let (buffer-read-only)
(when (setq beg (text-property-any
(point-min) (point-max) 'gnus-backlog
(let (buffer-read-only)
(when (setq beg (text-property-any
(point-min) (point-max) 'gnus-backlog
@@
-139,8
+133,7
@@
beg end)
(when (memq ident gnus-backlog-articles)
;; It was in the backlog.
beg end)
(when (memq ident gnus-backlog-articles)
;; It was in the backlog.
- (save-excursion
- (set-buffer (gnus-backlog-buffer))
+ (with-current-buffer (gnus-backlog-buffer)
(if (not (setq beg (text-property-any
(point-min) (point-max) 'gnus-backlog
ident)))
(if (not (setq beg (text-property-any
(point-min) (point-max) 'gnus-backlog
ident)))
@@
-151,8
+144,7
@@
(setq end
(next-single-property-change
(1+ beg) 'gnus-backlog (current-buffer) (point-max)))))
(setq end
(next-single-property-change
(1+ beg) 'gnus-backlog (current-buffer) (point-max)))))
- (save-excursion
- (and buffer (set-buffer buffer))
+ (with-current-buffer (or (current-buffer) buffer)
(let ((buffer-read-only nil))
(erase-buffer)
(insert-buffer-substring gnus-backlog-buffer beg end)))
(let ((buffer-read-only nil))
(erase-buffer)
(insert-buffer-substring gnus-backlog-buffer beg end)))