]> git.eshelyaron.com Git - emacs.git/commit
Allow not erase output buffer in shell commands
authorTino Calancha <tino.calancha@gmail.com>
Tue, 16 Aug 2016 09:18:44 +0000 (18:18 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Tue, 16 Aug 2016 09:18:44 +0000 (18:18 +0900)
commitc7119916dc958eeb8e6e2ef50d4a9f262db5be32
tree78e4ed4d9924bc535b7e4af149218f73e873c348
parent5783984787998f8222d66338efa61f0741466a54
Allow not erase output buffer in shell commands

* lisp/simple.el (shell-command-not-erase-buffer): New option to allow
not erasing the output buffer between shell commands.  Defaults to nil.
(shell-command-on-region): Use it.
(shell-command--save-pos-or-erase): New defun; store a buffer position
if 'shell-command-not-erase-buffer' is non-nil; otherwise
erase the output buffer of the shell command.
(shell-command, shell-command-on-region): Use it.
(shell-command--set-point-after-cmd): New defun;
if 'shell-command-not-erase-buffer' is non-nil, set point
in the output buffer to the position in 'shell-command-saved-pos'.
(shell-command-sentinel, shell-command-on-region): Use it.
* doc/emacs/misc.texi (shell-command-not-erase-buffer):
Document this feature in the manual.
; * etc/NEWS: Add entry for this new feature.
See discussion on:
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00610.html
doc/emacs/misc.texi
etc/NEWS
lisp/simple.el