* etc/NEWS: Describe the change.
* lisp/bindings.el (global-map): Add bindings for 'undo-redo'.
* lisp/simple.el (undo-no-redo): Turn into a user option.
+++
** New command 'undo-redo'.
It undoes previous undo commands, but doesn't record itself as an
-undoable command.
+undoable command. It is bound to 'C-?' and 'C-M-_', the first binding
+works well in graphical mode, and the second one is easy to hit on tty.
+
+For full conventional undo/redo behavior, you can also customize the
+user option 'undo-no-redo' to t.
+++
** New commands 'copy-matching-lines' and 'kill-matching-lines'.
"Keymap to repeat undo key sequences `C-x u u'. Used in `repeat-mode'.")
(put 'undo 'repeat-map 'undo-repeat-map)
+(define-key global-map (kbd "C-?") 'undo-redo)
+(define-key global-map [?\C-\M-_] 'undo-redo)
+
(define-key esc-map "!" 'shell-command)
(define-key esc-map "|" 'shell-command-on-region)
(define-key esc-map "&" 'async-shell-command)
(defvar undo-in-region nil
"Non-nil if `pending-undo-list' is not just a tail of `buffer-undo-list'.")
-(defvar undo-no-redo nil
- "If t, `undo' doesn't go through redo entries.")
+(defcustom undo-no-redo nil
+ "If t, `undo' doesn't go through redo entries."
+ :type 'boolean)
(defvar pending-undo-list nil
"Within a run of consecutive undo commands, list remaining to be undone.