(japanese-hankaku): Prefer the charset
`jisx0201' when the optional argument `ascii-only' is not specified. (japanese-hankaku-region): Ditto. From Katsumi Yamaoka <yamaoka@jpl.org>
This commit is contained in:
parent
719bb352ad
commit
c79cb28320
1 changed files with 5 additions and 5 deletions
|
@ -201,9 +201,9 @@ The argument object is not altered--the value is a copy.
|
||||||
Optional argument ASCII-ONLY non-nil means to return only ASCII character."
|
Optional argument ASCII-ONLY non-nil means to return only ASCII character."
|
||||||
(if (stringp obj)
|
(if (stringp obj)
|
||||||
(japanese-string-conversion obj 'japanese-hankaku-region ascii-only)
|
(japanese-string-conversion obj 'japanese-hankaku-region ascii-only)
|
||||||
(or (get-char-code-property obj 'ascii)
|
(or (and (not ascii-only)
|
||||||
(and (not ascii-only)
|
|
||||||
(get-char-code-property obj 'jisx0201))
|
(get-char-code-property obj 'jisx0201))
|
||||||
|
(get-char-code-property obj 'ascii)
|
||||||
obj)))
|
obj)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
@ -282,9 +282,9 @@ Optional argument ASCII-ONLY non-nil means to convert only to ASCII char."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "\\cj" nil t)
|
(while (re-search-forward "\\cj" nil t)
|
||||||
(let* ((zenkaku (preceding-char))
|
(let* ((zenkaku (preceding-char))
|
||||||
(hankaku (or (get-char-code-property zenkaku 'ascii)
|
(hankaku (or (and (not ascii-only)
|
||||||
(and (not ascii-only)
|
(get-char-code-property zenkaku 'jisx0201))
|
||||||
(get-char-code-property zenkaku 'jisx0201)))))
|
(get-char-code-property zenkaku 'ascii))))
|
||||||
(if hankaku
|
(if hankaku
|
||||||
(japanese-replace-region (match-beginning 0) (match-end 0)
|
(japanese-replace-region (match-beginning 0) (match-end 0)
|
||||||
hankaku)))))))
|
hankaku)))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue