Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
be5fc59b
Commit
be5fc59b
authored
Oct 12, 2001
by
Stefan Monnier
Browse files
(locate-library): Use load-suffixes and abbrev filename.
parent
7e573c4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
35 deletions
+18
-35
lisp/help-funs.el
lisp/help-funs.el
+14
-35
src/ChangeLog
src/ChangeLog
+4
-0
No files found.
lisp/help-funs.el
View file @
be5fc59b
...
...
@@ -82,7 +82,7 @@ With arg, you are asked to choose which language."
"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
'
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
...
...
@@ -94,40 +94,19 @@ and the file name is displayed in the echo area."
(
interactive
(
list
(
read-string
"Locate library: "
)
nil
nil
t
))
(
let
(
result
)
(
catch
'answer
(
mapc
(
lambda
(
dir
)
(
mapc
(
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
'
(
""
)
'
(
".elc"
".el"
""
)
(
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
))
(
catch
'answer
(
dolist
(
dir
(
or
path
load-path
))
(
dolist
(
suf
(
append
(
unless
nosuffix
load-suffixes
)
'
(
""
)))
(
let
((
try
(
expand-file-name
(
concat
library
suf
)
dir
)))
(
and
(
file-readable-p
try
)
(
null
(
file-directory-p
try
))
(
progn
(
if
interactive-call
(
message
"Library is file %s"
(
abbreviate-file-name
try
)))
(
throw
'answer
try
))))))
(
if
interactive-call
(
message
"No library %s in search path"
library
))
nil
))
;; Functions
...
...
src/ChangeLog
View file @
be5fc59b
2001-10-12 Stefan Monnier <monnier@cs.yale.edu>
* minibuf.c (keys_of_minibuf): Eliminate redundant bindings.
2001-10-12 Gerd Moellmann <gerd@gnu.org>
* xterm.c (notice_overwritten_cursor): Renamed from
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment