summaryrefslogtreecommitdiff
path: root/lisp/language/japan-util.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-11-16 06:26:27 +0000
committerKenichi Handa <handa@m17n.org>1998-11-16 06:26:27 +0000
commitb194460e44b22c557d067062387a548774836d26 (patch)
tree781b46dd771c359187ce764ea57bc85640d71b38 /lisp/language/japan-util.el
parent6185c1c05b28d5ba2e4b082e96de98d325a609d0 (diff)
downloademacs-b194460e44b22c557d067062387a548774836d26.tar.gz
(japanese-zenkaku-region): New optional arg KATAKANA-ONLY.
Diffstat (limited to 'lisp/language/japan-util.el')
-rw-r--r--lisp/language/japan-util.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 6cd54e27114..14932039e79 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -291,16 +291,20 @@ Optional argument ASCII-ONLY non-nil means to convert only to ASCII char."
hankaku)))))))
;;;###autoload
-(defun japanese-zenkaku-region (from to)
+(defun japanese-zenkaku-region (from to &optional katakana-only)
"Convert hankaku' chars in the region to Japanese `zenkaku' chars.
`Zenkaku' chars belong to `japanese-jisx0208'
-`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'."
- (interactive "r")
+`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'.
+Optional argument KATAKANA-ONLY non-nil means to convert only KATAKANA char."
+ (interactive "r\nP")
(save-restriction
(narrow-to-region from to)
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "\\ca\\|\\ck" nil t)
+ (while (or (and katakana-only
+ (re-search-forward "\\ck" nil t))
+ (and (not katakana-only)
+ (re-search-forward "\\ca\\|\\ck" nil t)))
(let* ((hankaku (preceding-char))
(composition (get-char-code-property hankaku 'kana-composition))
next slot)