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
d4708676
Commit
d4708676
authored
Sep 12, 1996
by
Richard M. Stallman
Browse files
(read-feature): New function.
(unload-feature): Read FEATURE interactively with read-feature.
parent
a1faca26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lisp/loadhist.el
lisp/loadhist.el
+11
-1
No files found.
lisp/loadhist.el
View file @
d4708676
...
...
@@ -101,12 +101,22 @@ This can include FILE itself."
dependents
))
(
defun
read-feature
(
prompt
)
"Read a feature name \(string\) from the minibuffer,
prompting with PROMPT and completing from `features', and
return the feature \(symbol\)."
(
intern
(
completing-read
prompt
(
mapcar
(
function
(
lambda
(
feature
)
(
list
(
symbol-name
feature
))))
features
)
nil
t
)))
;;;###autoload
(
defun
unload-feature
(
feature
&optional
force
)
"Unload the library that provided FEATURE, restoring all its autoloads.
If the feature is required by any other loaded code, and optional FORCE
is nil, raise an error."
(
interactive
"
S
Feature: "
)
(
interactive
(
list
(
read-feature
"Feature: "
)
))
(
if
(
not
(
featurep
feature
))
(
error
"%s is not a currently loaded feature"
(
symbol-name
feature
)))
(
if
(
not
force
)
...
...
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