functions: Overhaul call-process-to-string
parent
17af8f4373
commit
853ef85b3f
|
@ -25,12 +25,16 @@
|
|||
;; (interactive "r")
|
||||
;; ...
|
||||
|
||||
;; TODO: Use `process-lines' instead.
|
||||
(defun ambrevar/call-process-to-string (program &rest args)
|
||||
"Call PROGRAM with ARGS and return output."
|
||||
"Call PROGRAM with ARGS and return output.
|
||||
See also `process-lines'."
|
||||
;; Or equivalently:
|
||||
;; (with-temp-buffer
|
||||
;; (apply 'process-file program nil t nil args)
|
||||
;; (buffer-string))
|
||||
(with-output-to-string
|
||||
(with-current-buffer standard-output
|
||||
(apply 'call-process program nil t nil args))))
|
||||
(apply 'process-file program nil t nil args))))
|
||||
|
||||
(defun ambrevar/define-keys (map key def &rest bindings)
|
||||
"Like `define-key' but allow for defining several bindings at once.
|
||||
|
|
Loading…
Reference in New Issue