mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
(comint-replace-by-expanded-history): Expand only at prompt.
Pass SILENT flag to comint-replace-by-expanded-history-before-point.
This commit is contained in:
parent
196a790385
commit
8d3d2a0cdd
1 changed files with 5 additions and 3 deletions
|
|
@ -854,15 +854,17 @@ 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)))
|
||||
(string-match "[!^]" (funcall comint-get-old-input))
|
||||
(save-excursion (beginning-of-line)
|
||||
(looking-at comint-prompt-regexp)))
|
||||
;; Looks like there might be history references in the command.
|
||||
(let ((previous-modified-tick (buffer-modified-tick)))
|
||||
(message "Expanding history references...")
|
||||
(comint-replace-by-expanded-history-before-point)
|
||||
(comint-replace-by-expanded-history-before-point silent)
|
||||
(/= previous-modified-tick (buffer-modified-tick)))))
|
||||
|
||||
|
||||
(defun comint-replace-by-expanded-history-before-point ()
|
||||
(defun comint-replace-by-expanded-history-before-point (silent)
|
||||
"Expand directory stack reference before point.
|
||||
See `comint-replace-by-expanded-history'. Returns t if successful."
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue