* bug#31699: 26.1.50; find-face-definition defaults to non-face symbol
@ 2018-06-03 18:32 Basil L. Contovounesios
2018-06-03 18:39 ` Basil L. Contovounesios
0 siblings, 1 reply; 3+ messages in thread
From: Basil L. Contovounesios @ 2018-06-03 18:32 UTC (permalink / raw)
To: 31699
The following:
1. emacs -Q
2. M-: (insert "major-mode") RET
3. M-x find-face-definition RET RET
results in the following *Messages* line:
find-function-search-for-symbol:
Don’t know where ‘major-mode’ is defined
This is due to find-function-read using (variable-at-point t) instead of
(face-at-point t) to calculate the default completion candidate, even
when given an argument of 'defface.
Patch to follow.
Thanks,
--
Basil
In GNU Emacs 26.1.50 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-06-03 built on thunk
Repository revision: 16e8541b743a6beb1926fef53cf1bfaed9c346db
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux testing (buster)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#31699: 26.1.50; find-face-definition defaults to non-face symbol
2018-06-03 18:32 bug#31699: 26.1.50; find-face-definition defaults to non-face symbol Basil L. Contovounesios
@ 2018-06-03 18:39 ` Basil L. Contovounesios
2018-06-09 6:57 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Basil L. Contovounesios @ 2018-06-03 18:39 UTC (permalink / raw)
To: 31699
[-- Attachment #1: Type: text/plain, Size: 87 bytes --]
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Patch to follow.
As promised:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-default-candidate-of-find-face-definition.patch --]
[-- Type: text/x-diff, Size: 1027 bytes --]
From e129903ed87acedcadef203711b597a880ac36e0 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sun, 3 Jun 2018 19:34:37 +0100
Subject: [PATCH] Fix default candidate of find-face-definition
* 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index ed8dc74506..13bbd9a7ec 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -464,6 +464,7 @@ find-function-read
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)
--
2.17.1
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
Thanks,
--
Basil
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-09 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-03 18:32 bug#31699: 26.1.50; find-face-definition defaults to non-face symbol Basil L. Contovounesios
2018-06-03 18:39 ` Basil L. Contovounesios
2018-06-09 6:57 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).