]> git.eshelyaron.com Git - emacs.git/commitdiff
(japanese-hankaku): Prefer the charset
authorGerd Moellmann <gerd@gnu.org>
Mon, 28 May 2001 11:03:17 +0000 (11:03 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 28 May 2001 11:03:17 +0000 (11:03 +0000)
`jisx0201' when the optional argument `ascii-only' is not specified.
(japanese-hankaku-region): Ditto.
From Katsumi Yamaoka <yamaoka@jpl.org>

lisp/language/japan-util.el

index 282926db926a7ee665996966bcd83805eb06fba3..36dbefb4af771454b0a63963b83fddb88caa4c26 100644 (file)
@@ -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."
   (if (stringp obj)
       (japanese-string-conversion obj 'japanese-hankaku-region ascii-only)
-    (or (get-char-code-property obj 'ascii)
-       (and (not ascii-only)
+    (or (and (not ascii-only)
             (get-char-code-property obj 'jisx0201))
+       (get-char-code-property obj 'ascii)
        obj)))
 
 ;;;###autoload
@@ -282,9 +282,9 @@ Optional argument ASCII-ONLY non-nil means to convert only to ASCII char."
       (goto-char (point-min))
       (while (re-search-forward "\\cj" nil t)
        (let* ((zenkaku (preceding-char))
-              (hankaku (or (get-char-code-property zenkaku 'ascii)
-                           (and (not ascii-only)
-                                (get-char-code-property zenkaku 'jisx0201)))))
+              (hankaku (or (and (not ascii-only)
+                                (get-char-code-property zenkaku 'jisx0201))
+                           (get-char-code-property zenkaku 'ascii))))
          (if hankaku
              (japanese-replace-region (match-beginning 0) (match-end 0)
                                       hankaku)))))))