On Mon, Feb 22, 2021 at 7:21 AM Eli Zaretskii wrote: > > From: chad > > Date: Sun, 21 Feb 2021 21:02:43 -0800 > > Cc: Robert Pluim , Lars Ingebrigtsen , > Richard Stallman , > > EMACS development team > > > > I suspect that I ran into an instance of this recently, where the > helpful package (an extension that offers > > expanded help functions, basically) had trouble in it's helpful-callable > function with facemenu-face-menu. I > > tracked the problem down to a bad interaction in helpful with this code > in facemenu.el: > > > > (defvar facemenu-face-menu > > [...]) > > (defalias 'facemenu-face-menu facemenu-face-menu) > > > > The problem that I get is: > > > > Debugger entered--Lisp error: (wrong-type-argument sequencep t) > > mapconcat(identity (t) " ") > > s-join(" " (t)) > > helpful--signature(facemenu-face-menu) > > helpful-update() > > helpful-callable(facemenu-face-menu) > > funcall-interactively(helpful-callable facemenu-face-menu) > > call-interactively(helpful-callable nil nil) > > command-execute(helpful-callable) > > > > I'm not familiar with the (defalias 'foo foo) idiom, so maybe it should > be expected to work, and it's just a bug > > in helpful. (I reported it to the package maintainers already, with a > note that I'd mention it here.) There are a > > few other instances of in emacs that I found with a quick search, and > they also cause similar trouble for > > helpful. > > > > Is this an example of an accidental functional value, as I originally > expected, or am I barking up the wrong > > tree and instead just looking at a parsing bug? (My lisp is largely self > taught and started with Scheme, so > > these parts of elisp are murky to me.) > > I think it's a bug in helpful: facemenu-face-menu is a keymap, so > maybe helpful isn't ready for that. > Good point; I didn't (but should have) say: the issue, I think, is that the use of defalias makes helpful-callable think that facemenu-face-menu is a "viable callable", when it isn't. This doesn't mean that it's not a bug in helpful, of course; I'm just trying to understand if the bug is that helpful should be able to tell that facemenu-face-menu isn't "callable". Here's the start of helpful-callable, fwiw: (defun helpful-callable (symbol) > "Show help for function, macro or special form named SYMBOL. > See also `helpful-macro', `helpful-function' and `helpful-command'." > (interactive > (list (helpful--read-symbol > "Callable: " > (helpful--callable-at-point) > #'fboundp))) helpful--read-symbol seems to be a simple porcelain around completing-read with, in this case, #'fboundp as the predicate. That said, I'm not sure if this is just a bug in helpful being confused by the idiom with defalias, via the function-value usage you mentioned upthread. Thanks, ~Chad