diff options
| -rw-r--r-- | lisp/international/kinsoku.el | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el index 183771cf5f6..fec531f6047 100644 --- a/lisp/international/kinsoku.el +++ b/lisp/international/kinsoku.el | |||
| @@ -46,6 +46,22 @@ The value 0 means there's no limitation.") | |||
| 46 | (concat | 46 | (concat |
| 47 | ;; ASCII | 47 | ;; ASCII |
| 48 | "!)-_~}]:;',.?" | 48 | "!)-_~}]:;',.?" |
| 49 | ;; Latin JISX0201 | ||
| 50 | ;; Instead of putting Latin JISX0201 string directyly, we | ||
| 51 | ;; generate the string as below to avoid character | ||
| 52 | ;; unification problem. | ||
| 53 | (let* ((str1 "!)-_~}]:;',.?") | ||
| 54 | (len (length str1)) | ||
| 55 | (idx 0) | ||
| 56 | (str2 "") | ||
| 57 | ch) | ||
| 58 | (while (< idx len) | ||
| 59 | (setq ch (make-char 'latin-jisx0201 (aref str1 idx)) | ||
| 60 | str2 (concat str2 (char-to-string ch)) | ||
| 61 | idx (1+ idx))) | ||
| 62 | str2) | ||
| 63 | ;; Katakana JISX0201 | ||
| 64 | "(I!#'()*+,-./0^_(B" | ||
| 49 | ;; Japanese JISX0208 | 65 | ;; Japanese JISX0208 |
| 50 | "$B!"!#!$!%!&!'!(!)!*!+!,!-!.!/!0!1!2!3!4!5!6!7!8!9!:!;!<!=!>(B\ | 66 | "$B!"!#!$!%!&!'!(!)!*!+!,!-!.!/!0!1!2!3!4!5!6!7!8!9!:!;!<!=!>(B\ |
| 51 | $B!?!@!A!B!C!D!E!G!I!K!M!O!Q!S!U!W!Y![!k!l!m!n(B\ | 67 | $B!?!@!A!B!C!D!E!G!I!K!M!O!Q!S!U!W!Y![!k!l!m!n(B\ |
| @@ -72,6 +88,20 @@ The value 0 means there's no limitation.") | |||
| 72 | (concat | 88 | (concat |
| 73 | ;; ASCII | 89 | ;; ASCII |
| 74 | "({[`" | 90 | "({[`" |
| 91 | ;; Latin JISX0201 | ||
| 92 | ;; See the comment above. | ||
| 93 | (let* ((str1 "({[`") | ||
| 94 | (len (length str1)) | ||
| 95 | (idx 0) | ||
| 96 | (str2 "") | ||
| 97 | ch) | ||
| 98 | (while (< idx len) | ||
| 99 | (setq ch (make-char 'latin-jisx0201 (aref str1 idx)) | ||
| 100 | str2 (concat str2 (char-to-string ch)) | ||
| 101 | idx (1+ idx))) | ||
| 102 | str2) | ||
| 103 | ;; JISX0201 Katakana | ||
| 104 | "(I"(B" | ||
| 75 | ;; Japanese JISX0208 | 105 | ;; Japanese JISX0208 |
| 76 | "$B!F!H!J!L!N!P!R!T!V!X!Z!k!l!m!n!w!x(B\ | 106 | "$B!F!H!J!L!N!P!R!T!V!X!Z!k!l!m!n!w!x(B\ |
| 77 | $A!.!0#"#(!2!4!6!8!:!<!>!c!d!e#@!f!l(B" | 107 | $A!.!0#"#(!2!4!6!8!:!<!>!c!d!e#@!f!l(B" |
| @@ -101,7 +131,7 @@ The value 0 means there's no limitation.") | |||
| 101 | (goto-char (car pos-and-column))))) | 131 | (goto-char (car pos-and-column))))) |
| 102 | 132 | ||
| 103 | ;; Try to resolve `kinsoku' restriction by making the current line shorter. | 133 | ;; Try to resolve `kinsoku' restriction by making the current line shorter. |
| 104 | ;; The line can't be broken before the buffer position LINEBEG." | 134 | ;; The line can't be broken before the buffer position LINEBEG. |
| 105 | (defun kinsoku-shorter (linebeg) | 135 | (defun kinsoku-shorter (linebeg) |
| 106 | (let ((pos (save-excursion | 136 | (let ((pos (save-excursion |
| 107 | (forward-char -1) | 137 | (forward-char -1) |