Przeglądaj źródła

Add delete arg

master
10sr 7 lat temu
rodzic
commit
c1bac66add
Podpisane przez: 10sr ID klucza GPG: 7BEC428194130EB2
1 zmienionych plików z 6 dodań i 3 usunięć
  1. +6
    -3
      emacs.el

+ 6
- 3
emacs.el Wyświetl plik

@@ -1771,14 +1771,17 @@ Used by preview buffer and may defferent from awk-preview--point-end.")
nil nil
"Awk preview window configuration.") "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 (with-current-buffer buf
(let ((status (apply 'call-process-region (let ((status (apply 'call-process-region
beg beg
end end
awk-preview-program awk-preview-program
nil
delete
output output
nil nil
`(,@awk-preview-switches "-f" ,progfile)))) `(,@awk-preview-switches "-f" ,progfile))))


Ładowanie…
Anuluj
Zapisz