severity 36588 minor tags 36588 + patch quit Stefan Kangas writes: > I get an error trying to revert the apropos help buffer on Emacs 27 > (current master). I could also reproduce this on 26.1. > > Steps to reproduce: > 0. emacs -Q > 1. M-x apropos RET foo RET > 2. C-x o > 3. g yes RET > 4. Error: > apply: Symbol’s function definition is void: nil > > Backtrace: > Debugger entered--Lisp error: (void-function nil) > nil() > apply(nil nil) > help-mode-revert-buffer(t nil) > revert-buffer(t) > funcall-interactively(revert-buffer t) > #(revert-buffer nil nil) > apply(# revert-buffer (nil nil)) > call-interactively@ido-cr+-record-current-command(# call-interactively> revert-buffer nil nil) > apply(call-interactively@ido-cr+-record-current-command # call-interactively> (revert-buffer nil nil)) > call-interactively(revert-buffer nil nil) > command-execute(revert-buffer) This is because Apropos buffers are set up in apropos-print using with-output-to-temp-buffer, which by default calls help-mode, which sets revert-buffer-function permanently-locally to help-mode-revert-buffer. [Aside: Why is revert-buffer-function permanent-local?] help-mode-revert-buffer expects the command which generated the Help buffer to have previously called help-setup-xref. This should be possible to do in Apropos, but it would be quite ugly as help-setup-xref needs to be called with the Help buffer current, so Apropos commands would need to set their own version of help-xref-stack-item before apropos-print performs the help-setup-xref dance. Besides, Apropos buffers are not (currently) really Help buffers. Instead, I propose emulating a simpler version of help-setup-xref specific to Apropos: