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

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

[nongnu] elpa/jade-mode bbaf2bb3a1 092/128: add a THIRD comment type and


From: ELPA Syncer
Subject: [nongnu] elpa/jade-mode bbaf2bb3a1 092/128: add a THIRD comment type and use THAT ad default
Date: Sat, 29 Jan 2022 08:24:50 -0500 (EST)

branch: elpa/jade-mode
commit bbaf2bb3a1be4399d5c8046123216ef6e2e7c8ed
Author: Travis Jefferson <tjefferson@signpost.com>
Commit: Travis Jefferson <tjefferson@signpost.com>

    add a THIRD comment type and use THAT ad default
    
        I got the first 'fix' backwards :)
---
 example.jade | 3 ++-
 jade-mode.el | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/example.jade b/example.jade
index 69f9376ecc..dc8efa47a6 100644
--- a/example.jade
+++ b/example.jade
@@ -12,7 +12,8 @@ html(lang="en", class = ['classOne', 'classTwo'].join(','))
           li
       #content
         // here is a real comment
-        -// here is another real comment, this is probably a better default
+        -// here is another real comment
+        //- here is a THIRD real comment syntax (what?) (this one is 
documented)
         a(href = 'http://www.google.com') http://www.google.com
         - if (youAreUsingJade)
           p You are amazing
diff --git a/jade-mode.el b/jade-mode.el
index a7a9af9518..2874cd94e5 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -87,7 +87,7 @@
     ("\\(?:^[ {2,}]*\\(?:[a-z0-9_:\\-]*\\)\\)?\\(#[A-Za-z0-9\-\_]*[^ ]\\)" 1 
font-lock-variable-name-face) ;; id
     ("\\(?:^[ {2,}]*\\(?:[a-z0-9_:\\-]*\\)\\)?\\(\\.[A-Za-z0-9\-\_]*\\)" 1 
font-lock-type-face) ;; class name
     ("^[ \t]*\\([a-zA-Z0-9]+\\)" 1 font-lock-function-name-face) ;; tag name
-    ("^\\s-*\\(-?//.*\\)" 1 font-lock-comment-face t) ;; jade block comments
+    ("^[ \t]*\\(-?//.*\\)" 1 font-lock-comment-face t) ;; jade block comments
 
     ;; remove highlighting from literal content following tag/class/id
     ;; e.g. tag Inner text
@@ -350,8 +350,8 @@ region defined by BEG and END."
   (setq major-mode 'jade-mode)
 
   ;; comment syntax
-  (set (make-local-variable 'comment-start) "-// ")
-  (set (make-local-variable 'comment-start-skip) "-//\\s-*")
+  (set (make-local-variable 'comment-start) "//- ")
+  (set (make-local-variable 'comment-start-skip) "//-\\s-*")
 
   (setq-default jade-tab-width 2)
   (setq-local indent-line-function 'jade-indent-line)



reply via email to

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