From: Erik Naggum Date: Fri, 22 Sep 1995 21:51:21 +0000 (+0000) Subject: (get-setf-method): Protect caller's match-data from string-match. X-Git-Tag: emacs-19.34~2794 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ac05d33c673b3f1488e880ee64de34bafd13e901;p=emacs.git (get-setf-method): Protect caller's match-data from string-match. --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 46f8d3d5982..ba136913135 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -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)