projects
/
dotfiles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f1ffa21
)
emacs - fix bug emacs here
author
Peng Li
<seudut@gmail.com>
Sat, 2 Jul 2016 15:44:37 +0000
(23:44 +0800)
committer
Peng Li
<seudut@gmail.com>
Sat, 2 Jul 2016 15:44:37 +0000
(23:44 +0800)
emacs.d/config.org
patch
|
blob
|
history
diff --git
a/emacs.d/config.org
b/emacs.d/config.org
index
1830246
..
9a2ec74
100644
(file)
--- a/
emacs.d/config.org
+++ b/
emacs.d/config.org
@@
-1215,11
+1215,11
@@
Toggle an eshell in split window below, refer [[http://www.howardism.org/Technic
"Check if current windows list has a eshell buffer, and return the window"
(interactive)
(let ((ret nil))
"Check if current windows list has a eshell buffer, and return the window"
(interactive)
(let ((ret nil))
- (
dolist (window (window-list)
)
-
(let ((modename (with-current-buffer (window-buffer window
)
-
major-mode))
)
-
(if (equal modename 'eshell-mode
)
-
(setq ret window)))
)
+ (
walk-windows (lambda (window
)
+
(if (equal (with-current-buffer (window-buffer window) major-mode
)
+
'eshell-mode
)
+
(setq ret window))
)
+
nil nil
)
ret))
(defun sd/toggle-eshell-here ()
ret))
(defun sd/toggle-eshell-here ()
@@
-1227,7
+1227,10
@@
Toggle an eshell in split window below, refer [[http://www.howardism.org/Technic
(interactive)
(if (sd/window-has-eshell)
(if (equal major-mode 'eshell-mode)
(interactive)
(if (sd/window-has-eshell)
(if (equal major-mode 'eshell-mode)
- (delete-window)
+ (progn
+ (if (equal (length (window-list)) 1)
+ (mode-line-other-buffer)
+ (delete-window)))
(select-window (sd/window-has-eshell)))
(progn
(let ((dir default-directory))
(select-window (sd/window-has-eshell)))
(progn
(let ((dir default-directory))