Refill some long/short copyright headers.
[bpt/emacs.git] / lisp / mh-e / mh-show.el
index bd7d218..5c2f08c 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>
@@ -104,7 +103,7 @@ Use the command \\[mh-show] to show the message normally again."
 ;;;###mh-autoload
 (defun  mh-show-preferred-alternative ()
   "Display message with the default preferred alternative.
-I.e. we set \\mm-discouraged-alternatives to nil.
+This is as if `mm-discouraged-alternatives' is set to nil.
 
 Use the command \\[mh-show] to show the message normally again."
   (interactive)
@@ -147,9 +146,11 @@ 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 (if (fboundp 'window-full-height-p)
+                (window-full-height-p)
+              (= (1+ (window-height)) (frame-height))) ; 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 +167,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,8 +314,7 @@ 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 ()
@@ -358,7 +348,7 @@ The current frame height is taken into consideration."
 If the buffer we start in is still visible and DONT-RETURN is nil
 then switch to it after that."
   `(defun ,function ()
-     ,(format "Calls %s from the message's folder.\n%s\nSee \"%s\" for more info.\n"
+     ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n"
               original-function
               (if dont-return ""
                 "When function completes, returns to the show buffer if it is
@@ -508,8 +498,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 +813,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.
@@ -847,7 +836,8 @@ See also `mh-folder-mode'.
 
 \\{mh-show-mode-map}"
   (mh-do-in-gnu-emacs
-    (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))
+   (if (boundp 'tool-bar-map)
+       (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)))
   (mh-do-in-xemacs
     (mh-tool-bar-init :show))
   (set (make-local-variable 'mail-header-separator) mh-mail-header-separator)
@@ -925,5 +915,4 @@ See also `mh-folder-mode'.
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: 8607a80a-9b5c-43a7-a25d-d7e4a848c25b
 ;;; mh-show.el ends here