From: Mark Wooding Date: Thu, 27 Jan 2022 23:24:34 +0000 (+0000) Subject: el/dot-emacs.el: Sink the `comint' stuff to be with shell-mode hacking. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/539dce4c2422e7d4c720fad79f2a6ee2038257d1 el/dot-emacs.el: Sink the `comint' stuff to be with shell-mode hacking. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 67a5d1e..21933de 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -1096,21 +1096,6 @@ tramp, which seems to get itself into a twist." (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 @@ align the other subforms beneath it. Otherwise, indent them (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-_"))