[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/org/org-compat.el,v
From: |
Carsten Dominik |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/org/org-compat.el,v |
Date: |
Wed, 12 Nov 2008 08:01:14 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Carsten Dominik <cdominik> 08/11/12 08:01:10
Index: org-compat.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-compat.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- org-compat.el 25 Oct 2008 21:32:47 -0000 1.8
+++ org-compat.el 12 Nov 2008 08:01:07 -0000 1.9
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
-;; Version: 6.10c
+;; Version: 6.12a
;;
;; This file is part of GNU Emacs.
;;
@@ -150,6 +150,22 @@
string)
(put 'org-add-props 'lisp-indent-function 2)
+(defun org-fit-window-to-buffer (&optional window max-height min-height
+ shrink-only)
+ "Fit WINDOW to the buffer, but only if it is not a side-by-side window.
+WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are
+passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
+`shrink-window-if-larger-than-buffer' instead, the hight limit are
+ignored in this case."
+ (cond ((> (frame-width) (window-width window))
+ ;; do nothing if another window would suffer
+ )
+ ((and (fboundp 'fit-window-to-buffer) (not shrink-only))
+ (fit-window-to-buffer window max-height min-height))
+ ((fboundp 'shrink-window-if-larger-than-buffer)
+ (shrink-window-if-larger-than-buffer window)))
+ (or window (selected-window)))
+
;; Region compatibility
(defvar org-ignore-region nil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/org/org-compat.el,v,
Carsten Dominik <=