aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-10-20 18:44:11 -0400
committerStefan Monnier2014-10-20 18:44:11 -0400
commit24421aa68b1eb23d6dacfd647480e2c21ac6d343 (patch)
tree0a86b37b3959b838e946ae5de8922102a30d0a5d
parent531f56f59b2ae2fc79377662bd041b85b2563268 (diff)
downloademacs-24421aa68b1eb23d6dacfd647480e2c21ac6d343.tar.gz
emacs-24421aa68b1eb23d6dacfd647480e2c21ac6d343.zip
* lisp/subr.el (call-process-shell-command, process-file-shell-command):
Make the `args' obsolete. (start-process-shell-command, start-file-process-shell-command): Use `declare'. Fixes: debbugs:18409
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/dired.el4
-rw-r--r--lisp/subr.el21
4 files changed, 27 insertions, 11 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 31baeb33516..2e7c0983d12 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,6 +31,10 @@ These emulations of old editors are believed to be no longer relevant
31 - contact emacs-devel@gnu.org if you disagree. 31 - contact emacs-devel@gnu.org if you disagree.
32 32
33** cc-compat.el is marked as obsolete. 33** cc-compat.el is marked as obsolete.
34
35** call-process-shell-command and process-file-shell-command
36don't take "&rest args" any more.
37
34 38
35* Installation Changes in Emacs 24.4 39* Installation Changes in Emacs 24.4
36 40
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d3c0ab97ec4..3a6a304d724 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,11 @@
12014-03-20 Juanma Barranquero <lekktu@gmail.com> 12014-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * subr.el (call-process-shell-command, process-file-shell-command):
4 Make the `args' obsolete (bug#18409).
5 (start-process-shell-command, start-file-process-shell-command):
6 Use `declare'.
7
82014-10-20 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * skeleton.el (skeleton-autowrap): Mark as obsolete. Doc fix. 10 * skeleton.el (skeleton-autowrap): Mark as obsolete. Doc fix.
4 11
diff --git a/lisp/dired.el b/lisp/dired.el
index 98d3032637b..b84fc57376a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3883,7 +3883,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3883 3883
3884;;; Start of automatically extracted autoloads. 3884;;; Start of automatically extracted autoloads.
3885 3885
3886;;;### (autoloads nil "dired-aux" "dired-aux.el" "1a8e2a4a9117ab3a2586aa001358d3fb") 3886;;;### (autoloads nil "dired-aux" "dired-aux.el" "6969bb4414a8a31b91342ab922a94efb")
3887;;; Generated autoloads from dired-aux.el 3887;;; Generated autoloads from dired-aux.el
3888 3888
3889(autoload 'dired-diff "dired-aux" "\ 3889(autoload 'dired-diff "dired-aux" "\
@@ -4386,7 +4386,7 @@ instead.
4386 4386
4387;;;*** 4387;;;***
4388 4388
4389;;;### (autoloads nil "dired-x" "dired-x.el" "291bc6e869bf72c900604c45d40f45ed") 4389;;;### (autoloads nil "dired-x" "dired-x.el" "994b5d9fc38059ab641ec271c728e56f")
4390;;; Generated autoloads from dired-x.el 4390;;; Generated autoloads from dired-x.el
4391 4391
4392(autoload 'dired-jump "dired-x" "\ 4392(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/subr.el b/lisp/subr.el
index 12704da149b..215699de178 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2879,23 +2879,21 @@ COMMAND is the shell command to run.
2879An old calling convention accepted any number of arguments after COMMAND, 2879An old calling convention accepted any number of arguments after COMMAND,
2880which were just concatenated to COMMAND. This is still supported but strongly 2880which were just concatenated to COMMAND. This is still supported but strongly
2881discouraged." 2881discouraged."
2882 ;; We used to use `exec' to replace the shell with the command, 2882 (declare (advertised-calling-convention (name buffer command) "23.1"))
2883 ;; but that failed to handle (...) and semicolon, etc. 2883 ;; We used to use `exec' to replace the shell with the command,
2884 ;; but that failed to handle (...) and semicolon, etc.
2884 (start-process name buffer shell-file-name shell-command-switch 2885 (start-process name buffer shell-file-name shell-command-switch
2885 (mapconcat 'identity args " "))) 2886 (mapconcat 'identity args " ")))
2886(set-advertised-calling-convention 'start-process-shell-command
2887 '(name buffer command) "23.1")
2888 2887
2889(defun start-file-process-shell-command (name buffer &rest args) 2888(defun start-file-process-shell-command (name buffer &rest args)
2890 "Start a program in a subprocess. Return the process object for it. 2889 "Start a program in a subprocess. Return the process object for it.
2891Similar to `start-process-shell-command', but calls `start-file-process'." 2890Similar to `start-process-shell-command', but calls `start-file-process'."
2891 (declare (advertised-calling-convention (name buffer command) "23.1"))
2892 (start-file-process 2892 (start-file-process
2893 name buffer 2893 name buffer
2894 (if (file-remote-p default-directory) "/bin/sh" shell-file-name) 2894 (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
2895 (if (file-remote-p default-directory) "-c" shell-command-switch) 2895 (if (file-remote-p default-directory) "-c" shell-command-switch)
2896 (mapconcat 'identity args " "))) 2896 (mapconcat 'identity args " ")))
2897(set-advertised-calling-convention 'start-file-process-shell-command
2898 '(name buffer command) "23.1")
2899 2897
2900(defun call-process-shell-command (command &optional infile buffer display 2898(defun call-process-shell-command (command &optional infile buffer display
2901 &rest args) 2899 &rest args)
@@ -2911,13 +2909,18 @@ STDERR-FILE may be nil (discard standard error output),
2911t (mix it with ordinary output), or a file name string. 2909t (mix it with ordinary output), or a file name string.
2912 2910
2913Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted. 2911Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted.
2914Remaining arguments are strings passed as additional arguments for COMMAND.
2915Wildcards and redirection are handled as usual in the shell. 2912Wildcards and redirection are handled as usual in the shell.
2916 2913
2917If BUFFER is 0, `call-process-shell-command' returns immediately with value nil. 2914If BUFFER is 0, `call-process-shell-command' returns immediately with value nil.
2918Otherwise it waits for COMMAND to terminate and returns a numeric exit 2915Otherwise it waits for COMMAND to terminate and returns a numeric exit
2919status or a signal description string. 2916status or a signal description string.
2920If you quit, the process is killed with SIGINT, or SIGKILL if you quit again." 2917If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
2918
2919An old calling convention accepted any number of arguments after DISPLAY,
2920which were just concatenated to COMMAND. This is still supported but strongly
2921discouraged."
2922 (declare (advertised-calling-convention
2923 (command &optional infile buffer display) "24.5"))
2921 ;; We used to use `exec' to replace the shell with the command, 2924 ;; We used to use `exec' to replace the shell with the command,
2922 ;; but that failed to handle (...) and semicolon, etc. 2925 ;; but that failed to handle (...) and semicolon, etc.
2923 (call-process shell-file-name 2926 (call-process shell-file-name
@@ -2929,6 +2932,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again."
2929 &rest args) 2932 &rest args)
2930 "Process files synchronously in a separate process. 2933 "Process files synchronously in a separate process.
2931Similar to `call-process-shell-command', but calls `process-file'." 2934Similar to `call-process-shell-command', but calls `process-file'."
2935 (declare (advertised-calling-convention
2936 (command &optional infile buffer display) "24.5"))
2932 (process-file 2937 (process-file
2933 (if (file-remote-p default-directory) "/bin/sh" shell-file-name) 2938 (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
2934 infile buffer display 2939 infile buffer display