comparison lisp/progmodes/gdb-ui.el @ 90128:13796b0653c7

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-29 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 192-205) - Update from CVS - Use gdb-ui breakpoint faces on ttys too - Tweak gdb-ui breakpoint faces - Tweak info/.arch-inventory to identify info/.cvsignore as source - Clean up gdb-ui breakpoint faces
author Miles Bader <miles@gnu.org>
date Thu, 24 Mar 2005 18:41:26 +0000
parents e330fedc9152 88ef15014617
children 4da4a09e8b1b
comparison
equal deleted inserted replaced
90127:30ad2795fdab 90128:13796b0653c7
1158 ;; Bitmap for breakpoint in fringe 1158 ;; Bitmap for breakpoint in fringe
1159 (and (display-images-p) 1159 (and (display-images-p)
1160 (define-fringe-bitmap 'breakpoint 1160 (define-fringe-bitmap 'breakpoint
1161 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) 1161 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
1162 1162
1163 (defface breakpoint-enabled-bitmap-face 1163 (defface breakpoint-enabled
1164 '((t 1164 '((t
1165 :inherit fringe 1165 :foreground "red"
1166 :foreground "red")) 1166 :weight bold))
1167 "Face for enabled breakpoint icon in fringe." 1167 "Face for enabled breakpoint icon in fringe."
1168 :group 'gud) 1168 :group 'gud)
1169 1169 ;; compatibility alias for old name
1170 (defface breakpoint-disabled-bitmap-face 1170 (put 'breakpoint-enabled-bitmap-face 'face-alias 'breakpoint-enabled)
1171 '((t 1171
1172 :inherit fringe 1172 (defface breakpoint-disabled
1173 :foreground "grey60")) 1173 ;; We use different values of grey for different background types,
1174 ;; so that on low-color displays it will end up as something visible
1175 ;; if it has to be approximated.
1176 '((((background dark)) :foreground "grey60")
1177 (((background light)) :foreground "grey40"))
1174 "Face for disabled breakpoint icon in fringe." 1178 "Face for disabled breakpoint icon in fringe."
1175 :group 'gud) 1179 :group 'gud)
1176 1180 ;; compatibility alias for old name
1181 (put 'breakpoint-disabled-bitmap-face 'face-alias 'breakpoint-disabled)
1177 1182
1178 ;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) 1183 ;;-put breakpoint icons in relevant margins (even those set in the GUD buffer)
1179 (defun gdb-info-breakpoints-custom () 1184 (defun gdb-info-breakpoints-custom ()
1180 (let ((flag) (bptno)) 1185 (let ((flag) (bptno))
1181 ;; remove all breakpoint-icons in source buffers but not assembler buffer 1186 ;; remove all breakpoint-icons in source buffers but not assembler buffer
2192 (if (>= (car (window-fringes)) 8) 2197 (if (>= (car (window-fringes)) 8)
2193 (gdb-put-string 2198 (gdb-put-string
2194 nil (1+ start) 2199 nil (1+ start)
2195 `(left-fringe breakpoint 2200 `(left-fringe breakpoint
2196 ,(if enabled 2201 ,(if enabled
2197 'breakpoint-enabled-bitmap-face 2202 'breakpoint-enabled
2198 'breakpoint-disabled-bitmap-face))) 2203 'breakpoint-disabled)))
2199 (when (< left-margin-width 2) 2204 (when (< left-margin-width 2)
2200 (save-current-buffer 2205 (save-current-buffer
2201 (setq left-margin-width 2) 2206 (setq left-margin-width 2)
2202 (if (get-buffer-window (current-buffer) 0) 2207 (if (get-buffer-window (current-buffer) 0)
2203 (set-window-margins 2208 (set-window-margins
2230 (setq left-margin-width 2) 2235 (setq left-margin-width 2)
2231 (if (get-buffer-window (current-buffer) 0) 2236 (if (get-buffer-window (current-buffer) 0)
2232 (set-window-margins 2237 (set-window-margins
2233 (get-buffer-window (current-buffer) 0) 2238 (get-buffer-window (current-buffer) 0)
2234 left-margin-width right-margin-width)))) 2239 left-margin-width right-margin-width))))
2235 (gdb-put-string putstring (1+ start))))) 2240 (gdb-put-string
2241 (propertize putstring
2242 'face (if enabled 'breakpoint-enabled 'breakpoint-disabled))
2243 (1+ start)))))
2236 2244
2237 (defun gdb-remove-breakpoint-icons (start end &optional remove-margin) 2245 (defun gdb-remove-breakpoint-icons (start end &optional remove-margin)
2238 (gdb-remove-strings start end) 2246 (gdb-remove-strings start end)
2239 (if (display-images-p) 2247 (if (display-images-p)
2240 (remove-images start end)) 2248 (remove-images start end))