diff options
| author | Miles Bader | 2000-10-30 06:22:20 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-30 06:22:20 +0000 |
| commit | 1ec321a75015beea1d3c53cacf97af697f53aac1 (patch) | |
| tree | 1ea775b27b5272825b7b8c2c8fe25ef14ec849b6 /lisp | |
| parent | e62371e929af0d1d53afeebfbfbb7dfb71739da8 (diff) | |
| download | emacs-1ec321a75015beea1d3c53cacf97af697f53aac1.tar.gz emacs-1ec321a75015beea1d3c53cacf97af697f53aac1.zip | |
(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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/comint.el | 15 |
2 files changed, 18 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96748d3a426..3e54c19f1a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-10-30 Miles Bader <miles@lsi.nec.co.jp> | ||
| 2 | |||
| 3 | * comint.el (comint-replace-by-expanded-history): Don't use | ||
| 4 | comint-get-old-input (we're not looking at *old* input). | ||
| 5 | (comint-get-old-input-default): If using fields, signal an error | ||
| 6 | when the point is not in an input field. | ||
| 7 | |||
| 1 | 2000-10-30 Kenichi Handa <handa@etl.go.jp> | 8 | 2000-10-30 Kenichi Handa <handa@etl.go.jp> |
| 2 | 9 | ||
| 3 | * international/mule-conf.el: New charsets mule-unicode-2500-33ff | 10 | * international/mule-conf.el: New charsets mule-unicode-2500-33ff |
| @@ -4798,7 +4805,7 @@ | |||
| 4798 | 2000-08-28 Peter Breton <pbreton@ne.mediaone.net> | 4805 | 2000-08-28 Peter Breton <pbreton@ne.mediaone.net> |
| 4799 | 4806 | ||
| 4800 | * locate.el (locate): Cleaned up locate command's interactive prompting | 4807 | * locate.el (locate): Cleaned up locate command's interactive prompting |
| 4801 | Thanks to François_Pinard <pinard@iro.umontreal.ca> for suggestions. | 4808 | Thanks to Fran,Ag(Bois_Pinard <pinard@iro.umontreal.ca> for suggestions. |
| 4802 | 4809 | ||
| 4803 | * filecache.el (file-cache-case-fold-search): New variable | 4810 | * filecache.el (file-cache-case-fold-search): New variable |
| 4804 | (file-cache-assoc-function): New variable | 4811 | (file-cache-assoc-function): New variable |
| @@ -8729,7 +8736,7 @@ | |||
| 8729 | 8736 | ||
| 8730 | 2000-05-07 Dave Love <fx@gnu.org> | 8737 | 2000-05-07 Dave Love <fx@gnu.org> |
| 8731 | 8738 | ||
| 8732 | * time.el: Small doc fixes from Pavel Janík ml. | 8739 | * time.el: Small doc fixes from Pavel Jan,Am(Bk ml. |
| 8733 | 8740 | ||
| 8734 | 2000-05-05 Dave Love <fx@gnu.org> | 8741 | 2000-05-05 Dave Love <fx@gnu.org> |
| 8735 | 8742 | ||
diff --git a/lisp/comint.el b/lisp/comint.el index 8400530393d..3a02d93ee72 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1106,14 +1106,15 @@ See `comint-magic-space' and `comint-replace-by-expanded-history-before-point'. | |||
| 1106 | Returns t if successful." | 1106 | Returns t if successful." |
| 1107 | (interactive) | 1107 | (interactive) |
| 1108 | (if (and comint-input-autoexpand | 1108 | (if (and comint-input-autoexpand |
| 1109 | (string-match "!\\|^\\^" (funcall comint-get-old-input)) | ||
| 1110 | (if comint-use-prompt-regexp-instead-of-fields | 1109 | (if comint-use-prompt-regexp-instead-of-fields |
| 1111 | ;; Use comint-prompt-regexp | 1110 | ;; Use comint-prompt-regexp |
| 1112 | (save-excursion (beginning-of-line) | 1111 | (save-excursion |
| 1113 | (looking-at comint-prompt-regexp)) | 1112 | (beginning-of-line) |
| 1113 | (looking-at (concat comint-prompt-regexp "!\\|\\^"))) | ||
| 1114 | ;; Use input fields. User input that hasn't been entered | 1114 | ;; Use input fields. User input that hasn't been entered |
| 1115 | ;; yet, at the end of the buffer, has a nil `field' property. | 1115 | ;; yet, at the end of the buffer, has a nil `field' property. |
| 1116 | (null (get-char-property (point) 'field)))) | 1116 | (and (null (get-char-property (point) 'field)) |
| 1117 | (string-match "!\\|^\\^" (field-string))))) | ||
| 1117 | ;; Looks like there might be history references in the command. | 1118 | ;; Looks like there might be history references in the command. |
| 1118 | (let ((previous-modified-tick (buffer-modified-tick))) | 1119 | (let ((previous-modified-tick (buffer-modified-tick))) |
| 1119 | (comint-replace-by-expanded-history-before-point silent start) | 1120 | (comint-replace-by-expanded-history-before-point silent start) |
| @@ -1711,8 +1712,10 @@ value of `comint-use-prompt-regexp-instead-of-fields'." | |||
| 1711 | (end-of-line) | 1712 | (end-of-line) |
| 1712 | (buffer-substring beg (point)))) | 1713 | (buffer-substring beg (point)))) |
| 1713 | ;; Return the contents of the field at the current point. | 1714 | ;; Return the contents of the field at the current point. |
| 1714 | (field-string))) | 1715 | (let ((pos (field-beginning (point)))) |
| 1715 | 1716 | (unless (eq (get-char-property pos 'field) 'input) | |
| 1717 | (error "Point not in input field")) | ||
| 1718 | (field-string pos)))) | ||
| 1716 | 1719 | ||
| 1717 | (defun comint-copy-old-input () | 1720 | (defun comint-copy-old-input () |
| 1718 | "Insert after prompt old input at point as new input to be edited. | 1721 | "Insert after prompt old input at point as new input to be edited. |