diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init/ycp-prog.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-prog.el | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/emacs/.emacs.d/init/ycp-prog.el b/emacs/.emacs.d/init/ycp-prog.el index e2d7451..b1d0634 100644 --- a/emacs/.emacs.d/init/ycp-prog.el +++ b/emacs/.emacs.d/init/ycp-prog.el @@ -81,6 +81,7 @@ (setq gdb-many-windows t) (setq gdb-default-window-configuration-file (locate-user-emacs-file "gdb-window-conf")) + (setq gdb-debuginfod-enable-setting t) (require 'my-prog) (my-keybind global-map "C-c d q" 'my-gdb-quit @@ -114,6 +115,7 @@ (:delay 10) ;; tab-width 8 for ls etc. (add-hook 'shell-mode-hook 'my-set-tab-width-to-8) + (add-hook 'comint-mode-hook 'my-comint-add-write-history-hook) (my-keybind comint-mode-map "C-<return>" #'my-comint-send-input-and-return-prompt) (add-to-list 'my-buffer-create-functions diff --git a/emacs/.emacs.d/lisp/my/my-prog.el b/emacs/.emacs.d/lisp/my/my-prog.el index 9d6a778..900adaf 100644 --- a/emacs/.emacs.d/lisp/my/my-prog.el +++ b/emacs/.emacs.d/lisp/my/my-prog.el @@ -54,6 +54,13 @@ (sleep-for .1) (my-comint-revive)) +(defun my-comint-add-write-history-hook () + "Add `comint-write-input-ring' to `kill-buffer-hook'. + +To use as a hook to comint mode, so that history is updated on +buffer kill." + (add-hook 'kill-buffer-hook 'comint-write-input-ring 0 t)) + (defvar my-comint-revive-commands '((shell-mode . my-shell-revive) (inferior-emacs-lisp-mode . ielm)) @@ -329,12 +336,9 @@ left and the source buffer on the right. (defun my-gdb-quit () (interactive) - (let ((old-window (selected-window))) - (select-window (get-buffer-window gud-comint-buffer)) - (goto-char (point-max)) - (gdb-delchar-or-quit 0) - (my-toggle-lock-current-window-to-buffer) - (when (window-live-p old-window) (select-window old-window)))) + (let ((kill-buffer-query-functions nil)) + (kill-buffer gud-comint-buffer)) + ) (defun my-gdb-frames-add-breakpoint () (interactive) |