Ensure that we can find definitions when buffer is narrowed
commitabd18254aec76b26e86ae27e91d2c916ec20cc46
authorWilfred Hughes <me@wilfred.me.uk>
Sun, 10 Dec 2017 13:34:06 +0000 (10 13:34 +0000)
committerWilfred Hughes <me@wilfred.me.uk>
Sun, 10 Dec 2017 14:52:54 +0000 (10 14:52 +0000)
tree9d346b42760ea3d0bec8224481d09f16a9df79ad
parentab203e36d5f84a99b6d4b04f1a22ba028be750e3
Ensure that we can find definitions when buffer is narrowed

find-function-search-for-symbol will reuse the existing buffer if
we've already opened the file that contains this symbol. However, if
the user has narrowed that buffer, we can't find definitions outside
the narrowed area.

Instead, search the whole file to find definitions, and teach the help
buttons to widen if necessary.

* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
  Search the whole buffer for the target symbol.

* lisp/help-mode.el: Help buttons now widen the target buffer, if
  narrowing is in effect and the target position is not in that range.
lisp/emacs-lisp/find-func.el
lisp/help-mode.el