diff options
author | Yuuki Harano <masm+github@masm11.me> | 2021-07-04 22:37:03 +0900 |
---|---|---|
committer | Yuuki Harano <masm+github@masm11.me> | 2021-07-04 22:37:03 +0900 |
commit | 492a0ae5927eda83b65dd08d3e1655a62fc2c43d (patch) | |
tree | 8bb6a39483236c3a4574c93b37b0a81b8f639bb0 /lisp/emacs-lisp/find-func.el | |
parent | 01b0a909b5ca858a09484821cc866127652f4153 (diff) | |
parent | 2f2afa0b310bbce43a8703f5467b2638082abdd9 (diff) | |
download | emacs-492a0ae5927eda83b65dd08d3e1655a62fc2c43d.tar.gz emacs-492a0ae5927eda83b65dd08d3e1655a62fc2c43d.tar.bz2 emacs-492a0ae5927eda83b65dd08d3e1655a62fc2c43d.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 58876a45e19..7bc3e6b25ff 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -123,10 +123,18 @@ should insert the feature name." :group 'xref :version "25.1") +(defun find-function--defface (symbol) + (catch 'found + (while (re-search-forward (format find-face-regexp symbol) nil t) + (unless (ppss-comment-or-string-start + (save-excursion (syntax-ppss (match-beginning 0)))) + ;; We're not in a comment or a string. + (throw 'found t))))) + (defvar find-function-regexp-alist '((nil . find-function-regexp) (defvar . find-variable-regexp) - (defface . find-face-regexp) + (defface . find-function--defface) (feature . find-feature-regexp) (defalias . find-alias-regexp)) "Alist mapping definition types into regexp variables. |