branch: externals/cm-mode
commit 0768ca072fb6b1f493f74bd23f0152df1d94d769
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>
Remove newlines from change text in cm-substitution-string
Newlines aren't matched by the .*? construct in the string-match calls.
---
cm-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cm-mode.el b/cm-mode.el
index 60a80f9fcf..9f6b076982 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -475,7 +475,7 @@ substitutions, `d' for comments and highlights."
(when (eq action ?r)
(setq action nil)) ; so we can use a simple if rather than a cond
(let ((type (first change))
- (text (second change)))
+ (text (delete ?\n (second change)))) ; delete newlines because they
mess up string-match below.
(cond
((eq type 'cm-addition)
(if action (substring text 3 -3)