Skip to content

Instantly share code, notes, and snippets.

@fukamachi
Created February 27, 2012 10:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fukamachi/1922987 to your computer and use it in GitHub Desktop.
Save fukamachi/1922987 to your computer and use it in GitHub Desktop.
Emacs settings for Clack developers
(defun clack-slime-search-buffer-package ()
(let ((case-fold-search t)
(regexp (concat "^(\\(clack.util:\\)?namespace\\>[ \t']*"
"\\([^\n)]+\\)")))
(save-excursion
(if (or (re-search-backward regexp nil t)
(re-search-forward regexp nil t))
(match-string-no-properties 2)
(slime-search-buffer-package)))))
(setq slime-find-buffer-package-function 'clack-slime-search-buffer-package)
;; cl-annot
(font-lock-add-keywords 'lisp-mode '(("\\(?:^\\|[^,]\\)\\(@\\(?:\\sw\\|\\s_\\)+\\)" (1 font-lock-comment-face))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment