* [PATCH] term.el make bold face customizable
@ 2009-09-23 13:16 Ivan Kanis
2009-09-23 16:41 ` Dan Nicolaescu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ivan Kanis @ 2009-09-23 13:16 UTC (permalink / raw)
To: Dan Nicolaescu; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
Hi Dan,
Could you apply the following trivial patch?
Kind regards,
--
Ivan
Kanis http://kanis.fr
If you want others to be happy, practice compassion.
If you want to be happy, practice compassion.
-- Dalai Lama
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: term.patch --]
[-- Type: text/x-diff, Size: 1238 bytes --]
--- tmp/term.el 2009-09-23 15:04:37.000000000 +0200
+++ hg/lisp/misc/term.el 2009-09-23 15:10:06.000000000 +0200
@@ -482,6 +482,9 @@
:type '(choice (const nil) file)
:group 'term)
+(defvar term-bold-attribute '(:weight bold)
+ "Set to '(:weight normal) to disable bold")
+
(defvar term-prompt-regexp "^"
"Regexp to recognize prompts in the inferior process.
Defaults to \"^\", the null string at BOL.
@@ -3228,8 +3231,8 @@
term-default-bg-color
(elt ansi-term-color-vector term-ansi-current-bg-color))))
(when term-ansi-current-bold
- (setq term-current-face
- (append '(:weight bold) term-current-face)))
+ (setq term-current-face
+ (append term-bold-attribute term-current-face)))
(when term-ansi-current-underline
(setq term-current-face
(append '(:underline t) term-current-face))))
@@ -3257,7 +3260,7 @@
(elt ansi-term-color-vector term-ansi-current-bg-color))))
(when term-ansi-current-bold
(setq term-current-face
- (append '(:weight bold) term-current-face)))
+ (append term-bold-attribute term-current-face)))
(when term-ansi-current-underline
(setq term-current-face
(append '(:underline t) term-current-face))))))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] term.el make bold face customizable
2009-09-23 13:16 [PATCH] term.el make bold face customizable Ivan Kanis
@ 2009-09-23 16:41 ` Dan Nicolaescu
2009-09-23 20:52 ` Stefan Monnier
2009-09-24 1:16 ` Stefan Monnier
2 siblings, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2009-09-23 16:41 UTC (permalink / raw)
To: Ivan Kanis; +Cc: emacs-devel
Ivan Kanis <expire-by-2009-09-28@kanis.fr> writes:
> Hi Dan,
>
> Could you apply the following trivial patch?
I am against this kind of stuff. Next we will have to add a way
customize something so that to not display the blue color for example?
You can modify the terminfo/termcap entry locally to not say that bold
is supported, then well behaved applications will not display bold.
You might want to try to convince Stefan to apply it.
> Kind regards,
> --
> Ivan
> Kanis http://kanis.fr
>
> If you want others to be happy, practice compassion.
> If you want to be happy, practice compassion.
> -- Dalai Lama
>
> --- tmp/term.el 2009-09-23 15:04:37.000000000 +0200
> +++ hg/lisp/misc/term.el 2009-09-23 15:10:06.000000000 +0200
> @@ -482,6 +482,9 @@
> :type '(choice (const nil) file)
> :group 'term)
>
> +(defvar term-bold-attribute '(:weight bold)
> + "Set to '(:weight normal) to disable bold")
> +
> (defvar term-prompt-regexp "^"
> "Regexp to recognize prompts in the inferior process.
> Defaults to \"^\", the null string at BOL.
> @@ -3228,8 +3231,8 @@
> term-default-bg-color
> (elt ansi-term-color-vector term-ansi-current-bg-color))))
> (when term-ansi-current-bold
> - (setq term-current-face
> - (append '(:weight bold) term-current-face)))
> + (setq term-current-face
> + (append term-bold-attribute term-current-face)))
> (when term-ansi-current-underline
> (setq term-current-face
> (append '(:underline t) term-current-face))))
> @@ -3257,7 +3260,7 @@
> (elt ansi-term-color-vector term-ansi-current-bg-color))))
> (when term-ansi-current-bold
> (setq term-current-face
> - (append '(:weight bold) term-current-face)))
> + (append term-bold-attribute term-current-face)))
> (when term-ansi-current-underline
> (setq term-current-face
> (append '(:underline t) term-current-face))))))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] term.el make bold face customizable
2009-09-23 13:16 [PATCH] term.el make bold face customizable Ivan Kanis
2009-09-23 16:41 ` Dan Nicolaescu
@ 2009-09-23 20:52 ` Stefan Monnier
2009-09-24 1:16 ` Stefan Monnier
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-09-23 20:52 UTC (permalink / raw)
To: Ivan Kanis; +Cc: Dan Nicolaescu, emacs-devel
> Could you apply the following trivial patch?
> +(defvar term-bold-attribute '(:weight bold)
> + "Set to '(:weight normal) to disable bold")
Better yet:
(defface term-bold-face '((t :weight bold)))
and then
[...]
- (setq term-current-face
- (append '(:weight bold) term-current-face)))
+ (push term-bold-face term-current-face))
[...]
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] term.el make bold face customizable
2009-09-23 13:16 [PATCH] term.el make bold face customizable Ivan Kanis
2009-09-23 16:41 ` Dan Nicolaescu
2009-09-23 20:52 ` Stefan Monnier
@ 2009-09-24 1:16 ` Stefan Monnier
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2009-09-24 1:16 UTC (permalink / raw)
To: Ivan Kanis; +Cc: Dan Nicolaescu, emacs-devel
> Could you apply the following trivial patch?
Installed,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-24 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-23 13:16 [PATCH] term.el make bold face customizable Ivan Kanis
2009-09-23 16:41 ` Dan Nicolaescu
2009-09-23 20:52 ` Stefan Monnier
2009-09-24 1:16 ` Stefan Monnier
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.