diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2021-11-18 19:47:41 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2021-11-18 19:47:41 +0100 |
| commit | 22278a95474ccd665f84c16aa8760534ced9b150 (patch) | |
| tree | b75650e3f8b8bfb4ec9b35214e5cd8499b4a22b3 | |
| parent | 38aebc2781b75ee96a54d1d361807b1c23c6768e (diff) | |
Save match-datav0.2.0
This is necessary when `##' is evaluated uncompiled.
| -rw-r--r-- | llama.el | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -135,16 +135,17 @@ above is *displayed* as: (cond ((symbolp data) (let ((name (symbol-name data)) pos) - (when (string-match "\\`%\\([1-9*]\\)?\\'" name) - (setq pos (match-string 1 name)) - (setq pos (cond ((equal pos "*") 0) - ((not pos) 1) - (t (string-to-number pos)))) - (when (and (= pos 1) - (aref args 1) - (not (equal data (aref args 1)))) - (error "%% and %%1 are mutually exclusive")) - (aset args pos data)))) + (save-match-data + (when (string-match "\\`%\\([1-9*]\\)?\\'" name) + (setq pos (match-string 1 name)) + (setq pos (cond ((equal pos "*") 0) + ((not pos) 1) + (t (string-to-number pos)))) + (when (and (= pos 1) + (aref args 1) + (not (equal data (aref args 1)))) + (error "%% and %%1 are mutually exclusive")) + (aset args pos data))))) ((and (not (eq (car-safe data) '##)) (or (listp data) (vectorp data))) |
