]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/esh-cmd.el
Bump version to 25.0.95
[gnu-emacs] / lisp / eshell / esh-cmd.el
index baa8e7bafcf0da5ce0ac651a321c0220477df248..d3613d31405840dd2fc788c308931832991c3bbb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; esh-cmd.el --- command invocation  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
@@ -165,13 +165,13 @@ In order to substitute an alternate command form for execution, the
 hook function should throw it using the tag `eshell-replace-command'.
 For example:
 
-  (add-hook 'eshell-named-command-hook 'subst-with-cd)
+  (add-hook \\='eshell-named-command-hook \\='subst-with-cd)
   (defun subst-with-cd (command args)
-    (throw 'eshell-replace-command
+    (throw \\='eshell-replace-command
           (eshell-parse-command \"cd\" args)))
 
 Although useless, the above code will cause any non-glob, non-Lisp
-command (i.e., 'ls' as opposed to '*ls' or '(ls)') to be replaced by a
+command (i.e., `ls' as opposed to `*ls' or `(ls)') to be replaced by a
 call to `cd' using the arguments that were passed to the function."
   :type 'hook
   :group 'eshell-cmd)
@@ -243,7 +243,7 @@ return non-nil if the command is complex."
   "If non-nil, enable Eshell debugging code.
 This is slow, and only useful for debugging problems with Eshell.
 If you change this without using customize after Eshell has loaded,
-you must re-load 'esh-cmd.el'."
+you must re-load `esh-cmd.el'."
   :initialize 'custom-initialize-default
   :set (lambda (symbol value)
         (set symbol value)
@@ -284,7 +284,7 @@ command line.")
 (defvar eshell-command-arguments nil)
 (defvar eshell-in-pipeline-p nil
   "Internal Eshell variable, non-nil inside a pipeline.
-Has the value 'first, 'last for the first/last commands in the pipeline,
+Has the value `first', `last' for the first/last commands in the pipeline,
 otherwise t.")
 (defvar eshell-in-subcommand-p nil)
 (defvar eshell-last-arguments nil)
@@ -390,7 +390,7 @@ hooks should be run before and after the command."
       (macroexp-progn commands))))
 
 (defun eshell-debug-command (tag subform)
-  "Output a debugging message to '*eshell last cmd*'."
+  "Output a debugging message to `*eshell last cmd*'."
   (let ((buf (get-buffer-create "*eshell last cmd*"))
        (text (eshell-stringify eshell-current-command)))
     (with-current-buffer buf
@@ -424,14 +424,14 @@ hooks should be run before and after the command."
     (setq terms (cdr terms))))
 
 (defun eshell-rewrite-sexp-command (terms)
-  "Rewrite a sexp in initial position, such as '(+ 1 2)'."
+  "Rewrite a sexp in initial position, such as `(+ 1 2)'."
   ;; this occurs when a Lisp expression is in first position
   (if (and (listp (car terms))
           (eq (caar terms) 'eshell-command-to-value))
       (car (cdar terms))))
 
 (defun eshell-rewrite-initial-subcommand (terms)
-  "Rewrite a subcommand in initial position, such as '{+ 1 2}'."
+  "Rewrite a subcommand in initial position, such as `{+ 1 2}'."
   (if (and (listp (car terms))
           (eq (caar terms) 'eshell-as-subcommand))
       (car terms)))
@@ -634,7 +634,7 @@ For an external command, it means an exit code of 0."
     final))
 
 (defun eshell-parse-subcommand-argument ()
-  "Parse a subcommand argument of the form '{command}'."
+  "Parse a subcommand argument of the form `{command}'."
   (if (and (not eshell-current-argument)
           (not eshell-current-quoted)
           (eq (char-after) ?\{)
@@ -670,8 +670,8 @@ For an external command, it means an exit code of 0."
   "Separate TERMS using SEPARATOR.
 If REVERSED is non-nil, the list of separated term groups will be
 returned in reverse order.  If LAST-TERMS-SYM is a symbol, its value
-will be set to a list of all the separator operators found (or '(list
-nil)' if none)."
+will be set to a list of all the separator operators found (or (nil)
+if none)."
   (let ((sub-terms (list t))
        (eshell-sep-terms (list t))
        subchains)
@@ -800,7 +800,7 @@ This macro calls itself recursively, with NOTFIRST non-nil."
 (defmacro eshell-do-pipelines-synchronously (pipeline)
   "Execute the commands in PIPELINE in sequence synchronously.
 Output of each command is passed as input to the next one in the pipeline.
-This is used on systems where `start-process' is not supported."
+This is used on systems where async subprocesses are not supported."
   (when (setq pipeline (cadr pipeline))
     `(progn
        ,(when (cdr pipeline)
@@ -838,7 +838,7 @@ This is used on systems where `start-process' is not supported."
   "Execute the commands in PIPELINE, connecting each to one another."
   `(let ((eshell-in-pipeline-p t) tailproc)
      (progn
-       ,(if (fboundp 'start-process)
+       ,(if (fboundp 'make-process)
            `(eshell-do-pipelines ,pipeline)
          `(let ((tail-handles (eshell-create-handles
                                (car (aref eshell-current-handles
@@ -1016,8 +1016,8 @@ be finished later after the completion of an asynchronous subprocess."
     ;; we can modify any `let' forms to evaluate only once.
     (if (macrop (car form))
        (let ((exp (eshell-copy-tree (macroexpand form))))
-         (eshell-manipulate (format "expanding macro `%s'"
-                                    (symbol-name (car form)))
+         (eshell-manipulate (format-message "expanding macro `%s'"
+                                            (symbol-name (car form)))
            (setcar form (car exp))
            (setcdr form (cdr exp)))))
     (let ((args (cdr form)))
@@ -1095,8 +1095,8 @@ be finished later after the completion of an asynchronous subprocess."
        (t
        (if (and args (not (memq (car form) '(run-hooks))))
            (eshell-manipulate
-               (format "evaluating arguments to `%s'"
-                       (symbol-name (car form)))
+               (format-message "evaluating arguments to `%s'"
+                               (symbol-name (car form)))
              (while args
                (setcar args (eshell-do-eval (car args) synchronous-p))
                (setq args (cdr args)))))