]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-folder.el
* mh-e.el (mh-invisible-header-fields-internal): Remove Newsgroups
[gnu-emacs] / lisp / mh-e / mh-folder.el
index 8516856f14eb1bf5197fd1f0f9d8d376f1a45d05..86f9518459a4a7c0c690ca12fec0c121124ebecd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mh-folder.el --- MH-Folder mode
 
-;; Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -9,10 +9,10 @@
 
 ;; 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
-;; 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
@@ -20,9 +20,7 @@
 ;; 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:
 
@@ -156,6 +154,8 @@ annotation.")
   '("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]
@@ -225,6 +225,7 @@ annotation.")
   "'"           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
@@ -348,7 +349,7 @@ annotation.")
   "\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)))
@@ -510,7 +511,7 @@ font-lock is done highlighting.")
 
 (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
@@ -524,11 +525,8 @@ font-lock is done highlighting.")
 ;; Shush compiler.
 (defvar desktop-save-buffer)
 (defvar font-lock-auto-fontify)
-(defvar image-load-path)
 (defvar font-lock-defaults)             ; XEmacs
 
-(defvar mh-folder-buttons-init-flag nil)
-
 ;; Ensure new buffers won't get this mode if default-major-mode is nil.
 (put 'mh-folder-mode 'mode-class 'special)
 
@@ -590,13 +588,8 @@ perform the operation on all messages in that region.
 
 \\{mh-folder-mode-map}"
   (mh-do-in-gnu-emacs
-    (unless mh-folder-buttons-init-flag
-      (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-             (image-load-path (cons (car load-path)
-                                    (when (boundp 'image-load-path)
-                                      image-load-path))))
-        (mh-tool-bar-folder-buttons-init)
-        (setq mh-folder-buttons-init-flag t)))
+    (unless mh-folder-tool-bar-map
+        (mh-tool-bar-folder-buttons-init))
     (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
   (mh-do-in-xemacs
     (mh-tool-bar-init :folder))
@@ -661,7 +654,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)
-  (if (and mh-xemacs-flag
+  (if (and (featurep 'xemacs)
            font-lock-auto-fontify)
       (turn-on-font-lock)))             ; Force font-lock in XEmacs.
 
@@ -1503,7 +1496,7 @@ function doesn't recenter the folder buffer."
 
 (defun mh-update-unseen ()
   "Synchronize the unseen sequence with MH.
-Return non-nil iff 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