my-comint-send-string
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 02 Aug 2011 17:50:42 +0300
changeset 672 ec015b06e121
parent 670 d10f2e70ff5e
child 673 3f9a497c4ff7
my-comint-send-string
.emacs-my
--- a/.emacs-my	Tue Jul 19 23:14:10 2011 +0300
+++ b/.emacs-my	Tue Aug 02 17:50:42 2011 +0300
@@ -1281,6 +1281,18 @@
        )
      ))
 
+(defvar my-comint-send-hist-list nil
+  "History list for `my-comint-send-string'."
+  )
+(defun my-comint-send-string (string)
+  "Send string to comint buffers. Useful for *compilation* read-only buffer."
+  (interactive
+   (list (read-input "Type string: " nil 'my-comint-send-hist-list))
+   )
+  (comint-send-string (get-buffer-process (current-buffer)) string)
+  )
+(define-key compilation-mode-map [C-return] 'my-comint-send-string)
+
 ;;; ----------------------------------------------------------------
 (message "TAGS, etags, ctags, GNU GLOBAL")