Fix get-virtual-envs

This commit is contained in:
Ivan Malison 2014-11-18 19:31:52 -08:00
parent 8ccc274c81
commit a95f4a9a14

12
init.el
View File

@ -100,7 +100,7 @@
exec-path-from-shell slime string-inflection yaml-mode sgml-mode exec-path-from-shell slime string-inflection yaml-mode sgml-mode
dired+ ctags ctags-update helm-gtags hackernews gitconfig-mode dired+ ctags ctags-update helm-gtags hackernews gitconfig-mode
aggressive-indent imenu+ weechat evil helm-ag xclip neotree aggressive-indent imenu+ weechat evil helm-ag xclip neotree
magit-gh-pulls diminish gist)) magit-gh-pulls diminish gist org))
(defvar packages-appearance (defvar packages-appearance
'(monokai-theme solarized-theme zenburn-theme base16-theme molokai-theme '(monokai-theme solarized-theme zenburn-theme base16-theme molokai-theme
@ -304,6 +304,7 @@
(apply #'append (mapcar (lambda (env) `("-v" ,env)) virtual-envs))) (apply #'append (mapcar (lambda (env) `("-v" ,env)) virtual-envs)))
(defun get-virtual-envs () (defun get-virtual-envs ()
(if (projectile-project-p)
(condition-case ex (condition-case ex
(let ((project-root (projectile-project-root))) (let ((project-root (projectile-project-root)))
(cl-remove-if-not 'file-exists-p (cl-remove-if-not 'file-exists-p
@ -313,7 +314,7 @@
('error ('error
(message (format "Caught exception: [%s]" ex)) (message (format "Caught exception: [%s]" ex))
(setq retval (cons 'exception (list ex)))) (setq retval (cons 'exception (list ex))))
nil)) nil)))
(defun message-virtual-envs () (defun message-virtual-envs ()
(interactive) (interactive)
@ -517,11 +518,6 @@ buffer is not visiting a file."
(interactive "r") (interactive "r")
(shell-command-on-region b e "cat | tmux loadb -")) (shell-command-on-region b e "cat | tmux loadb -"))
(defun tmux-copy-buffer-name (&optional b e)
(interactive "r")
(shell-command (concat "echo " (shell-quote-argument (ffip-get-buffer-name))
" | tmux loadb -")))
(defun eval-and-replace () (defun eval-and-replace ()
(interactive) (interactive)
(backward-kill-sexp) (backward-kill-sexp)
@ -619,7 +615,7 @@ buffer is not visiting a file."
(defun get-appropriate-theme () (defun get-appropriate-theme ()
(let ((hour (let ((hour
(string-to-number (format-time-string "%H")))) (string-to-number (format-time-string "%H"))))
(if (or (< hour 8) (> hour 18)) (if (or (< hour 8) (> hour 17))
(random-choice dark-themes) (random-choice light-themes)))) (random-choice dark-themes) (random-choice light-themes))))
(setq current-theme nil) (setq current-theme nil)