|
From: | Juri Linkov |
Subject: | bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically |
Date: | Tue, 05 May 2009 14:03:44 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (x86_64-pc-linux-gnu) |
> + :type '(choice > + (const :tag "sensibly" split-window-sensibly) > + (const :tag "vertically" > + (lambda (window) > + (when (window--splittable-p window) > + (with-selected-window window > + (split-window-vertically))))) > + (const :tag "horizontally" > + (lambda (window) > + (when (window--splittable-p window t) > + (with-selected-window window > + (split-window-horizontally))))) Using lambdas in defcustoms is too ugly: it will put this long lambda code to custom-set-variables in .emacs, and cause other problems. I suggest defining new functions with the prefix `split-window-preferred-' that will provide a hint for the user where they are intended to be used: split-window-preferred-sensibly (window) split-window-preferred-vertically (window) split-window-preferred-horizontally (window) -- Juri Linkov http://www.jurta.org/emacs/
[Prev in Thread] | Current Thread | [Next in Thread] |