[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/window.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/window.el,v |
Date: |
Thu, 10 Jul 2008 04:27:32 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/07/10 04:27:32
Index: window.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/window.el,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- window.el 1 Jul 2008 03:01:54 -0000 1.144
+++ window.el 10 Jul 2008 04:27:32 -0000 1.145
@@ -1617,6 +1617,22 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/window.el,v,
Chong Yidong <=