emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving vertical boundaries after C-x 3


From: Nick Roberts
Subject: Re: Moving vertical boundaries after C-x 3
Date: Fri, 14 Apr 2006 08:51:08 +1200

Richard Stallman writes:
 >       How about
 >     adding:
 > 
 >     (global-set-key [vertical-line mouse-3] 'mouse-delete-other-windows)
 >     (global-set-key [vertical-line mouse-2] 'mouse-delete-window)
 > 
 >     and adjusting the help string accordingly?
 > 
 > Why suggest those?

For consistency with the mode line.  Its no big deal, I doubt that many will
use it but I see no inconvenience in having it.

To avoid any further ambiguity I attach the proposed patch below.  I note that
[vertical-line mouse-1] is already bound to mouse-select-window.  I have
changed the help string in xdisp.c to match that for the mode-line.  I set it
using make_string but I can't see that done anywhere else, so I wonder if
there's a better way.

I also note that even [vertical-line C-mouse-2] has a binding
(mouse-split-window-vertically).  This function works properly when the window
extends from top to bottom but once it has already been split vertically, it
splits the lower window in the wrong place.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** mouse.el    31 Mar 2006 11:03:14 +1200      1.297
--- mouse.el    14 Apr 2006 08:23:25 +1200      
***************
*** 2404,2409 ****
--- 2404,2411 ----
  (global-set-key [header-line mouse-1] 'mouse-select-window)
  (global-set-key [mode-line mouse-2] 'mouse-delete-other-windows)
  (global-set-key [mode-line mouse-3] 'mouse-delete-window)
+ (global-set-key [vertical-line mouse-2] 'mouse-delete-other-windows)
+ (global-set-key [vertical-line mouse-3] 'mouse-delete-window)
  (global-set-key [mode-line C-mouse-2] 'mouse-split-window-horizontally)
  (global-set-key [vertical-scroll-bar C-mouse-2] 
'mouse-split-window-vertically)
  (global-set-key [vertical-line C-mouse-2] 'mouse-split-window-vertically)


*** xdisp.c     13 Apr 2006 13:08:36 +1200      1.1086
--- xdisp.c     14 Apr 2006 08:41:08 +1200      
***************
*** 22360,22366 ****
    if (part == ON_VERTICAL_BORDER)
      {
        cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!       help_echo_string = make_string ("drag-mouse-1: resize", 20);
      }
    else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
           || part == ON_SCROLL_BAR)
--- 22360,22366 ----
    if (part == ON_VERTICAL_BORDER)
      {
        cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!       help_echo_string = make_string ("mouse-1: select (drag to resize), 
mouse-2: delete others, mouse-3: delete this", 78);
      }
    else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
           || part == ON_SCROLL_BAR)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]