GNU bug report logs -
#24221
25.1.50; binding anonymous functions to keys cause help buffer navigation errors
Previous Next
Reported by: Zachary Kanfer <zkanfer <at> gmail.com>
Date: Sun, 14 Aug 2016 01:01:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 25.1.50
Fixed in version 25.2
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I suggest using code such as that below - allow FUNCTION to be
`functionp', not only a symbol that is `fboundp' (and test for
the former first).
Also, the function that raises an error should be `user-error'
only when called interactively. Otherwise, it should be `error'.
[I would even argue that for interactive use it should be
`message', not `user-error', as that allows `describe-function'
to be used, e.g., in the minibuffer to get help on different
function-name candidates.]
(let* ((interactivep (called-interactively-p 'interactive))
(err-fn (if interactivep #user-error #'error)))
(if (and interactivep (not function))
(funcall err-fn "You did not specify a function symbol")
(if (not (or (functionp function) ; Allow anonymous functions.
(and function ; Allow macros and special forms.
(fboundp (intern-soft function))))))
(funcall err-fn "Not a defined function: `%S'" function)
(help-setup-xref ...)
...)
This bug report was last modified 8 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.