HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 2010 to copyright years.
[bpt/emacs.git]
/
lisp
/
mh-e
/
mh-folder.el
diff --git
a/lisp/mh-e/mh-folder.el
b/lisp/mh-e/mh-folder.el
index
a401738
..
583b371
100644
(file)
--- a/
lisp/mh-e/mh-folder.el
+++ b/
lisp/mh-e/mh-folder.el
@@
-1,6
+1,7
@@
;;; mh-folder.el --- MH-Folder mode
;;; mh-folder.el --- MH-Folder mode
-;; Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
@@
-9,10
+10,10
@@
;; This file is part of GNU Emacs.
;; 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
@@
-20,9
+21,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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-156,6
+155,8
@@
annotation.")
'("Message"
["Show Message" mh-show (mh-get-msg-num nil)]
["Show Message with Header" mh-header-display (mh-get-msg-num nil)]
'("Message"
["Show Message" mh-show (mh-get-msg-num nil)]
["Show Message with Header" mh-header-display (mh-get-msg-num nil)]
+ ["Show Message with Preferred Alternative"
+ mh-show-preferred-alternative (mh-get-msg-num nil)]
["Next Message" mh-next-undeleted-msg t]
["Previous Message" mh-previous-undeleted-msg t]
["Go to First Message" mh-first-msg t]
["Next Message" mh-next-undeleted-msg t]
["Previous Message" mh-previous-undeleted-msg t]
["Go to First Message" mh-first-msg t]
@@
-225,6
+226,7
@@
annotation.")
"'" mh-toggle-tick
"," mh-header-display
"." mh-alt-show
"'" mh-toggle-tick
"," mh-header-display
"." mh-alt-show
+ ":" mh-show-preferred-alternative
";" mh-toggle-mh-decode-mime-flag
">" mh-write-msg-to-file
"?" mh-help
";" mh-toggle-mh-decode-mime-flag
">" mh-write-msg-to-file
"?" mh-help
@@
-348,7
+350,7
@@
annotation.")
"\M-\t" mh-prev-button)
(cond
"\M-\t" mh-prev-button)
(cond
- (
mh-xemacs-flag
+ (
(featurep 'xemacs)
(define-key mh-folder-mode-map [button2] 'mh-show-mouse))
(t
(define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
(define-key mh-folder-mode-map [button2] 'mh-show-mouse))
(t
(define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
@@
-388,8
+390,9
@@
annotation.")
(?/ "Limit to [c]c, ran[g]e, fro[m], [s]ubject, [t]o; [w]iden")
(?X "un[s]har, [u]udecode message")
(?D "[b]urst digest")
(?/ "Limit to [c]c, ran[g]e, fro[m], [s]ubject, [t]o; [w]iden")
(?X "un[s]har, [u]udecode message")
(?D "[b]urst digest")
- (?K "[v]iew, [i]nline, [o]utput/save MIME part; save [a]ll parts; \n"
- "[TAB] next; [SHIFT-TAB] previous")
+ (?K "[v]iew, [i]nline, with [e]xternal viewer; \n"
+ "[o]utput/save MIME part; save [a]ll parts; \n"
+ "[t]oggle buttons; [TAB] next; [SHIFT-TAB] previous")
(?J "[b]lacklist, [w]hitelist message"))
"Key binding cheat sheet.
See `mh-set-help'.")
(?J "[b]lacklist, [w]hitelist message"))
"Key binding cheat sheet.
See `mh-set-help'.")
@@
-510,7
+513,7
@@
font-lock is done highlighting.")
(defmacro mh-remove-xemacs-horizontal-scrollbar ()
"Get rid of the horizontal scrollbar that XEmacs insists on putting in."
(defmacro mh-remove-xemacs-horizontal-scrollbar ()
"Get rid of the horizontal scrollbar that XEmacs insists on putting in."
- (when
mh-xemacs-flag
+ (when
(featurep 'xemacs)
`(if (and (featurep 'scrollbar)
(fboundp 'set-specifier))
(set-specifier horizontal-scrollbar-visible-p nil
`(if (and (featurep 'scrollbar)
(fboundp 'set-specifier))
(set-specifier horizontal-scrollbar-visible-p nil
@@
-526,7
+529,7
@@
font-lock is done highlighting.")
(defvar font-lock-auto-fontify)
(defvar font-lock-defaults) ; XEmacs
(defvar font-lock-auto-fontify)
(defvar font-lock-defaults) ; XEmacs
-;; Ensure new buffers won't get this mode if default
-
major-mode is nil.
+;; Ensure new buffers won't get this mode if default
major-mode is nil.
(put 'mh-folder-mode 'mode-class 'special)
;; Autoload cookie needed by desktop.el
(put 'mh-folder-mode 'mode-class 'special)
;; Autoload cookie needed by desktop.el
@@
-589,7
+592,8
@@
perform the operation on all messages in that region.
(mh-do-in-gnu-emacs
(unless mh-folder-tool-bar-map
(mh-tool-bar-folder-buttons-init))
(mh-do-in-gnu-emacs
(unless mh-folder-tool-bar-map
(mh-tool-bar-folder-buttons-init))
- (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
+ (if (boundp 'tool-bar-map)
+ (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)))
(mh-do-in-xemacs
(mh-tool-bar-init :folder))
(make-local-variable 'font-lock-defaults)
(mh-do-in-xemacs
(mh-tool-bar-init :folder))
(make-local-variable 'font-lock-defaults)
@@
-653,7
+657,7
@@
perform the operation on all messages in that region.
(easy-menu-add mh-folder-folder-menu)
(mh-inc-spool-make)
(mh-set-help mh-folder-mode-help-messages)
(easy-menu-add mh-folder-folder-menu)
(mh-inc-spool-make)
(mh-set-help mh-folder-mode-help-messages)
- (if (and
mh-xemacs-flag
+ (if (and
(featurep 'xemacs)
font-lock-auto-fontify)
(turn-on-font-lock))) ; Force font-lock in XEmacs.
font-lock-auto-fontify)
(turn-on-font-lock))) ; Force font-lock in XEmacs.
@@
-836,8
+840,8
@@
From a program, edit MESSAGE; nil means edit current message."
;; Invalidate the show buffer if it is showing the same message that is
;; to be edited.
(when (and (buffer-live-p (get-buffer mh-show-buffer))
;; Invalidate the show buffer if it is showing the same message that is
;; to be edited.
(when (and (buffer-live-p (get-buffer mh-show-buffer))
- (equal (
save-excursion (set-buffer mh-show-buffer)
-
buffer-file-name)
+ (equal (
with-current-buffer mh-show-buffer
+ buffer-file-name)
msg-filename))
(mh-invalidate-show-buffer))
msg-filename))
(mh-invalidate-show-buffer))
@@
-1233,9
+1237,8
@@
structures."
(current-buffer (current-buffer))
(threaded-view-flag mh-show-threads-flag))
(delete-other-windows)
(current-buffer (current-buffer))
(threaded-view-flag mh-show-threads-flag))
(delete-other-windows)
- (save-excursion
- (when (get-buffer folder)
- (set-buffer folder)
+ (when (get-buffer folder)
+ (with-current-buffer folder
(setq threaded-view-flag (memq 'unthread mh-view-ops))))
(when index-data
(mh-make-folder folder)
(setq threaded-view-flag (memq 'unthread mh-view-ops))))
(when index-data
(mh-make-folder folder)
@@
-1285,8
+1288,7
@@
the command \\[mh-refile-or-write-again]."
(output-file (mh-expand-file-name file)))
(setq mh-last-destination (list 'write file (if no-header 'no-header))
mh-last-destination-write mh-last-destination)
(output-file (mh-expand-file-name file)))
(setq mh-last-destination (list 'write file (if no-header 'no-header))
mh-last-destination-write mh-last-destination)
- (save-excursion
- (set-buffer (get-buffer-create mh-temp-buffer))
+ (with-current-buffer (get-buffer-create mh-temp-buffer)
(erase-buffer)
(insert-file-contents msg-file-to-output)
(goto-char (point-min))
(erase-buffer)
(insert-file-contents msg-file-to-output)
(goto-char (point-min))
@@
-1495,7
+1497,7
@@
function doesn't recenter the folder buffer."
(defun mh-update-unseen ()
"Synchronize the unseen sequence with MH.
(defun mh-update-unseen ()
"Synchronize the unseen sequence with MH.
-Return non-nil if
f
the MH folder was set.
+Return non-nil if the MH folder was set.
The hook `mh-unseen-updated-hook' is called after the unseen sequence
is updated."
(if mh-seen-list
The hook `mh-unseen-updated-hook' is called after the unseen sequence
is updated."
(if mh-seen-list
@@
-1755,7
+1757,7
@@
If UPDATE, append the scan lines, otherwise replace."
(goto-char scan-start)
(cond ((looking-at "scan: no messages in")
(keep-lines mh-scan-valid-regexp)) ; Flush random scan lines
(goto-char scan-start)
(cond ((looking-at "scan: no messages in")
(keep-lines mh-scan-valid-regexp)) ; Flush random scan lines
- ((looking-at (if (mh-variant-p '
m
u-mh)
+ ((looking-at (if (mh-variant-p '
gn
u-mh)
"scan: message set .* does not exist"
"scan: bad message list "))
(keep-lines mh-scan-valid-regexp))
"scan: message set .* does not exist"
"scan: bad message list "))
(keep-lines mh-scan-valid-regexp))
@@
-1820,8
+1822,7
@@
The default folder name is generated by the option
"Destination"
(let ((refile-file (ignore-errors (mh-msg-filename (mh-get-msg-num t)))))
(if (null refile-file) ""
"Destination"
(let ((refile-file (ignore-errors (mh-msg-filename (mh-get-msg-num t)))))
(if (null refile-file) ""
- (save-excursion
- (set-buffer (get-buffer-create mh-temp-buffer))
+ (with-current-buffer (get-buffer-create mh-temp-buffer)
(erase-buffer)
(insert-file-contents refile-file)
(or (and mh-default-folder-for-message-function
(erase-buffer)
(insert-file-contents refile-file)
(or (and mh-default-folder-for-message-function