From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: split-window as a command Date: Fri, 12 Apr 2013 13:37:24 +0200 Message-ID: <87obdkf097.fsf@rosalinde.fritz.box> References: <87ppy0p4cm.fsf@rosalinde.fritz.box> <5167D3E8.8000903@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365766660 23036 80.91.229.3 (12 Apr 2013 11:37:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2013 11:37:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 12 13:37:44 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQcIZ-0005fT-U7 for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2013 13:37:44 +0200 Original-Received: from localhost ([::1]:60349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQcIZ-0000q5-Fe for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2013 07:37:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQcIP-0000cf-Fi for emacs-devel@gnu.org; Fri, 12 Apr 2013 07:37:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQcIL-0003XR-6o for emacs-devel@gnu.org; Fri, 12 Apr 2013 07:37:33 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:51242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQcIK-0003X8-Tf for emacs-devel@gnu.org; Fri, 12 Apr 2013 07:37:29 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.35]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MR9tJ-1U0P601s6h-00UWgS for ; Fri, 12 Apr 2013 13:37:27 +0200 Original-Received: (qmail invoked by alias); 12 Apr 2013 11:37:26 -0000 Original-Received: from i59F57871.versanet.de (EHLO rosalinde.fritz.box) [89.245.120.113] by mail.gmx.net (mp035) with SMTP; 12 Apr 2013 13:37:26 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19Q4PJzzeJQsJJE98NIkwydeTjmVS5izeaVCE44O6 Gy8kZaxJdq12z2 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158851 Archived-At: On Fri, 12 Apr 2013 11:29:12 +0200 martin rudalics wrote: >> The doc string of split-window says "Interactively, SIZE is the prefix >> argument." But in fact, invoking split-window with a prefix argument >> has no effect, because its interactive spec is "i". Maybe this is just >> a doc bug, since, when split-window was still a C function, its doc >> string said "Interactively, all arguments are nil." But I don't see why >> it is a command at all any more: invoked interactively, it has exactly >> the same effect as invoking split-window-below without a prefix >> argument, and since the latter does not ignore a prefix argument passed >> to it, it does more than interactively called split-window. So it >> appears to be superfluous for split-window to be a command. Or am I >> overlooking something? > > Everything you say here is correct. Can you please fix it? > > Thanks, martin Here's a patch; I can't commit it to the Savannah repository, since I don't have write access to it. 2013-04-12 Stephen Berman * NEWS: Mention fixing `split-window' to be non-interactive. === modified file 'etc/NEWS' *** etc/NEWS 2013-04-09 17:54:50 +0000 --- etc/NEWS 2013-04-12 10:34:13 +0000 *************** *** 76,81 **** --- 76,86 ---- * Editing Changes in Emacs 24.4 + ** `split-window' is no longer a command, just a non-interactive function. + As a command it was a special case of `split-window-below', and as such + superfluous. After being reimplemented in Lisp, its interactive form + was mistakenly retained. + ** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized', bound to and M-, respectively. 2013-04-12 Stephen Berman * windows.texi (Splitting Windows): Change category of split-window from a command to a function. === modified file 'doc/lispref/windows.texi' *** doc/lispref/windows.texi 2013-01-06 20:34:54 +0000 --- doc/lispref/windows.texi 2013-04-12 10:14:33 +0000 *************** *** 717,723 **** This section describes functions for creating a new window by @dfn{splitting} an existing one. ! @deffn Command split-window &optional window size side This function creates a new live window next to the window @var{window}. If @var{window} is omitted or @code{nil}, it defaults to the selected window. That window is ``split'', and reduced in --- 717,723 ---- This section describes functions for creating a new window by @dfn{splitting} an existing one. ! @defun split-window &optional window size side This function creates a new live window next to the window @var{window}. If @var{window} is omitted or @code{nil}, it defaults to the selected window. That window is ``split'', and reduced in *************** *** 767,773 **** lieu of the usual action of @code{split-window}. Otherwise, this function obeys the @code{window-atom} or @code{window-side} window parameter, if any. @xref{Window Parameters}. ! @end deffn As an example, here is a sequence of @code{split-window} calls that yields the window configuration discussed in @ref{Windows and Frames}. --- 767,773 ---- lieu of the usual action of @code{split-window}. Otherwise, this function obeys the @code{window-atom} or @code{window-side} window parameter, if any. @xref{Window Parameters}. ! @end defun As an example, here is a sequence of @code{split-window} calls that yields the window configuration discussed in @ref{Windows and Frames}. 2013-04-12 Stephen Berman * window.el (split-window): Remove interactive form, since as a command this function is a special case of split-window-below. === modified file 'lisp/window.el' *** lisp/window.el 2013-01-02 16:13:04 +0000 --- lisp/window.el 2013-04-12 09:43:13 +0000 *************** *** 3686,3692 **** absolute value can be less than `window-min-height' or `window-min-width'; so this command can make a new window as small as one line or two columns. SIZE defaults to half of ! WINDOW's size. Interactively, SIZE is the prefix argument. Optional third argument SIDE nil (or `below') specifies that the new window shall be located below WINDOW. SIDE `above' means the --- 3686,3692 ---- absolute value can be less than `window-min-height' or `window-min-width'; so this command can make a new window as small as one line or two columns. SIZE defaults to half of ! WINDOW's size. Optional third argument SIDE nil (or `below') specifies that the new window shall be located below WINDOW. SIDE `above' means the *************** *** 3718,3724 **** window, these properties as well as the buffer displayed in the new window are inherited from the window selected on WINDOW's frame. The selected window is not changed by this function." - (interactive "i") (setq window (window-normalize-window window)) (let* ((side (cond ((not side) 'below) --- 3718,3723 ----