]> git.eshelyaron.com Git - emacs.git/commitdiff
comint-get-old-input-default: behavior follows docstring
authorDima Kogan <dima@secretsauce.net>
Fri, 25 Nov 2016 21:15:12 +0000 (13:15 -0800)
committerDima Kogan <dima@secretsauce.net>
Tue, 31 Jan 2017 05:04:11 +0000 (21:04 -0800)
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.

lisp/comint.el

index 830f4ca88f9c9d366286022916bfaef5133c8044..b23f72ed61828271502d9244c45ac75cca328d4f 100644 (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.