* Interrogating which face is being used
@ 2009-07-17 15:07 Tim Visher
2009-07-17 15:11 ` Andy Stewart
2009-07-17 15:49 ` Bastien
0 siblings, 2 replies; 6+ messages in thread
From: Tim Visher @ 2009-07-17 15:07 UTC (permalink / raw)
To: emacs
Hello Everyone,
I'm wondering if it's possible to interrogate the entity under point
to discover which face is currently being used to control its display.
Thanks!
--
In Christ,
Timmy V.
http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interrogating which face is being used
2009-07-17 15:07 Interrogating which face is being used Tim Visher
@ 2009-07-17 15:11 ` Andy Stewart
2009-07-17 22:22 ` Tim Visher
2009-07-17 15:49 ` Bastien
1 sibling, 1 reply; 6+ messages in thread
From: Andy Stewart @ 2009-07-17 15:11 UTC (permalink / raw)
To: help-gnu-emacs
Tim Visher <tim.visher@gmail.com> writes:
Hi Tim,
> Hello Everyone,
>
> I'm wondering if it's possible to interrogate the entity under point
> to discover which face is currently being used to control its display.
>
> Thanks!
(defun find-function-or-variable-at-point (&optional prefix)
"Find function or variable define at current point."
(interactive "P")
(if (equal 0 (variable-at-point)) ;if have not variable at current point
(if (function-called-at-point) ;if have function call at current point
(call-interactively (if (null prefix) 'find-function 'find-function-other-window))
(if (face-at-point) ;if have face define at current point
(call-interactively (if (null prefix) 'find-face-definition 'find-face-definition-other-window))
(message "Nothing at point.")))
(call-interactively (if (null prefix) 'find-variable 'find-variable-other-window))))
(defun find-face-definition-other-window (face)
"Find FACE definition at other window."
(interactive (find-function-read 'defface))
(find-function-do-it face 'defface 'switch-to-buffer-other-window))
Above is my smart function for find function, variable, face define
around point.
Just binding some key with function
`find-function-or-variable-at-point`.
Enjoy!
-- Andy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Interrogating which face is being used
2009-07-17 15:07 Interrogating which face is being used Tim Visher
2009-07-17 15:11 ` Andy Stewart
@ 2009-07-17 15:49 ` Bastien
1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2009-07-17 15:49 UTC (permalink / raw)
To: Tim Visher; +Cc: emacs
Tim Visher <tim.visher@gmail.com> writes:
> I'm wondering if it's possible to interrogate the entity under point
> to discover which face is currently being used to control its display.
C-u C-x =
M-x customize-face RET
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.2698.1247843246.2239.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2009-07-17 22:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 15:07 Interrogating which face is being used Tim Visher
2009-07-17 15:11 ` Andy Stewart
2009-07-17 22:22 ` Tim Visher
2009-07-17 15:49 ` Bastien
[not found] <mailman.2698.1247843246.2239.help-gnu-emacs@gnu.org>
2009-07-17 15:13 ` henry atting
2009-07-17 16:02 ` Deepak Ramani
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.