Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4ecc0b67
Commit
4ecc0b67
authored
May 05, 2008
by
Sam Steingold
Browse files
(delete-other-windows-vertically): New function.
parent
d0c66c5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/window.el
lisp/window.el
+15
-0
No files found.
lisp/ChangeLog
View file @
4ecc0b67
2008-05-05 Sam Steingold <sds@gnu.org>
* window.el (delete-other-windows-vertically): New function.
2008-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
* dired.el (dired-read-dir-and-switches):
...
...
lisp/window.el
View file @
4ecc0b67
...
...
@@ -1095,6 +1095,21 @@ active. This function is run by `mouse-autoselect-window-timer'."
(
run-hooks
'mouse-leave-buffer-hook
))
(
select-window
window
))))
(
defun
delete-other-windows-vertically
(
&optional
window
)
"Delete the windows in the same column with WINDOW, but not WINDOW itself.
This may be a useful alternative binding for \\[delete-other-windows]
if you often split windows horizontally."
(
interactive
)
(
let*
((
window
(
or
window
(
selected-window
)))
(
edges
(
window-edges
window
))
(
w
window
)
delenda
)
(
while
(
not
(
eq
(
setq
w
(
next-window
w
1
))
window
))
(
let
((
e
(
window-edges
w
)))
(
when
(
and
(
=
(
car
e
)
(
car
edges
))
(
=
(
caddr
e
)
(
caddr
edges
)))
(
push
w
delenda
))))
(
mapc
'delete-window
delenda
)))
(
define-key
ctl-x-map
"2"
'split-window-vertically
)
(
define-key
ctl-x-map
"3"
'split-window-horizontally
)
(
define-key
ctl-x-map
"}"
'enlarge-window-horizontally
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment