branch: elpa/jinja2-mode
commit 556ed3b80bc046af8c2261dbacc27e616925dfa9
Author: Florian Mounier <[email protected]>
Commit: Florian Mounier <[email protected]>
Remove messages
---
jinja2.el | 43 ++++++++++++++++++++++++++++++++++++-------
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/jinja2.el b/jinja2.el
index 8c44718880..806e51f41e 100644
--- a/jinja2.el
+++ b/jinja2.el
@@ -1,3 +1,29 @@
+;; Jinja2 mode for emacs
+;; Copyright (C) 2011 Florian Mounier aka paradoxxxzero
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;; Author: Florian Mounier aka paradoxxxzero
+;; Description :
+;; This is an emacs major mode for jinja2 with:
+;; syntax highlighting
+;; sgml/html integration
+;; indentation (working with sgml)
+;; more to come
+
+;; This file comes from http://github.com/paradoxxxzero/jinja2-mode
+
(require 'sgml-mode)
(defvar jinja2-mode-hook nil)
@@ -158,40 +184,43 @@
(if (looking-at (concat "^[ \t]*{% *.*?{% *end" (regexp-opt
jinja2-font-lock-indenting-keywords)))
(progn
(setq cur-indent (current-indentation))
- (message (format "Jinja_No1] jinja : %d sgml : %d"
cur-indent html-indentation )))
+ ;; (message (format "Jinja_No1] jinja : %d sgml : %d"
cur-indent html-indentation ))
+ )
(if (looking-at (concat "^[ \t]*{% *" (regexp-opt
jinja2-font-lock-indenting-keywords)))
(setq cur-indent (current-indentation))
(setq cur-indent (- (current-indentation) indent-width)))
- (message (format "Jinja_end1] jinja : %d sgml : %d" cur-indent
html-indentation )))
+ ;; (message (format "Jinja_end1] jinja : %d sgml : %d" cur-indent
html-indentation ))
+ )
)
(if (< cur-indent 0)
(setq cur-indent 0)))
(if (looking-at "^[ \t]*</") ; Assume sgml end block trust sgml
(progn
(setq cur-indent html-indentation)
- (message (format "SGML_?1] jinja : %d sgml : %d" cur-indent
html-indentation )))
+ ;; (message (format "SGML_?1] jinja : %d sgml : %d" cur-indent
html-indentation ))
+ )
(save-excursion
(while not-indented
(forward-line -1)
(if (looking-at "^[ \t]*{% *end") ; Don't indent after end
(progn
(setq cur-indent (current-indentation))
- (message (format "Jinja_end2] jinja : %d sgml : %d"
cur-indent html-indentation ))
+ ;; (message (format "Jinja_end2] jinja : %d sgml : %d"
cur-indent html-indentation ))
(setq not-indented nil))
(if (looking-at (concat "^[ \t]*{% *.*?{% *end" (regexp-opt
jinja2-font-lock-indenting-keywords)))
(progn
(setq cur-indent (current-indentation))
- (message (format "Jinja_No] jinja : %d sgml : %d"
cur-indent html-indentation ))
+ ;; (message (format "Jinja_No] jinja : %d sgml : %d"
cur-indent html-indentation ))
(setq not-indented nil))
(if (looking-at (concat "^[ \t]*{% *" (regexp-opt
jinja2-font-lock-indenting-keywords))) ; Check start tag
(progn
(setq cur-indent (+ (current-indentation) indent-width))
- (message (format "Jinja_open] jinja : %d sgml : %d"
cur-indent html-indentation ))
+ ;; (message (format "Jinja_open] jinja : %d sgml : %d"
cur-indent html-indentation ))
(setq not-indented nil))
(if (looking-at "^[ \t]*<") ; Assume sgml block trust sgml
(progn
(setq cur-indent html-indentation)
- (message (format "SGML_?] jinja : %d sgml : %d"
cur-indent html-indentation ))
+ ;; (message (format "SGML_?] jinja : %d sgml : %d"
cur-indent html-indentation ))
(setq not-indented nil))
(if (bobp) ; We don't know
(setq not-indented nil))))))))))