X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=20411af644a5b5c51fcfe40fd395b529f45e5ceb;hb=69c3ddf33a7938b92d3c8979582c12a8ccc5806d;hp=91b18bd09a42e1df6980d0a2ab8982fcd1eba9c7;hpb=d75462c13eb1d5a5ca2772446df7a8161f924257;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index 91b18bd..20411af 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -1271,15 +1271,17 @@ Quickly start eshll in split window below, refer [[http://www.howardism.org/Tech (delete-window) (select-window (sd/window-has-eshell))) (progn - (split-window-vertically (- (/ (window-total-height) 3))) - (other-window 1) - (unless (and (boundp 'eshell-buffer-name) (get-buffer eshell-buffer-name)) - (eshell)) - (switch-to-buffer eshell-buffer-name) - (goto-char (point-max)) - (eshell-kill-input) - (insert (format "cd %s" default-directory)) - (eshell-send-input)))) + (let ((dir default-directory)) + + (split-window-vertically (- (/ (window-total-height) 3))) + (other-window 1) + (unless (and (boundp 'eshell-buffer-name) (get-buffer eshell-buffer-name)) + (eshell)) + (switch-to-buffer eshell-buffer-name) + (goto-char (point-max)) + (eshell-kill-input) + (insert (format "cd %s" dir)) + (eshell-send-input))))) (global-unset-key (kbd "M-`")) (global-set-key (kbd "M-`") 'sd/toggle-eshell-here)