HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Quote file name commands in eshell.
[bpt/emacs.git]
/
lisp
/
eshell
/
esh-arg.el
diff --git
a/lisp/eshell/esh-arg.el
b/lisp/eshell/esh-arg.el
index
e6d73ac
..
ad52a5d
100644
(file)
--- a/
lisp/eshell/esh-arg.el
+++ b/
lisp/eshell/esh-arg.el
@@
-1,7
+1,6
@@
;;; esh-arg.el --- argument processing
;;; esh-arg.el --- argument processing
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Author: John Wiegley <johnw@gnu.org>
@@
-118,8
+117,9
@@
treated as a literal character."
;;; User Variables:
;;; User Variables:
-(defcustom eshell-arg-load-hook
'(eshell-arg-initialize)
+(defcustom eshell-arg-load-hook
nil
"A hook that gets run when `eshell-arg' is loaded."
"A hook that gets run when `eshell-arg' is loaded."
+ :version "24.1" ; removed eshell-arg-initialize
:type 'hook
:group 'eshell-arg)
:type 'hook
:group 'eshell-arg)
@@
-202,6
+202,18
@@
If POS is nil, the location of point is checked."
(or (= pos (point-max))
(memq (char-after pos) eshell-delimiter-argument-list))))
(or (= pos (point-max))
(memq (char-after pos) eshell-delimiter-argument-list))))
+(defun eshell-quote-argument (string)
+ "Return STRING with magic characters quoted.
+Magic characters are those in `eshell-special-chars-outside-quoting'."
+ (let ((index 0))
+ (mapconcat (lambda (c)
+ (prog1
+ (or (eshell-quote-backslash string index)
+ (char-to-string c))
+ (setq index (1+ index))))
+ string
+ "")))
+
;; Argument parsing
(defun eshell-parse-arguments (beg end)
;; Argument parsing
(defun eshell-parse-arguments (beg end)
@@
-311,7
+323,7
@@
special character that is not itself a backslash."
(char-to-string (char-before))))
;; allow \\<RET> to mean a literal "\" character followed by a
;; normal return, rather than a backslash followed by a line
(char-to-string (char-before))))
;; allow \\<RET> to mean a literal "\" character followed by a
;; normal return, rather than a backslash followed by a line
- ;; continuat
or
(i.e., "\\ + \n" rather than "\ + \\n"). This
+ ;; continuat
ion
(i.e., "\\ + \n" rather than "\ + \\n"). This
;; is necessary because backslashes in Eshell are not special
;; unless they either precede something special, or precede a
;; backslash that precedes something special. (Mainly this is
;; is necessary because backslashes in Eshell are not special
;; unless they either precede something special, or precede a
;; backslash that precedes something special. (Mainly this is
@@
-391,5
+403,4
@@
special character that is not itself a backslash."
(char-to-string (char-after)))))
(goto-char end)))))))
(char-to-string (char-after)))))
(goto-char end)))))))
-;; arch-tag: 7f593a2b-8fc1-4def-8f84-8f51ed0198d6
;;; esh-arg.el ends here
;;; esh-arg.el ends here