Skip to content

Commit

Permalink
Add watchwords to coding hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jan 7, 2010
1 parent b191b8b commit c0b7ae5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions starter-kit-defuns.el
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
6 changes: 3 additions & 3 deletions starter-kit-js.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0b7ae5

Please sign in to comment.