eschulte pushed a commit to branch go
in repository elpa.
commit 750dae6d764841c5963054bc5803bad236137434
Author: Eric Schulte <[email protected]>
Date: Fri Aug 9 00:46:37 2013 -0600
wrap go-re-cond in save-match-data
---
go-util.el | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/go-util.el b/go-util.el
index 7247d05..ccb2252 100644
--- a/go-util.el
+++ b/go-util.el
@@ -142,13 +142,14 @@
(defmacro go-re-cond (string &rest body)
(declare (indent 1))
- `(cond ,@(mapcar
- (lambda (part)
- (cons (if (or (keywordp (car part)) (eq t (car part)))
- (car part)
- `(string-match ,(car part) ,string))
- (cdr part)))
- body)))
+ `(save-match-data
+ (cond ,@(mapcar
+ (lambda (part)
+ (cons (if (or (keywordp (car part)) (eq t (car part)))
+ (car part)
+ `(string-match ,(car part) ,string))
+ (cdr part)))
+ body))))
(def-edebug-spec go-re-cond (form body))
(defvar *go-partial-line* nil "Holds partial lines of input from a process.")