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 e341b93..2c5fa53 100644 (file)
@@ -1495,6 +1495,9 @@ doesn't match any of the regular expressions in
 
 (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
@@ -1506,7 +1509,7 @@ doesn't match any of the regular expressions in
                      "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