aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-08-08 15:52:19 +0200
committerLars Ingebrigtsen2022-08-08 15:53:41 +0200
commitffc81ebc4b5d6cfc827e6a08679da55134f73fb5 (patch)
tree0d285330a12d247433e1e5805ede15a9c5a0b62f /lisp/replace.el
parent498c5d26bb6360eda5c6cedbcf027e2cc67120ff (diff)
downloademacs-ffc81ebc4b5d6cfc827e6a08679da55134f73fb5.tar.gz
emacs-ffc81ebc4b5d6cfc827e6a08679da55134f73fb5.zip
Allow specifying how args are to be stored in `command-history'
* doc/lispref/functions.texi (Declare Form): Document `interactive-args' * lisp/replace.el (replace-string): Store the correct interactive arguments (bug#45607). * lisp/emacs-lisp/byte-run.el (byte-run--set-interactive-args): New function. (defun-declarations-alist): Use it. * src/callint.c (fix_command): Remove the old hack (which now longer works since interactive specs are byte-compiled) and instead rely on `interactive-args'.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index ab9ac17ed9c..cac0edf43ac 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -664,7 +664,10 @@ which will run faster and will not set the mark or print anything.
664\(You may need a more complex loop if FROM-STRING can match the null string 664\(You may need a more complex loop if FROM-STRING can match the null string
665and TO-STRING is also null.)" 665and TO-STRING is also null.)"
666 (declare (interactive-only 666 (declare (interactive-only
667 "use `search-forward' and `replace-match' instead.")) 667 "use `search-forward' and `replace-match' instead.")
668 (interactive-args
669 (start (if (use-region-p) (region-beginning)))
670 (end (if (use-region-p) (region-end)))))
668 (interactive 671 (interactive
669 (let ((common 672 (let ((common
670 (query-replace-read-args 673 (query-replace-read-args