[Gd-chatter] r11350 - trunk/gwydion/tools/elisp
cpage at gwydiondylan.org
cpage at gwydiondylan.org
Sun May 13 14:45:38 CEST 2007
Author: cpage
Date: Sun May 13 14:45:37 2007
New Revision: 11350
Modified:
trunk/gwydion/tools/elisp/dylan-mode.el
Log:
Job: minor
Dylan Mode used to highlight #-words abutting other characters, e.g. it
highlighted "#rest" within the text "#rested". Now it only matches whole words.
Modified: trunk/gwydion/tools/elisp/dylan-mode.el
==============================================================================
--- trunk/gwydion/tools/elisp/dylan-mode.el (original)
+++ trunk/gwydion/tools/elisp/dylan-mode.el Sun May 13 14:45:37 2007
@@ -745,7 +745,18 @@
;; font-lock syntactic keywords, perhaps?
'("\\(#\\)\"[^\"]*\"?" 1 font-lock-string-face)
;; Function signature keywords
- "#rest\\|#key\\|#all-keys\\|#next"
+ ;;
+ ;; "#" does not have symbol or word syntax, so we can't
+ ;; match for "\\<" at the start of #-words. Match for "not
+ ;; a word constituent" instead. This highlights some
+ ;; patterns that aren't valid Dylan, but it's close
+ ;; enough. (e.g., it highlights "#key" within "##key".)
+ (list (concat "\\W"
+ (regexp-opt
+ '("#rest" "#key" "#all-keys" "#next")
+ t)
+ "\\>")
+ 1 font-lock-keyword-face)
dyl-other-pattern
;; Definition starts
(list (concat "\\b\\(" dyl-define-pattern
More information about the chatter
mailing list