comparison lisp/prim/packages.el @ 183:e121b013d1f0 r20-3b18

Import from CVS: tag r20-3b18
author cvs
date Mon, 13 Aug 2007 09:54:23 +0200
parents 9ad43877534d
children 3d6bfa290dbd
comparison
equal deleted inserted replaced
182:f07455f06202 183:e121b013d1f0
110 (let ((basic '(".elc" ".el" "")) 110 (let ((basic '(".elc" ".el" ""))
111 (compressed '(".Z" ".gz" ""))) 111 (compressed '(".Z" ".gz" "")))
112 ;; If autocompression mode is on, 112 ;; If autocompression mode is on,
113 ;; consider all combinations of library suffixes 113 ;; consider all combinations of library suffixes
114 ;; and compression suffixes. 114 ;; and compression suffixes.
115 (if (rassq 'jka-compr-handler file-name-handler-alist) 115 (if (or (rassq 'jka-compr-handler file-name-handler-alist)
116 (member 'crypt-find-file-hook find-file-hooks))
116 (apply 'nconc 117 (apply 'nconc
117 (mapcar (lambda (compelt) 118 (mapcar (lambda (compelt)
118 (mapcar (lambda (baselt) 119 (mapcar (lambda (baselt)
119 (concat baselt compelt)) 120 (concat baselt compelt))
120 basic)) 121 basic))
129 130
130 (defun packages-add-suffix (str) 131 (defun packages-add-suffix (str)
131 (if (null (string-match "\\.el\\'" str)) 132 (if (null (string-match "\\.el\\'" str))
132 (concat str ".elc") 133 (concat str ".elc")
133 str)) 134 str))
135
136 (defun list-autoloads-path ()
137 "List autoloads from precomputed load-path."
138 (let ((path load-path)
139 autoloads)
140 (while path
141 (if (file-exists-p (concat (car path)
142 "/" autoload-file-name))
143 (setq autoloads (cons (concat (car path)
144 "/" autoload-file-name)
145 autoloads)))
146 (setq path (cdr path)))
147 autoloads))
134 148
135 (defun list-autoloads () 149 (defun list-autoloads ()
136 "List autoload files in (what will be) the normal lisp search path. 150 "List autoload files in (what will be) the normal lisp search path.
137 This function is used during build to find where the global symbol files so 151 This function is used during build to find where the global symbol files so
138 they can be perused for their useful information." 152 they can be perused for their useful information."
167 (setq data-directory-list 181 (setq data-directory-list
168 (cons (concat package "/etc/") data-directory-list))) 182 (cons (concat package "/etc/") data-directory-list)))
169 ;; Lisp files 183 ;; Lisp files
170 (if (file-directory-p (concat package "/lisp")) 184 (if (file-directory-p (concat package "/lisp"))
171 (progn 185 (progn
172 (setq load-path (cons (concat package "/lisp/") load-path)) 186 (setq load-path (cons (concat package "/lisp") load-path))
173 (let ((dirs (directory-files (concat package "/lisp/") 187 (let ((dirs (directory-files (concat package "/lisp/")
174 t "^[^-.]" nil 'dirs-only)) 188 t "^[^-.]" nil 'dirs-only))
175 dir) 189 dir)
176 (while dirs 190 (while dirs
177 (setq dir (car dirs)) 191 (setq dir (car dirs))