Mercurial > emacs
comparison lisp/progmodes/gdb-ui.el @ 88056:7dc2524306eb
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1021
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 29 Jan 2008 06:54:30 +0000 |
parents | 5d58981e6690 d1a91cfdb94c |
children | fa454b3c5b7b c70e45a7acfd |
comparison
equal
deleted
inserted
replaced
88055:9ea2c2750268 | 88056:7dc2524306eb |
---|---|
433 "Create an alist of #define directives for GUD tooltips." | 433 "Create an alist of #define directives for GUD tooltips." |
434 (let* ((file (buffer-file-name)) | 434 (let* ((file (buffer-file-name)) |
435 (output | 435 (output |
436 (with-output-to-string | 436 (with-output-to-string |
437 (with-current-buffer standard-output | 437 (with-current-buffer standard-output |
438 (call-process shell-file-name | 438 (and file (file-exists-p file) |
439 (if (file-exists-p file) file nil) | 439 (call-process shell-file-name file |
440 (list t nil) nil "-c" | 440 (list t nil) nil "-c" |
441 (concat gdb-cpp-define-alist-program " " | 441 (concat gdb-cpp-define-alist-program " " |
442 gdb-cpp-define-alist-flags))))) | 442 gdb-cpp-define-alist-flags)))))) |
443 (define-list (split-string output "\n" t)) (name)) | 443 (define-list (split-string output "\n" t)) (name)) |
444 (setq gdb-define-alist nil) | 444 (setq gdb-define-alist nil) |
445 (dolist (define define-list) | 445 (dolist (define define-list) |
446 (setq name (nth 1 (split-string define "[( ]"))) | 446 (setq name (nth 1 (split-string define "[( ]"))) |
447 (push (cons name define) gdb-define-alist)))) | 447 (push (cons name define) gdb-define-alist)))) |