diff options
| author | Glenn Morris | 2010-12-07 21:00:12 -0800 |
|---|---|---|
| committer | Glenn Morris | 2010-12-07 21:00:12 -0800 |
| commit | ac8331a7bfdaeb3e96d9e79ff78e0ae823192c19 (patch) | |
| tree | 9159f450b6a6aaec9f110b123946c3f0dbb3dc75 /lisp | |
| parent | 5fe9ebd14e9f41704c0bedb9ea0c6ad4e4501995 (diff) | |
| download | emacs-ac8331a7bfdaeb3e96d9e79ff78e0ae823192c19.tar.gz emacs-ac8331a7bfdaeb3e96d9e79ff78e0ae823192c19.zip | |
In gdb, try to init comint history from gdbhist.
* lisp/progmodes/gdb-mi.el (gdb): Try to initialize comint input history
from gdb's history file. (Bug#7575)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef07e777022..a098dae546f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-12-08 Glenn Morris <rgm@gnu.org> | 1 | 2010-12-08 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/gdb-mi.el (gdb): Try to initialize comint input history | ||
| 4 | from gdb's history file. (Bug#7575) | ||
| 5 | |||
| 3 | * mail/emacsbug.el (report-emacs-bug): | 6 | * mail/emacsbug.el (report-emacs-bug): |
| 4 | Try to handle some other mail clients. | 7 | Try to handle some other mail clients. |
| 5 | 8 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 3019f8bbf04..3e80269d09c 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -647,7 +647,22 @@ detailed description of this mode. | |||
| 647 | (gud-common-init command-line nil 'gud-gdbmi-marker-filter) | 647 | (gud-common-init command-line nil 'gud-gdbmi-marker-filter) |
| 648 | (set (make-local-variable 'gud-minor-mode) 'gdbmi) | 648 | (set (make-local-variable 'gud-minor-mode) 'gdbmi) |
| 649 | (setq comint-input-sender 'gdb-send) | 649 | (setq comint-input-sender 'gdb-send) |
| 650 | 650 | (when (ring-empty-p comint-input-ring) ; cf shell-mode | |
| 651 | (let (hfile) | ||
| 652 | (when (catch 'done | ||
| 653 | (dolist (file '(".gdbinit" "~/.gdbinit")) | ||
| 654 | (if (file-readable-p (setq file (expand-file-name file))) | ||
| 655 | (with-temp-buffer | ||
| 656 | (insert-file-contents file) | ||
| 657 | (and (re-search-forward | ||
| 658 | "^ *set history filename *\\(.*\\)" nil t) | ||
| 659 | (file-readable-p | ||
| 660 | (setq hfile (expand-file-name | ||
| 661 | (match-string 1) | ||
| 662 | (file-name-directory file)))) | ||
| 663 | (throw 'done t)))))) | ||
| 664 | (set (make-local-variable 'comint-input-ring-file-name) hfile) | ||
| 665 | (comint-read-input-ring t)))) | ||
| 651 | (gud-def gud-tbreak "tbreak %f:%l" "\C-t" | 666 | (gud-def gud-tbreak "tbreak %f:%l" "\C-t" |
| 652 | "Set temporary breakpoint at current line.") | 667 | "Set temporary breakpoint at current line.") |
| 653 | (gud-def gud-jump | 668 | (gud-def gud-jump |
| @@ -4191,5 +4206,4 @@ BUFFER nil or omitted means use the current buffer." | |||
| 4191 | 4206 | ||
| 4192 | (provide 'gdb-mi) | 4207 | (provide 'gdb-mi) |
| 4193 | 4208 | ||
| 4194 | ;; arch-tag: 1b41ea2b-f364-4cec-8f35-e02e4fe01912 | ||
| 4195 | ;;; gdb-mi.el ends here | 4209 | ;;; gdb-mi.el ends here |