diff options
| author | Gerd Moellmann | 2001-05-28 11:03:17 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-05-28 11:03:17 +0000 |
| commit | c79cb28320c392df58574025e0f09208a50f23e3 (patch) | |
| tree | ab0a87262b0490670c9e84b7731404ff3bc22190 | |
| parent | 719bb352adc90907db9a84275d5e53f51b0e9c9a (diff) | |
| download | emacs-c79cb28320c392df58574025e0f09208a50f23e3.tar.gz emacs-c79cb28320c392df58574025e0f09208a50f23e3.zip | |
(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>
| -rw-r--r-- | lisp/language/japan-util.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index 282926db926..36dbefb4af7 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el | |||
| @@ -201,9 +201,9 @@ The argument object is not altered--the value is a copy. | |||
| 201 | Optional argument ASCII-ONLY non-nil means to return only ASCII character." | 201 | Optional argument ASCII-ONLY non-nil means to return only ASCII character." |
| 202 | (if (stringp obj) | 202 | (if (stringp obj) |
| 203 | (japanese-string-conversion obj 'japanese-hankaku-region ascii-only) | 203 | (japanese-string-conversion obj 'japanese-hankaku-region ascii-only) |
| 204 | (or (get-char-code-property obj 'ascii) | 204 | (or (and (not ascii-only) |
| 205 | (and (not ascii-only) | ||
| 206 | (get-char-code-property obj 'jisx0201)) | 205 | (get-char-code-property obj 'jisx0201)) |
| 206 | (get-char-code-property obj 'ascii) | ||
| 207 | obj))) | 207 | obj))) |
| 208 | 208 | ||
| 209 | ;;;###autoload | 209 | ;;;###autoload |
| @@ -282,9 +282,9 @@ Optional argument ASCII-ONLY non-nil means to convert only to ASCII char." | |||
| 282 | (goto-char (point-min)) | 282 | (goto-char (point-min)) |
| 283 | (while (re-search-forward "\\cj" nil t) | 283 | (while (re-search-forward "\\cj" nil t) |
| 284 | (let* ((zenkaku (preceding-char)) | 284 | (let* ((zenkaku (preceding-char)) |
| 285 | (hankaku (or (get-char-code-property zenkaku 'ascii) | 285 | (hankaku (or (and (not ascii-only) |
| 286 | (and (not ascii-only) | 286 | (get-char-code-property zenkaku 'jisx0201)) |
| 287 | (get-char-code-property zenkaku 'jisx0201))))) | 287 | (get-char-code-property zenkaku 'ascii)))) |
| 288 | (if hankaku | 288 | (if hankaku |
| 289 | (japanese-replace-region (match-beginning 0) (match-end 0) | 289 | (japanese-replace-region (match-beginning 0) (match-end 0) |
| 290 | hankaku))))))) | 290 | hankaku))))))) |