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

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

[elpa] master 28e978c 118/433: (mmm-ify-by-class): Added completion on a


From: Dmitry Gutov
Subject: [elpa] master 28e978c 118/433: (mmm-ify-by-class): Added completion on all defined classes.
Date: Thu, 15 Mar 2018 19:43:47 -0400 (EDT)

branch: master
commit 28e978cff9f43e4a7801b878a73ce33c2dbc0fda
Author: mas <mas>
Commit: mas <mas>

    (mmm-ify-by-class): Added completion on all defined classes.
---
 mmm-cmds.el | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/mmm-cmds.el b/mmm-cmds.el
index e2c382e..c6679fd 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.8 2000/07/11 02:28:17 mas Exp $
+;; Version: $Id: mmm-cmds.el,v 1.9 2000/07/21 01:08:33 mas Exp $
 
 ;;{{{ GPL
 
@@ -39,10 +39,17 @@
 
 (defun mmm-ify-by-class (class)
   "Add submode regions according to an existing submode class."
-  (interactive "SSubmode Class: ")
-  (mmm-apply-class class)
-  (mmm-add-to-history class)
-  (mmm-update-font-lock-buffer))
+  (interactive
+   (list (intern
+          (completing-read "Submode Class: "
+                           (mapcar #'(lambda (spec)
+                                       (list (symbol-name (car spec))))
+                                   mmm-classes-alist)
+                           nil t))))
+  (unless (eq class (intern ""))
+    (mmm-apply-class class)
+    (mmm-add-to-history class)
+    (mmm-update-font-lock-buffer)))
 
 ;;}}}
 ;;{{{ Applying by the Region



reply via email to

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