Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / mh-e / mh-folder.el
index 52a6d78..71ef873 100644 (file)
@@ -1,7 +1,6 @@
 ;;; mh-folder.el --- MH-Folder mode
 
-;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2009
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2012  Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -78,7 +77,7 @@ the MH mail system."
 ;;; Desktop Integration
 
 ;; desktop-buffer-mode-handlers appeared in Emacs 22.
-(if (fboundp 'desktop-buffer-mode-handlers)
+(if (boundp 'desktop-buffer-mode-handlers)
     (add-to-list 'desktop-buffer-mode-handlers
                  '(mh-folder-mode . mh-restore-desktop-buffer)))
 
@@ -527,7 +526,8 @@ font-lock is done highlighting.")
 ;; Shush compiler.
 (defvar desktop-save-buffer)
 (defvar font-lock-auto-fontify)
-(defvar font-lock-defaults)             ; XEmacs
+(mh-do-in-xemacs
+  (defvar font-lock-defaults))
 
 ;; Ensure new buffers won't get this mode if default major-mode is nil.
 (put 'mh-folder-mode 'mode-class 'special)
@@ -840,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))
-               (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))
 
@@ -1237,9 +1237,8 @@ structures."
         (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)
@@ -1289,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)
-    (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))
@@ -1824,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) ""
-       (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
@@ -1977,5 +1974,4 @@ If MSG is nil then act on the message at point"
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: aa97b758-d4f6-4c86-bc5a-1950921da1e7
 ;;; mh-folder.el ends here