* diff-function face
@ 2006-03-17 11:26 Nick Roberts
2006-03-18 8:43 ` Richard Stallman
2006-03-20 6:53 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Nick Roberts @ 2006-03-17 11:26 UTC (permalink / raw)
Currently diff-function face inherits from diff-context and looks like
its part of the diff hunk. I presume this is a mistake as its really
part of the header. In any case I find a diff is a lot easier to view
if diff-function inherits from diff-header.
[Please note that the function is only visible if you have something like:
(setq diff-switches "-cp")
in your .emacs and works for C functions]
OK to apply?
--
Nick http://www.inet.net.nz/~nickrob
*** diff-mode.el 07 Feb 2006 10:13:32 +1300 1.84
--- diff-mode.el 18 Mar 2006 00:19:09 +1300
*************** when editing big diffs)."
*** 274,280 ****
(defvar diff-indicator-changed-face 'diff-indicator-changed)
(defface diff-function
! '((t :inherit diff-context))
"`diff-mode' face used to highlight function names produced by \"diff -p\"."
:group 'diff-mode)
;; backward-compatibility alias
--- 274,280 ----
(defvar diff-indicator-changed-face 'diff-indicator-changed)
(defface diff-function
! '((t :inherit diff-header))
"`diff-mode' face used to highlight function names produced by \"diff -p\"."
:group 'diff-mode)
;; backward-compatibility alias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff-function face
2006-03-17 11:26 diff-function face Nick Roberts
@ 2006-03-18 8:43 ` Richard Stallman
2006-03-18 9:24 ` Nick Roberts
2006-03-20 6:53 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2006-03-18 8:43 UTC (permalink / raw)
Cc: emacs-devel
Currently diff-function face inherits from diff-context and looks like
its part of the diff hunk. I presume this is a mistake as its really
part of the header. In any case I find a diff is a lot easier to view
if diff-function inherits from diff-header.
Wouldn't it be better if this were different from the rest of the
hunk? That would help it stand out. Perhaps it should inherit from
some other face, neither diff-header nor diff-function.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff-function face
2006-03-18 8:43 ` Richard Stallman
@ 2006-03-18 9:24 ` Nick Roberts
0 siblings, 0 replies; 5+ messages in thread
From: Nick Roberts @ 2006-03-18 9:24 UTC (permalink / raw)
Cc: emacs-devel
> Currently diff-function face inherits from diff-context and looks like
> its part of the diff hunk. I presume this is a mistake as its really
> part of the header. In any case I find a diff is a lot easier to view
> if diff-function inherits from diff-header.
>
> Wouldn't it be better if this were different from the rest of the
> hunk? That would help it stand out. Perhaps it should inherit from
> some other face, neither diff-header nor diff-function.
More faces doesn't always mean better (I think compilation mode proves that).
It could draw attention away from other equally important parts of the patch.
Either way I don't really mind. I just think it shouldn't inherit from
diff-context.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff-function face
2006-03-17 11:26 diff-function face Nick Roberts
2006-03-18 8:43 ` Richard Stallman
@ 2006-03-20 6:53 ` Stefan Monnier
2006-03-20 7:28 ` Nick Roberts
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2006-03-20 6:53 UTC (permalink / raw)
Cc: emacs-devel
> Currently diff-function face inherits from diff-context and looks like
> its part of the diff hunk. I presume this is a mistake as its really
> part of the header. In any case I find a diff is a lot easier to view
> if diff-function inherits from diff-header.
I don't have much preference here, but just to give some context (pun
intended): I decided to inherit from diff-context because the function-info
is really just that: context. Also, in many cases this info is useless
(because the naive heuristic used to find the function name works OK for
C but not for much else), so I'd rather have it be discrete.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: diff-function face
2006-03-20 6:53 ` Stefan Monnier
@ 2006-03-20 7:28 ` Nick Roberts
0 siblings, 0 replies; 5+ messages in thread
From: Nick Roberts @ 2006-03-20 7:28 UTC (permalink / raw)
Cc: emacs-devel
Stefan Monnier writes:
> > Currently diff-function face inherits from diff-context and looks like
> > its part of the diff hunk. I presume this is a mistake as its really
> > part of the header. In any case I find a diff is a lot easier to view
> > if diff-function inherits from diff-header.
>
> I don't have much preference here, but just to give some context (pun
> intended): I decided to inherit from diff-context because the function-info
> is really just that: context. Also, in many cases this info is useless
> (because the naive heuristic used to find the function name works OK for
> C but not for much else), so I'd rather have it be discrete.
(discreet?)
Yes, thats a good reason for not using a face other than diff-context
or diff-header.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-20 7:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 11:26 diff-function face Nick Roberts
2006-03-18 8:43 ` Richard Stallman
2006-03-18 9:24 ` Nick Roberts
2006-03-20 6:53 ` Stefan Monnier
2006-03-20 7:28 ` Nick Roberts
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).