public
Created

silverstripe-mode

  • Download Gist
silverstripe-mode.el
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(define-derived-mode silverstripe-mode html-mode "Silverstripe"
 
(font-lock-add-keywords
nil
'(
("\\(<% \\| %>\\)" 1 font-lock-keyword-face)
("\\(\\(if\\|else\\|control\\|cacheblock\\|Level\\|end_[a-zA-Z1-9_\.]*\\|include\\)+\\)\\>" 1 font-lock-function-name-face)
("\\(.\\(Title\\|NexPageLink\\|Link\\|RelativeLink\\|ChildrenOf\\|Page\\|Level\\|Menu\\|Section2\\|LoginForm\\|SilverStripeNavigator\\|PageComments\\|Now\\|LinkTo\\|AbsoluteLink\\|CurrentMember\\|PastVisitor\\|PastMember\\|XML_val\\|RAW_val\\|SQL_val\\|JS_val\\|ATT_val\\|First\\|Last\\|FirstLast\\|MiddleString\\|Middle\\|Even\\|Odd\\|EvenOdd\\|Pos\\|TotalItems\\|BaseHref\\|Debug\\|CurrentPage\\|Top\\)+\\)\\>" 1 font-lock-constant-face)
("\\(.\\(ID\\|ClassName\\|Created\\|LastEdited\\|URLSegment\\|Title\\|MenuTitle\\|Content\\|MetaTitle\\|MetaDescription\\|MetaKeywords\\|ShowInMenus\\|ShowInSearch\\|HomepageForDomain\\|ProvideComments\\|Sort\\|LegacyURL\\|HasBrokenFile\\|HasBrokenLink\\|Status\\|ReportClass\\|ParentID\\|Version\\|EmailTo\\|EmailOnSubmit\\|SubmitButtonText\\|OnCompleteMessage\\|Subscribe\\|AllNewsletters\\|Subject\\|ErrorCode\\|LinkedPageID\\|RedirectionType\\|ExternalURL\\|LinkToID\\|VersionID\\|CopyContentFromID\\|RecordClassName\\)+\\)\\>" 1 font-lock-constant-face)
("\\(.\\(Link\\|LinkOrCurrent\\|LinkOrSection\\|LinkingMode\\|ElementName\\|InSection\\|Comments\\|Breadcrumbs\\|NestedTitle\\|MetaTags\\|ContentSource\\|MultipleParents\\|TreeTitle\\|CMSTreeClasses\\|Now\\|LinkTo\\|AbsoluteLink\\|CurrentMember\\|PastVisitor\\|PastMember\\|XML_val\\|RAW_val\\|SQL_val\\|JS_val\\|ATT_val\\|First\\|Last\\|FirstLast\\|MiddleString\\|Middle\\|Even\\|Odd\\|EvenOdd\\|Pos\\|TotalItems\\|BaseHref\\|CurrentPage\\|Top\\)+\\)\\>" 1 font-lock-constant-face)
("\\($[a-zA-Z1-9_\.]*\\)" 1 font-lock-type-face))
)
(font-lock-mode 1)
)
 
(setq auto-mode-alist (cons '( "\\.ss\\'" . silverstripe-mode ) auto-mode-alist ))
 
(provide 'silverstripe-mode)

<% end_control %> breaks the tab-indent.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.