Skip to content

Instantly share code, notes, and snippets.

@tsdeng
Created December 6, 2013 07:15
Show Gist options
  • Save tsdeng/7819812 to your computer and use it in GitHub Desktop.
Save tsdeng/7819812 to your computer and use it in GitHub Desktop.
scifi mode
(setq scifi-font-lock-keywords
'(
("library(name\\(\s?\\)=\\(\s?\\)['\"]\\([^']+\\)" (3 font-lock-keyword-face)) ;target name
("pants('\\([^']*\\)'" (1 font-lock-keyword-face t))
)
)
(defvar scifi-mode-hook nil "* pants mode.")
(defun scifi-mode () "scifi"
(interactive)
(kill-all-local-variables)
(setq major-mode 'scifi-mode)
(setq mode-name "Scifi")
(set (make-local-variable 'font-lock-defaults) '(scifi-font-lock-keywords))
(run-hooks 'scifi-mode-hook))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment