summaryrefslogtreecommitdiff
path: root/lisp/loadhist.el
diff options
context:
space:
mode:
authorOleh Krehel <ohwoeowho@gmail.com>2015-08-12 20:12:14 +0200
committerOleh Krehel <ohwoeowho@gmail.com>2015-08-12 20:15:57 +0200
commit401bc8b28d47db697e4997d35059ce5bc45f5648 (patch)
tree72ae7a655f2db8b216baf17e5201c31d7b45b664 /lisp/loadhist.el
parentad0b6dd05a1a782dc12e921fc077aef46698e063 (diff)
downloademacs-401bc8b28d47db697e4997d35059ce5bc45f5648.tar.gz
loadhist.el (read-feature): Conform to completing-read
* lisp/loadhist.el (read-feature): According to `completing-read' documentation, if collection is a list, then it must be a list of strings. And not a list of symbols like before.
Diffstat (limited to 'lisp/loadhist.el')
-rw-r--r--lisp/loadhist.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 056a4ef4dc2..52fd04736f6 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -101,10 +101,15 @@ A library name is equivalent to the file name that `load-library' would load."
"Read feature name from the minibuffer, prompting with string PROMPT.
If optional second arg LOADED-P is non-nil, the feature must be loaded
from a file."
- (intern (completing-read prompt
- features
- (and loaded-p #'feature-file)
- loaded-p)))
+ (intern (completing-read
+ prompt
+ (mapcar #'symbol-name
+ (if loaded-p
+ (delq nil
+ (mapcar
+ (lambda (x) (and (feature-file x) x))
+ features))
+ features)))))
(defvaralias 'loadhist-hook-functions 'unload-feature-special-hooks)
(defvar unload-feature-special-hooks