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:
@@ -302,6 +302,7 @@ 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)
|
||||
(without-restriction
|
||||
(goto-char (point-min))
|
||||
(unless (re-search-forward
|
||||
(if type
|
||||
@@ -313,7 +314,7 @@ TYPE should be nil to find a function, or `defvar' to find a variable."
|
||||
"\""))
|
||||
nil t)
|
||||
(error "Can't find source for %s" fun-or-var))
|
||||
(cons (current-buffer) (match-beginning 0))))
|
||||
(cons (current-buffer) (match-beginning 0)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun find-library (library)
|
||||
|
||||
Reference in New Issue
Block a user