aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/comint.el27
1 files changed, 17 insertions, 10 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 849345ef205..7a2b2fbd0ea 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -591,7 +591,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
591 ;; Some programs that use terminfo get very confused 591 ;; Some programs that use terminfo get very confused
592 ;; if TERM is not a valid terminal type. 592 ;; if TERM is not a valid terminal type.
593 (if (and (boundp 'system-uses-terminfo) system-uses-terminfo) 593 (if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
594 (list "TERM=dumb" 594 (list "TERM=dumb" "TERMCAP="
595 (format "COLUMNS=%d" (frame-width))) 595 (format "COLUMNS=%d" (frame-width)))
596 (list "TERM=emacs" 596 (list "TERM=emacs"
597 (format "TERMCAP=emacs:co#%d:tc=unknown:" (frame-width)))) 597 (format "TERMCAP=emacs:co#%d:tc=unknown:" (frame-width))))
@@ -1449,12 +1449,17 @@ Then send it to the process running in the current buffer.
1449The string is sent using `comint-input-sender'. 1449The string is sent using `comint-input-sender'.
1450Security bug: your string can still be temporarily recovered with 1450Security bug: your string can still be temporarily recovered with
1451\\[view-lossage]." 1451\\[view-lossage]."
1452 (interactive "P") ; Defeat snooping via C-x ESC ESC 1452 (interactive "P") ; Defeat snooping via C-x ESC ESC
1453 (let ((proc (get-buffer-process (current-buffer)))) 1453 (let ((proc (get-buffer-process (current-buffer))))
1454 (if (not proc) 1454 (cond ((not proc)
1455 (error "Current buffer has no process") 1455 (error "Current buffer has no process"))
1456 (funcall comint-input-sender proc 1456 ((stringp str)
1457 (if (stringp str) str (comint-read-noecho "Non-echoed text: " t)))))) 1457 (funcall comint-input-sender proc str))
1458 (t
1459 (let ((str (comint-read-noecho "Non-echoed text: " t)))
1460 (if (stringp str)
1461 (send-invisible str)
1462 (message "Warning: text will be echoed")))))))
1458 1463
1459(defun comint-watch-for-password-prompt (string) 1464(defun comint-watch-for-password-prompt (string)
1460 "Prompt in the minibuffer for password and send without echoing. 1465 "Prompt in the minibuffer for password and send without echoing.
@@ -1540,11 +1545,13 @@ Useful if you accidentally suspend the top-level process."
1540 (kill-region pmark (point))))) 1545 (kill-region pmark (point)))))
1541 1546
1542(defun comint-delchar-or-maybe-eof (arg) 1547(defun comint-delchar-or-maybe-eof (arg)
1543 "Delete ARG characters forward, or (if at eob) send an EOF to subprocess." 1548 "Delete ARG characters forward or send an EOF to subprocess.
1549Sends an EOF only if point is at the end of the buffer and there is no input."
1544 (interactive "p") 1550 (interactive "p")
1545 (if (eobp) 1551 (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
1546 (process-send-eof) 1552 (if (and (eobp) (= (point) (marker-position pmark)))
1547 (delete-char arg))) 1553 (process-send-eof)
1554 (delete-char arg))))
1548 1555
1549(defun comint-send-eof () 1556(defun comint-send-eof ()
1550 "Send an EOF to the current buffer's process." 1557 "Send an EOF to the current buffer's process."