SUPERSEDES APPROVE COMMIT xemacs-base
Stephen J. Turnbull writes:
This patch eliminates one of the problems, and I hope it addresses
the
second as well. It seems to work in light standalone testing, but I
haven't used it in place much yet.
There was a typo in the original patch (missing separator for
mapconcat). With the corrected patch, after several days' use I don't
see any problems in shell buffers and the like.
There needs to be a test suite for this, but I want to get the bug
fixed without waiting for infrastructure development.
/playpen/src/XEmacs/Packages/xemacs-packages/xemacs-base ~
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog,v
retrieving revision 1.192
diff -u -U0 -r1.192 ChangeLog
--- ChangeLog 14 Aug 2006 08:32:17 -0000 1.192
+++ ChangeLog 7 Mar 2007 04:15:40 -0000
@@ -0,0 +1,4 @@
+2007-02-28 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * comint.el (comint-quote-filename): Fix infloop.
+
Index: comint.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/comint.el,v
retrieving revision 1.19
diff -u -r1.19 comint.el
--- comint.el 31 Jul 2006 17:08:44 -0000 1.19
+++ comint.el 7 Mar 2007 04:15:47 -0000
@@ -2811,13 +2811,10 @@
Magic characters are those in `comint-file-name-quote-list'."
(if (null comint-file-name-quote-list)
filename
- (let ((regexp
- (format "\\(^\\|[^\\]\\)\\([%s]\\)"
- (mapconcat 'char-to-string comint-file-name-quote-list ""))))
- (save-match-data
- (while (string-match regexp filename)
- (setq filename (replace-match "\\1\\\\\\2" nil nil filename)))
- filename))))
+ (mapconcat (lambda (x)
+ (concat (if (memq x comint-file-name-quote-list) "\\" "")
+ (char-to-string x)))
+ filename "")))
(defun comint-unquote-filename (filename)
"Return FILENAME with quoted characters unquoted."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches