[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9afb287 043/433: Added mmm-[get, set]-class-parameters and
From: |
Dmitry Gutov |
Subject: |
[elpa] master 9afb287 043/433: Added mmm-[get, set]-class-parameters and creation-hook. |
Date: |
Thu, 15 Mar 2018 19:43:31 -0400 (EDT) |
branch: master
commit 9afb2872fd7c2a8251245fb18b91bebf0d5440a1
Author: mas <mas>
Commit: mas <mas>
Added mmm-[get,set]-class-parameters and creation-hook.
---
mmm-class.el | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/mmm-class.el b/mmm-class.el
index 656ccc2..42888a6 100644
--- a/mmm-class.el
+++ b/mmm-class.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-class.el,v 1.4 2000/05/18 18:28:13 mas Exp $
+;; Version: $Id: mmm-class.el,v 1.5 2000/06/27 02:46:56 mas Exp $
;;{{{ GPL
@@ -51,6 +51,22 @@ class specifier itself."
(t (signal 'mmm-invalid-submode-class (list class)))))
;;}}}
+;;{{{ Get and Set Class Parameters
+
+(defun mmm-get-class-parameter (class param)
+ "Get the value of the parameter PARAM for CLASS, or nil if none."
+ (cadr (member param (mmm-get-class-spec class))))
+
+(defun mmm-set-class-parameter (class param value)
+ "Set the value of the parameter PARAM for CLASS to VALUE.
+Creates a new parameter if one is not present."
+ (let* ((spec (mmm-get-class-spec class))
+ (current (member param spec)))
+ (if current
+ (setcar (cdr current) value)
+ (nconc spec (list param value)))))
+
+;;}}}
;;{{{ Apply Classes
(defun* mmm-apply-class
@@ -108,7 +124,7 @@ error once all classes have been applied."
(beg-sticky (not (number-or-marker-p front)))
(end-sticky (not (number-or-marker-p back)))
(front-offset 0) (back-offset 0) front-verify back-verify
- front-form back-form
+ front-form back-form creation-hook
&allow-other-keys)
"Create submode regions from START to STOP according to arguments.
If CLASSES is supplied, it must be a list of valid CLASSes. Otherwise,
@@ -139,7 +155,8 @@ the rest of the arguments are for an actual class being
applied. See
(condition-case nil
(mmm-make-region submode beg end :face face
:front front-form :back back-form
- :beg-sticky beg-sticky :end-sticky end-sticky)
+ :beg-sticky beg-sticky :end-sticky end-sticky
+ :creation-hook creation-hook)
;; If our region is invalid, go back to the end of the front
;; match and continue on.
(mmm-invalid-parent (goto-char (- beg front-offset)))))))))
- [elpa] master 988a3db 035/433: (mmm-save-local-variables): Added extra parameters for saving type and, (continued)
- [elpa] master 988a3db 035/433: (mmm-save-local-variables): Added extra parameters for saving type and, Dmitry Gutov, 2018/03/15
- [elpa] master 3c44251 047/433: # Added comment about loading supplied classes separately., Dmitry Gutov, 2018/03/15
- [elpa] master faaf000 040/433: # Commented on local variable improvements and version numbers., Dmitry Gutov, 2018/03/15
- [elpa] master 85ced66 041/433: # Reformatting., Dmitry Gutov, 2018/03/15
- [elpa] master 216c602 046/433: Fixed bug saving variables when creating regions; need to set them first., Dmitry Gutov, 2018/03/15
- [elpa] master 854c8a1 049/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master fbf7da0 045/433: # Updated docstring, Dmitry Gutov, 2018/03/15
- [elpa] master c2f2ef7 050/433: # Changed version numbers, Dmitry Gutov, 2018/03/15
- [elpa] master c22fb9f 054/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master aedb013 060/433: # Updated comment about psgml., Dmitry Gutov, 2018/03/15
- [elpa] master 9afb287 043/433: Added mmm-[get, set]-class-parameters and creation-hook.,
Dmitry Gutov <=
- [elpa] master 48e8e70 042/433: Fixed bug where font-lock-mode was set to `t' globally, causing, Dmitry Gutov, 2018/03/15
- [elpa] master e77d5b3 026/433: Released 0.3.9., Dmitry Gutov, 2018/03/15
- [elpa] master b6fccc2 044/433: Added creation-hook, fixed mode-name problem., Dmitry Gutov, 2018/03/15
- [elpa] master 8270590 037/433: Rewrote local variable functions, added new ones, changed updating,, Dmitry Gutov, 2018/03/15
- [elpa] master ccecc35 057/433: (mmm-valid-buffer): Checked against noninteractive and hidden buffers., Dmitry Gutov, 2018/03/15
- [elpa] master c4ffbd8 059/433: (mmm-fontify-region-list): Saved local variables before moving., Dmitry Gutov, 2018/03/15
- [elpa] master 6819dcc 062/433: Added Embperl., Dmitry Gutov, 2018/03/15
- [elpa] master 297bf01 063/433: Created file defining `universal' submode., Dmitry Gutov, 2018/03/15
- [elpa] master dddbab2 031/433: Released 0.3.10, Dmitry Gutov, 2018/03/15
- [elpa] master a083dc4 061/433: Added def-edebug-specs., Dmitry Gutov, 2018/03/15