]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/esh-arg.el
Merge from emacs-23
[gnu-emacs] / lisp / eshell / esh-arg.el
index 75a8513fb26a2ed52a4fd3226bb1bdcfcdcf6624..0485c4f5b9613e404b32b37c53f75592f311346a 100644 (file)
@@ -123,7 +123,7 @@ treated as a literal character."
   :type 'hook
   :group 'eshell-arg)
 
-(defcustom eshell-delimiter-argument-list '(?\; ?& ?\| ?\> ?  ?\t ?\n)
+(defcustom eshell-delimiter-argument-list '(?\; ?& ?\| ?\> ?\s ?\t ?\n)
   "List of characters to recognize as argument separators."
   :type '(repeat character)
   :group 'eshell-arg)
@@ -214,25 +214,24 @@ Point is left at the end of the arguments."
       (narrow-to-region beg end)
       (let ((inhibit-point-motion-hooks t)
            (args (list t))
-           after-change-functions
            delim)
-       (remove-text-properties (point-min) (point-max)
-                               '(arg-begin nil arg-end nil))
-       (if (setq
-            delim
-            (catch 'eshell-incomplete
-              (while (not (eobp))
-                (let* ((here (point))
-                       (arg (eshell-parse-argument)))
-                  (if (= (point) here)
-                      (error "Failed to parse argument '%s'"
-                             (buffer-substring here (point-max))))
-                  (and arg (nconc args (list arg)))))))
-           (if (listp delim)
-               (throw 'eshell-incomplete delim)
-             (throw 'eshell-incomplete
-                    (list delim (point) (cdr args)))))
-       (cdr args)))))
+        (with-silent-modifications
+          (remove-text-properties (point-min) (point-max)
+                                  '(arg-begin nil arg-end nil))
+          (if (setq
+               delim
+               (catch 'eshell-incomplete
+                 (while (not (eobp))
+                   (let* ((here (point))
+                          (arg (eshell-parse-argument)))
+                     (if (= (point) here)
+                         (error "Failed to parse argument '%s'"
+                                (buffer-substring here (point-max))))
+                     (and arg (nconc args (list arg)))))))
+              (throw 'eshell-incomplete (if (listp delim)
+                                            delim
+                                          (list delim (point) (cdr args)))))
+          (cdr args))))))
 
 (defun eshell-parse-argument ()
   "Get the next argument.  Leave point after it."