From e38b967ad745d0d862c0ea8bacc5bc89a19c8272 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 20 Mar 2005 01:49:32 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-193 Use gdb-ui breakpoint faces on ttys too 2005-03-20 Miles Bader * lisp/progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Use breakpoint faces in text-mode too. Change to new face names. (breakpoint-enabled): Renamed from `breakpoint-enabled-bitmap-face'. Add `:weight bold' attribute. (breakpoint-disabled): Renamed from `breakpoint-disabled-bitmap-face'. --- lisp/progmodes/gdb-ui.el | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'lisp/progmodes/gdb-ui.el') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index fea1bbce69a..e339dbc3b19 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1160,20 +1160,24 @@ static char *magick[] = { (define-fringe-bitmap 'breakpoint "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) -(defface breakpoint-enabled-bitmap-face +(defface breakpoint-enabled '((t :inherit fringe + :weight bold :foreground "red")) "Face for enabled breakpoint icon in fringe." :group 'gud) +;; compatibility alias for old name +(put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) -(defface breakpoint-disabled-bitmap-face +(defface breakpoint-disabled '((t :inherit fringe :foreground "grey60")) "Face for disabled breakpoint icon in fringe." :group 'gud) - +;; compatibility alias for old name +(put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled) ;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) (defun gdb-info-breakpoints-custom () @@ -2194,8 +2198,8 @@ BUFFER nil or omitted means use the current buffer." nil (1+ start) `(left-fringe breakpoint ,(if enabled - 'breakpoint-enabled-bitmap-face - 'breakpoint-disabled-bitmap-face))) + 'breakpoint-enabled + 'breakpoint-disabled))) (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) @@ -2232,7 +2236,10 @@ BUFFER nil or omitted means use the current buffer." (set-window-margins (get-buffer-window (current-buffer) 0) left-margin-width right-margin-width)))) - (gdb-put-string putstring (1+ start))))) + (gdb-put-string + (propertize putstring + 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled)) + (1+ start))))) (defun gdb-remove-breakpoint-icons (start end &optional remove-margin) (gdb-remove-strings start end) -- cgit v1.2.3 From 0c04baa6c567d68b5baebab9c28c35a5e697ef79 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 22 Mar 2005 05:05:50 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-199 Tweak gdb-ui breakpoint faces 2005-03-22 Miles Bader * lisp/progmodes/gdb-ui.el (breakpoint-enabled, breakpoint-disabled): Tweak details to look good on both ttys and bitmap displays, light or dark background, etc. --- lisp/progmodes/gdb-ui.el | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'lisp/progmodes/gdb-ui.el') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index e339dbc3b19..89a69aaf2d6 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1161,19 +1161,38 @@ static char *magick[] = { "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) (defface breakpoint-enabled - '((t - :inherit fringe + ;; On ttys, we don't inherit from the `fringe' face because that + ;; doesn't seem to do the right thing in some cases (?), whereas + ;; it's required on non-tty displays to get the background right. + '((((type tty)) :weight bold - :foreground "red")) + :foreground "red") + (t + :weight bold + :foreground "red" + :inherit fringe)) "Face for enabled breakpoint icon in fringe." :group 'gud) ;; compatibility alias for old name (put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled) (defface breakpoint-disabled - '((t - :inherit fringe - :foreground "grey60")) + ;; We use different values of grey for different background types, + ;; so that on low-color displays it will end up as something visible + ;; if it has to be approximated. On ttys, we don't inherit from the + ;; `fringe' face because that doesn't seem to do the right thing in + ;; some cases (?), whereas it's required on non-tty displays to get + ;; the background right. + '((((type tty) (background dark)) + :foreground "grey60") + (((type tty) (background light)) + :foreground "grey40") + (((background dark)) + :foreground "grey60" + :inherit fringe) + (((background light)) + :foreground "grey40" + :inherit fringe)) "Face for disabled breakpoint icon in fringe." :group 'gud) ;; compatibility alias for old name -- cgit v1.2.3 From 5f9e3a263619a4dcfd661898568d60b4bddba1d9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 22 Mar 2005 23:08:57 +0000 Subject: (breakpoint-enabled, breakpoint-disabled): Don't inherit from fringe face (now happens automatically). --- lisp/progmodes/gdb-ui.el | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'lisp/progmodes/gdb-ui.el') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 89a69aaf2d6..2a714e84b9a 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1161,16 +1161,12 @@ static char *magick[] = { "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) (defface breakpoint-enabled - ;; On ttys, we don't inherit from the `fringe' face because that - ;; doesn't seem to do the right thing in some cases (?), whereas - ;; it's required on non-tty displays to get the background right. '((((type tty)) :weight bold :foreground "red") (t :weight bold - :foreground "red" - :inherit fringe)) + :foreground "red")) "Face for enabled breakpoint icon in fringe." :group 'gud) ;; compatibility alias for old name @@ -1179,20 +1175,15 @@ static char *magick[] = { (defface breakpoint-disabled ;; We use different values of grey for different background types, ;; so that on low-color displays it will end up as something visible - ;; if it has to be approximated. On ttys, we don't inherit from the - ;; `fringe' face because that doesn't seem to do the right thing in - ;; some cases (?), whereas it's required on non-tty displays to get - ;; the background right. + ;; if it has to be approximated. '((((type tty) (background dark)) :foreground "grey60") (((type tty) (background light)) :foreground "grey40") (((background dark)) - :foreground "grey60" - :inherit fringe) + :foreground "grey60") (((background light)) - :foreground "grey40" - :inherit fringe)) + :foreground "grey40")) "Face for disabled breakpoint icon in fringe." :group 'gud) ;; compatibility alias for old name -- cgit v1.2.3