+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
2000-08-28 Peter Breton <pbreton@ne.mediaone.net>
* locate.el (locate): Cleaned up locate command's interactive prompting
- Thanks to François_Pinard <pinard@iro.umontreal.ca> for suggestions.
+ Thanks to Fran\e,Ag\e(Bois_Pinard <pinard@iro.umontreal.ca> for suggestions.
* filecache.el (file-cache-case-fold-search): New variable
(file-cache-assoc-function): New variable
2000-05-07 Dave Love <fx@gnu.org>
- * time.el: Small doc fixes from Pavel Janík ml.
+ * time.el: Small doc fixes from Pavel Jan\e,Am\e(Bk ml.
2000-05-05 Dave Love <fx@gnu.org>
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)
(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.