Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add watchwords to coding hook.

  • Loading branch information...
commit c0b7ae5fd87675e896242557846c144cb55d274a 1 parent b191b8b
@technomancy authored
Showing with 10 additions and 3 deletions.
  1. +7 −0 starter-kit-defuns.el
  2. +3 −3 starter-kit-js.el
View
7 starter-kit-defuns.el
@@ -92,10 +92,17 @@ Symbols matching the text at point are put first in the completion list."
(defun turn-off-tool-bar ()
(tool-bar-mode -1))
+(defun add-watchwords ()
+ (font-lock-add-keywords
+ nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):"
+ 1 font-lock-warning-face t))))
+
(add-hook 'coding-hook 'local-column-number-mode)
(add-hook 'coding-hook 'local-comment-auto-fill)
(add-hook 'coding-hook 'turn-on-hl-line-mode)
+(add-hook 'coding-hook 'turn-on-save-place-mode)
(add-hook 'coding-hook 'pretty-lambdas)
+(add-hook 'coding-hook 'add-watchwords)
(defun run-coding-hook ()
"Enable things that are convenient across all coding buffers."
View
6 starter-kit-js.el
@@ -11,14 +11,14 @@
(add-hook 'espresso-mode-hook 'idle-highlight)
(setq espresso-indent-level 2)
+;; If you prefer js2-mode, use this instead:
+;; (add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode))
+
(eval-after-load 'espresso
'(progn (define-key espresso-mode-map "{" 'paredit-open-curly)
(define-key espresso-mode-map "}" 'paredit-close-curly-and-newline)
;; fixes problem with pretty function font-lock
(define-key espresso-mode-map (kbd ",") 'self-insert-command)
- (font-lock-add-keywords 'espresso-mode
- '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\):"
- 1 font-lock-warning-face t)))
(font-lock-add-keywords
'espresso-mode `(("\\(function *\\)("
(0 (progn (compose-region (match-beginning 1)
Please sign in to comment.
Something went wrong with that request. Please try again.