aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorDima Kogan2016-12-25 11:35:26 -0800
committerDima Kogan2018-06-17 22:58:46 -0700
commit74f377b3955198d6f66afa34bbbf6d004aad134a (patch)
tree20b81a85d4f8d25113618157795c6b600ca08e54 /etc
parent2d1b774dbc31b753527321ae1e441d5e424a5265 (diff)
downloademacs-74f377b3955198d6f66afa34bbbf6d004aad134a.tar.gz
emacs-74f377b3955198d6f66afa34bbbf6d004aad134a.zip
comint-insert-previous-argument counts args from start or from end
This function is invoked in shell-mode by the user, and is meant to emulate what M-. does in zsh and bash: it inserts an argument from a previous command. Without a prefix argument, it inserts the last arg from the previous command; with an argument INDEX, it inserts the INDEX-th argument. bash counts from the start, while zsh counts from the end. This patch adds a variable `comint-insert-previous-argument-from-end' that emulates the zsh behavior if non-nil. * lisp/comint.el (comint-arguments): can take in negative arguments to count from the end, same as indexing in python. (comint-insert-previous-argument): if comint-insert-previous-argument-from-end is non-nil, INDEX counts arguments from the end; if nil, from the beginning (Bug#25271) * etc/NEWS: Document this.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 5a3a27ee4af..8bf1da470fc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -190,6 +190,16 @@ navigation and editing of large files.
190It now treats the optional 2nd argument to mean that the URL should be 190It now treats the optional 2nd argument to mean that the URL should be
191shown in the currently selected window. 191shown in the currently selected window.
192 192
193** Comint
194*** 'comint-insert-previous-argument' knows how to count args
195from the beginning or from the end. This is useful because
196'comint-insert-previous-argument' exists to emulate M-. in bash and zsh; and
197bash counts from the start while zsh counts from the end.
198
199*** New variable 'comint-insert-previous-argument-from-end' controls whether
200args passed to 'comint-insert-previous-argument' count from the beginning or
201from the end
202
193** Flymake 203** Flymake
194 204
195+++ 205+++