chiark / gitweb /
el/dot-emacs.el: Sink the `comint' stuff to be with shell-mode hacking.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jan 2022 23:24:34 +0000 (23:24 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jan 2022 23:24:34 +0000 (23:24 +0000)
el/dot-emacs.el

index 67a5d1e888031386ac8729547859a79e0ddc080d..21933de4e4545aa0ad23aedd75c0b3d9c84f5acd 100644 (file)
@@ -1096,21 +1096,6 @@ (defun mdw-auto-revert ()
   (let ((auto-revert-check-vc-info t))
     (auto-revert-buffers)))
 
-(defun comint-send-and-indent ()
-  (interactive)
-  (comint-send-input)
-  (and mdw-auto-indent
-       (indent-for-tab-command)))
-
-(defadvice comint-line-beginning-position
-    (around mdw-calculate-it-properly () activate compile)
-  "Calculate the actual line start for multi-line input."
-  (if (or comint-use-prompt-regexp
-         (eq (field-at-pos (point)) 'output))
-      ad-do-it
-    (setq ad-return-value
-           (constrain-to-field (line-beginning-position) (point)))))
-
 ;;;--------------------------------------------------------------------------
 ;;; Dired hacking.
 
@@ -4943,6 +4928,21 @@ (defun mdw-term-mode-setup ()
   (auto-fill-mode -1)
   (setq tab-width 8))
 
+(defun comint-send-and-indent ()
+  (interactive)
+  (comint-send-input)
+  (and mdw-auto-indent
+       (indent-for-tab-command)))
+
+(defadvice comint-line-beginning-position
+    (around mdw-calculate-it-properly () activate compile)
+  "Calculate the actual line start for multi-line input."
+  (if (or comint-use-prompt-regexp
+         (eq (field-at-pos (point)) 'output))
+      ad-do-it
+    (setq ad-return-value
+           (constrain-to-field (line-beginning-position) (point)))))
+
 (defun term-send-meta-right () (interactive) (term-send-raw-string "\e\e[C"))
 (defun term-send-meta-left  () (interactive) (term-send-raw-string "\e\e[D"))
 (defun term-send-ctrl-uscore () (interactive) (term-send-raw-string "\C-_"))