summaryrefslogtreecommitdiff
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'."
(defun comint-previous-input (arg)
"Cycle backwards through input history, saving input."
(interactive "*p")
- (if (and comint-input-ring-index
+ (if (and comint-input-ring-index
(or ;; leaving the "end" of the ring
(and (< arg 0) ; going down
(eq comint-input-ring-index 0))
(and (> arg 0) ; going up
- (eq comint-input-ring-index
+ (eq comint-input-ring-index
(1- (ring-length comint-input-ring)))))
comint-stored-incomplete-input)
(comint-restore-input)
@@ -1510,23 +1510,23 @@ Similarly for Soar, Scheme, etc."
(concat input "\n")))
(let ((beg (marker-position pmark))
- (end (if no-newline (point) (1- (point))))
- (inhibit-modification-hooks t))
+ (end (if no-newline (point) (1- (point))))
+ (inhibit-modification-hooks t))
(when (> end beg)
- ;; Set text-properties for the input field
- (add-text-properties
- beg end
- '(front-sticky t
- font-lock-face comint-highlight-input
- mouse-face highlight
- help-echo "mouse-2: insert after prompt as new input"))
+ (add-text-properties beg end
+ '(front-sticky t
+ font-lock-face comint-highlight-input))
(unless comint-use-prompt-regexp
;; Give old user input a field property of `input', to
;; distinguish it from both process output and unsent
;; input. The terminating newline is put into a special
;; `boundary' field to make cursor movement between input
;; and output fields smoother.
- (put-text-property beg end 'field 'input)))
+ (add-text-properties
+ beg end
+ '(mouse-face highlight
+ help-echo "mouse-2: insert after prompt as new input"
+ field input))))
(unless (or no-newline comint-use-prompt-regexp)
;; Cover the terminating newline
(add-text-properties end (1+ end)
@@ -2357,19 +2357,19 @@ preceding newline is removed."
(when (eq (get-text-property (1- pt) 'read-only) 'fence)
(remove-list-of-text-properties (1- pt) pt '(read-only)))))))
-(defun comint-kill-whole-line (&optional arg)
+(defun comint-kill-whole-line (&optional count)
"Kill current line, ignoring read-only and field properties.
-With prefix arg, kill that many lines starting from the current line.
-If arg is negative, kill backward. Also kill the preceding newline,
+With prefix arg COUNT, kill that many lines starting from the current line.
+If COUNT is negative, kill backward. Also kill the preceding newline,
instead of the trailing one. \(This is meant to make \\[repeat] work well
with negative arguments.)
-If arg is zero, kill current line but exclude the trailing newline.
+If COUNT is zero, kill current line but exclude the trailing newline.
The read-only status of newlines is updated with `comint-update-fence',
if necessary."
(interactive "p")
(let ((inhibit-read-only t) (inhibit-field-text-motion t))
- (kill-whole-line arg)
- (when (>= arg 0) (comint-update-fence))))
+ (kill-whole-line count)
+ (when (>= count 0) (comint-update-fence))))
(defun comint-kill-region (beg end &optional yank-handler)
"Like `kill-region', but ignores read-only properties, if safe.