/[emacs]/emacs/lisp/help-fns.el
ViewVC logotype

Diff of /emacs/lisp/help-fns.el

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

revision 1.76 by rms, Sun Oct 23 19:12:10 2005 UTC revision 1.77 by rfrancoise, Fri Oct 28 16:55:47 2005 UTC
# Line 100  With ARG, you are asked to choose which Line 100  With ARG, you are asked to choose which
100        (setq buffer-undo-list nil)        (setq buffer-undo-list nil)
101        (set-buffer-modified-p nil))))        (set-buffer-modified-p nil))))
102    
 ;;;###autoload  
 (defun locate-library (library &optional nosuffix path interactive-call)  
   "Show the precise file name of Emacs library LIBRARY.  
 This command searches the directories in `load-path' like `\\[load-library]'  
 to find the file that `\\[load-library] RET LIBRARY RET' would load.  
 Optional second arg NOSUFFIX non-nil means don't add suffixes `load-suffixes'  
 to the specified name LIBRARY.  
   
 If the optional third arg PATH is specified, that list of directories  
 is used instead of `load-path'.  
   
 When called from a program, the file name is normaly returned as a  
 string.  When run interactively, the argument INTERACTIVE-CALL is t,  
 and the file name is displayed in the echo area."  
   (interactive (list (completing-read "Locate library: "  
                                       'locate-file-completion  
                                       (cons load-path load-suffixes))  
                      nil nil  
                      t))  
   (let ((file (locate-file library  
                            (or path load-path)  
                            (append (unless nosuffix load-suffixes) '("")))))  
     (if interactive-call  
         (if file  
             (message "Library is file %s" (abbreviate-file-name file))  
           (message "No library %s in search path" library)))  
     file))  
   
103    
104  ;; Functions  ;; Functions
105    

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

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