comint-get-old-input-default: behavior follows docstring

lisp/comint.el (comint-get-old-input-default): Modify behavior to follow
docstring: if `comint-use-prompt-regexp' is nil, then return the CURRENT LINE,
if point is on an output field.
This commit is contained in:
Dima Kogan 2016-11-25 13:15:12 -08:00
parent 68e8f4bb4a
commit 3c941b9000

View file

@ -2239,10 +2239,7 @@ the current line with any initial string matching the regexp
(null (get-char-property (setq bof (field-beginning)) 'field)))
(field-string-no-properties bof)
(comint-bol)
(buffer-substring-no-properties (point)
(if comint-use-prompt-regexp
(line-end-position)
(field-end))))))
(buffer-substring-no-properties (point) (line-end-position)))))
(defun comint-copy-old-input ()
"Insert after prompt old input at point as new input to be edited.