]> git.eshelyaron.com Git - emacs.git/commit
xref-find-definitions: Exclude more generic function items.
authorStephen Leake <stephen_leake@stephe-leake.org>
Thu, 13 Aug 2015 17:54:39 +0000 (12:54 -0500)
committerStephen Leake <stephen_leake@stephe-leake.org>
Thu, 13 Aug 2015 18:16:47 +0000 (13:16 -0500)
commit0382fd42c6979bbedc9230b789503258a5e963eb
tree989b157edeb659f5e0b2b3e8b884ec143dcbe3fd
parent9c13a81a9e1aa74901cd958d7adb3ca71966dbef
xref-find-definitions: Exclude more generic function items.

* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Add doc string.
(cl--generic-find-defgeneric-regexp): New.
(find-function-regexp-alist): Add it.

* lisp/emacs-lisp/find-func.el (find-feature-regexp): Move here from
elisp-mode.el, change to search for ";;; Code:"
(find-alias-regexp): Move here from elisp-mode.el, cleaned up.
(find-function-regexp-alist): Add them.

* lisp/progmodes/elisp-mode.el:
(elisp--xref-format, elisp--xref-format-extra): Change back to defvar due
to bug#21237.
(elisp--xref-find-definitions): Exclude co-located default methods for
generic functions. Also exclude implicitly declared defgeneric.
(elisp--xref-find-definitions): Handle C source properly. Exclude minor
mode variables defined by 'define-minor-mode'.

* test/automated/elisp-mode-tests.el: Declare generic functions, add
tests for them.
(xref-elisp-test-run): Fix bug.
(emacs-test-dir): Improve initial value.
(find-defs-defun-defvar-el): Don't expect defvar.
(find-defs-feature-el): Match change to find-feature-regexp.
lisp/emacs-lisp/cl-generic.el
lisp/emacs-lisp/find-func.el
lisp/progmodes/elisp-mode.el
test/automated/elisp-mode-tests.el