diff options
| author | Erik Naggum | 1995-09-22 21:51:21 +0000 |
|---|---|---|
| committer | Erik Naggum | 1995-09-22 21:51:21 +0000 |
| commit | ac05d33c673b3f1488e880ee64de34bafd13e901 (patch) | |
| tree | 0edc4e26803130506fab79bc1fae736e4e60dbe4 | |
| parent | 90bfea27cb898aed96f9b687edd7d7fadec7f117 (diff) | |
| download | emacs-ac05d33c673b3f1488e880ee64de34bafd13e901.tar.gz emacs-ac05d33c673b3f1488e880ee64de34bafd13e901.zip | |
(get-setf-method): Protect caller's match-data from string-match.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 3 |
1 files changed, 2 insertions, 1 deletions
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'." | |||
| 1726 | method | 1726 | method |
| 1727 | (error "Setf-method for %s returns malformed method" | 1727 | (error "Setf-method for %s returns malformed method" |
| 1728 | func))) | 1728 | func))) |
| 1729 | (and (string-match "\\`c[ad][ad][ad]?[ad]?r\\'" name) | 1729 | (and (save-match-data |
| 1730 | (string-match "\\`c[ad][ad][ad]?[ad]?r\\'" name)) | ||
| 1730 | (get-setf-method (compiler-macroexpand place))) | 1731 | (get-setf-method (compiler-macroexpand place))) |
| 1731 | (and (eq func 'edebug-after) | 1732 | (and (eq func 'edebug-after) |
| 1732 | (get-setf-method (nth (1- (length place)) place) | 1733 | (get-setf-method (nth (1- (length place)) place) |