;;; 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>
;;;###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)
(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)...
(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."
(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 ()
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
"--"
["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]
;;; 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.
\\{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)
;; sentence-end-double-space: nil
;; End:
-;; arch-tag: 8607a80a-9b5c-43a7-a25d-d7e4a848c25b
;;; mh-show.el ends here