chiark / gitweb /
el/dot-emacs.el: Scala fontification fettling.
authorMark Wooding <mwooding@good.com>
Mon, 17 Mar 2014 12:39:11 +0000 (12:39 +0000)
committerMark Wooding <mwooding@good.com>
Mon, 17 Mar 2014 12:39:11 +0000 (12:39 +0000)
The Scala mode is trying to do something clever with comment filling.
Try to dissuade it.  Also, use an explicit list of punctuation
characters, because Scala mode (quite rightly) does a lot of fiddling
with syntax tables.

el/dot-emacs.el

index e341b933cbb247f85483796e2a28629a6c804524..2c5fa5340e60712c074fc2e42309f9afcbf070b1 100644 (file)
@@ -1495,6 +1495,9 @@ (defun mdw-fontify-javascript ()
 
 (defun mdw-fontify-scala ()
 
 
 (defun mdw-fontify-scala ()
 
+  ;; Comment filling.
+  (setq mdw-fill-prefix mdw-c-comment-fill-prefix)
+
   ;; Define things to be fontified.
   (make-local-variable 'font-lock-keywords)
   (let ((scala-keywords
   ;; Define things to be fontified.
   (make-local-variable 'font-lock-keywords)
   (let ((scala-keywords
@@ -1506,7 +1509,7 @@ (defun mdw-fontify-scala ()
                      "var" "while" "with" "yield"))
        (scala-constants
         (mdw-regexps "false" "null" "super" "this" "true"))
                      "var" "while" "with" "yield"))
        (scala-constants
         (mdw-regexps "false" "null" "super" "this" "true"))
-       (punctuation "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"))
+       (punctuation "[-!%^&*=+:@#~/?\\|`]"))
 
     (setq font-lock-keywords
          (list
 
     (setq font-lock-keywords
          (list