Commit 1ec321a7 authored by Miles Bader's avatar Miles Bader
Browse files

(comint-replace-by-expanded-history): Don't use

comint-get-old-input (we're not looking at *old* input).
(comint-get-old-input-default): If using fields, signal an error
when the point is not in an input field.
parent e62371e9
2000-10-30 Miles Bader <miles@lsi.nec.co.jp>
* comint.el (comint-replace-by-expanded-history): Don't use
comint-get-old-input (we're not looking at *old* input).
(comint-get-old-input-default): If using fields, signal an error
when the point is not in an input field.
2000-10-30 Kenichi Handa <handa@etl.go.jp>
* international/mule-conf.el: New charsets mule-unicode-2500-33ff
......@@ -4798,7 +4805,7 @@
2000-08-28 Peter Breton <pbreton@ne.mediaone.net>
* locate.el (locate): Cleaned up locate command's interactive prompting
Thanks to Franois_Pinard <pinard@iro.umontreal.ca> for suggestions.
Thanks to Fran,Ag(Bois_Pinard <pinard@iro.umontreal.ca> for suggestions.
* filecache.el (file-cache-case-fold-search): New variable
(file-cache-assoc-function): New variable
......@@ -8729,7 +8736,7 @@
2000-05-07 Dave Love <fx@gnu.org>
* time.el: Small doc fixes from Pavel Jank ml.
* time.el: Small doc fixes from Pavel Jan,Am(Bk ml.
2000-05-05 Dave Love <fx@gnu.org>
......
......@@ -1106,14 +1106,15 @@ See `comint-magic-space' and `comint-replace-by-expanded-history-before-point'.
Returns t if successful."
(interactive)
(if (and comint-input-autoexpand
(string-match "!\\|^\\^" (funcall comint-get-old-input))
(if comint-use-prompt-regexp-instead-of-fields
;; Use comint-prompt-regexp
(save-excursion (beginning-of-line)
(looking-at comint-prompt-regexp))
(save-excursion
(beginning-of-line)
(looking-at (concat comint-prompt-regexp "!\\|\\^")))
;; Use input fields. User input that hasn't been entered
;; yet, at the end of the buffer, has a nil `field' property.
(null (get-char-property (point) 'field))))
(and (null (get-char-property (point) 'field))
(string-match "!\\|^\\^" (field-string)))))
;; Looks like there might be history references in the command.
(let ((previous-modified-tick (buffer-modified-tick)))
(comint-replace-by-expanded-history-before-point silent start)
......@@ -1711,8 +1712,10 @@ value of `comint-use-prompt-regexp-instead-of-fields'."
(end-of-line)
(buffer-substring beg (point))))
;; Return the contents of the field at the current point.
(field-string)))
(let ((pos (field-beginning (point))))
(unless (eq (get-char-property pos 'field) 'input)
(error "Point not in input field"))
(field-string pos))))
(defun comint-copy-old-input ()
"Insert after prompt old input at point as new input to be edited.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment