[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5f276a1 307/433: Update instructions and docstrings
From: |
Dmitry Gutov |
Subject: |
[elpa] master 5f276a1 307/433: Update instructions and docstrings |
Date: |
Thu, 15 Mar 2018 19:44:25 -0400 (EDT) |
branch: master
commit 5f276a1c2ba35218c29d7c71f4dcac5fc9e9f1b1
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Update instructions and docstrings
---
mmm-erb.el | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/mmm-erb.el b/mmm-erb.el
index 0ad42f9..d59a849 100644
--- a/mmm-erb.el
+++ b/mmm-erb.el
@@ -25,20 +25,28 @@
;;; Commentary:
-;; This file contains the definition of JavaScript, CSS, ERB and EJS submode
+;; This file contains definitions of JavaScript, CSS, ERB and EJS submode
;; classes, and well as support functions for proper indentation.
;; Usage:
;; (require 'mmm-auto)
-;; (mmm-add-mode-ext-class 'html-erb-mode "\\.html\\(\\.erb\\)?\\'" 'html-js)
-;; (mmm-add-mode-ext-class 'html-erb-mode "\\.html\\(\\.erb\\)?\\'" 'html-css)
+
+;; (setq mmm-global-mode 'auto)
+
+;; (mmm-add-mode-ext-class 'html-erb-mode nil 'html-js)
+;; (mmm-add-mode-ext-class 'html-erb-mode nil 'html-css)
;; (mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb)
;; (mmm-add-mode-ext-class 'html-erb-mode "\\.jst\\.ejs\\'" 'ejs)
;; (add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode))
;; (add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode))
+;; Optional settings:
+
+;; (setq mmm-submode-decoration-level 2
+;; mmm-parse-when-idle t)
+
;;; Code:
(require 'sgml-mode)
@@ -103,11 +111,11 @@
(add-hook 'mmm-js-mode-submode-hook 'mmm-erb-process-submode nil t))
(defun mmm-erb-process-submode ()
- "Hook function run when entering erb submode."
+ "Hook function to run after primary or submode major mode function."
(setq indent-line-function 'mmm-erb-indent-line))
(defun mmm-erb-indent-line ()
- "Indent current line or selection intelligently."
+ "Indent the current line intelligently."
(interactive)
(let ((offset (- (current-column) (current-indentation))))
(back-to-indentation)
@@ -158,6 +166,7 @@
(or additional-offset 0))))))
(defun mmm-erb-indent-line-primary ()
+ "Indent line in primary mode."
(let* ((here (point))
;; Go before previous line's tag.
(start (progn (forward-line -1)
@@ -202,8 +211,8 @@
(skip-syntax-forward "-")
(funcall scan-fn end)))))))
-(defconst mmm-erb-ruby-close-re "\\bend\\b\\|}"
- "Regexp to match the end of an Ruby block.")
+(defconst mmm-erb-ruby-close-re "\\<end\\>\\|}"
+ "Regexp to match the end of a Ruby block.")
(defun mmm-erb-scan-erb (limit)
(cond ((looking-at "\\(?:if\\|unless\\|for\\|while\\)\\b") 'open)
@@ -233,4 +242,5 @@
(when name (symbol-value name))))
(provide 'mmm-erb)
+
;;; mmm-erb.el ends here
- [elpa] master 3c2f878 243/433: # Updated, (continued)
- [elpa] master 3c2f878 243/433: # Updated, Dmitry Gutov, 2018/03/15
- [elpa] master d6dc934 203/433: (mmm-here-doc-get-mode): Try each word individually first., Dmitry Gutov, 2018/03/15
- [elpa] master 9b857f5 255/433: Added Noweb documentation (Joe Kelsey), Dmitry Gutov, 2018/03/15
- [elpa] master 6485ce3 259/433: Fixed stupid bug, so autoloading will actually work, Dmitry Gutov, 2018/03/15
- [elpa] master d242111 258/433: *** empty log message ***, Dmitry Gutov, 2018/03/15
- [elpa] master c75f330 317/433: Merge pull request #15 from dgutov/master, Dmitry Gutov, 2018/03/15
- [elpa] master c1997e1 313/433: Revert unintended check-in of mmm-erb changes, Dmitry Gutov, 2018/03/15
- [elpa] master c42fcb2 286/433: Compatibility fix for mode line format of Emacs 23, Dmitry Gutov, 2018/03/15
- [elpa] master b171ba0 324/433: Merge pull request #17 from dgutov/retro, Dmitry Gutov, 2018/03/15
- [elpa] master 53bd8b4 319/433: Remove duplicate entries, Dmitry Gutov, 2018/03/15
- [elpa] master 5f276a1 307/433: Update instructions and docstrings,
Dmitry Gutov <=
- [elpa] master a0b1ecc 320/433: Merge pull request #16 from dgutov/c++-mode, Dmitry Gutov, 2018/03/15
- [elpa] master a5a24df 322/433: Fix the timer error: "Selecting deleted buffer", Dmitry Gutov, 2018/03/15
- [elpa] master 0b30852 244/433: * mmm-vars.el (mmm-c-derived-modes): Added php-mode., Dmitry Gutov, 2018/03/15
- [elpa] master 34c3a19 212/433: Updated mode preferences to check fboundp when regions are created., Dmitry Gutov, 2018/03/15
- [elpa] master 46185e0 232/433: Made C indentation style variables buffer-local., Dmitry Gutov, 2018/03/15
- [elpa] master fee1b52 211/433: Added file with Emacs-related macros from Alan Shutko., Dmitry Gutov, 2018/03/15
- [elpa] master 3c68c28 235/433: * mmm-sample.el (httpd-conf-perl): Added submode class from Rob, Dmitry Gutov, 2018/03/15
- [elpa] master c8cfb89 346/433: * mmm-noweb.el: Qualify the "doesn't work" statement., Dmitry Gutov, 2018/03/15
- [elpa] master 8e7e76b 355/433: Move html-js and html-css classes from mmm-erb to mmm-sample, Dmitry Gutov, 2018/03/15
- [elpa] master 4c51cd9 315/433: Merge pull request #13 from dgutov/master, Dmitry Gutov, 2018/03/15