branch: externals/cm-mode
commit 8f472f71a1f12adf81902220ae865e1ad348c7a9
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>
Use the new cm-delimiters in cm-insert-markup
---
cm-mode.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/cm-mode.el b/cm-mode.el
index cd8732fda6..99d961407c 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -294,13 +294,16 @@ preceded with `@`.
If TYPE is 'cm-highlight, a comment is added, which optionally
starts with `cm-author'."
- (multiple-value-bind (bdelim edelim) (cdr (assq type cm-delimiters))
+ (let* ((delims (cdr (assq type cm-delimiters)))
+ (bdelim (first delims))
+ (middle (if (third delims) (second delims))) ; "~>" for
cm-substitution, otherwise nil
+ (edelim (cm-last1 delims)))
(insert (or bdelim "")
(or text (if (and (eq type 'cm-comment)
cm-author)
(concat "@" cm-author " ")
""))
- (if (eq type 'cm-substitution) "~>" "")
+ (or middle "")
(or edelim "")))
(if (and (not (eq type 'cm-comment))
(or cm-author (eq type 'cm-highlight)))