* turning off underlining, bold, all faces
@ 2005-03-25 19:08 Karl Berry
2005-03-25 19:34 ` Joe Corneli
0 siblings, 1 reply; 5+ messages in thread
From: Karl Berry @ 2005-03-25 19:08 UTC (permalink / raw)
I mostly use Emacs (21.3) in tty mode. I've tried various terminal
types, makes no apparent difference; currently using "xterm-color" for
no real reason. I would like to turn off all faces, i.e., underlining,
bold, and other such "enhancements". (I already don't have color,
despite the terminal type, and I'm happy about that.)
I see there was a long thread here about this about a year ago, around
http://lists.gnu.org/archive/html/help-gnu-emacs/2004-04/msg00460.html.
The solution there was to do
(global-font-lock-mode -1)
or
(global-font-lock-mode nil)
That had no apparent effect for me. Maybe it only related to colors.
For instance, the man buffer from M-x man man still has an ersatz bold
and underline for me, after the above. Also, *Help* buffers from, eg,
describe-function, have underlining.
I see Joe Corneli posted a list of specific faces:
http://lists.gnu.org/archive/html/help-gnu-emacs/2004-04/msg00443.html
Such a list is certainly better than nothing, but it seems painful and
unmaintainable in general.
Is there a generic way inside Emacs to just turn off everything? (I saw
nothing in the manual or source about it, which surprises me, as it
seems so fundamental.) If not, I wonder if devising a new terminal type
without the attributes would have the same effect.
Any advice welcome & appreciated.
Thanks,
karl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: turning off underlining, bold, all faces
2005-03-25 19:08 Karl Berry
@ 2005-03-25 19:34 ` Joe Corneli
0 siblings, 0 replies; 5+ messages in thread
From: Joe Corneli @ 2005-03-25 19:34 UTC (permalink / raw)
This looks easier to maintain, and in combination with
(global-font-lock-mode -1)
should have you sitting pretty (add additional items to the list as
necessary). It isn't quite turning off everything, but to be honest I
don't know what would be left after you've done this.
(copy-face 'default 'italic)
(copy-face 'default 'underline)
(copy-face 'default 'bold)
(copy-face 'default 'bold-italic)
(copy-face 'default 'button)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: turning off underlining, bold, all faces
[not found] <mailman.228.1111778664.28103.help-gnu-emacs@gnu.org>
@ 2005-03-26 1:04 ` Thien-Thi Nguyen
2005-03-26 1:20 ` Thien-Thi Nguyen
2005-03-26 2:07 ` Sean Richards
1 sibling, 1 reply; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-26 1:04 UTC (permalink / raw)
karl@freefriends.org (Karl Berry) writes:
> devising a new terminal type
> without the attributes would have the same effect.
here is a command you can use in emacs' src/ subdir:
sed -e '/T[SN]_.*= tget/!d' \
-e 's/= tget......//' \
-e 's/\".*//' \
-e 's/.*\(T[SN]_.*\) \([^ ][^ ]*\)$/\2 \1/' \
term.c
it shows which terminal capabilities are used by emacs
on console to effect bold, underline, etc. you can copy
the vt100 entry from /etc/termcap (or wherever) and remove
those capabilities you wish to disable. for example, to
zonk bold, change ":md=BLAH:" to ":". save the entry to
~/.termcap and set the TERMCAP env var to that file. you
have to exit/restart emacs at this point, (un)fortunately,
to use the new settings.
i've appended the output for those (poor souls) w/o access
to source code, or are otherwise uninclined to experiment,
or are otherwise bound by idiotic legal systems that mar
their free thought potential.
thi
____________________________
al TS_ins_line
AL TS_ins_multi_lines
bl TS_bell
cd TS_clr_to_bottom
ce TS_clr_line
cl TS_clr_frame
cs TS_set_scroll_region
cS TS_set_scroll_region_1
dc TS_del_char
DC TS_del_multi_chars
dl TS_del_line
DL TS_del_multi_lines
dm TS_delete_mode
ed TS_end_delete_mode
ei TS_end_insert_mode
ic TS_ins_char
IC TS_ins_multi_chars
im TS_insert_mode
ip TS_pad_inserted_char
ke TS_end_keypad_mode
ks TS_keypad_mode
pc TS_pad_char
rp TS_repeat
se TS_end_standout_mode
sf TS_fwd_scroll
so TS_standout_mode
sr TS_rev_scroll
te TS_end_termcap_modes
ti TS_termcap_modes
vb TS_visible_bell
ve TS_cursor_normal
vs TS_cursor_visible
vi TS_cursor_invisible
wi TS_set_window
us TS_enter_underline_mode
ue TS_exit_underline_mode
md TS_enter_bold_mode
mh TS_enter_dim_mode
mb TS_enter_blink_mode
mr TS_enter_reverse_mode
as TS_enter_alt_charset_mode
ae TS_exit_alt_charset_mode
me TS_exit_attribute_mode
op TS_orig_pair
AF TS_set_foreground
AB TS_set_background
Sf TS_set_foreground
Sb TS_set_background
Co TN_max_colors
pa TN_max_pairs
NC TN_no_color_video
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: turning off underlining, bold, all faces
2005-03-26 1:04 ` turning off underlining, bold, all faces Thien-Thi Nguyen
@ 2005-03-26 1:20 ` Thien-Thi Nguyen
0 siblings, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-03-26 1:20 UTC (permalink / raw)
i forgot to mention: you need to set the TERM env var,
as well. for example, renaming the entry as vt100-sedate:
TERM=vt100-sedate ; export TERM
TERMCAP=$HOME/.termcap ; export TERMCAP
happy hacking,
thi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: turning off underlining, bold, all faces
[not found] <mailman.228.1111778664.28103.help-gnu-emacs@gnu.org>
2005-03-26 1:04 ` turning off underlining, bold, all faces Thien-Thi Nguyen
@ 2005-03-26 2:07 ` Sean Richards
1 sibling, 0 replies; 5+ messages in thread
From: Sean Richards @ 2005-03-26 2:07 UTC (permalink / raw)
karl@freefriends.org (Karl Berry) writes:
> I mostly use Emacs (21.3) in tty mode. I've tried various terminal
> types, makes no apparent difference; currently using "xterm-color" for
> no real reason. I would like to turn off all faces, i.e., underlining,
> bold, and other such "enhancements". (I already don't have color,
> despite the terminal type, and I'm happy about that.)
I use the following elisp to turn off bold faces
(defun unbold-all-faces ()
"Clear the `bold' flag from all faces."
(interactive)
(dolist (f (face-list))
(if (face-bold-p f) (set-face-bold-p f nil))))
(add-hook 'font-lock-mode-hook
(lambda ()
(unbold-all-faces)))
You could expand this for underline, etc. I found this in gnu.emacs.help a
few years ago, here is the Message ID of the original posting
87sn1x5clv.fsf@shadizar.dyndns.org
Cheers, Sean
--
"Hver sin smak", sa vintapperen, han drakk mens de andre sloss."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-26 2:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.228.1111778664.28103.help-gnu-emacs@gnu.org>
2005-03-26 1:04 ` turning off underlining, bold, all faces Thien-Thi Nguyen
2005-03-26 1:20 ` Thien-Thi Nguyen
2005-03-26 2:07 ` Sean Richards
2005-03-25 19:08 Karl Berry
2005-03-25 19:34 ` Joe Corneli
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).