aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2007-08-05 14:09:30 +0000
committerVinicius Jose Latorre2007-08-05 14:09:30 +0000
commita6f882f597eb7238df3ec104b93089511f3c3adc (patch)
treefe867a74a5df3be0ae78f09637eaa0b4d0f3349b
parent0dad68f0390a6a0c3d780650b38e9abe87a47914 (diff)
downloademacs-a6f882f597eb7238df3ec104b93089511f3c3adc.tar.gz
emacs-a6f882f597eb7238df3ec104b93089511f3c3adc.zip
Honor term-default-fg-color and term-default-bg-color settings when modifying term-current-face.
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/term.el24
2 files changed, 30 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0d9657200ed..4dd70c7eff8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12007-08-05 Peter Povinec <ppovinec <at> yahoo.com> (tiny change)
2
3 * term.el: Honor term-default-fg-color and term-default-bg-color
4 settings when modifying term-current-face.
5 (term-default-fg-color, term-default-bg-color): Initialized from
6 default term-current-face.
7 (term-mode, term-reset-terminal): Set term-current-face with
8 term-default-fg-color and term-default-bg-color.
9 (term-handle-colors-array): term-current-face has term-default-fg-color
10 and term-default-bg-color after reset escape sequence.
11 (term-handle-colors-array): Set term-current-color with
12 term-default-fg/bg-color instead of ansi-term-color-vector when the
13 index (term-ansi-current-color or term-ansi-current-bg-color) is zero.
14
12007-08-05 Vinicius Jose Latorre <viniciusig@ig.com.br> 152007-08-05 Vinicius Jose Latorre <viniciusig@ig.com.br>
2 16
3 * printing.el: Require lpr and ps-print when loading printing package. 17 * printing.el: Require lpr and ps-print when loading printing package.
diff --git a/lisp/term.el b/lisp/term.el
index c7b5ee249d1..4d1c660543a 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -695,12 +695,12 @@ Buffer local variable.")
695 695
696;;; faces -mm 696;;; faces -mm
697 697
698(defcustom term-default-fg-color 'unspecified 698(defcustom term-default-fg-color (face-foreground term-current-face)
699 "Default color for foreground in `term'." 699 "Default color for foreground in `term'."
700 :group 'term 700 :group 'term
701 :type 'string) 701 :type 'string)
702 702
703(defcustom term-default-bg-color 'unspecified 703(defcustom term-default-bg-color (face-background term-current-face)
704 "Default color for background in `term'." 704 "Default color for background in `term'."
705 :group 'term 705 :group 'term
706 :type 'string) 706 :type 'string)
@@ -1098,6 +1098,8 @@ Entry to this mode runs the hooks on `term-mode-hook'."
1098 (make-local-variable 'term-pending-delete-marker) 1098 (make-local-variable 'term-pending-delete-marker)
1099 (setq term-pending-delete-marker (make-marker)) 1099 (setq term-pending-delete-marker (make-marker))
1100 (make-local-variable 'term-current-face) 1100 (make-local-variable 'term-current-face)
1101 (setq term-current-face (list :background term-default-bg-color
1102 :foreground term-default-fg-color))
1101 (make-local-variable 'term-pending-frame) 1103 (make-local-variable 'term-pending-frame)
1102 (setq term-pending-frame nil) 1104 (setq term-pending-frame nil)
1103 ;; Cua-mode's keybindings interfere with the term keybindings, disable it. 1105 ;; Cua-mode's keybindings interfere with the term keybindings, disable it.
@@ -3055,7 +3057,8 @@ See `term-prompt-regexp'."
3055 (setq term-scroll-start 0) 3057 (setq term-scroll-start 0)
3056 (setq term-scroll-end term-height) 3058 (setq term-scroll-end term-height)
3057 (setq term-insert-mode nil) 3059 (setq term-insert-mode nil)
3058 (setq term-current-face nil) 3060 (setq term-current-face (list :background term-default-bg-color
3061 :foreground term-default-fg-color))
3059 (setq term-ansi-current-underline nil) 3062 (setq term-ansi-current-underline nil)
3060 (setq term-ansi-current-bold nil) 3063 (setq term-ansi-current-bold nil)
3061 (setq term-ansi-current-reverse nil) 3064 (setq term-ansi-current-reverse nil)
@@ -3117,7 +3120,8 @@ See `term-prompt-regexp'."
3117 3120
3118;;; 0 (Reset) or unknown (reset anyway) 3121;;; 0 (Reset) or unknown (reset anyway)
3119 (t 3122 (t
3120 (setq term-current-face nil) 3123 (setq term-current-face (list :background term-default-bg-color
3124 :foreground term-default-fg-color))
3121 (setq term-ansi-current-underline nil) 3125 (setq term-ansi-current-underline nil)
3122 (setq term-ansi-current-bold nil) 3126 (setq term-ansi-current-bold nil)
3123 (setq term-ansi-current-reverse nil) 3127 (setq term-ansi-current-reverse nil)
@@ -3154,11 +3158,11 @@ See `term-prompt-regexp'."
3154 (setq term-current-face 3158 (setq term-current-face
3155 (list :background 3159 (list :background
3156 (if (= term-ansi-current-color 0) 3160 (if (= term-ansi-current-color 0)
3157 (face-foreground 'default) 3161 term-default-fg-color
3158 (elt ansi-term-color-vector term-ansi-current-color)) 3162 (elt ansi-term-color-vector term-ansi-current-color))
3159 :foreground 3163 :foreground
3160 (if (= term-ansi-current-bg-color 0) 3164 (if (= term-ansi-current-bg-color 0)
3161 (face-background 'default) 3165 term-default-bg-color
3162 (elt ansi-term-color-vector term-ansi-current-bg-color)))) 3166 (elt ansi-term-color-vector term-ansi-current-bg-color))))
3163 (when term-ansi-current-bold 3167 (when term-ansi-current-bold
3164 (setq term-current-face 3168 (setq term-current-face
@@ -3181,9 +3185,13 @@ See `term-prompt-regexp'."
3181 ) 3185 )
3182 (setq term-current-face 3186 (setq term-current-face
3183 (list :foreground 3187 (list :foreground
3184 (elt ansi-term-color-vector term-ansi-current-color) 3188 (if (= term-ansi-current-color 0)
3189 term-default-fg-color
3190 (elt ansi-term-color-vector term-ansi-current-color))
3185 :background 3191 :background
3186 (elt ansi-term-color-vector term-ansi-current-bg-color))) 3192 (if (= term-ansi-current-bg-color 0)
3193 term-default-bg-color
3194 (elt ansi-term-color-vector term-ansi-current-bg-color))))
3187 (when term-ansi-current-bold 3195 (when term-ansi-current-bold
3188 (setq term-current-face 3196 (setq term-current-face
3189 (append '(:weight bold) term-current-face))) 3197 (append '(:weight bold) term-current-face)))