aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/comint.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el36
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 1b9d8df738f..eb5c9f28a4e 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1047,12 +1047,12 @@ Moves relative to `comint-input-ring-index'."
1047(defun comint-previous-input (arg) 1047(defun comint-previous-input (arg)
1048 "Cycle backwards through input history, saving input." 1048 "Cycle backwards through input history, saving input."
1049 (interactive "*p") 1049 (interactive "*p")
1050 (if (and comint-input-ring-index 1050 (if (and comint-input-ring-index
1051 (or ;; leaving the "end" of the ring 1051 (or ;; leaving the "end" of the ring
1052 (and (< arg 0) ; going down 1052 (and (< arg 0) ; going down
1053 (eq comint-input-ring-index 0)) 1053 (eq comint-input-ring-index 0))
1054 (and (> arg 0) ; going up 1054 (and (> arg 0) ; going up
1055 (eq comint-input-ring-index 1055 (eq comint-input-ring-index
1056 (1- (ring-length comint-input-ring))))) 1056 (1- (ring-length comint-input-ring)))))
1057 comint-stored-incomplete-input) 1057 comint-stored-incomplete-input)
1058 (comint-restore-input) 1058 (comint-restore-input)
@@ -1510,23 +1510,23 @@ Similarly for Soar, Scheme, etc."
1510 (concat input "\n"))) 1510 (concat input "\n")))
1511 1511
1512 (let ((beg (marker-position pmark)) 1512 (let ((beg (marker-position pmark))
1513 (end (if no-newline (point) (1- (point)))) 1513 (end (if no-newline (point) (1- (point))))
1514 (inhibit-modification-hooks t)) 1514 (inhibit-modification-hooks t))
1515 (when (> end beg) 1515 (when (> end beg)
1516 ;; Set text-properties for the input field 1516 (add-text-properties beg end
1517 (add-text-properties 1517 '(front-sticky t
1518 beg end 1518 font-lock-face comint-highlight-input))
1519 '(front-sticky t
1520 font-lock-face comint-highlight-input
1521 mouse-face highlight
1522 help-echo "mouse-2: insert after prompt as new input"))
1523 (unless comint-use-prompt-regexp 1519 (unless comint-use-prompt-regexp
1524 ;; Give old user input a field property of `input', to 1520 ;; Give old user input a field property of `input', to
1525 ;; distinguish it from both process output and unsent 1521 ;; distinguish it from both process output and unsent
1526 ;; input. The terminating newline is put into a special 1522 ;; input. The terminating newline is put into a special
1527 ;; `boundary' field to make cursor movement between input 1523 ;; `boundary' field to make cursor movement between input
1528 ;; and output fields smoother. 1524 ;; and output fields smoother.
1529 (put-text-property beg end 'field 'input))) 1525 (add-text-properties
1526 beg end
1527 '(mouse-face highlight
1528 help-echo "mouse-2: insert after prompt as new input"
1529 field input))))
1530 (unless (or no-newline comint-use-prompt-regexp) 1530 (unless (or no-newline comint-use-prompt-regexp)
1531 ;; Cover the terminating newline 1531 ;; Cover the terminating newline
1532 (add-text-properties end (1+ end) 1532 (add-text-properties end (1+ end)
@@ -2357,19 +2357,19 @@ preceding newline is removed."
2357 (when (eq (get-text-property (1- pt) 'read-only) 'fence) 2357 (when (eq (get-text-property (1- pt) 'read-only) 'fence)
2358 (remove-list-of-text-properties (1- pt) pt '(read-only))))))) 2358 (remove-list-of-text-properties (1- pt) pt '(read-only)))))))
2359 2359
2360(defun comint-kill-whole-line (&optional arg) 2360(defun comint-kill-whole-line (&optional count)
2361 "Kill current line, ignoring read-only and field properties. 2361 "Kill current line, ignoring read-only and field properties.
2362With prefix arg, kill that many lines starting from the current line. 2362With prefix arg COUNT, kill that many lines starting from the current line.
2363If arg is negative, kill backward. Also kill the preceding newline, 2363If COUNT is negative, kill backward. Also kill the preceding newline,
2364instead of the trailing one. \(This is meant to make \\[repeat] work well 2364instead of the trailing one. \(This is meant to make \\[repeat] work well
2365with negative arguments.) 2365with negative arguments.)
2366If arg is zero, kill current line but exclude the trailing newline. 2366If COUNT is zero, kill current line but exclude the trailing newline.
2367The read-only status of newlines is updated with `comint-update-fence', 2367The read-only status of newlines is updated with `comint-update-fence',
2368if necessary." 2368if necessary."
2369 (interactive "p") 2369 (interactive "p")
2370 (let ((inhibit-read-only t) (inhibit-field-text-motion t)) 2370 (let ((inhibit-read-only t) (inhibit-field-text-motion t))
2371 (kill-whole-line arg) 2371 (kill-whole-line count)
2372 (when (>= arg 0) (comint-update-fence)))) 2372 (when (>= count 0) (comint-update-fence))))
2373 2373
2374(defun comint-kill-region (beg end &optional yank-handler) 2374(defun comint-kill-region (beg end &optional yank-handler)
2375 "Like `kill-region', but ignores read-only properties, if safe. 2375 "Like `kill-region', but ignores read-only properties, if safe.