branch: master
commit fff25f63b965a5cef6482bad0c91a1a0f866634d
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>
Note that 'autogen.sh' should be run to generate 'configure' and
'Makefile.in' (see #11)
---
.gitignore | 4 ++++
README | 1 +
mmm-erb.el | 22 ++++++++++++++--------
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index c531d98..4700f32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
+autom4te.cache
+aclocal.m4
+configure
+Makefile.in
*.elc
diff --git a/README b/README
index fdcb874..6d8ce4c 100644
--- a/README
+++ b/README
@@ -19,6 +19,7 @@ INSTALLATION
To install in the standard locations, unpack the archive, `cd' to
the mmm-mode-X.X.X directory created, and run these commands:
+ ./autogen.sh
./configure
make
make install
diff --git a/mmm-erb.el b/mmm-erb.el
index 10d8e79..75eba51 100644
--- a/mmm-erb.el
+++ b/mmm-erb.el
@@ -112,12 +112,20 @@
(pushnew '(indent-line-function buffer) mmm-save-local-variables)
;;;###autoload
-(define-derived-mode html-erb-mode html-mode "ERB-HTML"
+(define-minor-mode mmm-html-minor-mode
+ "Minor mode which provides context and set-up for HTML-related mmm-mode
classes."
+ nil " ERB" nil
(setq sgml-unclosed-tags nil) ; Simplifies indentation logic.
- (add-hook 'mmm-html-erb-mode-hook 'mmm-erb-process-submode nil t)
- (add-hook 'mmm-ruby-mode-submode-hook 'mmm-erb-process-submode nil t)
- (add-hook 'mmm-css-mode-submode-hook 'mmm-erb-process-submode nil t)
- (add-hook 'mmm-js-mode-submode-hook 'mmm-erb-process-submode nil t))
+ (dolist (hook '(mmm-html-erb-mode-hook
+ mmm-nxml-web-mode-hook
+ mmm-ruby-mode-submode-hook
+ mmm-css-mode-submode-hook
+ mmm-js-mode-submode-hook))
+ (add-hook hook 'mmm-erb-process-submode nil t)))
+
+;;;###autoload
+(define-derived-mode html-erb-mode html-mode "ERB-HTML"
+ (mmm-html-minor-mode t))
(defun mmm-erb-process-submode ()
"Hook function to run after primary or submode major mode function."
@@ -257,9 +265,7 @@
;;;###autoload
(define-derived-mode nxml-web-mode nxml-mode "nXML-Web"
- (add-hook 'mmm-nxml-web-mode-hook 'mmm-erb-process-submode nil t)
- (add-hook 'mmm-css-mode-submode-hook 'mmm-erb-process-submode nil t)
- (add-hook 'mmm-js-mode-submode-hook 'mmm-erb-process-submode nil t))
+ (mmm-html-minor-mode t))
(provide 'mmm-erb)