From: bg66 Date: Fri, 3 May 2002 12:08:08 +0000 (+0000) Subject: * lisp/initz.el (initz-get-files): Add optional argument `all'. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a8ddc63eccb2720a00da68432270766f67cd0041;p=elisp%2Finitz.git * lisp/initz.el (initz-get-files): Add optional argument `all'. If it is non-nil, return all files. * lisp/initz-vars.el (initz-list-all-modules): New user option. * lisp/initz-list.el (initz-list-node-expand): Use it. --- diff --git a/ChangeLog b/ChangeLog index 2a4b117..e0cfa41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-05-03 OHASHI Akira + + * lisp/initz.el (initz-get-files): Add optional argument `all'. + If it is non-nil, return all files. + * lisp/initz-vars.el (initz-list-all-modules): New user option. + * lisp/initz-list.el (initz-list-node-expand): Use it. + 2002-05-01 OHASHI Akira * lisp/initz-vars.el (initz-delete-compile-log-buffer): New user diff --git a/lisp/initz-list.el b/lisp/initz-list.el index da2652e..af56b0a 100644 --- a/lisp/initz-list.el +++ b/lisp/initz-list.el @@ -261,7 +261,7 @@ start-open t rear-nonsticky t help-echo ,file)) (put-text-property start (point) :file file))) - (initz-get-files 'startup node)) + (initz-get-files 'startup node initz-list-all-modules)) (sort-lines nil sort-start (point))) (set-buffer-modified-p nil) (setq buffer-read-only t))) diff --git a/lisp/initz-vars.el b/lisp/initz-vars.el index 4497e5c..d1341f9 100644 --- a/lisp/initz-vars.el +++ b/lisp/initz-vars.el @@ -92,6 +92,11 @@ :type 'boolean :group 'initz) +(defcustom initz-list-all-modules nil + "*If non-nil, initz lists all modules in `initz-list'." + :type 'boolean + :group 'initz) + ;; Faces. (defface initz-list-node-face '((((class color) (background light)) (:foreground "blue")) diff --git a/lisp/initz.el b/lisp/initz.el index 2145c6b..156d461 100644 --- a/lisp/initz.el +++ b/lisp/initz.el @@ -165,7 +165,7 @@ If ARG is specified, don't display code name." (concat file "c")) directory))) -(defun initz-get-files (kind dir) +(defun initz-get-files (kind dir &optional all) "Return files of the directory made by KIND and DIR." (let ((directory (expand-file-name (initz-get-init-value dir 'dir) @@ -174,12 +174,18 @@ If ARG is specified, don't display code name." (concat initz-prefix (initz-get-init-value dir 'prefix)))) (ext (if (eq kind 'startup) "\\.el$" "\\.elc$"))) - (unless (and (not (eq dir 'misc)) - (string= prefix initz-prefix)) - (directory-files - directory t (concat "^\\(" prefix "\\|" - prefix initz-separator-string - initz-module-regexp "\\)" ext))))) + ;; List all files. + (if all + (directory-files + directory t (concat "^\\(" initz-prefix "\\|" + initz-prefix initz-separator-string + initz-module-regexp "\\)" ext)) + (unless (and (not (eq dir 'misc)) + (string= prefix initz-prefix)) + (directory-files + directory t (concat "^\\(" prefix "\\|" + prefix initz-separator-string + initz-module-regexp "\\)" ext)))))) (defun initz-make-directory (sym) "Make SYM's directory."