mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Fix "Narrowing src/ file breaks xref"
* lisp/emacs-lisp/find-func.el (find-function-C-source): Look outside of the current narrowing as well (bug#80749).
This commit is contained in:
parent
1df537e8eb
commit
9d6d4cabbf
1 changed files with 13 additions and 12 deletions
|
|
@ -302,18 +302,19 @@ TYPE should be nil to find a function, or `defvar' to find a variable."
|
|||
(indirect-function
|
||||
(find-function-advised-original fun-or-var)))))
|
||||
(with-current-buffer (find-file-noselect file)
|
||||
(goto-char (point-min))
|
||||
(unless (re-search-forward
|
||||
(if type
|
||||
(concat "DEFVAR[A-Z_]*[ \t\n]*([ \t\n]*\""
|
||||
(regexp-quote (symbol-name fun-or-var))
|
||||
"\"")
|
||||
(concat "DEFUN[ \t\n]*([ \t\n]*\""
|
||||
(regexp-quote (subr-name (advice--cd*r fun-or-var)))
|
||||
"\""))
|
||||
nil t)
|
||||
(error "Can't find source for %s" fun-or-var))
|
||||
(cons (current-buffer) (match-beginning 0))))
|
||||
(without-restriction
|
||||
(goto-char (point-min))
|
||||
(unless (re-search-forward
|
||||
(if type
|
||||
(concat "DEFVAR[A-Z_]*[ \t\n]*([ \t\n]*\""
|
||||
(regexp-quote (symbol-name fun-or-var))
|
||||
"\"")
|
||||
(concat "DEFUN[ \t\n]*([ \t\n]*\""
|
||||
(regexp-quote (subr-name (advice--cd*r fun-or-var)))
|
||||
"\""))
|
||||
nil t)
|
||||
(error "Can't find source for %s" fun-or-var))
|
||||
(cons (current-buffer) (match-beginning 0)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun find-library (library)
|
||||
|
|
|
|||
Loading…
Reference in a new issue