]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (call-process-shell-command, process-file-shell-command):
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 20 Oct 2014 22:44:11 +0000 (18:44 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 20 Oct 2014 22:44:11 +0000 (18:44 -0400)
Make the `args' obsolete.
(start-process-shell-command, start-file-process-shell-command):
Use `declare'.

Fixes: debbugs:18409
etc/NEWS
lisp/ChangeLog
lisp/dired.el
lisp/subr.el

index 31baeb33516ad5dbf30234ad6f7dcfbd3159c20e..2e7c0983d120f792eba2f755b7f3ef6a58f59900 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,6 +31,10 @@ These emulations of old editors are believed to be no longer relevant
  - contact emacs-devel@gnu.org if you disagree.
 
 ** cc-compat.el is marked as obsolete.
+
+** call-process-shell-command and process-file-shell-command
+don't take "&rest args" any more.
+
 \f
 * Installation Changes in Emacs 24.4
 
index d3c0ab97ec4e1f807a3b8e4f7f626f2b87c27a8e..3a6a304d7247551507370f0ac3f5b5dbd7b6aa0b 100644 (file)
@@ -1,4 +1,11 @@
-2014-03-20  Juanma Barranquero  <lekktu@gmail.com>
+2014-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (call-process-shell-command, process-file-shell-command):
+       Make the `args' obsolete (bug#18409).
+       (start-process-shell-command, start-file-process-shell-command):
+       Use `declare'.
+
+2014-10-20  Juanma Barranquero  <lekktu@gmail.com>
 
        * skeleton.el (skeleton-autowrap): Mark as obsolete.  Doc fix.
 
index 98d3032637bccd5d61a437412f91be54ba601496..b84fc57376a934290750ae253de225324ac233c0 100644 (file)
@@ -3883,7 +3883,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 \f
 ;;; Start of automatically extracted autoloads.
 \f
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "1a8e2a4a9117ab3a2586aa001358d3fb")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "6969bb4414a8a31b91342ab922a94efb")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
@@ -4386,7 +4386,7 @@ instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired-x" "dired-x.el" "291bc6e869bf72c900604c45d40f45ed")
+;;;### (autoloads nil "dired-x" "dired-x.el" "994b5d9fc38059ab641ec271c728e56f")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\
index 12704da149bcb6d44ed6a77358e114b30c860aa0..215699de17851dd75eba162ad2a54cd662480d6a 100644 (file)
@@ -2879,23 +2879,21 @@ COMMAND is the shell command to run.
 An old calling convention accepted any number of arguments after COMMAND,
 which were just concatenated to COMMAND.  This is still supported but strongly
 discouraged."
-   ;; We used to use `exec' to replace the shell with the command,
-   ;; but that failed to handle (...) and semicolon, etc.
+  (declare (advertised-calling-convention (name buffer command) "23.1"))
+  ;; We used to use `exec' to replace the shell with the command,
+  ;; but that failed to handle (...) and semicolon, etc.
   (start-process name buffer shell-file-name shell-command-switch
                 (mapconcat 'identity args " ")))
-(set-advertised-calling-convention 'start-process-shell-command
-                                   '(name buffer command) "23.1")
 
 (defun start-file-process-shell-command (name buffer &rest args)
   "Start a program in a subprocess.  Return the process object for it.
 Similar to `start-process-shell-command', but calls `start-file-process'."
+  (declare (advertised-calling-convention (name buffer command) "23.1"))
   (start-file-process
    name buffer
    (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
    (if (file-remote-p default-directory) "-c" shell-command-switch)
    (mapconcat 'identity args " ")))
-(set-advertised-calling-convention 'start-file-process-shell-command
-                                   '(name buffer command) "23.1")
 
 (defun call-process-shell-command (command &optional infile buffer display
                                           &rest args)
@@ -2911,13 +2909,18 @@ STDERR-FILE may be nil (discard standard error output),
 t (mix it with ordinary output), or a file name string.
 
 Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted.
-Remaining arguments are strings passed as additional arguments for COMMAND.
 Wildcards and redirection are handled as usual in the shell.
 
 If BUFFER is 0, `call-process-shell-command' returns immediately with value nil.
 Otherwise it waits for COMMAND to terminate and returns a numeric exit
 status or a signal description string.
-If you quit, the process is killed with SIGINT, or SIGKILL if you quit again."
+If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
+
+An old calling convention accepted any number of arguments after DISPLAY,
+which were just concatenated to COMMAND.  This is still supported but strongly
+discouraged."
+  (declare (advertised-calling-convention
+            (command &optional infile buffer display) "24.5"))
   ;; We used to use `exec' to replace the shell with the command,
   ;; but that failed to handle (...) and semicolon, etc.
   (call-process shell-file-name
@@ -2929,6 +2932,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again."
                                           &rest args)
   "Process files synchronously in a separate process.
 Similar to `call-process-shell-command', but calls `process-file'."
+  (declare (advertised-calling-convention
+            (command &optional infile buffer display) "24.5"))
   (process-file
    (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
    infile buffer display