changeset 13066:9caf0cd95acf

(get-setf-method): Protect caller's match-data from string-match.
author Erik Naggum <erik@naggum.no>
date Fri, 22 Sep 1995 21:51:21 +0000
parents 717fa3c6e815
children fef2a9095f0c
files lisp/emacs-lisp/cl-macs.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl-macs.el	Fri Sep 22 21:34:12 1995 +0000
+++ b/lisp/emacs-lisp/cl-macs.el	Fri Sep 22 21:51:21 1995 +0000
@@ -1726,7 +1726,8 @@
 			    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)