From c1bac66addc00453858eefc8545bdb2f8fdb5323 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Fri, 5 Oct 2018 18:53:21 +0900 Subject: [PATCH] Add delete arg --- emacs.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 4aff436..5db4a73 100644 --- a/emacs.el +++ b/emacs.el @@ -1771,14 +1771,17 @@ Used by preview buffer and may defferent from awk-preview--point-end.") nil "Awk preview window configuration.") -(defun awk-preview--invoke-awk (buf beg end progfile output) - "Execute PROFILE awk process with BEG and END input and output to OUTPUT buffer." +(defun awk-preview--invoke-awk (buf beg end progfile output &optional delete) + "Execute PROGFILE awk process with BEG and END input and output to OUTPUT buffer. + +When OUTPUT is t the result will be output to BUF. +Delete the text between BEG and END when DELETE is non-nil." (with-current-buffer buf (let ((status (apply 'call-process-region beg end awk-preview-program - nil + delete output nil `(,@awk-preview-switches "-f" ,progfile))))