changeset 52177:57a5b7571acc

(gdb-insert-field, gdb-array-format1) (gdb-info-breakpoints-custom, gdb-info-frames-custom) (gdb-info-threads-custom): Add help-echo text. (gdb-display-back): Don't use purecopy. (gdb-info-breakpoints-custom, gdb-reset) (gdb-assembler-custom): Use display-images-p to test if breakpoint icons can be displayed.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 11 Aug 2003 21:55:20 +0000
parents 34cb3805a63d
children b5ad3c78162a
files lisp/gdb-ui.el
diffstat 1 files changed, 26 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gdb-ui.el	Mon Aug 11 21:52:48 2003 +0000
+++ b/lisp/gdb-ui.el	Mon Aug 11 21:55:20 2003 +0000
@@ -817,7 +817,7 @@
   (setq gdb-display-in-progress nil))
 
 (define-button-type 'gdb-display-back
-  'help-echo (purecopy "mouse-2, RET: go back to previous display buffer")
+  'help-echo "mouse-2, RET: go back to previous display buffer"
   'action (lambda (button) (gdb-display-go-back)))
 
 (defun gdb-display-go-back ()
@@ -945,10 +945,8 @@
 	(insert-buffer-substring (gdb-get-buffer
 				  'gdb-partial-output-buffer)
 				 start end)
-	(put-text-property (- (point) (- end start)) (- (point) 1)
-			   'mouse-face 'highlight)
-	(put-text-property (- (point) (- end start)) (- (point) 1)
-			   'local-map gdb-dive-map)))
+	(add-text-properties (- (point) (- end start)) (- (point) 1)
+			     `(mouse-face highlight local-map ,gdb-dive-map))))
     (delete-region start end)))
 
 (defvar gdb-values nil)
@@ -1060,12 +1058,11 @@
 	  (setq array-stop (int-to-string (aref gdb-array-stop num)))
 	  (setq array-range (concat "[" array-start
 				    ":" array-stop "]"))
-	  (put-text-property 1 (+ (length array-start)
-				  (length array-stop) 2)
-			     'mouse-face 'highlight array-range)
-	  (put-text-property 1 (+ (length array-start)
-				  (length array-stop) 2)
-			     'local-map gdb-array-slice-map array-range)
+	  (add-text-properties 
+	   1 (+ (length array-start) (length array-stop) 2)
+	   `(mouse-face highlight
+	     local-map ,gdb-array-slice-map
+	     help-echo "mouse-2, RET: select slice for this index") array-range)
 	  (goto-char (point-min))
 	  (setq array-slice (concat array-slice array-range))
 	  (setq num (+ num 1)))
@@ -1342,7 +1339,7 @@
       (with-current-buffer buffer
 	(if (and (eq gud-minor-mode 'gdba)
 		 (not (string-match "^\*" (buffer-name))))
-	    (if (eq window-system 'x)
+	    (if (display-images-p)
 		(remove-images (point-min) (point-max))
 	      (gdb-remove-strings (point-min) (point-max))))))
     (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
@@ -1360,9 +1357,9 @@
 		      (looking-at "\\(\\S-*\\):\\([0-9]+\\)")
 		      (let ((line (match-string 2)) (buffer-read-only nil)
 			    (file (match-string 1)))
-			(put-text-property (progn (beginning-of-line) (point))
-					   (progn (end-of-line) (point))
-					   'mouse-face 'highlight)
+			(add-text-properties (point-at-bol) (point-at-eol)
+			 '(mouse-face highlight
+			   help-echo "mouse-2, RET: visit breakpoint"))
 			(with-current-buffer
 			    (find-file-noselect
 			     (if (file-exists-p file) file
@@ -1383,7 +1380,7 @@
 			    (let ((start (progn (beginning-of-line)
 						(- (point) 1)))
 				  (end (progn (end-of-line) (+ (point) 1))))
-			      (if (eq window-system 'x)
+			      (if (display-images-p)
 				  (progn
 				    (remove-images start end)
 				    (if (eq ?y flag)
@@ -1544,18 +1541,17 @@
       (let ((buffer-read-only nil))
 	(goto-char (point-min))
 	(while (< (point) (point-max))
-	  (put-text-property (progn (beginning-of-line) (point))
-			     (progn (end-of-line) (point))
-			     'mouse-face 'highlight)
+	  (add-text-properties (point-at-bol) (point-at-eol)
+			     '(mouse-face highlight
+			       help-echo "mouse-2, RET: Select frame"))
 	  (beginning-of-line)
 	  (if (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)")
 		  (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)"))
 	      (if (equal (match-string 1) gdb-current-frame)
-		  (put-text-property (progn (beginning-of-line) (point))
-				     (progn (end-of-line) (point))
-				     'face 
-				     `(:background ,(face-attribute 'default :foreground)
-				       :foreground ,(face-attribute 'default :background)))))
+		  (put-text-property (point-at-bol) (point-at-eol)
+		   'face 
+		   `(:background ,(face-attribute 'default :foreground)
+		     :foreground ,(face-attribute 'default :background)))))
 	  (forward-line 1))))))
 
 (defun gdb-stack-buffer-name ()
@@ -1629,9 +1625,9 @@
     (let ((buffer-read-only nil))
       (goto-char (point-min))
       (while (< (point) (point-max))
-	(put-text-property (progn (beginning-of-line) (point))
-			   (progn (end-of-line) (point))
-			   'mouse-face 'highlight)
+	(add-text-properties (point-at-bol) (point-at-eol)
+			     '(mouse-face highlight
+			       help-echo "mouse-2, RET: select thread"))
 	(forward-line 1)))))
 
 (defun gdb-threads-buffer-name ()
@@ -2160,7 +2156,7 @@
 	  (if (eq gud-minor-mode 'gdba)
 	      (if (string-match "^\*.+*$" (buffer-name))
 		  (kill-buffer nil)
-		(if (eq window-system 'x)
+		(if (display-images-p)
 		    (remove-images (point-min) (point-max))
 		  (gdb-remove-strings (point-min) (point-max)))
 		(setq left-margin-width 0)
@@ -2323,7 +2319,7 @@
 		  (setq gdb-arrow-position (point))
 		  (gdb-put-arrow "=>" (point))))))
       ;; remove all breakpoint-icons in assembler buffer before updating.
-      (if (eq window-system 'x)
+      (if (display-images-p)
 	  (remove-images (point-min) (point-max))
 	(gdb-remove-strings (point-min) (point-max))))
     (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
@@ -2344,7 +2340,7 @@
 		  (if (re-search-forward address nil t)
 		      (let ((start (progn (beginning-of-line) (- (point) 1)))
 			    (end (progn (end-of-line) (+ (point) 1))))
-			(if (eq window-system 'x)
+			(if (display-images-p)
 			    (progn
 			      (remove-images start end)
 			      (if (eq ?y flag)