/[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.14 by wohler, Fri Dec 2 04:55:39 2005 UTC revision 1.15 by wohler, Sat Dec 10 01:41:43 2005 UTC
# Line 73  This directory contains, among other thi Line 73  This directory contains, among other thi
73  ;;;###autoload  ;;;###autoload
74  (put 'mh-lib-progs 'risky-local-variable t)  (put 'mh-lib-progs 'risky-local-variable t)
75    
76    (defvar mh-variants nil
77      "List describing known MH variants.
78    Created by the function `mh-variants'")
79    
80    ;;;###mh-autoload
81    (defun mh-variants ()
82      "Return a list of installed variants of MH on the system.
83    This function looks for MH in `mh-sys-path', `mh-path' and
84    `exec-path'. The format of the list of variants that is returned is described
85    by the variable `mh-variants'."
86      (if mh-variants
87          mh-variants
88        (let ((list-unique))
89          ;; Make a unique list of directories, keeping the given order.
90          ;; We don't want the same MH variant to be listed multiple times.
91          (loop for dir in (append mh-path mh-sys-path exec-path) do
92                (setq dir (file-chase-links (directory-file-name dir)))
93                (add-to-list 'list-unique dir))
94          (loop for dir in (nreverse list-unique) do
95                (when (and dir (file-directory-p dir) (file-readable-p dir))
96                  (let ((variant (mh-variant-info dir)))
97                    (if variant
98                        (add-to-list 'mh-variants variant)))))
99          mh-variants)))
100    
101  (defvar mh-variant-in-use nil  (defvar mh-variant-in-use nil
102    "The MH variant currently in use; a string with variant and version number.    "The MH variant currently in use; a string with variant and version number.
103  This differs from `mh-variant' when the latter is set to `autodetect'.")  This differs from `mh-variant' when the latter is set to `autodetect'.")
# Line 171  The list `exec-path' is searched in addi Line 196  The list `exec-path' is searched in addi
196  There's no need for users to modify this list.  Instead add extra  There's no need for users to modify this list.  Instead add extra
197  directories to the customizable variable `mh-path'.")  directories to the customizable variable `mh-path'.")
198    
 (defcustom mh-path nil  
   "*List of directories to search for variants of the MH variant.  
 The directories will be searched for `mhparam' in addition to directories  
 listed in `mh-sys-path' and `exec-path'."  
   :group 'mh-e  
   :type '(repeat (directory)))  
   
 (defvar mh-variants nil  
   "List describing known MH variants.  
 Created by the function `mh-variants'")  
   
199  (defun mh-variant-mh-info (dir)  (defun mh-variant-mh-info (dir)
200    "Return info for MH variant in DIR assuming a temporary buffer is setup."    "Return info for MH variant in DIR assuming a temporary buffer is setup."
201    ;; MH does not have the -version option.    ;; MH does not have the -version option.
# Line 281  This assumes that a temporary buffer is Line 295  This assumes that a temporary buffer is
295         ((mh-variant-nmh-info dir))         ((mh-variant-nmh-info dir))
296         ((mh-variant-mu-mh-info dir))))))         ((mh-variant-mu-mh-info dir))))))
297    
 ;;;###mh-autoload  
 (defun mh-variants ()  
   "Return a list of installed variants of MH on the system.  
 This function looks for MH in `mh-sys-path', `mh-path' and  
 `exec-path'. The format of the list of variants that is returned is described  
 by the variable `mh-variants'."  
   (if mh-variants  
       mh-variants  
     (let ((list-unique))  
       ;; Make a unique list of directories, keeping the given order.  
       ;; We don't want the same MH variant to be listed multiple times.  
       (loop for dir in (append mh-path mh-sys-path exec-path) do  
             (setq dir (file-chase-links (directory-file-name dir)))  
             (add-to-list 'list-unique dir))  
       (loop for dir in (nreverse list-unique) do  
             (when (and dir (file-directory-p dir) (file-readable-p dir))  
               (let ((variant (mh-variant-info dir)))  
                 (if variant  
                     (add-to-list 'mh-variants variant)))))  
       mh-variants)))  
   
298    
299    
300  (defvar mh-image-load-path-called-flag nil)  (defvar mh-image-load-path-called-flag nil)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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