Created
August 8, 2011 20:16
-
-
Save ymorimo/1132618 to your computer and use it in GitHub Desktop.
edit-server config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (require 'edit-server nil 'noerror) | |
(setq edit-server-new-frame nil) | |
(edit-server-start) | |
(setq my-edit-server-mode-alist '(("github.com" . markdown-mode) ("blogger.com" . html-mode))) | |
(add-hook 'edit-server-start-hook | |
(lambda () | |
(let ((lst my-edit-server-mode-alist)) | |
(while lst | |
(if (string-match (caar lst) (buffer-name)) | |
(progn | |
(funcall (cdar lst)) | |
(setq lst nil)) | |
(setq lst (cdr lst))))))) | |
;; bring Emacs to the front | |
(when (eq window-system 'ns) | |
(add-hook 'edit-server-start-hook | |
(lambda () (ns-do-applescript "tell application \"Emacs\" to activate"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment