Mercurial > emacs
comparison lisp/simple.el @ 16316:50be5f6cb5e6
(shell-command-to-string): Make the buffer current
since output goes in current buffer. Use shell-command-switch.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 24 Sep 1996 23:54:08 +0000 |
parents | 20690a1ec100 |
children | 87f15c601f5a |
comparison
equal
deleted
inserted
replaced
16315:cca1c6324cab | 16316:50be5f6cb5e6 |
---|---|
943 (display-buffer buffer)))))))) | 943 (display-buffer buffer)))))))) |
944 | 944 |
945 (defun shell-command-to-string (command) | 945 (defun shell-command-to-string (command) |
946 "Execute shell command COMMAND and return its output as a string." | 946 "Execute shell command COMMAND and return its output as a string." |
947 (with-output-to-string | 947 (with-output-to-string |
948 (call-process shell-file-name nil t nil "-c" command))) | 948 (with-current-buffer |
949 standard-output | |
950 (call-process shell-file-name nil t nil shell-command-switch command)))) | |
949 | 951 |
950 (defconst universal-argument-map | 952 (defconst universal-argument-map |
951 (let ((map (make-sparse-keymap))) | 953 (let ((map (make-sparse-keymap))) |
952 (define-key map [t] 'universal-argument-other-key) | 954 (define-key map [t] 'universal-argument-other-key) |
953 (define-key map (vector meta-prefix-char t) 'universal-argument-other-key) | 955 (define-key map (vector meta-prefix-char t) 'universal-argument-other-key) |