comparison lisp/finder.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
148 ;; XEmacs change 148 ;; XEmacs change
149 (find-file "finder-inf.el") 149 (find-file "finder-inf.el")
150 (let ((processed nil) 150 (let ((processed nil)
151 (directory-abbrev-alist 151 (directory-abbrev-alist
152 (append 152 (append
153 (mapcar (function (lambda (dir) 153 (mapcar (function (lambda (dir) (cons dir "")))
154 (cons (concat "^" (regexp-quote dir))
155 "")))
156 finder-abbreviate-directory-list) 154 finder-abbreviate-directory-list)
157 directory-abbrev-alist)) 155 directory-abbrev-alist))
158 (using-load-path)) 156 (using-load-path))
159 (or dirs (setq dirs load-path)) 157 (or dirs (setq dirs load-path))
160 (setq using-load-path (equal dirs load-path)) 158 (setq using-load-path (equal dirs load-path))
167 (insert "\n(defconst finder-package-info '(\n") 165 (insert "\n(defconst finder-package-info '(\n")
168 (mapcar 166 (mapcar
169 (lambda (d) 167 (lambda (d)
170 (mapcar 168 (mapcar
171 (lambda (f) 169 (lambda (f)
172 (when (and (not (member f processed)) (file-readable-p f)) 170 (when (not (member f processed))
173 (let (summary keystart keywords) 171 (let (summary keystart keywords)
174 (setq processed (cons f processed)) 172 (setq processed (cons f processed))
175 (if (not finder-compile-keywords-quiet) 173 (if (not finder-compile-keywords-quiet)
176 (message "Processing %s ..." f)) 174 (message "Processing %s ..." f))
177 (save-excursion 175 (save-excursion
285 (setq found (expand-file-name file (car dirs))))) 283 (setq found (expand-file-name file (car dirs)))))
286 (setq dirs (cdr dirs))) 284 (setq dirs (cdr dirs)))
287 found))) 285 found)))
288 286
289 (defun finder-commentary (file) 287 (defun finder-commentary (file)
290 "Display FILE's commentary section. 288 (interactive)
291 FILE should be in a form suitable for passing to `locate-library'." 289 (let* ((str (lm-commentary (finder-find-library file))))
292 (interactive "sLibrary name: ")
293 (let* ((str (lm-commentary (or (finder-find-library file)
294 (finder-find-library (concat file ".el"))
295 (error "Can't find library %s" file)))))
296 (if (null str) 290 (if (null str)
297 (error "Can't find any Commentary section")) 291 (error "Can't find any Commentary section"))
298 (pop-to-buffer "*Finder*") 292 (pop-to-buffer "*Finder*")
299 ;; XEmacs change 293 ;; XEmacs change
300 (setq buffer-read-only nil 294 (setq buffer-read-only nil