1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
emacs/lisp/emulation
Stefan Monnier 5dc644a6b0 Generalize the prefix-command machinery of C-u
* lisp/simple.el (prefix-command-echo-keystrokes-functions)
(prefix-command-preserve-state-hook): New hooks.
(internal-echo-keystrokes-prefix): New function.
(prefix-command--needs-update, prefix-command--last-echo): New vars.
(prefix-command-update, prefix-command-preserve): New functions.
(reset-this-command-lengths): New compatibility definition.
(universal-argument--mode): Call prefix-command-update.
(universal-argument, universal-argument-more, negative-argument)
(digit-argument): Call prefix-command-preserve-state.

* src/keyboard.c: Call internal-echo-keystrokes-prefix to build
the "prefix argument" to echo.
(this_command_key_count_reset, before_command_key_count)
(before_command_echo_length): Delete variables.
(echo_add_key): Always add a space.
(echo_char): Remove.
(echo_dash): Don't give up when this_command_key_count is 0, since that
is now the case after a prefix command.
(echo_update): New function, extracted from echo_now.
(echo_now): Use it.
(add_command_key, read_char, record_menu_key): Remove old disabled code.
(command_loop_1): Don't refrain from pushing an undo boundary when
prefix-arg is set.  Remove other prefix-arg special case, now handled
directly in the prefix commands instead.  But call echo_now if there's
a prefix state to echo.
(read_char, record_menu_key): Use echo_update instead of echo_char.
(read_key_sequence): Use echo_now rather than echo_dash/echo_char.
(Freset_this_command_lengths): Delete function.
(syms_of_keyboard): Define Qinternal_echo_keystrokes_prefix.
(syms_of_keyboard): Don't defsubr Sreset_this_command_lengths.

* lisp/simple.el: Use those new hooks for C-u.
(universal-argument--description): New function.
(prefix-command-echo-keystrokes-functions): Use it.
(universal-argument--preserve): New function.
(prefix-command-preserve-state-hook): Use it.
(command-execute): Call prefix-command-update if needed.

* lisp/kmacro.el (kmacro-step-edit-prefix-commands)
(kmacro-step-edit-prefix-index): Delete variables.
(kmacro-step-edit-query, kmacro-step-edit-insert): Remove ad-hoc
support for prefix arg commands.
(kmacro-step-edit-macro): Don't bind kmacro-step-edit-prefix-index.

* lisp/emulation/cua-base.el (cua--prefix-override-replay)
(cua--shift-control-prefix): Use prefix-command-preserve-state.
Remove now unused arg `arg'.
(cua--prefix-override-handler, cua--prefix-repeat-handler)
(cua--shift-control-c-prefix, cua--shift-control-x-prefix):
Update accordingly.
(cua--prefix-override-timeout): Don't call reset-this-command-lengths
any more.
(cua--keep-active, cua-exchange-point-and-mark): Don't set mark-active
if the mark is not set.
2015-09-01 21:14:18 -04:00
..
cua-base.el Generalize the prefix-command machinery of C-u 2015-09-01 21:14:18 -04:00
cua-gmrk.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
cua-rect.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
edt-lk201.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
edt-mapper.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
edt-pc.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
edt-vt100.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
edt.el Text quoting fixes in cedet, emulation, emacs-lisp 2015-08-29 21:43:01 -07:00
keypad.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
viper-cmd.el Text quoting fixes in cedet, emulation, emacs-lisp 2015-08-29 21:43:01 -07:00
viper-ex.el Text quoting fixes in cedet, emulation, emacs-lisp 2015-08-29 21:43:01 -07:00
viper-init.el Prefer directed to neutral quotes 2015-08-24 23:57:25 -07:00
viper-keym.el * lisp/emulation/viper.el: A couple of docstring format tweaks 2015-02-05 11:05:07 -05:00
viper-macs.el Text quoting fixes in cedet, emulation, emacs-lisp 2015-08-29 21:43:01 -07:00
viper-mous.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00
viper-util.el Don't quote nil and t in doc strings 2015-05-21 10:06:44 -07:00
viper.el Update copyright year to 2015 2015-01-01 14:26:41 -08:00