summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 3b66c68598f..ad154f9dea1 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -478,12 +478,13 @@ and use this command with a prefix argument (the value does not matter)."
;; 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)