chiark / gitweb /
el/dot-emacs.el: Help `gud-find-expr' to not crash if prompts are read-only.
[profile] / el / dot-emacs.el
index a574f713feb0aaac3dbad2877684574292b886c8..1fc526349355ab16d15cc332ce72d8f777c56423 100644 (file)
@@ -5255,6 +5255,11 @@ (dolist (hook '(m4-mode-hook autoconf-mode-hook autotest-mode-hook))
 (progn
   (add-hook 'makefile-mode-hook 'mdw-misc-mode-config t))
 
+;; nroff/troff.
+
+(progn
+  (add-hook 'nroff-mode-hook 'mdw-misc-mode-config t))
+
 ;;;--------------------------------------------------------------------------
 ;;; Text mode.
 
@@ -5502,6 +5507,11 @@ (defadvice gdb-set-window-buffer
   "Don't make windows dedicated.  Seriously."
   (set-window-dedicated-p (or window (selected-window)) nil))
 
+(defadvice gud-find-expr
+    (around mdw-inhibit-read-only (&rest args) compile activate)
+  "Inhibit errors caused by my setting of `comint-prompt-read-only'."
+  (let ((inhibit-read-only t)) ad-do-it))
+
 ;;;--------------------------------------------------------------------------
 ;;; SQL stuff.