]> git.eshelyaron.com Git - emacs.git/commitdiff
(get-setf-method): Protect caller's match-data from string-match.
authorErik Naggum <erik@naggum.no>
Fri, 22 Sep 1995 21:51:21 +0000 (21:51 +0000)
committerErik Naggum <erik@naggum.no>
Fri, 22 Sep 1995 21:51:21 +0000 (21:51 +0000)
lisp/emacs-lisp/cl-macs.el

index 46f8d3d5982ce4ef19000e8fee6cc3b7af3bdbc3..ba13691313594f803a3afe343d8f7a6470845ec4 100644 (file)
@@ -1726,7 +1726,8 @@ a macro like `setf' or `incf'."
                            method
                          (error "Setf-method for %s returns malformed method"
                                 func)))
-                  (and (string-match "\\`c[ad][ad][ad]?[ad]?r\\'" name)
+                  (and (save-match-data
+                         (string-match "\\`c[ad][ad][ad]?[ad]?r\\'" name))
                        (get-setf-method (compiler-macroexpand place)))
                   (and (eq func 'edebug-after)
                        (get-setf-method (nth (1- (length place)) place)