branch: externals/olivetti commit 4c2ab02002e7f82cd7d1652a97c5bbe6551b2c50 Author: Paul Rankin <he...@paulwrankin.com> Commit: Paul Rankin <he...@paulwrankin.com>
Use version<, print patch message, cleanup docs --- olivetti.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/olivetti.el b/olivetti.el index 9664365..6395e4c 100644 --- a/olivetti.el +++ b/olivetti.el @@ -230,8 +230,7 @@ fraction of the window width." Cycle through all windows displaying current buffer and: -If ARG is 'exit then cycle through all windows displaying the -current buffer and set window margins to nil. +If ARG is 'exit set window margins to nil. If ARG is nil, first find the `olivetti-safe-width' to which to set `olivetti-body-width', then find the appropriate margin size @@ -295,10 +294,10 @@ If prefixed with ARG, incrementally increase." :group 'olivetti) (defun split-window-right-force (&optional size) - "Filter arguments to `split-window-right' to force split. + "Filter arguments to `split-window-right' to force splitting window. -If optional argument SIZE is ommitted or nil, split window -exactly in half. +If optional argument SIZE is ommitted or nil, both windows get +the same width. Workaround for known Emacs bug in `window-min-size'. See <http://debbugs.gnu.org/24193>." @@ -312,9 +311,10 @@ Adds advice to `split-window-right' to workaround changes in width when using large margins. See <http://debbugs.gnu.org/24193>." (unless (or (advice-member-p 'split-window-right-force 'split-window-right) - (< (string-to-number emacs-version) 25)) - (advice-add 'split-window-right :filter-args - 'split-window-right-force))) + (version< emacs-version "25")) + (advice-add 'split-window-right :filter-args + 'split-window-right-force) + (message "olivetti: Function `split-window-right' has been patched"))) ;;; Mode Definition