emacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-commit] emacs/lisp/mh-e mh-utils.el mh-e.el mh-customiz...


From: Bill Wohler
Subject: [Emacs-commit] emacs/lisp/mh-e mh-utils.el mh-e.el mh-customiz...
Date: Mon, 19 Dec 2005 05:37:02 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         
Changes by:     Bill Wohler <address@hidden>    05/12/19 05:37:02

Modified files:
        lisp/mh-e      : mh-utils.el mh-e.el mh-customize.el mh-comp.el 
                         ChangeLog 

Log message:
        * mh-customize.el (mh-toolbar): Rename to mh-tool-bar.
        (mh-tool-bar-search-function): Sync docstrings with manual.
        (mh-tool-bar-customize): Replace toolbar with tool bar in docstring.
        (mh-tool-bar-letter-help): Fix manual reference.
        (mh-xemacs-use-toolbar-flag): Rename to mh-xemacs-use-tool-bar-flag.
        Initialize to mh-xemacs-has-tool-bar-flag. Sync docstrings with
        manual.
        (mh-xemacs-toolbar-position): Rename to mh-xemacs-tool-bar-position.
        Initialize to nil. Drop "no tool bar" option (redundant) and change
        "Same As Default Tool Bar" setting to nil. Sync docstrings with
        manual.
        (mh-tool-bar-define): Replace toolbar with tool-bar or tool bar
        depending on context.
        (mh-toolbar-init): Rename to mh-tool-bar-init. Simplified condition
        for calling set-specifier. Only look at the value of
        mh-xemacs-use-tool-bar-flag.
        (mh-tool-bar-folder-buttons, mh-tool-bar-letter-buttons): Sync
        docstrings with manual.
        
        * mh-comp.el (mh-letter-mode): Use mh-tool-bar-init instead of
        mh-toolbar-init.
        
        * mh-e.el (mh-folder-mode): Ditto.
        
        * mh-utils.el (mh-show-mode): Ditto.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-utils.el.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-e.el.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-customize.el.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-comp.el.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.76&tr2=1.77&r1=text&r2=text

Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.76 emacs/lisp/mh-e/ChangeLog:1.77
--- emacs/lisp/mh-e/ChangeLog:1.76      Thu Dec 15 19:32:01 2005
+++ emacs/lisp/mh-e/ChangeLog   Mon Dec 19 05:37:02 2005
@@ -1,3 +1,32 @@
+2005-12-18  Bill Wohler  <address@hidden>
+
+       * mh-customize.el (mh-toolbar): Rename to mh-tool-bar.
+       (mh-tool-bar-search-function): Sync docstrings with manual.
+       (mh-tool-bar-customize): Replace toolbar with tool bar in
+       docstring.
+       (mh-tool-bar-letter-help): Fix manual reference.
+       (mh-xemacs-use-toolbar-flag): Rename to
+       mh-xemacs-use-tool-bar-flag. Initialize to
+       mh-xemacs-has-tool-bar-flag. Sync docstrings with manual.
+       (mh-xemacs-toolbar-position): Rename to
+       mh-xemacs-tool-bar-position. Initialize to nil. Drop "no tool bar"
+       option (redundant) and change "Same As Default Tool Bar" setting
+       to nil. Sync docstrings with manual.
+       (mh-tool-bar-define): Replace toolbar with tool-bar or tool bar
+       depending on context.
+       (mh-toolbar-init): Rename to mh-tool-bar-init. Simplified
+       condition for calling set-specifier. Only look at the value of
+       mh-xemacs-use-tool-bar-flag.
+       (mh-tool-bar-folder-buttons, mh-tool-bar-letter-buttons): Sync
+       docstrings with manual.
+
+       * mh-comp.el (mh-letter-mode): Use mh-tool-bar-init instead of
+       mh-toolbar-init.
+
+       * mh-e.el (mh-folder-mode): Ditto.
+
+       * mh-utils.el (mh-show-mode): Ditto.
+
 2005-12-15  Bill Wohler  <address@hidden>
 
        * mh-e.el (mh-delete-msg): Sync docstrings with manual.
Index: emacs/lisp/mh-e/mh-comp.el
diff -u emacs/lisp/mh-e/mh-comp.el:1.25 emacs/lisp/mh-e/mh-comp.el:1.26
--- emacs/lisp/mh-e/mh-comp.el:1.25     Mon Dec  5 02:26:03 2005
+++ emacs/lisp/mh-e/mh-comp.el  Mon Dec 19 05:37:02 2005
@@ -994,7 +994,7 @@
   ;; Enable undo since a show-mode buffer might have been reused.
   (buffer-enable-undo)
   (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)
-  (mh-funcall-if-exists mh-toolbar-init :letter)
+  (mh-funcall-if-exists mh-tool-bar-init :letter)
   (make-local-variable 'font-lock-defaults)
   (cond
    ((or (equal mh-highlight-citation-style 'font-lock)
Index: emacs/lisp/mh-e/mh-customize.el
diff -u emacs/lisp/mh-e/mh-customize.el:1.43 
emacs/lisp/mh-e/mh-customize.el:1.44
--- emacs/lisp/mh-e/mh-customize.el:1.43        Wed Dec 14 18:47:38 2005
+++ emacs/lisp/mh-e/mh-customize.el     Mon Dec 19 05:37:02 2005
@@ -198,9 +198,9 @@
   :link '(custom-manual "(mh-e)Threading")
   :group 'mh-e)
 
-(defgroup mh-toolbar nil
-  "The toolbar"
-  :link '(custom-manual "(mh-e)Toolbar")
+(defgroup mh-tool-bar nil
+  "The tool bar"
+  :link '(custom-manual "(mh-e)Tool Bar")
   :prefix "mh-"
   :group 'mh-e)
 
@@ -1801,15 +1801,18 @@
 
 
 
-;;; The Toolbar (:group 'mh-toolbar)
+;;; The Tool Bar (:group 'mh-tool-bar)
 
 (defcustom mh-tool-bar-search-function 'mh-search-folder
-  "*Function called by the tool-bar search button.
-See `mh-search-folder' and `mh-index-search' for details."
+  "*Function called by the tool bar search button.
+
+Available functions include `mh-search-folder', the default, and
+`mh-index-search'. You can also choose \"Other Function\" from the \"Value
+Menu\" and enter a function of your own choosing."
   :type '(choice (const mh-search-folder)
                  (const mh-index-search)
-                 (function :tag "Other function"))
-  :group 'mh-toolbar)
+                 (function :tag "Other Function"))
+  :group 'mh-tool-bar)
 
 ;; Functions called from the tool bar
 (defun mh-tool-bar-search (&optional arg)
@@ -1819,7 +1822,7 @@
   (call-interactively mh-tool-bar-search-function))
 
 (defun mh-tool-bar-customize ()
-  "Call `mh-customize' from the toolbar."
+  "Call `mh-customize' from the tool bar."
   (interactive)
   (mh-customize t))
 
@@ -1830,9 +1833,9 @@
   (delete-other-windows))
 
 (defun mh-tool-bar-letter-help ()
-  "Visit \"(mh-e)Draft Editing\"."
+  "Visit \"(mh-e)Editing Drafts\"."
   (interactive)
-  (info "(mh-e)Draft Editing")
+  (info "(mh-e)Editing Drafts")
   (delete-other-windows))
 
 (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag)
@@ -1855,45 +1858,35 @@
 
 ;; XEmacs has a couple of extra customizations...
 (mh-do-in-xemacs
-  (defcustom mh-xemacs-use-toolbar-flag (if (and (featurep 'toolbar)
-                                                 (featurep 'xpm)
-                                                 (device-on-window-system-p))
-                                            t
-                                          nil)
-    "*If non-nil, use toolbar.
+  (defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
+    "*If non-nil, use tool bar.
 
-This will default to t if you are in an environment that supports
-toolbars and xpm."
+This option controls whether to show the MH-E icons at all. By default, this
+option is turned on if the window system supports tool bars. If your system
+doesn't support tool bars, then you won't be able to turn on this option."
     :type 'boolean
-    :group 'mh-toolbar)
-
-  (defcustom mh-xemacs-toolbar-position (if mh-xemacs-use-toolbar-flag
-                                            'default
-                                          nil)
-    "*Where to put the toolbar.
-
-Valid non-nil values are \"default\", \"top\", \"bottom\", \"left\",
-\"right\".  These match the four edges of the frame, with \"default\"
-meaning \"use the same position as the default-toolbar\".
-
-A nil value means do not use a toolbar.
-
-If this variable is set to anything other than \"default\" and the
-default-toolbar has a different positional setting from the value of
-this variable, then two toolbars will be displayed.  The MH-E toolbar
-and the default-toolbar."
-    :type '(radio (const :tag "Same position as the \"default-toolbar\""
-                         :value default)
-                  (const :tag "Along the top edge of the frame"
-                         :value top)
-                  (const :tag "Along the bottom edge of the frame"
-                         :value bottom)
-                  (const :tag "Along the left edge of the frame"
-                         :value left)
-                  (const :tag "Along the right edge of the frame"
-                         :value right)
-                  (const :tag "Don't use a toolbar" nil))
-    :group 'mh-toolbar))
+    :group 'mh-tool-bar
+    :set (lambda (symbol value)
+           (if (and (eq value t)
+                    (not mh-xemacs-has-tool-bar-flag))
+               (error "Tool bar not supported"))
+           (set-default symbol value)))
+
+  (defcustom mh-xemacs-tool-bar-position nil
+    "*Tool bar location.
+
+This option controls the placement of the tool bar along the four edges of the
+frame. You can choose from one of \"Same As Default Tool Bar\", \"Top\",
+\"Bottom\", \"Left\", or \"Right\". If this variable is set to anything other
+than \"Same As Default Tool Bar\" and the default tool bar is in a different
+location, then two tool bars will be displayed: the MH-E tool bar and the
+default tool bar."
+    :type '(radio (const :tag "Same As Default Tool Bar" :value nil)
+                  (const :tag "Top" :value top)
+                  (const :tag "Bottom" :value bottom)
+                  (const :tag "Left" :value left)
+                  (const :tag "Right" :value right))
+    :group 'mh-tool-bar))
 
 (defun mh-buffer-exists-p (mode)
   "Test whether a buffer with major mode MODE is present."
@@ -1996,7 +1989,7 @@
                                     (t 'folder-vectors)))
                  (list (cond ((eq type :letter) 'mh-tool-bar-letter-buttons)
                              (t 'mh-tool-bar-folder-buttons)))
-                 (key (intern (concat "mh-" type1 "toolbar-" name-str)))
+                 (key (intern (concat "mh-" type1 "tool-bar-" name-str)))
                  (setter (intern (concat type1 "-button-setter")))
                  (mbuttons (cond ((eq type :letter) 'letter-buttons)
                                  ((eq type :show) 'show-buttons)
@@ -2063,89 +2056,87 @@
                      tool-bar-map))))
          ;; Custom setter functions
          (defun mh-tool-bar-folder-buttons-set (symbol value)
-           "Construct toolbar for `mh-folder-mode' and `mh-show-mode'."
+           "Construct tool bar for `mh-folder-mode' and `mh-show-mode'."
            (set-default symbol value)
            (mh-tool-bar-folder-buttons-init))
          (defun mh-tool-bar-letter-buttons-set (symbol value)
-           "Construct toolbar for `mh-letter-mode'."
+           "Construct tool bar for `mh-letter-mode'."
            (set-default symbol value)
            (mh-tool-bar-letter-buttons-init)))
        ;; XEmacs specific code
        (mh-do-in-xemacs
-         (defvar mh-toolbar-folder-vector-map
+         (defvar mh-tool-bar-folder-vector-map
            ',(loop for button in folder-buttons
                    for vector in folder-vectors
                    collect (cons button vector)))
-         (defvar mh-toolbar-show-vector-map
+         (defvar mh-tool-bar-show-vector-map
            ',(loop for button in show-buttons
                    for vector in show-vectors
                    collect (cons button vector)))
-         (defvar mh-toolbar-letter-vector-map
+         (defvar mh-tool-bar-letter-vector-map
            ',(loop for button in letter-buttons
                    for vector in letter-vectors
                    collect (cons button vector)))
-         (defvar mh-toolbar-folder-buttons nil)
-         (defvar mh-toolbar-show-buttons nil)
-         (defvar mh-toolbar-letter-buttons nil)
+         (defvar mh-tool-bar-folder-buttons nil)
+         (defvar mh-tool-bar-show-buttons nil)
+         (defvar mh-tool-bar-letter-buttons nil)
          ;; Custom setter functions
          (defun mh-tool-bar-letter-buttons-set (symbol value)
            (set-default symbol value)
-           (when mh-xemacs-has-toolbar-flag
-             (setq mh-toolbar-letter-buttons
+           (when mh-xemacs-has-tool-bar-flag
+             (setq mh-tool-bar-letter-buttons
                    (loop for b in value
-                         collect (cdr (assoc b 
mh-toolbar-letter-vector-map))))))
+                         collect (cdr (assoc b 
mh-tool-bar-letter-vector-map))))))
          (defun mh-tool-bar-folder-buttons-set (symbol value)
            (set-default symbol value)
-           (when mh-xemacs-has-toolbar-flag
-             (setq mh-toolbar-folder-buttons
+           (when mh-xemacs-has-tool-bar-flag
+             (setq mh-tool-bar-folder-buttons
                    (loop for b in value
-                         collect (cdr (assoc b mh-toolbar-folder-vector-map))))
-             (setq mh-toolbar-show-buttons
+                         collect (cdr (assoc b 
mh-tool-bar-folder-vector-map))))
+             (setq mh-tool-bar-show-buttons
                    (loop for b in value
-                         collect (cdr (assoc b mh-toolbar-show-vector-map))))))
-         ;; Initialize toolbar
-         (defun mh-toolbar-init (mode)
-           "Install toolbar in MODE."
-           (let ((toolbar (cond ((eq mode :folder) mh-toolbar-folder-buttons)
-                                ((eq mode :letter) mh-toolbar-letter-buttons)
-                                ((eq mode :show) mh-toolbar-show-buttons)))
+                         collect (cdr (assoc b 
mh-tool-bar-show-vector-map))))))
+         (defun mh-tool-bar-init (mode)
+           "Install tool bar in MODE."
+           (let ((tool-bar (cond ((eq mode :folder) mh-tool-bar-folder-buttons)
+                                ((eq mode :letter) mh-tool-bar-letter-buttons)
+                                ((eq mode :show) mh-tool-bar-show-buttons)))
                  (height 37)
                  (width 40)
                  (buffer (current-buffer)))
-             (when (and mh-xemacs-toolbar-position mh-xemacs-use-toolbar-flag
-                        mh-xemacs-has-toolbar-flag)
+             (when mh-xemacs-use-tool-bar-flag
                (cond
-                ((eq mh-xemacs-toolbar-position 'top)
-                 (set-specifier top-toolbar toolbar buffer)
+                ((eq mh-xemacs-tool-bar-position 'top)
+                 (set-specifier top-toolbar tool-bar buffer)
                  (set-specifier top-toolbar-visible-p t)
                  (set-specifier top-toolbar-height height))
-                ((eq mh-xemacs-toolbar-position 'bottom)
-                 (set-specifier bottom-toolbar toolbar buffer)
+                ((eq mh-xemacs-tool-bar-position 'bottom)
+                 (set-specifier bottom-toolbar tool-bar buffer)
                  (set-specifier bottom-toolbar-visible-p t)
                  (set-specifier bottom-toolbar-height height))
-                ((eq mh-xemacs-toolbar-position 'left)
-                 (set-specifier left-toolbar toolbar buffer)
+                ((eq mh-xemacs-tool-bar-position 'left)
+                 (set-specifier left-toolbar tool-bar buffer)
                  (set-specifier left-toolbar-visible-p t)
                  (set-specifier left-toolbar-width width))
-                ((eq mh-xemacs-toolbar-position 'right)
-                 (set-specifier right-toolbar toolbar buffer)
+                ((eq mh-xemacs-tool-bar-position 'right)
+                 (set-specifier right-toolbar tool-bar buffer)
                  (set-specifier right-toolbar-visible-p t)
                  (set-specifier right-toolbar-width width))
-                (t (set-specifier default-toolbar toolbar buffer)))))))
-       ;; Declare customizable toolbars
+                (t (set-specifier default-toolbar tool-bar buffer)))))))
+       ;; Declare customizable tool bars
        (custom-declare-variable
         'mh-tool-bar-folder-buttons
         '(list ,@(mapcar (lambda (x) `(quote ,x)) folder-defaults))
-        "Choose buttons to include in MH-E folder/show toolbar."
-        :group 'mh-toolbar :set 'mh-tool-bar-folder-buttons-set
+        "List of buttons to include in MH-Folder tool bar."
+        :group 'mh-tool-bar :set 'mh-tool-bar-folder-buttons-set
         :type '(set ,@(loop for x in folder-buttons
                             for y in folder-docs
                             collect `(const :tag ,y ,x))))
        (custom-declare-variable
         'mh-tool-bar-letter-buttons
         '(list ,@(mapcar (lambda (x) `(quote ,x)) letter-defaults))
-        "Choose buttons to include in MH-E letter toolbar."
-        :group 'mh-toolbar :set 'mh-tool-bar-letter-buttons-set
+        "List of buttons to include in MH-Letter tool bar."
+        :group 'mh-tool-bar :set 'mh-tool-bar-letter-buttons-set
         :type '(set ,@(loop for x in letter-buttons
                             for y in letter-docs
                             collect `(const :tag ,y ,x)))))))
Index: emacs/lisp/mh-e/mh-e.el
diff -u emacs/lisp/mh-e/mh-e.el:1.36 emacs/lisp/mh-e/mh-e.el:1.37
--- emacs/lisp/mh-e/mh-e.el:1.36        Thu Dec 15 19:32:01 2005
+++ emacs/lisp/mh-e/mh-e.el     Mon Dec 19 05:37:02 2005
@@ -1742,7 +1742,7 @@
   (easy-menu-add mh-folder-message-menu)
   (easy-menu-add mh-folder-folder-menu)
   (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)
-  (mh-funcall-if-exists mh-toolbar-init :folder)
+  (mh-funcall-if-exists mh-tool-bar-init :folder)
   (if (and mh-xemacs-flag
            font-lock-auto-fontify)
       (turn-on-font-lock)))             ; Force font-lock in XEmacs.
Index: emacs/lisp/mh-e/mh-utils.el
diff -u emacs/lisp/mh-e/mh-utils.el:1.21 emacs/lisp/mh-e/mh-utils.el:1.22
--- emacs/lisp/mh-e/mh-utils.el:1.21    Fri Dec  2 06:44:00 2005
+++ emacs/lisp/mh-e/mh-utils.el Mon Dec 19 05:37:02 2005
@@ -1120,7 +1120,7 @@
            font-lock-auto-fontify)
       (turn-on-font-lock))
   (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)
-  (mh-funcall-if-exists mh-toolbar-init :show)
+  (mh-funcall-if-exists mh-tool-bar-init :show)
   (when mh-decode-mime-flag
     (mh-make-local-hook 'kill-buffer-hook)
     (add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]