Cocoa emacs stuff.

This commit is contained in:
Ivan Malison 2014-10-17 19:11:48 -07:00
parent 6929aa194c
commit 7e87d26e6e

23
init.el
View File

@ -21,6 +21,8 @@
(let ((default-directory "~/.emacs.d/elpa/")) (let ((default-directory "~/.emacs.d/elpa/"))
(normal-top-level-add-subdirs-to-load-path)) (normal-top-level-add-subdirs-to-load-path))
(setq exec-path (cons "/usr/local/bin/" exec-path))
(add-to-list 'custom-theme-load-path "~/.emacs.d/elpa/") (add-to-list 'custom-theme-load-path "~/.emacs.d/elpa/")
(require 'patches) (require 'patches)
@ -79,6 +81,11 @@ Return a list of installed packages or nil for every package not installed."
;; This makes it so that emacs --daemon creates server files in ~/.emacs.d/server ;; This makes it so that emacs --daemon creates server files in ~/.emacs.d/server
;;(setq server-use-tcp t) ;;(setq server-use-tcp t)
;; Set the default font for emacs.
;;(set-face-attribute 'default t :font "Monaco for Powerline")
;;(set-frame-font "Monaco" t t)
;;(set-face-attribute 'default nil :height 80)
;; Enable ido mode. ;; Enable ido mode.
(require 'ido) (require 'ido)
(ido-mode t) (ido-mode t)
@ -196,7 +203,7 @@ Return a list of installed packages or nil for every package not installed."
(add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init)) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init))
; Load flymake on non-temp buffers ;; Load flymake on non-temp buffers
(add-hook 'python-mode-hook (add-hook 'python-mode-hook
(lambda () (unless (or (eq buffer-file-name nil) (eq (file-name-directory buffer-file-name) nil)) (flymake-mode 1)))) (lambda () (unless (or (eq buffer-file-name nil) (eq (file-name-directory buffer-file-name) nil)) (flymake-mode 1))))
@ -231,10 +238,16 @@ Return a list of installed packages or nil for every package not installed."
(defun get-virtual-envs () (defun get-virtual-envs ()
(interactive) (interactive)
(let ((project-root (with-project-root (cdr project-details))))
(cl-remove-if-not 'file-exists-p (condition-case ex
(mapcar (lambda (env-suffix) (concat project-root env-suffix)) (let ((project-root (with-project-root (cdr project-details))))
'(".tox/py27/" "env"))))) (cl-remove-if-not 'file-exists-p
(mapcar (lambda (env-suffix) (concat project-root env-suffix))
'(".tox/py27/" "env"))))
('error
(message (format "Caught exception: [%s]" ex))
(setq retval (cons 'exception (list ex))))
nil))
(add-hook 'python-mode-hook 'add-virtual-envs-to-jedi-server) (add-hook 'python-mode-hook 'add-virtual-envs-to-jedi-server)