GNU bug report logs -
#17250
24.3; find-variable gives search-failed error message
Previous Next
Reported by: Johan Claesson <johanclaesson <at> bredband.net>
Date: Sat, 12 Apr 2014 12:39:02 UTC
Severity: minor
Tags: confirmed, fixed, patch
Found in version 24.3
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> But there are several places that use this function without checking the
> return value. Are they relying on this function to bug out with a
> cryptic error, or are they all confident that the file name can be
> found?
>
> So I haven't applied it yet. Perhaps somebody else will weigh in...
I think it's okay. Here's my analysis of the call-sites found by M-x
rgrep:
./help-fns.el:163:;; (defun help-C-file-name (subr-or-var kind)
./help-fns.el:170:(defun help-C-file-name (subr-or-var kind)
./help-fns.el:319: (help-C-file-name type 'subr)
./help-fns.el:325: (help-C-file-name object 'var)
These 2 are in the return value position of
`find-lisp-object-file-name', whose docstring says "If no suitable file
is found, return nil".
./emacs-lisp/find-func.el:436: (help-C-file-name def 'subr))
This one is only called if `def' satisfies `subrp', so I think failing
to find it can't happen anyway.
./emacs-lisp/find-func.el:555: (help-C-file-name variable 'var))))
This one is in find-variable-noselect. Before your change, it would
throw (search-failed "\037Vfoo\n"), with your change it throws (error
"Don’t know where ‘foo’ is defined") which seems better.
./progmodes/elisp-mode.el:693: (push (elisp--xref-make-xref nil symbol (help-C-file-name (symbol-function symbol) 'subr)) xrefs))
./progmodes/elisp-mode.el:770: ;; yet; help-C-file-name does that. Second call will
./progmodes/elisp-mode.el:772: (push (elisp--xref-make-xref 'defvar symbol (help-C-file-name symbol 'var)) xrefs))
./ldefs-boot.el:15592:(autoload 'help-C-file-name "help-fns" "\
./help-mode.el:203: (help-C-file-name (indirect-function fun) 'fun)))
./help-mode.el:243: (setq file (help-C-file-name var 'var)))
As far as I can tell, all of these calls only happen if the symbol has
already been found by `find-lisp-object-file-name', so they won't
trigger the failure case.
This bug report was last modified 5 years and 335 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.