[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different width face in code
From: |
Kai Großjohann |
Subject: |
Re: Different width face in code |
Date: |
Thu, 29 Nov 2001 16:38:29 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu) |
"Eric M. Ludlam" <address@hidden> writes:
> I thought it would be nifty to set font-lock-comment-face to be
> slightly smaller than the default font so I could pack more comments
> onto the screen, and found that multi-line comments in C code cause
> the secondary lines to be pulled toward the left margin some.
I think it would make sense to judiciously use tabs and spaces for
indentation. Then the display engine can display tabs specially.
For example, consider this code fragment:
if (...) {
if (...) {
foobar(a,
b);
> > _______
The indentation points indicated by ">" come from c-basic-offset,
whereas the indentation indicated by "_" comes from aligning the "b"
line to the same spot where "a" is. If the "b" line was always
indented with two tabs and 7 spaces, then you could change the tab
width and the code would always look right.
I guess something similar could apply to the comments: if the tabs
are displayed with the same width for all fonts, then this would
DTRT, I guess.
Does this make sense?
kai
--
Simplification good! Oversimplification bad! (Larry Wall)