1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00

* simple.el (zap-to-char): Allow zapping using input methods.

Fixes: debbugs:1580
This commit is contained in:
Lars Magne Ingebrigtsen 2012-04-10 04:23:21 +02:00
parent 4bbc3323df
commit 74beb59f81
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* simple.el (zap-to-char): Allow zapping using input methods
(bug#1580).
* textmodes/fill.el (fill-region): Leave point and mark where they
were before filling (bug#5399).

View File

@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified."
"Kill up to and including ARGth occurrence of CHAR.
Case is ignored if `case-fold-search' is non-nil in the current buffer.
Goes backward if ARG is negative; error if CHAR not found."
(interactive "p\ncZap to char: ")
(interactive (list (prefix-numeric-value current-prefix-arg)
(read-char "Zap to char: " t)))
;; Avoid "obsolete" warnings for translation-table-for-input.
(with-no-warnings
(if (char-table-p translation-table-for-input)
(setq char (or (aref translation-table-for-input char) char))))
(kill-region (point) (progn
(search-forward (char-to-string char) nil nil arg)
; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
(point))))
;; kill-line and its subroutines.