diff options
| author | Dima Kogan | 2016-12-25 11:35:26 -0800 |
|---|---|---|
| committer | Dima Kogan | 2018-06-17 22:58:46 -0700 |
| commit | 74f377b3955198d6f66afa34bbbf6d004aad134a (patch) | |
| tree | 20b81a85d4f8d25113618157795c6b600ca08e54 /etc | |
| parent | 2d1b774dbc31b753527321ae1e441d5e424a5265 (diff) | |
| download | emacs-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/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
| @@ -190,6 +190,16 @@ navigation and editing of large files. | |||
| 190 | It now treats the optional 2nd argument to mean that the URL should be | 190 | It now treats the optional 2nd argument to mean that the URL should be |
| 191 | shown in the currently selected window. | 191 | shown in the currently selected window. |
| 192 | 192 | ||
| 193 | ** Comint | ||
| 194 | *** 'comint-insert-previous-argument' knows how to count args | ||
| 195 | from the beginning or from the end. This is useful because | ||
| 196 | 'comint-insert-previous-argument' exists to emulate M-. in bash and zsh; and | ||
| 197 | bash counts from the start while zsh counts from the end. | ||
| 198 | |||
| 199 | *** New variable 'comint-insert-previous-argument-from-end' controls whether | ||
| 200 | args passed to 'comint-insert-previous-argument' count from the beginning or | ||
| 201 | from the end | ||
| 202 | |||
| 193 | ** Flymake | 203 | ** Flymake |
| 194 | 204 | ||
| 195 | +++ | 205 | +++ |