]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix default candidate of find-face-definition
authorBasil L. Contovounesios <contovob@tcd.ie>
Sun, 3 Jun 2018 18:34:37 +0000 (19:34 +0100)
committerEli Zaretskii <eliz@gnu.org>
Sat, 9 Jun 2018 06:52:54 +0000 (09:52 +0300)
* lisp/emacs-lisp/find-func.el (find-function-read): Use
face-at-point instead of variable-at-point for faces. (bug#31699)

lisp/emacs-lisp/find-func.el

index 300bfab32337ba59cafbfcbd03dbbf0c4ee84891..c5424693eca2a5f288f98272611f5d3da20480b0 100644 (file)
@@ -466,6 +466,7 @@ If TYPE is nil, defaults using `function-called-at-point',
 otherwise uses `variable-at-point'."
   (let* ((symb1 (cond ((null type) (function-called-at-point))
                       ((eq type 'defvar) (variable-at-point))
+                      ((eq type 'defface) (face-at-point t))
                       (t (variable-at-point t))))
          (symb  (unless (eq symb1 0) symb1))
          (predicate (cdr (assq type '((nil . fboundp)