emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115060: * lisp/bindings.el (ctl-x-map): Bind C-x SP


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115060: * lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
Date: Mon, 11 Nov 2013 05:19:03 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115060
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2013-11-11 00:18:53 -0500
message:
  * lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
  * src/keyboard.c (command_loop_1): Use region-extract-function.
  * src/insdel.c (Qregion_extract_function): Not static any more (can we
  stop pretending that these vars can benefit from being marked static?).
modified:
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/bindings.el               
bindings.el-20091113204419-o5vbwnq5f7feedwu-1013
  lisp/rect.el                   rect.el-20091113204419-o5vbwnq5f7feedwu-83
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/insdel.c                   insdel.c-20091113204419-o5vbwnq5f7feedwu-175
  src/keyboard.c                 keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2013-11-11 04:50:56 +0000
+++ b/etc/NEWS  2013-11-11 05:18:53 +0000
@@ -189,7 +189,7 @@
 
 * Editing Changes in Emacs 24.4
 
-** New command `rectangle-mark' makes a rectangular region.
+** Command `rectangle-mark-mode' bound to C-x SPC makes a rectangular region.
 Most commands are still unaware of it, but kill/yank do work on the rectangle.
 
 ** C-x TAB enters a transient interactive mode.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-11 04:55:39 +0000
+++ b/lisp/ChangeLog    2013-11-11 05:18:53 +0000
@@ -1,3 +1,7 @@
+2013-11-11  Stefan Monnier  <address@hidden>
+
+       * bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
+
 2013-11-11  Nathan Trapuzzano  <address@hidden>  (tiny change)
 
        * emacs-lisp/cconv.el (cconv-convert): Print warning instead of

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2013-08-08 00:44:22 +0000
+++ b/lisp/bindings.el  2013-11-11 05:18:53 +0000
@@ -891,6 +891,7 @@
 
 (define-key ctl-x-map "\C-x" 'exchange-point-and-mark)
 (define-key ctl-x-map "\C-@" 'pop-global-mark)
+(define-key ctl-x-map " " 'rectangle-mark-mode)
 (define-key ctl-x-map [?\C- ] 'pop-global-mark)
 
 (define-key global-map "\C-n" 'next-line)

=== modified file 'lisp/rect.el'
--- a/lisp/rect.el      2013-11-04 20:45:36 +0000
+++ b/lisp/rect.el      2013-11-11 05:18:53 +0000
@@ -414,9 +414,7 @@
 
 ;;; New rectangle integration with kill-ring.
 
-;; FIXME: lots of known problems with the new rectangle support:
-;; - no key binding for mark-rectangle.
-;; - no access to the `string-rectangle' functionality.
+;; FIXME: known problems with the new rectangle support:
 ;; - lots of commands handle the region without paying attention to its
 ;;   rectangular shape.
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-09 21:24:10 +0000
+++ b/src/ChangeLog     2013-11-11 05:18:53 +0000
@@ -1,3 +1,9 @@
+2013-11-11  Stefan Monnier  <address@hidden>
+
+       * keyboard.c (command_loop_1): Use region-extract-function.
+       * insdel.c (Qregion_extract_function): Not static any more (can we
+       stop pretending that these vars can benefit from being marked static?).
+
 2013-11-09  Eli Zaretskii  <address@hidden>
 
        * search.c (find_newline): If buffer text is relocated during the

=== modified file 'src/insdel.c'
--- a/src/insdel.c      2013-11-06 04:11:04 +0000
+++ b/src/insdel.c      2013-11-11 05:18:53 +0000
@@ -1778,7 +1778,7 @@
   bset_point_before_scroll (current_buffer, Qnil);
 }
 
-static Lisp_Object Qregion_extract_function;
+Lisp_Object Qregion_extract_function;
 
 /* Check that it is okay to modify the buffer between START and END,
    which are char positions.

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2013-11-06 21:17:26 +0000
+++ b/src/keyboard.c    2013-11-11 05:18:53 +0000
@@ -1321,6 +1321,8 @@
 /* The last boundary auto-added to buffer-undo-list.  */
 Lisp_Object last_undo_boundary;
 
+extern Lisp_Object Qregion_extract_function;
+
 /* FIXME: This is wrong rather than test window-system, we should call
    a new set-selection, which will then dispatch to x-set-selection, or
    tty-set-selection, or w32-set-selection, ...  */
@@ -1629,16 +1631,11 @@
                  && NILP (Fmemq (Vthis_command,
                                  Vselection_inhibit_update_commands)))
                {
-                 ptrdiff_t beg
-                   = XINT (Fmarker_position (BVAR (current_buffer, mark)));
-                 ptrdiff_t end = PT;
-                 if (beg < end)
-                   call2 (Qx_set_selection, QPRIMARY,
-                          make_buffer_string (beg, end, 0));
-                 else if (beg > end)
-                   call2 (Qx_set_selection, QPRIMARY,
-                          make_buffer_string (end, beg, 0));
-                 /* Don't set empty selections.  */
+                 Lisp_Object txt
+                   = call1 (Fsymbol_value (Qregion_extract_function), Qnil);
+                 if (XINT (Flength (txt)) > 0)
+                   /* Don't set empty selections.  */
+                   call2 (Qx_set_selection, QPRIMARY, txt);
                }
 
              if (current_buffer != prev_buffer || MODIFF != prev_modiff)


reply via email to

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