From: Kai Gro?j. <ka...@us...> - 2002-04-10 19:00:23
|
Update of /cvsroot/tramp/tramp/lisp In directory usw-pr-cvs1:/tmp/cvs-serv3188/tramp/lisp Modified Files: ChangeLog tramp.el Log Message: (tramp-shell-quote-argument): When calling shell-quote-argument internally, make sure it uses Unix-like behavior, not Windows-like behavior. (This is done by binding system-type, which is certainly not the right way to do it!) Index: ChangeLog =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/ChangeLog,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -d -r2.94 -r2.95 *** ChangeLog 25 Mar 2002 16:32:36 -0000 2.94 --- ChangeLog 10 Apr 2002 17:16:25 -0000 2.95 *************** *** 1,2 **** --- 1,9 ---- + 2002-04-10 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> + + * tramp.el (tramp-shell-quote-argument): When calling + shell-quote-argument internally, make sure it uses Unix-like + behavior, not Windows-like behavior. (This is done by binding + system-type, which is certainly not the right way to do it!) + 2002-03-25 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> Index: tramp.el =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v retrieving revision 2.94 retrieving revision 2.95 diff -C2 -d -r2.94 -r2.95 *** tramp.el 25 Mar 2002 16:32:25 -0000 2.94 --- tramp.el 10 Apr 2002 17:16:25 -0000 2.95 *************** *** 4795,4798 **** --- 4795,4803 ---- ;; massage the newline part of the result. ;; + ;; This function should produce a string which is grokked by a Unix + ;; shell, even if the Emacs is running on Windows. Since this is the + ;; kludges section, we bind `system-type' in such a way that + ;; `shell-quote-arguments' behaves as if on Unix. + ;; ;; Thanks to Mario DeWeerd for the hint that it is sufficient for this ;; function to work with Bourne-like shells. *************** *** 4800,4813 **** "Similar to `shell-quote-argument', but groks newlines. Only works for Bourne-like shells." ! (save-match-data ! (let ((result (shell-quote-argument s)) ! (nl (regexp-quote (format "\\%s" tramp-rsh-end-of-line)))) ! (when (and (>= (length result) 2) ! (string= (substring result 0 2) "\\~")) ! (setq result (substring result 1))) ! (while (string-match nl result) ! (setq result (replace-match (format "'%s'" tramp-rsh-end-of-line) ! t t result))) ! result))) ;; ;; EFS hooks itself into the file name handling stuff in more places --- 4805,4819 ---- "Similar to `shell-quote-argument', but groks newlines. Only works for Bourne-like shells." ! (let ((system-type 'not-windows)) ! (save-match-data ! (let ((result (shell-quote-argument s)) ! (nl (regexp-quote (format "\\%s" tramp-rsh-end-of-line)))) ! (when (and (>= (length result) 2) ! (string= (substring result 0 2) "\\~")) ! (setq result (substring result 1))) ! (while (string-match nl result) ! (setq result (replace-match (format "'%s'" tramp-rsh-end-of-line) ! t t result))) ! result)))) ;; ;; EFS hooks itself into the file name handling stuff in more places |