Mercurial > hg > xemacs-beta
comparison lisp/lib-complete.el @ 531:0493e9f3c27f
[xemacs-hg @ 2001-05-12 11:16:12 by ben]
event-msw.c: eliminate cygwin warnings.
dired.c, syswindows.h, win32.c: find the Net* functions the hard way to avoid errors on win 9x.
find-paths.el: fix error with null EXCLUDE-REGEXP.
font-lock.el: fix problem reported by hrvoje with buffers starting with a space.
lib-complete.el: add a variable to control where `find-library' looks, analogous to `find-function-source-path'.
etags.c: new version from Francesco.
Makefile.in.in: i'm getting real tired of incomplete commits. is this getting worse or something?
author | ben |
---|---|
date | Sat, 12 May 2001 11:16:25 +0000 |
parents | 7039e6323819 |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
530:c948643d954f | 531:0493e9f3c27f |
---|---|
293 ))) | 293 ))) |
294 (load library)) | 294 (load library)) |
295 | 295 |
296 ;;=== find-library with completion (Author: Bob Weiner) =================== | 296 ;;=== find-library with completion (Author: Bob Weiner) =================== |
297 | 297 |
298 (defcustom find-library-source-path nil | |
299 "The default list of directories where find-library searches. | |
300 | |
301 If this variable is `nil' then find-library searches `load-path' by | |
302 default. | |
303 | |
304 A good way to set this variable is like this: | |
305 | |
306 \(setq find-library-source-path | |
307 (paths-find-recursive-load-path | |
308 (list lisp-directory \"/src/xemacs/xemacs-packages-src/\"))) | |
309 " | |
310 :type '(repeat directory) | |
311 :group 'find-function) | |
312 | |
298 (defun find-library (library &optional codesys display-function) | 313 (defun find-library (library &optional codesys display-function) |
299 "Find and display in the current window the source for the Elisp LIBRARY. | 314 "Find and display in the current window the source for the Elisp LIBRARY. |
300 LIBRARY should be a name without any path information and may include or omit | 315 LIBRARY should be a name without any path information and may include or omit |
301 the \".el\" suffix. Under XEmacs/Mule, the optional second argument CODESYS | 316 the \".el\" suffix. Under XEmacs/Mule, the optional second argument CODESYS |
302 specifies the coding system to use when decoding the file. Interactively, | 317 specifies the coding system to use when decoding the file. Interactively, |
303 with a prefix argument, this prompts for the coding system. Optional third | 318 with a prefix argument, this prompts for the coding system. Optional third |
304 argument DISPLAY-FUNCTION must take two arguments, the filename to display | 319 argument DISPLAY-FUNCTION must take two arguments, the filename to display |
305 and CODESYS. The default for DISPLAY-FUNCTION is `find-file'." | 320 and CODESYS. The default for DISPLAY-FUNCTION is `find-file'. |
321 | |
322 This function searches `find-library-source-path' to find the library; | |
323 if this is nil (the default), then `load-path' is searched." | |
306 (interactive | 324 (interactive |
307 (list (read-library-name "Find library: ") | 325 (list (read-library-name "Find library: ") |
308 (if current-prefix-arg | 326 (if current-prefix-arg |
309 (read-coding-system "Coding System: ")))) | 327 (read-coding-system "Coding System: ")))) |
310 (let ((path (if (or (null library) (equal library "")) | 328 (let ((path (if (or (null library) (equal library "")) |
311 nil | 329 nil |
312 (locate-file library load-path | 330 (locate-file library (or find-library-source-path load-path) |
313 ;; decompression doesn't work with Mule -slb | 331 ;; decompression doesn't work with Mule -slb |
314 (if (featurep 'mule) | 332 (if (featurep 'mule) |
315 ":.el:.elc" | 333 ":.el:.elc" |
316 ":.el:.el.gz:.el.Z:.elc"))))) | 334 ":.el:.el.gz:.el.Z:.elc"))))) |
317 (if path (funcall (if (fboundp display-function) | 335 (if path (funcall (if (fboundp display-function) |