diff lisp/prim/help.el @ 177:6075d714658b r20-3b15

Import from CVS: tag r20-3b15
author cvs
date Mon, 13 Aug 2007 09:51:16 +0200
parents 8eaf7971accc
children 9ad43877534d
line wrap: on
line diff
--- a/lisp/prim/help.el	Mon Aug 13 09:50:16 2007 +0200
+++ b/lisp/prim/help.el	Mon Aug 13 09:51:16 2007 +0200
@@ -1174,51 +1174,52 @@
   nil)
 
 ;; Synched with Emacs 19.35
-(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 `M-x load-library'
-to find the file that `M-x load-library RET LIBRARY RET' would load.
-Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el'
-to the specified name LIBRARY.
+;; Moved to packages.el
+;(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 `M-x load-library'
+;to find the file that `M-x load-library RET LIBRARY RET' would load.
+;Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el'
+;to the specified name LIBRARY.
 
-If the optional third arg PATH is specified, that list of directories
-is used instead of `load-path'."
-  (interactive (list (read-string "Locate library: ")
-                     nil nil
-                     t))
-  (let (result)
-    (catch 'answer
-      (mapcar
-       (lambda (dir)
-         (mapcar
-          (lambda (suf)
-            (let ((try (expand-file-name (concat library suf) dir)))
-              (and (file-readable-p try)
-                   (null (file-directory-p try))
-                   (progn
-                     (setq result try)
-                     (throw 'answer try)))))
-          (if nosuffix
-              '("")
-            (let ((basic '(".elc" ".el" ""))
-                  (compressed '(".Z" ".gz" "")))
-              ;; If autocompression mode is on,
-              ;; consider all combinations of library suffixes
-              ;; and compression suffixes.
-              (if (rassq 'jka-compr-handler file-name-handler-alist)
-                  (apply 'nconc
-                         (mapcar (lambda (compelt)
-                                   (mapcar (lambda (baselt)
-                                             (concat baselt compelt))
-                                           basic))
-                                 compressed))
-                basic)))))
-       (or path load-path)))
-    (and interactive-call
-         (if result
-             (message "Library is file %s" result)
-           (message "No library %s in search path" library)))
-    result))
+;If the optional third arg PATH is specified, that list of directories
+;is used instead of `load-path'."
+;  (interactive (list (read-string "Locate library: ")
+;                     nil nil
+;                     t))
+;  (let (result)
+;    (catch 'answer
+;      (mapcar
+;       (lambda (dir)
+;         (mapcar
+;          (lambda (suf)
+;            (let ((try (expand-file-name (concat library suf) dir)))
+;              (and (file-readable-p try)
+;                   (null (file-directory-p try))
+;                   (progn
+;                     (setq result try)
+;                     (throw 'answer try)))))
+;          (if nosuffix
+;              '("")
+;            (let ((basic '(".elc" ".el" ""))
+;                  (compressed '(".Z" ".gz" "")))
+;              ;; If autocompression mode is on,
+;              ;; consider all combinations of library suffixes
+;              ;; and compression suffixes.
+;              (if (rassq 'jka-compr-handler file-name-handler-alist)
+;                  (apply 'nconc
+;                         (mapcar (lambda (compelt)
+;                                   (mapcar (lambda (baselt)
+;                                             (concat baselt compelt))
+;                                           basic))
+;                                 compressed))
+;                basic)))))
+;       (or path load-path)))
+;    (and interactive-call
+;         (if result
+;             (message "Library is file %s" result)
+;           (message "No library %s in search path" library)))
+;    result))
 
 ;; Functions ported from C into Lisp in XEmacs