emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master b25ce5b 204/433: (mmm-insert-by-key): Use match-face and m


From: Dmitry Gutov
Subject: [elpa] master b25ce5b 204/433: (mmm-insert-by-key): Use match-face and major-mode-preferences.
Date: Thu, 15 Mar 2018 19:44:02 -0400 (EDT)

branch: master
commit b25ce5b4decc436a789884bdd92610165e74ff6d
Author: mas <mas>
Commit: mas <mas>

    (mmm-insert-by-key): Use match-face and major-mode-preferences.
---
 mmm-cmds.el | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/mmm-cmds.el b/mmm-cmds.el
index 9de05b9..116cb07 100644
--- a/mmm-cmds.el
+++ b/mmm-cmds.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2000 by Michael Abraham Shulman
 
 ;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-cmds.el,v 1.12 2000/09/05 07:22:13 mas Exp $
+;; Version: $Id: mmm-cmds.el,v 1.13 2001/01/15 04:56:25 mas Exp $
 
 ;;{{{ GPL
 
@@ -268,10 +268,21 @@ MODIFIERS, the dotted list becomes simply BASIC-KEY."
                  (submode
                   (if match-submode
                       (mmm-save-all (funcall match-submode front-str))
-                    (plist-get class :submode))))
+                    (plist-get class :submode)))
+                 (match-face (plist-get class :match-face))
+                 (face
+                  (cond ((functionp match-face)
+                         (mmm-save-all
+                          (funcall match-face front-str)))
+                        (match-face
+                         (cdr (assoc front-str match-face)))
+                        (t
+                         (plist-get class :face)))))
+            (unless (fboundp submode)
+              (setq submode (cdr (assq submode mmm-major-mode-preferences))))
             (mmm-make-region
              submode beg end :front front-str :back back-str
-             :face (plist-get class :face)
+             :face face
 ;;;             :beg-sticky (plist-get class :beg-sticky)
 ;;;             :end-sticky (plist-get class :end-sticky)
              :beg-sticky t :end-sticky t



reply via email to

[Prev in Thread] Current Thread [Next in Thread]