aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <[email protected]>2012-04-10 04:23:21 +0200
committerLars Magne Ingebrigtsen <[email protected]>2012-04-10 04:23:21 +0200
commit74beb59f81f7e2a9e4ca0ab8aede53b405189507 (patch)
tree03a62af7fc5dc7c155db1189d1f453cc3d7f2ed3
parent4bbc3323df984f9614960a066d99460be4a65b4a (diff)
* simple.el (zap-to-char): Allow zapping using input methods.
Fixes: debbugs:1580
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/simple.el4
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4e3d7b3f49..6bf4056ba1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2012-04-10 Lars Magne Ingebrigtsen <[email protected]>
+ * 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).
diff --git a/lisp/simple.el b/lisp/simple.el
index 9fab1d6dd8..54005ebd2b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.