1

When using describe-key, the following block from the help+20 package, in the describe-function-1 function:

(help-xref-button 1 #'(lambda (arg)
                      (let ((location
                         (find-function-noselect arg)))
                    (pop-to-buffer (car location))
                    (goto-char (cdr location))))
                function)

Is causing the following error:

help-xref-button: Wrong type argument: symbolp, (lambda (arg) (let ((location (find-function-noselect arg))) (pop-to-buffer (car location)) (goto-char (cdr location))))

I tried pulling the lambda out into its own function:

;;;###autoload
(defun describe-function-1--hyperlink (arg)
    (let ((location
        (find-function-noselect arg)))
  (pop-to-buffer (car location))
  (goto-char (cdr location))))

Modifying the help-xref-button call accordingly:

(help-xref-button 1 #'describe-function-1--hyperlink function)

But am getting the following error:

make-text-button: Unknown button type ‘describe-function-1--hyperlink’

How can I create a new button type, if that's what I really need to do?

7
  • 2
    IIUC, help+20.el is the version of the help+.el package that is meant for Emacs 20. Are you really running that ancient an Emacs? If not, you should probably delete the help+20.el package and install help+.el. See Emacs Wiki.
    – NickD
    Sep 14 at 7:43
  • Ah; that makes much more sense. I didn't quite understand the difference between the two versions, as I thought that help+20 was version 20 and above. I'll report back on whether it works later this afternoon EST! Sep 14 at 8:32
  • 1
    No, I believe that help+20.el is for Emacs 20 only. help+.el is for Emacs 22 and later. Not sure what one should use for Emacs 21 (but I hope the question is a cademic: at this point, nobody should be using Emacs 21 IMO). See the Emacs Wiki link in my first comment.
    – NickD
    Sep 14 at 8:41
  • 1
    What @NickD said. The header of file help+20.el says: "Extensions to `help.el' for Emacs 20" and "Compatibility: GNU Emacs 20.x".
    – Drew
    Sep 14 at 15:48
  • 1
    That would be fine AFAIAC.
    – NickD
    Sep 16 at 17:13

1 Answer 1

0

As mentioned by NickD and Drew in the comments of the question, the issue was my using help+20, which is used only for emacs 20, instead of help+.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.