all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Auctex like c++ mode
@ 2015-02-13 22:10 Glen Stark
  2015-02-14  7:21 ` Tassilo Horn
  0 siblings, 1 reply; 2+ messages in thread
From: Glen Stark @ 2015-02-13 22:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hi everyone.

I really like the way auctex increases the font size (face size) for 
sections and subsections in latex mode.

I've always thought it would be really nifty to do the same thing for the 
signature part of function definitions in c-modes.  In case I screwed up 
the vocabulary, what I mean is this:

void i_want_this_big(maybe the params too, i'm easy)
{
/// I want the body normal
}

I also thing it would be really sexy if nested braces and parenthesis 
could be distinguished by varying face sizes.   Maybe once I saw this in 
practice I'd change my mind, but I'd like to try it out.

It seems to me that this should be easy enough to do, but I don't know 
how to do it, and I haven't been able to find any instructions or theme 
or anything online... perhaps because I'm not searching for the right 
terms.

Can anyone explain how I might go about doing this?  I'm an apprentice 
level elisp programmer.

Cheers,

Glen


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Auctex like c++ mode
  2015-02-13 22:10 Auctex like c++ mode Glen Stark
@ 2015-02-14  7:21 ` Tassilo Horn
  0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2015-02-14  7:21 UTC (permalink / raw)
  To: Glen Stark; +Cc: help-gnu-emacs

Glen Stark <mail@glenstark.net> writes:

> I've always thought it would be really nifty to do the same thing for
> the signature part of function definitions in c-modes.  In case I
> screwed up the vocabulary, what I mean is this:
>
> void i_want_this_big(maybe the params too, i'm easy)
> {
> /// I want the body normal
> }
>
> I also thing it would be really sexy if nested braces and parenthesis
> could be distinguished by varying face sizes.  Maybe once I saw this
> in practice I'd change my mind, but I'd like to try it out.
>
> It seems to me that this should be easy enough to do, but I don't know
> how to do it, and I haven't been able to find any instructions or
> theme or anything online... perhaps because I'm not searching for the
> right terms.

Move point on the function name, do `M-x customize-face RET'.  It'll
automatically offer `font-lock-function-name-face' which is the face
used by the text at point.  Confirm with RET and you're put in a
*Customize* buffer where you can increase the Height face attribute to,
e.g., 1.2 to make function names one fifth larger than the other text.

Parens and braces don't seem to be fontified with custom faces, so
that's not easy to change.  But you can play with customizing other
faces.  Just move point to text that's highlighted and do `M-x
customize-face', e.g., variables, types, keywords, strings, comments...

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-14  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 22:10 Auctex like c++ mode Glen Stark
2015-02-14  7:21 ` Tassilo Horn

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.