Mercurial > emacs
comparison lisp/subr.el @ 69168:6e701396a0ec
(locate-library): Use `get-load-suffixes' instead of `load-suffixes'
and `load-file-rep-suffixes' instead of '("").
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Mon, 27 Feb 2006 02:01:08 +0000 |
parents | f038d760daf1 |
children | 196122ba0b05 8976b9f5eda1 5754737d1e04 |
comparison
equal
deleted
inserted
replaced
69167:35ff03ec3238 | 69168:6e701396a0ec |
---|---|
1322 When called from a program, the file name is normaly returned as a | 1322 When called from a program, the file name is normaly returned as a |
1323 string. When run interactively, the argument INTERACTIVE-CALL is t, | 1323 string. When run interactively, the argument INTERACTIVE-CALL is t, |
1324 and the file name is displayed in the echo area." | 1324 and the file name is displayed in the echo area." |
1325 (interactive (list (completing-read "Locate library: " | 1325 (interactive (list (completing-read "Locate library: " |
1326 'locate-file-completion | 1326 'locate-file-completion |
1327 (cons load-path load-suffixes)) | 1327 (cons load-path (get-load-suffixes))) |
1328 nil nil | 1328 nil nil |
1329 t)) | 1329 t)) |
1330 (let ((file (locate-file library | 1330 (let ((file (locate-file library |
1331 (or path load-path) | 1331 (or path load-path) |
1332 (append (unless nosuffix load-suffixes) '(""))))) | 1332 (append (unless nosuffix (get-load-suffixes)) |
1333 load-file-rep-suffixes)))) | |
1333 (if interactive-call | 1334 (if interactive-call |
1334 (if file | 1335 (if file |
1335 (message "Library is file %s" (abbreviate-file-name file)) | 1336 (message "Library is file %s" (abbreviate-file-name file)) |
1336 (message "No library %s in search path" library))) | 1337 (message "No library %s in search path" library))) |
1337 file)) | 1338 file)) |