]> git.eshelyaron.com Git - emacs.git/commitdiff
* mh-customize.el (mh-min-colors-defined-flag, mh-defface-compat):
authorBill Wohler <wohler@newt.com>
Sat, 5 Nov 2005 04:02:06 +0000 (04:02 +0000)
committerBill Wohler <wohler@newt.com>
Sat, 5 Nov 2005 04:02:06 +0000 (04:02 +0000)
Move to mh-init.el to minimize bulk of mh-customize.el.

* mh-init.el: Modify commentary since file is used for load and
initialization as well as setting and getting the variant.
(mh-min-colors-defined-flag, mh-defface-compat): Move here from
mh-customize.el.

lisp/mh-e/ChangeLog
lisp/mh-e/mh-customize.el
lisp/mh-e/mh-init.el

index b00a78df654f1fe9b6c91861d6f83e4c50706730..4898113c768d758ae7760d5ab1c9fd00027df23c 100644 (file)
@@ -1,5 +1,13 @@
 2005-11-04  Bill Wohler  <wohler@newt.com>
 
+       * mh-customize.el (mh-min-colors-defined-flag, mh-defface-compat):
+       Move to mh-init.el to minimize bulk of mh-customize.el.
+
+       * mh-init.el: Modify commentary since file is used for load and
+       initialization as well as setting and getting the variant.
+       (mh-min-colors-defined-flag, mh-defface-compat): Move
+       here from mh-customize.el. 
+
        * mh-customize.el: Refactor faces. Move grayscale requirements
        last before t. Use uniform line breaks.
        (mh-min-colors-defined-flag): New variable.
index bf673b4fa527e0a1b164622831eed4e8410e2426..1bac400f93b37879b367127a07748b491d819b6f 100644 (file)
@@ -2248,30 +2248,6 @@ will be removed from the unseen sequence."
 
 ;;; Faces (:group 'mh-*-faces + group where faces described)
 
-(defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag)
-                                        (>= emacs-major-version 22))
-  "Non-nil means defface supports min-colors display requirement.")
-
-(defun mh-defface-compat (spec)
-  "Converts SPEC for defface if necessary to run on older platforms.
-See `defface' for the spec definition.
-
-When `mh-min-colors-defined-flag' is nil, this function finds a display with a
-single \"class\" requirement with a \"color\" item, renames the requirement to
-\"tty\" and moves it to the beginning of the list. It then strips any
-\"min-colors\" requirements."
-  (when (not mh-min-colors-defined-flag)
-    ;; Insert ((class tty)) display with ((class color)) attributes.
-    (let ((attributes (cdr (assoc '((class color)) spec))))
-      (cons (cons '((class tty)) attributes) spec))
-    ;; Delete ((class color)) display.
-    (delq (assoc '((class color)) spec) spec)
-    ;; Strip min-colors.
-    (loop for entry in spec do
-          (when (not (eq (car entry) t))
-            (if (assoc 'min-colors (car entry))
-                (delq (assoc 'min-colors (car entry)) (car entry)))))))
-  
 ;;; Faces Used in Scan Listing (:group 'mh-folder-faces)
 
 (defvar mh-folder-body-face 'mh-folder-body
index dcc9af84e415fad972d55147be3a2d515062d599..5575086fe784363b5080b4b11a11e29c77496ab6 100644 (file)
 
 ;;; Commentary:
 
-;; Sets up the MH variant (currently nmh or MH).
+;; Sets up the MH variant (currently nmh, MH, or GNU mailutils).
 ;;
 ;; Users may customize `mh-variant' to switch between available variants.
 ;; Available MH variants are described in the variable `mh-variants'.
 ;; Developers may check which variant is currently in use with the
 ;; variable `mh-variant-in-use' or the function `mh-variant-p'.
+;;
+;; Also contains code that is used at load or initialization time only.
 
 ;;; Change Log:
 
@@ -300,6 +302,8 @@ by the variable `mh-variants'."
                     (add-to-list 'mh-variants variant)))))
       mh-variants)))
 
+\f
+
 (defvar mh-image-load-path-called-flag nil)
 
 ;;;###mh-autoload
@@ -325,6 +329,32 @@ directory is added to the `load-path' if it isn't already there."
         (add-to-list 'load-path mh-image-load-path)))
     (setq mh-image-load-path-called-flag t)))
 
+\f
+
+(defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag)
+                                        (>= emacs-major-version 22))
+  "Non-nil means defface supports min-colors display requirement.")
+
+(defun mh-defface-compat (spec)
+  "Converts SPEC for defface if necessary to run on older platforms.
+See `defface' for the spec definition.
+
+When `mh-min-colors-defined-flag' is nil, this function finds a display with a
+single \"class\" requirement with a \"color\" item, renames the requirement to
+\"tty\" and moves it to the beginning of the list. It then strips any
+\"min-colors\" requirements."
+  (when (not mh-min-colors-defined-flag)
+    ;; Insert ((class tty)) display with ((class color)) attributes.
+    (let ((attributes (cdr (assoc '((class color)) spec))))
+      (cons (cons '((class tty)) attributes) spec))
+    ;; Delete ((class color)) display.
+    (delq (assoc '((class color)) spec) spec)
+    ;; Strip min-colors.
+    (loop for entry in spec do
+          (when (not (eq (car entry) t))
+            (if (assoc 'min-colors (car entry))
+                (delq (assoc 'min-colors (car entry)) (car entry)))))))
+  
 (provide 'mh-init)
 
 ;;; Local Variables: