Emacs raises "funcall: Symbol's value as variable is void: choices" on bookmark-set.
After disabling bookmark+, bookmark-set started to work correctly.
Does anyone have an idea how to solve this?
Emacs raises "funcall: Symbol's value as variable is void: choices" on bookmark-set.
After disabling bookmark+, bookmark-set started to work correctly.
Does anyone have an idea how to solve this?
I cannot find any use of a variable named choices
in the Bookmark+ code.
What is the most recent Last-Updated
date you see in any of the Bookmark+ source-file headers?
I would suggest that you do this, if you haven't done it already:
Check whether you have something in bmkp-after-set-hook
. If so, try removing it to see whether that removes the error.
Download the latest Bookmark+ source files (from Emacs Wiki or from MELPA).
Delete any byte-compiled (i.e., *.elc
) versions of the files that you might have.
Try again, to see if you get the same error. If so, please report it to me by email: M-x bmkp-send-bug-report
.
If not (no such error anymore):
a. Load source file bookmark+-mac.el
, which defines Lisp macros used by the other files.
b. Byte-compile bookmark+-mac.el
.
c. Byte-compile the other files. (An easy way to do this is to mark them in Dired and use B
.)
d. Restart Emacs and see whether you get the error again (you will be using the byte-compiled files this time). If so, M-x bmkp-send-bug-report
.
Sorry for your trouble. Let me know, and I'll get it fixed. If you use M-x bmkp-send-bug-report
then please try to provide a complete recipe to repro the problem, preferably starting from emacs -Q
(no init file). Thx.
Drew has found an answer:
This is an ido-completing-read+.el
bug. You will want to report
it to that library's maintainer. Here is the relevant part of the
source code:
(when (and def (listp def))
(setq choices (append def (nreverse (cl-set-difference choices def)))
def (car def)))
(when (and def initial (stringp initial) (not (string= initial "")))
(setq choices (cons def (remove def choices))
def nil))
The variable CHOICES is not declared with (defvar choices)
, and
the file has local variable lexical-binding
set to t. This means
that CHOICES is considered to be a lexically bound variable. But
is never bound lexically.
Probably the library maintainer just needs to add (defvar choices).
Or else bind choices
. Or else remove the setting of `lexical-binding'
to t.