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
cf37ed4f
Commit
cf37ed4f
authored
Jul 10, 2008
by
Chong Yidong
Browse files
(truncated-partial-width-window-p): New function.
parent
81577689
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
lisp/window.el
lisp/window.el
+16
-0
No files found.
lisp/window.el
View file @
cf37ed4f
...
...
@@ -1617,6 +1617,22 @@ This may be a useful alternative binding for \\[delete-other-windows]
(
push
w
delenda
))))
(
mapc
'delete-window
delenda
)))
(
defun
truncated-partial-width-window-p
(
&optional
window
)
"Non-nil if lines in WINDOW are specifically truncated due to its width.
This returns nil if WINDOW is not a partial-width window
(regardless of the value of `truncate-lines').
Otherwise, consult the value of `truncate-partial-width-windows'
for the buffer shown in WINDOW.
If WINDOW is nil, use the selected window."
(
unless
window
(
setq
window
(
selected-window
)))
(
unless
(
window-full-width-p
window
)
(
let
((
t-p-w-w
(
buffer-local-value
'truncate-partial-width-windows
(
window-buffer
window
))))
(
if
(
integerp
t-p-w-w
)
(
<
(
window-width
window
)
t-p-w-w
)
t-p-w-w
))))
(
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