From 24ec8ea3b03d84b22b25ebd895abc0e9ef07dfa5 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 22 Feb 2017 10:28:08 +0100 Subject: Emacs: Add process-exit-code command --- tag-emacs/emacs.d/init.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 68f2c7ea..cf71075e 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1234,6 +1234,10 @@ rather useful. (command (read-shell-command "Shell command: " nil nil nil))) (shell-command (replace-regexp-in-string "%" file-buffer command) to-current-buffer))) +(defun process-exit-code (program &rest args) + "Run PROGRAM with ARGS and return the exit code" + (apply 'call-process program nil nil nil args)) + (defun narrow-to-region-indirect (start end) "Restrict editing in this buffer to the current region, indirectly." (interactive "r") -- cgit 1.4.1