[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
address@hidden: Setting term-default-fg-color/term-default-bg-color has
From: |
Richard Stallman |
Subject: |
address@hidden: Setting term-default-fg-color/term-default-bg-color has no effect] |
Date: |
Sat, 30 Jun 2007 20:30:49 -0400 |
This can be installed as a tiny change. Would someone please check whether
it is a good idea, and DTRT?
------- Start of forwarded message -------
X-Spam-Status: No, score=0.9 required=5.0 tests=FORGED_YAHOO_RCVD,
SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no version=3.1.0
To: address@hidden
From: Peter Povinec <address@hidden>
Date: Sat, 30 Jun 2007 00:17:59 +0000 (UTC)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Setting term-default-fg-color/term-default-bg-color has no effect
Hi!
I use ansi-term a lot and like to have different color scheme for my term
buffers. After upgrading to Emacs22 from 21.4 I notice that my setting of
term-default-fg-color/term-default-bg-color no longer has any effect. I found
no documentation stating that it was not supported in Emacs22, so I suppose it
is a bug.
I looked at the old 21.4 code and based on that created the following minimalist
patch, which is satisfactory in addressing the issue.
HTH,
- --Peter
2007-06-25 Peter Povinec <ppovinec <at> yahoo.com>
* term.el: Honor term-default-fg-color and term-default-bg-color
settings when modifying term-current-face.
*** /home/ppovinec/term.el.orig 2007-06-24 01:04:07.298996000 -0700
- --- /home/ppovinec/term.el 2007-06-25 16:40:33.434255000 -0700
***************
*** 695,710 ****
;;; faces -mm
! (defcustom term-default-fg-color 'unspecified
"Default color for foreground in `term'."
:group 'term
:type 'string)
! (defcustom term-default-bg-color 'unspecified
"Default color for background in `term'."
:group 'term
:type 'string)
;;; Use the same colors that xterm uses, see `xterm-standard-colors'.
(defvar ansi-term-color-vector
[unspecified "black" "red3" "green3" "yellow3" "blue2"
- --- 695,714 ----
;;; faces -mm
! (defcustom term-default-fg-color (face-foreground term-current-face)
"Default color for foreground in `term'."
:group 'term
:type 'string)
! (defcustom term-default-bg-color (face-background term-current-face)
"Default color for background in `term'."
:group 'term
:type 'string)
+ ;;; Start with requested fg/bg.
+ (setq term-current-face (list :background term-default-bg-color
+ :foreground term-default-fg-color))
+
;;; Use the same colors that xterm uses, see `xterm-standard-colors'.
(defvar ansi-term-color-vector
[unspecified "black" "red3" "green3" "yellow3" "blue2"
***************
*** 3055,3061 ****
(setq term-scroll-start 0)
(setq term-scroll-end term-height)
(setq term-insert-mode nil)
! (setq term-current-face nil)
(setq term-ansi-current-underline nil)
(setq term-ansi-current-bold nil)
(setq term-ansi-current-reverse nil)
- --- 3059,3066 ----
(setq term-scroll-start 0)
(setq term-scroll-end term-height)
(setq term-insert-mode nil)
! (setq term-current-face (list :background term-default-bg-color
! :foreground term-default-fg-color))
(setq term-ansi-current-underline nil)
(setq term-ansi-current-bold nil)
(setq term-ansi-current-reverse nil)
***************
*** 3117,3123 ****
;;; 0 (Reset) or unknown (reset anyway)
(t
! (setq term-current-face nil)
(setq term-ansi-current-underline nil)
(setq term-ansi-current-bold nil)
(setq term-ansi-current-reverse nil)
- --- 3122,3129 ----
;;; 0 (Reset) or unknown (reset anyway)
(t
! (setq term-current-face (list :background term-default-bg-color
! :foreground term-default-fg-color))
(setq term-ansi-current-underline nil)
(setq term-ansi-current-bold nil)
(setq term-ansi-current-reverse nil)
***************
*** 3154,3164 ****
(setq term-current-face
(list :background
(if (= term-ansi-current-color 0)
! (face-foreground 'default)
(elt ansi-term-color-vector term-ansi-current-color))
:foreground
(if (= term-ansi-current-bg-color 0)
! (face-background 'default)
(elt ansi-term-color-vector
term-ansi-current-bg-color))))
(when term-ansi-current-bold
(setq term-current-face
- --- 3160,3170 ----
(setq term-current-face
(list :background
(if (= term-ansi-current-color 0)
! term-default-fg-color
(elt ansi-term-color-vector term-ansi-current-color))
:foreground
(if (= term-ansi-current-bg-color 0)
! term-default-bg-color
(elt ansi-term-color-vector
term-ansi-current-bg-color))))
(when term-ansi-current-bold
(setq term-current-face
***************
*** 3181,3189 ****
)
(setq term-current-face
(list :foreground
! (elt ansi-term-color-vector term-ansi-current-color)
:background
(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)))
- --- 3187,3200 ----
)
(setq term-current-face
(list :foreground
! (if (= term-ansi-current-color 0)
! term-default-fg-color
! (elt ansi-term-color-vector term-ansi-current-color))
:background
+ (if (= term-ansi-current-bg-color 0)
+ 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)))
_______________________________________________
bug-gnu-emacs mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- address@hidden: Setting term-default-fg-color/term-default-bg-color has no effect],
Richard Stallman <=