Mercurial > emacs
diff lisp/eshell/esh-arg.el @ 111686:e8049570c647
* lisp/eshell/: Use with-silent-modifications.
* lisp/eshell/esh-cmd.el (eshell-parse-command):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/em-script.el (eshell-source-file):
Use with-silent-modifications.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 23 Nov 2010 12:36:15 -0500 |
parents | 1d1d5d9bd884 |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/eshell/esh-arg.el Tue Nov 23 10:13:43 2010 -0500 +++ b/lisp/eshell/esh-arg.el Tue Nov 23 12:36:15 2010 -0500 @@ -123,7 +123,7 @@ :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 @@ (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."