Commit 2e7f2ec0 authored by Karoly Lorentey's avatar Karoly Lorentey

Merged in changes from CVS HEAD

Patches applied:

 * miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-138
   Update from CVS

 * miles@gnu.org--gnu-2003/emacs--cvs-trunk--0--patch-139
   Update from CVS


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-15
parents 53fed860 8af1a978
...@@ -2,6 +2,20 @@ ...@@ -2,6 +2,20 @@
* .cvsignore: Add .arch-inventory. * .cvsignore: Add .arch-inventory.
2003-12-24 Andreas Schwab <schwab@suse.de>
* configure.in: Check for <sys/socket.h>. Include it before
including <net/if.h>. Move check for <net/if.h> before it's use.
2003-12-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* Makefile.in (install-arch-dep): Don't let cd output go into
pipe for carbon_appdir.
2003-12-24 Andreas Schwab <schwab@suse.de>
* configure.in (PKG_CHECK_MODULES): Fix quoting.
2003-12-01 Andreas Schwab <schwab@suse.de> 2003-12-01 Andreas Schwab <schwab@suse.de>
* configure.in (powerpc-apple-darwin*): Use ${CC-cc} instead of * configure.in (powerpc-apple-darwin*): Use ${CC-cc} instead of
......
...@@ -367,9 +367,9 @@ install-arch-dep: mkdir ...@@ -367,9 +367,9 @@ install-arch-dep: mkdir
done done
if test "${carbon_appdir}" != ""; then \ if test "${carbon_appdir}" != ""; then \
umask 022; mkdir -p ${carbon_appdir}/Emacs.app; \ umask 022; mkdir -p ${carbon_appdir}/Emacs.app; \
(cd mac/Emacs.app; tar -chf - . ) | \ (cd mac/Emacs.app; (tar -chf - . | \
(cd ${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \ (cd ${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \
&& cat > /dev/null) || exit 1; \ && cat > /dev/null))) || exit 1; \
fi fi
### Install the files that are machine-independent. ### Install the files that are machine-independent.
......
This diff is collapsed.
...@@ -1507,6 +1507,12 @@ if test $emacs_cv_struct_exception != yes; then ...@@ -1507,6 +1507,12 @@ if test $emacs_cv_struct_exception != yes; then
AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.])
fi fi
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif])
dnl checks for structure members dnl checks for structure members
AC_STRUCT_TM AC_STRUCT_TM
AC_STRUCT_TIMEZONE AC_STRUCT_TIMEZONE
...@@ -1516,7 +1522,14 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff, ...@@ -1516,7 +1522,14 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff,
[#include <time.h>]) [#include <time.h>])
AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr, struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
struct ifreq.ifr_addr], , ,[#include <net/if.h>]) struct ifreq.ifr_addr], , ,
[AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif])
dnl checks for compiler characteristics dnl checks for compiler characteristics
...@@ -1845,7 +1858,7 @@ dnl This function defintion taken from Gnome 2.0 ...@@ -1845,7 +1858,7 @@ dnl This function defintion taken from Gnome 2.0
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN(PKG_CHECK_MODULES, [ AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no succeeded=no
if test -z "$PKG_CONFIG"; then if test -z "$PKG_CONFIG"; then
...@@ -1893,7 +1906,7 @@ AC_DEFUN(PKG_CHECK_MODULES, [ ...@@ -1893,7 +1906,7 @@ AC_DEFUN(PKG_CHECK_MODULES, [
if test $succeeded = yes; then if test $succeeded = yes; then
ifelse([$3], , :, [$3]) ifelse([$3], , :, [$3])
else else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4])
fi fi
]) ])
...@@ -2510,7 +2523,7 @@ dnl Fixme: Not used. Should this be HAVE_SOCKETS? ...@@ -2510,7 +2523,7 @@ dnl Fixme: Not used. Should this be HAVE_SOCKETS?
[Define to 1 if you have inet sockets.]) [Define to 1 if you have inet sockets.])
fi fi
AC_CHECK_HEADERS(sys/ioctl.h net/if.h) AC_CHECK_HEADERS(sys/ioctl.h)
if test -f /usr/lpp/X11/bin/smt.exp; then if test -f /usr/lpp/X11/bin/smt.exp; then
AC_DEFINE(HAVE_AIX_SMT_EXP, 1, AC_DEFINE(HAVE_AIX_SMT_EXP, 1,
......
2003-12-24 Thien-Thi Nguyen <ttn@gnu.org>
* make-docfile.c (main): For return code, no longer special-case VMS.
Instead, use `EXIT_SUCCESS' and `EXIT_FAILURE' from stdlib.h.
2003-09-28 Andreas B,A|(Bsching <crunchy@tzi.de> (tiny change) 2003-09-28 Andreas B,A|(Bsching <crunchy@tzi.de> (tiny change)
* emacsclient.c (quote_file_name): Print the result instead of * emacsclient.c (quote_file_name): Print the result instead of
......
...@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
of GNU Emacs. .elc and .el and .c files are allowed. of GNU Emacs. .elc and .el and .c files are allowed.
A .o file can also be specified; the .c file it was made from is used. A .o file can also be specified; the .c file it was made from is used.
This helps the makefile pass the correct list of files. This helps the makefile pass the correct list of files.
Option -d DIR means change to DIR before looking for files.
The results, which go to standard output or to a file The results, which go to standard output or to a file
specified with -a or -o (-a to append, -o to start from nothing), specified with -a or -o (-a to append, -o to start from nothing),
...@@ -174,10 +175,7 @@ main (argc, argv) ...@@ -174,10 +175,7 @@ main (argc, argv)
if (j == i) if (j == i)
err_count += scan_file (argv[i]); err_count += scan_file (argv[i]);
} }
#ifndef VMS return (err_count > 0 ? EXIT_FAILURE : EXIT_SUCCESS);
exit (err_count > 0);
#endif /* VMS */
return err_count > 0;
} }
/* Read file FILENAME and output its doc strings to outfile. */ /* Read file FILENAME and output its doc strings to outfile. */
......
...@@ -3,6 +3,88 @@ ...@@ -3,6 +3,88 @@
* dired.el (dired-between-files): Always use dired-move-to-filename, * dired.el (dired-between-files): Always use dired-move-to-filename,
which is more robust in non-english locales. which is more robust in non-english locales.
2003-12-25 Markus Rost <rost@mathematik.uni-bielefeld.de>
* vc.el (vc-dired-purge): Avoid error from `kill-line'.
2003-12-24 Andreas Schwab <schwab@suse.de>
* shell.el (shell-file-name-quote-list): Add backslash.
* comint.el (comint-quote-filename): Correctly handle backslash
in comint-file-name-quote-list.
2003-12-24 Kenichi Handa <handa@m17n.org>
* international/mule-cmds.el (set-default-coding-systems): Call
ucs-set-table-for-input for all buffers that don't have local
value of buffer-file-coding-system.
* international/ucs-tables.el (ucs-set-table-for-input): If
translation-table-for-encode is a symbol, get its
translation-table property.
2003-12-23 Luc Teirlinck <teirllm@auburn.edu>
* ffap.el (ffap-read-file-or-url): Eliminate reliance of the call
to `completing-read' on a recently fixed bug.
* fringe.el (fringe-query-style): Suggest `?' in minibuffer prompt,
instead of SPACE, to get the list of possible fringe modes. SPACE
only works if both `partial-completion-mode' and
`completion-auto-help' are nil.
* complete.el (PC-is-complete-p): delete.
(PC-do-completion): Replace all calls to `PC-is-complete-p' with
calls to `test-completion'.
2003-12-23 Nick Roberts <nick@nick.uklinux.net>
* progmodes/gud.el (gud-speedbar-buttons): Use speed-bar-edit-line
to edit values when there are no children.
* gdb-ui.el (gdba, gdb-assembler-mode): Call the mode "Machine" as
a mode called "Assembler" already exists.
(gdb-use-colon-colon-notation, gdb-show-changed-values): New
options.
(gud-watch): Use format option. Remove font properties from
string.
(gdb-var-create-handler, gdb-var-list-children-handler): Don't
bother about properties as there are none.
(gdb-var-create-handler, gdb-var-list-children-handler)
(gdb-var-update-handler): Call gdb-var-evaluate-expression-handler
with two arguments.
(gdb-var-evaluate-expression-handler, gdb-post-prompt): Let
speedbar show value changes with a different font.
(gdb-edit-value): New defun.
(gdb-clear-partial-output, gdb-clear-inferior-io)
(def-gdb-auto-update-handler): Use erase-buffer.
(gdb-frame-handler): Display watch expressions in
FUNCTION::VARIABLE format if required.
2003-12-23 John Paul Wallington <jpw@gnu.org>
* info.el (Info-unescape-quotes, Info-split-parameter-string)
(Info-goto-emacs-command-node): Doc fixes.
2003-12-03 Kenichi Handa <handa@m17n.org>
* language/cyrillic.el: Register "microsoft-cp1251" in
ctext-non-standard-encodings-alist.
("Bulgarian"): Add ctext-non-standard-encodings.
("Belarusian"): Likewise.
* international/mule-conf.el (compound-text-with-extensions):
Change the type to 2 (iso-2022 base).
* international/mule.el (ctext-non-standard-encodings-alist):
Change the format.
(ctext-non-standard-encodings): New variable.
(ctext-post-read-conversion): Fully re-written.
(ctext-non-standard-designations-alist): Delete it.
(ctext-non-standard-encodings-table): New function.
(ctext-pre-write-conversion): Fully re-written.
2003-11-30 Per Abrahamsen <abraham@dina.kvl.dk> 2003-11-30 Per Abrahamsen <abraham@dina.kvl.dk>
* cus-edit.el (custom-add-parent-links): Add documentation links * cus-edit.el (custom-add-parent-links): Add documentation links
......
...@@ -2625,11 +2625,13 @@ Magic characters are those in `comint-file-name-quote-list'." ...@@ -2625,11 +2625,13 @@ Magic characters are those in `comint-file-name-quote-list'."
(if (null comint-file-name-quote-list) (if (null comint-file-name-quote-list)
filename filename
(let ((regexp (let ((regexp
(format "\\(^\\|[^\\]\\)\\([%s]\\)" (format "[%s]"
(mapconcat 'char-to-string comint-file-name-quote-list "")))) (mapconcat 'char-to-string comint-file-name-quote-list ""))))
(save-match-data (save-match-data
(while (string-match regexp filename) (let ((i 0))
(setq filename (replace-match "\\1\\\\\\2" nil nil filename))) (while (string-match regexp filename i)
(setq filename (replace-match "\\\\\\&" nil nil filename))
(setq i (1+ (match-end 0)))))
filename)))) filename))))
(defun comint-unquote-filename (filename) (defun comint-unquote-filename (filename)
......
...@@ -368,7 +368,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ...@@ -368,7 +368,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
;; Check if buffer contents can already be considered complete ;; Check if buffer contents can already be considered complete
(if (and (eq mode 'exit) (if (and (eq mode 'exit)
(PC-is-complete-p str table pred)) (test-completion str table pred))
'complete 'complete
;; Do substitutions in directory names ;; Do substitutions in directory names
...@@ -641,7 +641,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ...@@ -641,7 +641,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(if improved (if improved
;; We changed it... would it be complete without the space? ;; We changed it... would it be complete without the space?
(if (PC-is-complete-p (buffer-substring 1 (1- end)) (if (test-completion (buffer-substring 1 (1- end))
table pred) table pred)
(delete-region (1- end) end))) (delete-region (1- end) end)))
...@@ -649,7 +649,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ...@@ -649,7 +649,7 @@ of `minibuffer-completion-table' and the minibuffer contents.")
;; We changed it... enough to be complete? ;; We changed it... enough to be complete?
(and (eq mode 'exit) (and (eq mode 'exit)
(PC-is-complete-p (field-string) table pred)) (test-completion (field-string) table pred))
;; If totally ambiguous, display a list of completions ;; If totally ambiguous, display a list of completions
(if (or (eq completion-auto-help t) (if (or (eq completion-auto-help t)
...@@ -680,20 +680,6 @@ of `minibuffer-completion-table' and the minibuffer contents.") ...@@ -680,20 +680,6 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(car poss))))) (car poss)))))
t))))) t)))))
(defun PC-is-complete-p (str table pred)
(let ((res (if (listp table)
(assoc str table)
(if (vectorp table)
(or (equal str "nil") ; heh, heh, heh
(intern-soft str table))
(funcall table str pred 'lambda)))))
(and res
(or (not pred)
(and (not (listp table)) (not (vectorp table)))
(funcall pred res))
res)))
(defun PC-chop-word (new old) (defun PC-chop-word (new old)
(let ((i -1) (let ((i -1)
(j -1)) (j -1))
......
...@@ -1216,7 +1216,7 @@ which may actually result in an url rather than a filename." ...@@ -1216,7 +1216,7 @@ which may actually result in an url rather than a filename."
'ffap-read-file-or-url-internal 'ffap-read-file-or-url-internal
dir dir
nil nil
(if dir (cons guess (length dir)) guess) (if dir (cons guess (1+ (length dir))) guess)
(list 'file-name-history)))) (list 'file-name-history))))
;; Do file substitution like (interactive "F"), suggested by MCOOK. ;; Do file substitution like (interactive "F"), suggested by MCOOK.
(or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess)))
......
...@@ -119,7 +119,7 @@ If ALL-FRAMES, the negation of the fringe values in ...@@ -119,7 +119,7 @@ If ALL-FRAMES, the negation of the fringe values in
Otherwise the negation of the fringe value in the currently selected Otherwise the negation of the fringe value in the currently selected
frame parameter is used." frame parameter is used."
(let ((mode (intern (completing-read (let ((mode (intern (completing-read
"Select fringe mode for all frames (SPACE for list): " "Select fringe mode for all frames (type ? for list): "
'(("none") ("default") ("left-only") '(("none") ("default") ("left-only")
("right-only") ("half") ("minimal")) ("right-only") ("half") ("minimal"))
nil t)))) nil t))))
......
...@@ -35,16 +35,15 @@ ...@@ -35,16 +35,15 @@
;; Start the debugger with M-x gdba. ;; Start the debugger with M-x gdba.
;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim ;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim
;; Kingdon and uses GDB's annotation interface. You don't need to know about ;; Kingdon and uses GDB's annotation interface. You don't need to know about
;; annotations to use this mode as a debugger, but if you are interested ;; annotations to use this mode as a debugger, but if you are interested
;; developing the mode itself, then see the Annotations section in the GDB ;; developing the mode itself, then see the Annotations section in the GDB
;; info manual. ;; info manual. Some GDB/MI commands are also used through th CLI command
;; 'interpreter mi <mi-command>'.
;; ;;
;; Known Bugs: ;; Known Bugs:
;; Does not auto-display arrays of structures or structures containing arrays. ;;
;; On MS Windows, Gdb 5.1.1 from MinGW 2.0 does not flush the output from the
;; inferior.
;;; Code: ;;; Code:
...@@ -121,7 +120,7 @@ The following interactive lisp functions help control operation : ...@@ -121,7 +120,7 @@ The following interactive lisp functions help control operation :
(set (make-local-variable 'gud-minor-mode) 'gdba) (set (make-local-variable 'gud-minor-mode) 'gdba)
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
;; ;;
(gud-def gud-break (if (not (string-equal mode-name "Assembler")) (gud-def gud-break (if (not (string-equal mode-name "Machine"))
(gud-call "break %f:%l" arg) (gud-call "break %f:%l" arg)
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
...@@ -129,7 +128,7 @@ The following interactive lisp functions help control operation : ...@@ -129,7 +128,7 @@ The following interactive lisp functions help control operation :
(gud-call "break *%a" arg))) (gud-call "break *%a" arg)))
"\C-b" "Set breakpoint at current line or address.") "\C-b" "Set breakpoint at current line or address.")
;; ;;
(gud-def gud-remove (if (not (string-equal mode-name "Assembler")) (gud-def gud-remove (if (not (string-equal mode-name "Machine"))
(gud-call "clear %f:%l" arg) (gud-call "clear %f:%l" arg)
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
...@@ -137,7 +136,7 @@ The following interactive lisp functions help control operation : ...@@ -137,7 +136,7 @@ The following interactive lisp functions help control operation :
(gud-call "clear *%a" arg))) (gud-call "clear *%a" arg)))
"\C-d" "Remove breakpoint at current line or address.") "\C-d" "Remove breakpoint at current line or address.")
;; ;;
(gud-def gud-until (if (not (string-equal mode-name "Assembler")) (gud-def gud-until (if (not (string-equal mode-name "Machine"))
(gud-call "until %f:%l" arg) (gud-call "until %f:%l" arg)
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
...@@ -175,15 +174,23 @@ The following interactive lisp functions help control operation : ...@@ -175,15 +174,23 @@ The following interactive lisp functions help control operation :
;; ;;
(run-hooks 'gdba-mode-hook)) (run-hooks 'gdba-mode-hook))
(defcustom gdb-use-colon-colon-notation t
"Non-nil means use FUNCTION::VARIABLE format to display variables in the
speedbar."
:type 'boolean
:group 'gud)
(defun gud-watch () (defun gud-watch ()
"Watch expression at point." "Watch expression at point."
(interactive) (interactive)
(let ((expr (tooltip-identifier-from-point (point)))) (let ((expr (tooltip-identifier-from-point (point))))
(if (string-equal gdb-current-language "c") (if (and (string-equal gdb-current-language "c")
gdb-use-colon-colon-notation)
(setq expr (concat gdb-current-frame "::" expr))) (setq expr (concat gdb-current-frame "::" expr)))
(catch 'already-watched (catch 'already-watched
(dolist (var gdb-var-list) (dolist (var gdb-var-list)
(if (string-equal expr (car var)) (throw 'already-watched nil))) (if (string-equal expr (car var)) (throw 'already-watched nil)))
(set-text-properties 0 (length expr) nil expr)
(gdb-enqueue-input (gdb-enqueue-input
(list (concat "server interpreter mi \"-var-create - * " expr "\"\n") (list (concat "server interpreter mi \"-var-create - * " expr "\"\n")
`(lambda () (gdb-var-create-handler ,expr)))))) `(lambda () (gdb-var-create-handler ,expr))))))
...@@ -197,10 +204,10 @@ The following interactive lisp functions help control operation : ...@@ -197,10 +204,10 @@ The following interactive lisp functions help control operation :
(goto-char (point-min)) (goto-char (point-min))
(if (re-search-forward gdb-var-create-regexp nil t) (if (re-search-forward gdb-var-create-regexp nil t)
(let ((var (list expr (let ((var (list expr
(match-string-no-properties 1) (match-string 1)
(match-string-no-properties 2) (match-string 2)
(match-string-no-properties 3) (match-string 3)
nil))) nil nil)))
(push var gdb-var-list) (push var gdb-var-list)
(speedbar 1) (speedbar 1)
(if (equal (nth 2 var) "0") (if (equal (nth 2 var) "0")
...@@ -208,13 +215,13 @@ The following interactive lisp functions help control operation : ...@@ -208,13 +215,13 @@ The following interactive lisp functions help control operation :
(list (concat "server interpreter mi \"-var-evaluate-expression " (list (concat "server interpreter mi \"-var-evaluate-expression "
(nth 1 var) "\"\n") (nth 1 var) "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler `(lambda () (gdb-var-evaluate-expression-handler
,(nth 1 var))))) ,(nth 1 var) nil))))
(setq gdb-var-changed t))) (setq gdb-var-changed t)))
(if (re-search-forward "Undefined command" nil t) (if (re-search-forward "Undefined command" nil t)
(message "Watching expressions requires gdb 6.0 onwards") (message "Watching expressions requires gdb 6.0 onwards")
(message "No symbol %s in current context." expr))))) (message "No symbol %s in current context." expr)))))
(defun gdb-var-evaluate-expression-handler (varnum) (defun gdb-var-evaluate-expression-handler (varnum changed)
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward ".*value=\"\\(.*?\\)\"" nil t) (re-search-forward ".*value=\"\\(.*?\\)\"" nil t)
...@@ -223,7 +230,8 @@ The following interactive lisp functions help control operation : ...@@ -223,7 +230,8 @@ The following interactive lisp functions help control operation :
(dolist (var gdb-var-list) (dolist (var gdb-var-list)
(if (string-equal varnum (cadr var)) (if (string-equal varnum (cadr var))
(progn (progn
(setcar (nthcdr 4 var) (match-string-no-properties 1)) (if changed (setcar (nthcdr 5 var) t))
(setcar (nthcdr 4 var) (match-string 1))
(setcar (nthcdr num gdb-var-list) var) (setcar (nthcdr num gdb-var-list) var)
(throw 'var-found nil))) (throw 'var-found nil)))
(setq num (+ num 1)))))) (setq num (+ num 1))))))
...@@ -247,10 +255,11 @@ The following interactive lisp functions help control operation : ...@@ -247,10 +255,11 @@ The following interactive lisp functions help control operation :
(progn (progn
(push var var-list) (push var var-list)
(while (re-search-forward gdb-var-list-children-regexp nil t) (while (re-search-forward gdb-var-list-children-regexp nil t)
(let ((varchild (list (match-string-no-properties 2) (let ((varchild (list (match-string 2)
(match-string-no-properties 1) (match-string 1)
(match-string-no-properties 3) (match-string 3)
(match-string-no-properties 4) (match-string 5)
(match-string 4)
nil))) nil)))
(dolist (var1 gdb-var-list) (dolist (var1 gdb-var-list)
(if (string-equal (cadr var1) (cadr varchild)) (if (string-equal (cadr var1) (cadr varchild))
...@@ -263,7 +272,7 @@ The following interactive lisp functions help control operation : ...@@ -263,7 +272,7 @@ The following interactive lisp functions help control operation :
"server interpreter mi \"-var-evaluate-expression " "server interpreter mi \"-var-evaluate-expression "
(nth 1 varchild) "\"\n") (nth 1 varchild) "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler `(lambda () (gdb-var-evaluate-expression-handler
,(nth 1 varchild))))))))) ,(nth 1 varchild) nil))))))))
(push var var-list))) (push var var-list)))
(setq gdb-var-list (nreverse var-list)))))) (setq gdb-var-list (nreverse var-list))))))
...@@ -281,12 +290,12 @@ The following interactive lisp functions help control operation : ...@@ -281,12 +290,12 @@ The following interactive lisp functions help control operation :
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward gdb-var-update-regexp nil t) (while (re-search-forward gdb-var-update-regexp nil t)
(let ((varnum (match-string-no-properties 1))) (let ((varnum (match-string 1)))
(gdb-enqueue-input (gdb-enqueue-input
(list (concat "server interpreter mi \"-var-evaluate-expression " (list (concat "server interpreter mi \"-var-evaluate-expression "
varnum "\"\n") varnum "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler `(lambda () (gdb-var-evaluate-expression-handler
,varnum))))))) ,varnum t)))))))
(gdb-set-pending-triggers (gdb-set-pending-triggers
(delq 'gdb-var-update (gdb-get-pending-triggers)))) (delq 'gdb-var-update (gdb-get-pending-triggers))))
...@@ -299,7 +308,7 @@ The following interactive lisp functions help control operation : ...@@ -299,7 +308,7 @@ The following interactive lisp functions help control operation :
(var (assoc expr gdb-var-list)) (var (assoc expr gdb-var-list))
(varnum (cadr var))) (varnum (cadr var)))
(gdb-enqueue-input (gdb-enqueue-input
(list (concat "server interpreter mi \"-var-delete " varnum "\"\n") (list (concat "server interpreter mi \"-var-delete " varnum "\"\n")
'ignore)) 'ignore))
(setq gdb-var-list (delq var gdb-var-list)) (setq gdb-var-list (delq var gdb-var-list))
(dolist (varchild gdb-var-list) (dolist (varchild gdb-var-list)
...@@ -307,6 +316,23 @@ The following interactive lisp functions help control operation : ...@@ -307,6 +316,23 @@ The following interactive lisp functions help control operation :
(setq gdb-var-list (delq varchild gdb-var-list))))) (setq gdb-var-list (delq varchild gdb-var-list)))))
(setq gdb-var-changed t))) (setq gdb-var-changed t)))
(defun gdb-edit-value (text token indent)
"Assign a value to a variable displayed in the speedbar"
(interactive)
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (cadr var)) (value))
(setq value (read-string "New value: "))
(gdb-enqueue-input
(list (concat "server interpreter mi \"-var-assign "
varnum " " value "\"\n")
'ignore))))