Remove unused variable temp-buffer-show-specifiers.
[bpt/emacs.git] / lisp / mh-e / mh-show.el
index 83fa172..d14ab20 100644 (file)
@@ -1,7 +1,6 @@
 ;;; mh-show.el --- MH-Show mode
 
-;; Copyright (C) 1993, 1995, 1997, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 1997, 2000-2011  Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -147,9 +146,9 @@ displayed."
             (if (not clean-message-header)
                 (mh-start-of-uncleaned-message)))
         (mh-display-msg msg folder)))
-    (if (not (= (1+ (window-height)) (frame-height))) ;not horizontally split
-        (shrink-window (- (window-height) (or mh-summary-height
-                                              (mh-summary-height)))))
+    (unless (mh-window-full-height-p) ; not vertically split
+      (shrink-window (- (window-height) (or mh-summary-height
+                                            (mh-summary-height)))))
     (mh-recenter nil)
     ;; The following line is a nop which forces update of the scan line so
     ;; that font-lock will update it (if needed)...
@@ -166,16 +165,6 @@ displayed."
         (apply #'mh-speed-flists t folders)))
     (run-hooks 'mh-show-hook)))
 
-;;;###mh-autoload
-(defun mh-showing-mode (&optional arg)
-  "Change whether messages should be displayed.
-
-With ARG, display messages if ARG is positive, otherwise don't display them."
-  (setq mh-showing-mode
-        (if (null arg)
-            (not mh-showing-mode)
-          (> (prefix-numeric-value arg) 0))))
-
 ;;;###mh-autoload
 (defun mh-start-of-uncleaned-message ()
   "Position uninteresting headers off the top of the window."
@@ -323,17 +312,16 @@ ignored if VISIBLE-HEADERS is non-nil."
 (defun mh-invalidate-show-buffer ()
   "Invalidate the show buffer so we must update it to use it."
   (if (get-buffer mh-show-buffer)
-      (save-excursion
-        (set-buffer mh-show-buffer)
+      (with-current-buffer mh-show-buffer
         (mh-unvisit-file))))
 
 (defun mh-unvisit-file ()
   "Separate current buffer from the message file it was visiting."
   (or (not (buffer-modified-p))
       (null buffer-file-name)           ;we've been here before
-      (yes-or-no-p (format "Message %s modified; flush changes? "
+      (yes-or-no-p (format "Message %s modified; discard changes? "
                            (file-name-nondirectory buffer-file-name)))
-      (error "Flushing changes not confirmed"))
+      (error "Changes preserved"))
   (clear-visited-file-modtime)
   (unlock-buffer)
   (setq buffer-file-name nil))
@@ -508,8 +496,7 @@ still visible.\n")
     "--"
     ["Narrow to Subject Sequence"       mh-show-narrow-to-subject t]
     ["Narrow to Tick Sequence"          mh-show-narrow-to-tick
-     (save-excursion
-       (set-buffer mh-show-folder-buffer)
+     (with-current-buffer mh-show-folder-buffer
        (and mh-tick-seq (mh-seq-msgs (mh-find-seq mh-tick-seq))))]
     ["Delete Rest of Same Subject"      mh-show-delete-subject t]
     ["Toggle Tick Mark"                 mh-show-toggle-tick t]
@@ -824,7 +811,7 @@ operation."
 
 ;;; MH-Show Mode
 
-;; 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-show-mode 'mode-class 'special)
 
 ;; Shush compiler.
@@ -926,5 +913,4 @@ See also `mh-folder-mode'.
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: 8607a80a-9b5c-43a7-a25d-d7e4a848c25b
 ;;; mh-show.el ends here