diff lisp/dired-aux.el @ 1170:54a44b2b9591

entered into RCS
author Richard M. Stallman <rms@gnu.org>
date Sat, 19 Sep 1992 19:40:38 +0000
parents f165d900e06e
children 1131f4462ca2
line wrap: on
line diff
--- a/lisp/dired-aux.el	Sat Sep 19 19:21:09 1992 +0000
+++ b/lisp/dired-aux.el	Sat Sep 19 19:40:38 1992 +0000
@@ -478,12 +478,13 @@
   ;; Return the name of the compressed or uncompressed file.
   ;; Rerurn nil if no change in files.
   (let (handler (handlers file-name-handler-alist))
-    (while (and (consp handlers) (null handler))
-      (if (and (consp (car handlers))
-	       (stringp (car (car handlers)))
-	       (string-match (car (car handlers)) file))
-	  (setq handler (cdr (car handlers))))
-      (setq handlers (cdr handlers)))
+    (save-match-data
+      (while (and (consp handlers) (null handler))
+	(if (and (consp (car handlers))
+		 (stringp (car (car handlers)))
+		 (string-match (car (car handlers)) file))
+	    (setq handler (cdr (car handlers))))
+	(setq handlers (cdr handlers))))
     (cond (handler
 	   (funcall handler 'dired-compress-file file))
 	  ((file-symlink-p file)