comparison lisp/progmodes/gdb-ui.el @ 83552:d3099204c799

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-585 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-586 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-587 Update from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-588 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-589 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-590 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-591 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-592
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 06 Jan 2007 15:25:16 +0000
parents 17e0dd217877 5b3d80ea3c0e
children b8d9a391daf3
comparison
equal deleted inserted replaced
83551:d9dc7e67ad3f 83552:d3099204c799
894 Changed values are highlighted with the face `font-lock-warning-face'." 894 Changed values are highlighted with the face `font-lock-warning-face'."
895 :type 'boolean 895 :type 'boolean
896 :group 'gud 896 :group 'gud
897 :version "22.1") 897 :version "22.1")
898 898
899 (defcustom gdb-max-children 40
900 "Maximum number of children allowed before Emacs asks"
901 :type 'integer
902 :group 'gud
903 :version "22.1")
904
899 (defun gdb-speedbar-expand-node (text token indent) 905 (defun gdb-speedbar-expand-node (text token indent)
900 "Expand the node the user clicked on. 906 "Expand the node the user clicked on.
901 TEXT is the text of the button we clicked on, a + or - item. 907 TEXT is the text of the button we clicked on, a + or - item.
902 TOKEN is data related to this node. 908 TOKEN is data related to this node.
903 INDENT is the current indentation depth." 909 INDENT is the current indentation depth."
904 (if (and gud-comint-buffer (buffer-name gud-comint-buffer)) 910 (if (and gud-comint-buffer (buffer-name gud-comint-buffer))
905 (progn 911 (progn
906 (cond ((string-match "+" text) ;expand this node 912 (cond ((string-match "+" text) ;expand this node
907 (if (and (eq (buffer-local-value 913 (let* ((var (assoc token gdb-var-list))
908 'gud-minor-mode gud-comint-buffer) 'gdba) 914 (expr (nth 1 var)) (children (nth 2 var)))
909 (string-equal gdb-version "pre-6.4")) 915 (if (or (<= (string-to-number children) gdb-max-children)
910 (gdb-var-list-children token) 916 (y-or-n-p
911 (gdb-var-list-children-1 token))) 917 (format
918 "%s has %s children. Continue? " expr children)))
919 (if (and (eq (buffer-local-value
920 'gud-minor-mode gud-comint-buffer) 'gdba)
921 (string-equal gdb-version "pre-6.4"))
922 (gdb-var-list-children token)
923 (gdb-var-list-children-1 token)))))
912 ((string-match "-" text) ;contract this node 924 ((string-match "-" text) ;contract this node
913 (dolist (var gdb-var-list) 925 (dolist (var gdb-var-list)
914 (if (string-match (concat token "\\.") (car var)) 926 (if (string-match (concat token "\\.") (car var))
915 (setq gdb-var-list (delq var gdb-var-list)))) 927 (setq gdb-var-list (delq var gdb-var-list))))
916 (gdb-var-delete-children token) 928 (gdb-var-delete-children token)