* 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?).
\f
* 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.
+2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
+
2013-11-11 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change)
* emacs-lisp/cconv.el (cconv-convert): Print warning instead of
(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)
;;; 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.
+2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * 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 <eliz@gnu.org>
* search.c (find_newline): If buffer text is relocated during the
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.
/* 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, ... */
&& 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)