[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102608: In gdb, try to init comint h
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102608: In gdb, try to init comint history from gdbhist. |
Date: |
Tue, 07 Dec 2010 21:00:12 -0800 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102608
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2010-12-07 21:00:12 -0800
message:
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)
modified:
lisp/ChangeLog
lisp/progmodes/gdb-mi.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-12-08 03:47:27 +0000
+++ b/lisp/ChangeLog 2010-12-08 05:00:12 +0000
@@ -1,5 +1,8 @@
2010-12-08 Glenn Morris <address@hidden>
+ * progmodes/gdb-mi.el (gdb): Try to initialize comint input history
+ from gdb's history file. (Bug#7575)
+
* mail/emacsbug.el (report-emacs-bug):
Try to handle some other mail clients.
=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el 2010-09-25 12:04:35 +0000
+++ b/lisp/progmodes/gdb-mi.el 2010-12-08 05:00:12 +0000
@@ -647,7 +647,22 @@
(gud-common-init command-line nil 'gud-gdbmi-marker-filter)
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
(setq comint-input-sender 'gdb-send)
-
+ (when (ring-empty-p comint-input-ring) ; cf shell-mode
+ (let (hfile)
+ (when (catch 'done
+ (dolist (file '(".gdbinit" "~/.gdbinit"))
+ (if (file-readable-p (setq file (expand-file-name file)))
+ (with-temp-buffer
+ (insert-file-contents file)
+ (and (re-search-forward
+ "^ *set history filename *\\(.*\\)" nil t)
+ (file-readable-p
+ (setq hfile (expand-file-name
+ (match-string 1)
+ (file-name-directory file))))
+ (throw 'done t))))))
+ (set (make-local-variable 'comint-input-ring-file-name) hfile)
+ (comint-read-input-ring t))))
(gud-def gud-tbreak "tbreak %f:%l" "\C-t"
"Set temporary breakpoint at current line.")
(gud-def gud-jump
@@ -4191,5 +4206,4 @@
(provide 'gdb-mi)
-;; arch-tag: 1b41ea2b-f364-4cec-8f35-e02e4fe01912
;;; gdb-mi.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102608: In gdb, try to init comint history from gdbhist.,
Glenn Morris <=