aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorKarl Heuer1994-04-19 00:51:24 +0000
committerKarl Heuer1994-04-19 00:51:24 +0000
commit8d3d2a0cddfa96be9fa3f3d9733e6fc1569ea59a (patch)
tree926862dfafd03e20bde633e954a7e8057bd90ebd /lisp/comint.el
parent196a7903859d7f25d927e73119d264bca8049b91 (diff)
downloademacs-8d3d2a0cddfa96be9fa3f3d9733e6fc1569ea59a.tar.gz
emacs-8d3d2a0cddfa96be9fa3f3d9733e6fc1569ea59a.zip
(comint-replace-by-expanded-history): Expand only at prompt.
Pass SILENT flag to comint-replace-by-expanded-history-before-point.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 6c3993d73eb..29e73f13e12 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -854,15 +854,17 @@ See `comint-magic-space' and `comint-replace-by-expanded-history-before-point'.
854Returns t if successful." 854Returns t if successful."
855 (interactive) 855 (interactive)
856 (if (and comint-input-autoexpand 856 (if (and comint-input-autoexpand
857 (string-match "[!^]" (funcall comint-get-old-input))) 857 (string-match "[!^]" (funcall comint-get-old-input))
858 (save-excursion (beginning-of-line)
859 (looking-at comint-prompt-regexp)))
858 ;; Looks like there might be history references in the command. 860 ;; Looks like there might be history references in the command.
859 (let ((previous-modified-tick (buffer-modified-tick))) 861 (let ((previous-modified-tick (buffer-modified-tick)))
860 (message "Expanding history references...") 862 (message "Expanding history references...")
861 (comint-replace-by-expanded-history-before-point) 863 (comint-replace-by-expanded-history-before-point silent)
862 (/= previous-modified-tick (buffer-modified-tick))))) 864 (/= previous-modified-tick (buffer-modified-tick)))))
863 865
864 866
865(defun comint-replace-by-expanded-history-before-point () 867(defun comint-replace-by-expanded-history-before-point (silent)
866 "Expand directory stack reference before point. 868 "Expand directory stack reference before point.
867See `comint-replace-by-expanded-history'. Returns t if successful." 869See `comint-replace-by-expanded-history'. Returns t if successful."
868 (save-excursion 870 (save-excursion