/[emacs]/emacs/lisp/mh-e/mh-init.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-init.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by wohler, Mon Oct 17 05:52:53 2005 UTC revision 1.13 by wohler, Sat Nov 5 04:02:06 2005 UTC
# Line 26  Line 26 
26    
27  ;;; Commentary:  ;;; Commentary:
28    
29  ;; Sets up the MH variant (currently nmh or MH).  ;; Sets up the MH variant (currently nmh, MH, or GNU mailutils).
30  ;;  ;;
31  ;; Users may customize `mh-variant' to switch between available variants.  ;; Users may customize `mh-variant' to switch between available variants.
32  ;; Available MH variants are described in the variable `mh-variants'.  ;; Available MH variants are described in the variable `mh-variants'.
33  ;; Developers may check which variant is currently in use with the  ;; Developers may check which variant is currently in use with the
34  ;; variable `mh-variant-in-use' or the function `mh-variant-p'.  ;; variable `mh-variant-in-use' or the function `mh-variant-p'.
35    ;;
36    ;; Also contains code that is used at load or initialization time only.
37    
38  ;;; Change Log:  ;;; Change Log:
39    
# Line 300  by the variable `mh-variants'." Line 302  by the variable `mh-variants'."
302                      (add-to-list 'mh-variants variant)))))                      (add-to-list 'mh-variants variant)))))
303        mh-variants)))        mh-variants)))
304    
305    
306    
307  (defvar mh-image-load-path-called-flag nil)  (defvar mh-image-load-path-called-flag nil)
308    
309  ;;;###mh-autoload  ;;;###mh-autoload
# Line 325  directory is added to the `load-path' if Line 329  directory is added to the `load-path' if
329          (add-to-list 'load-path mh-image-load-path)))          (add-to-list 'load-path mh-image-load-path)))
330      (setq mh-image-load-path-called-flag t)))      (setq mh-image-load-path-called-flag t)))
331    
332    
333    
334    (defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag)
335                                            (>= emacs-major-version 22))
336      "Non-nil means defface supports min-colors display requirement.")
337    
338    (defun mh-defface-compat (spec)
339      "Converts SPEC for defface if necessary to run on older platforms.
340    See `defface' for the spec definition.
341    
342    When `mh-min-colors-defined-flag' is nil, this function finds a display with a
343    single \"class\" requirement with a \"color\" item, renames the requirement to
344    \"tty\" and moves it to the beginning of the list. It then strips any
345    \"min-colors\" requirements."
346      (when (not mh-min-colors-defined-flag)
347        ;; Insert ((class tty)) display with ((class color)) attributes.
348        (let ((attributes (cdr (assoc '((class color)) spec))))
349          (cons (cons '((class tty)) attributes) spec))
350        ;; Delete ((class color)) display.
351        (delq (assoc '((class color)) spec) spec)
352        ;; Strip min-colors.
353        (loop for entry in spec do
354              (when (not (eq (car entry) t))
355                (if (assoc 'min-colors (car entry))
356                    (delq (assoc 'min-colors (car entry)) (car entry)))))))
357      
358  (provide 'mh-init)  (provide 'mh-init)
359    
360  ;;; Local Variables:  ;;; Local Variables:

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26