comparison lisp/utils/lib-complete.el @ 48:56c54cf7c5b6 r19-16b90

Import from CVS: tag r19-16b90
author cvs
date Mon, 13 Aug 2007 08:56:04 +0200
parents 0293115a14e9
children 131b0175ea99
comparison
equal deleted inserted replaced
47:11c6df210d7f 48:56c54cf7c5b6
3 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz> 3 ;; Author : Mike Williams <mike-w@cs.aukuni.ac.nz>
4 ;; Created On : Sat Apr 20 17:47:21 1991 4 ;; Created On : Sat Apr 20 17:47:21 1991
5 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de> 5 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
6 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu> 6 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
7 ;; Last Modified On: Thu Jul 1 14:23:00 1994 7 ;; Last Modified On: Thu Jul 1 14:23:00 1994
8 ;; RCS Info : $Revision: 1.2 $ $Locker: $ 8 ;; RCS Info : $Revision: 1.3 $ $Locker: $
9 ;; ======================================================================== 9 ;; ========================================================================
10 ;; NOTE: this file must be recompiled if changed. 10 ;; NOTE: this file must be recompiled if changed.
11 ;; 11 ;;
12 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991 12 ;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
13 ;; 13 ;;
271 (let* ((read-library-internal-search-path SEARCH-PATH) 271 (let* ((read-library-internal-search-path SEARCH-PATH)
272 (library (completing-read PROMPT 'read-library-internal 272 (library (completing-read PROMPT 'read-library-internal
273 FILTER (or MUST-MATCH FULL) nil))) 273 FILTER (or MUST-MATCH FULL) nil)))
274 (cond 274 (cond
275 ((equal library "") DEFAULT) 275 ((equal library "") DEFAULT)
276 (FULL (locate-file library read-library-internal-search-path ".el:.elc")) 276 (FULL (locate-file library read-library-internal-search-path
277 ;; decompression doesn't work with Mule -slb
278 (if (featurep 'mule)
279 ".el:.elc"
280 ".el:.el.gz:.elc")))
277 (t library)))) 281 (t library))))
278 282
279 ;; NOTE: as a special case, read-library may be used to read a filename 283 ;; NOTE: as a special case, read-library may be used to read a filename
280 ;; relative to the current directory, returning a *relative* pathname 284 ;; relative to the current directory, returning a *relative* pathname
281 ;; (read-file-name returns a full pathname). 285 ;; (read-file-name returns a full pathname).
284 288
285 (defun get-library-path () 289 (defun get-library-path ()
286 "Front end to read-library" 290 "Front end to read-library"
287 (read-library "Find Library file: " load-path nil t t 291 (read-library "Find Library file: " load-path nil t t
288 (function (lambda (fn) 292 (function (lambda (fn)
289 (cond 293 (cond
290 ((string-match "\\.el$" fn) 294 ;; decompression doesn't work with mule -slb
295 ((string-match (if (featurep 'mule)
296 "\\.el$"
297 "\\.el\\(\\.gz\\)?$") fn)
291 (substring fn 0 (match-beginning 0)))))) 298 (substring fn 0 (match-beginning 0))))))
292 )) 299 ))
293 300
294 ;;=== Replacement for load-library with completion ======================== 301 ;;=== Replacement for load-library with completion ========================
295 302