diff options
| author | Dave Love | 2001-03-01 18:14:39 +0000 |
|---|---|---|
| committer | Dave Love | 2001-03-01 18:14:39 +0000 |
| commit | 74ace46ab1ca5d34d87d7c48405f84ec3f94d670 (patch) | |
| tree | 719a3ef66620f05250d80951fde9146e78314bdc | |
| parent | c654de1d4b20b4ff93c99e5ab106862f6da1ee1f (diff) | |
| download | emacs-74ace46ab1ca5d34d87d7c48405f84ec3f94d670.tar.gz emacs-74ace46ab1ca5d34d87d7c48405f84ec3f94d670.zip | |
Doc fixes.
| -rw-r--r-- | lisp/international/quail.el | 87 | ||||
| -rw-r--r-- | lisp/international/utf-8.el | 10 |
2 files changed, 47 insertions, 50 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 4303edc011b..6d26a01aa35 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -593,7 +593,7 @@ We assume there are six rows and each row has 15 keys (columns), | |||
| 593 | the first column of the fifth row is left of key `z', | 593 | the first column of the fifth row is left of key `z', |
| 594 | the sixth row is below the `z' - `/' row. | 594 | the sixth row is below the `z' - `/' row. |
| 595 | Nth (N is even) and (N+1)th characters in the string are non-shifted | 595 | Nth (N is even) and (N+1)th characters in the string are non-shifted |
| 596 | and shifted characters respectively at the same location. | 596 | and shifted characters respectively at the same location. |
| 597 | The location of Nth character is row (N / 30) and column ((N mod 30) / 2). | 597 | The location of Nth character is row (N / 30) and column ((N mod 30) / 2). |
| 598 | The command `quail-set-keyboard-layout' usually sets this variable.") | 598 | The command `quail-set-keyboard-layout' usually sets this variable.") |
| 599 | 599 | ||
| @@ -733,9 +733,9 @@ you type is correctly handled." | |||
| 733 | (mapcar (function (lambda (x) (quail-keyboard-translate x))) | 733 | (mapcar (function (lambda (x) (quail-keyboard-translate x))) |
| 734 | keyseq))) | 734 | keyseq))) |
| 735 | 735 | ||
| 736 | ;; Insert the visual keyboard layout table according to KBD-LAYOUT. | ||
| 737 | ;; The format of KBD-LAYOUT is the same as `quail-keyboard-layout'. | ||
| 738 | (defun quail-insert-kbd-layout (kbd-layout) | 736 | (defun quail-insert-kbd-layout (kbd-layout) |
| 737 | "Insert the visual keyboard layout table according to KBD-LAYOUT. | ||
| 738 | The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." | ||
| 739 | (let (done-list layout i ch) | 739 | (let (done-list layout i ch) |
| 740 | ;; At first, convert KBD-LAYOUT to the same size vector that | 740 | ;; At first, convert KBD-LAYOUT to the same size vector that |
| 741 | ;; contains translated character or string. | 741 | ;; contains translated character or string. |
| @@ -1208,7 +1208,7 @@ The returned value is a Quail map specific to KEY." | |||
| 1208 | (if (not (equal def translation)) | 1208 | (if (not (equal def translation)) |
| 1209 | ;; We must reflect TRANSLATION to car part of MAP. | 1209 | ;; We must reflect TRANSLATION to car part of MAP. |
| 1210 | (setcar map translation))) | 1210 | (setcar map translation))) |
| 1211 | (if (and (consp translation) (vectorp (cdr translation))) | 1211 | (if (and (consp translation) (vectorp (cdr translation))) |
| 1212 | (progn | 1212 | (progn |
| 1213 | (setq quail-current-translations translation) | 1213 | (setq quail-current-translations translation) |
| 1214 | (if (quail-forget-last-selection) | 1214 | (if (quail-forget-last-selection) |
| @@ -1223,12 +1223,11 @@ The returned value is a Quail map specific to KEY." | |||
| 1223 | (signal 'quail-error (apply 'format args))) | 1223 | (signal 'quail-error (apply 'format args))) |
| 1224 | 1224 | ||
| 1225 | 1225 | ||
| 1226 | ;; Convert input string STR to a list of events while interleaving | ||
| 1227 | ;; with the following special events: | ||
| 1228 | ;; (compose-last-chars LEN COMPONENTS) | ||
| 1229 | ;; (quail-advice INPUT-STRING) | ||
| 1230 | |||
| 1231 | (defun quail-input-string-to-events (str) | 1226 | (defun quail-input-string-to-events (str) |
| 1227 | "Convert input string STR to a list of events. | ||
| 1228 | Do so while interleaving with the following special events: | ||
| 1229 | \(compose-last-chars LEN COMPONENTS) | ||
| 1230 | \(quail-advice INPUT-STRING)" | ||
| 1232 | (let* ((events (string-to-list str)) | 1231 | (let* ((events (string-to-list str)) |
| 1233 | (len (length str)) | 1232 | (len (length str)) |
| 1234 | (idx len) | 1233 | (idx len) |
| @@ -1444,15 +1443,14 @@ Return the input string." | |||
| 1444 | (interactive) | 1443 | (interactive) |
| 1445 | (quail-terminate-translation)) | 1444 | (quail-terminate-translation)) |
| 1446 | 1445 | ||
| 1447 | ;; Update the current translation status according to CONTROL-FLAG. | ||
| 1448 | ;; If CONTROL-FLAG is integer value, it is the number of keys in the | ||
| 1449 | ;; head quail-current-key which can be translated. The remaining keys | ||
| 1450 | ;; are put back to unread-command-events to be handled again. If | ||
| 1451 | ;; CONTROL-FLAG is t, terminate the translation for the whole keys in | ||
| 1452 | ;; quail-current-key. If CONTROL-FLAG is nil, proceed the translation | ||
| 1453 | ;; with more keys. | ||
| 1454 | |||
| 1455 | (defun quail-update-translation (control-flag) | 1446 | (defun quail-update-translation (control-flag) |
| 1447 | "Update the current translation status according to CONTROL-FLAG. | ||
| 1448 | If CONTROL-FLAG is integer value, it is the number of keys in the | ||
| 1449 | head `quail-current-key' which can be translated. The remaining keys | ||
| 1450 | are put back to `unread-command-events' to be handled again. If | ||
| 1451 | CONTROL-FLAG is t, terminate the translation for the whole keys in | ||
| 1452 | `quail-current-key'. If CONTROL-FLAG is nil, proceed the translation | ||
| 1453 | with more keys." | ||
| 1456 | (let ((func (quail-update-translation-function))) | 1454 | (let ((func (quail-update-translation-function))) |
| 1457 | (if func | 1455 | (if func |
| 1458 | (setq control-flag (funcall func control-flag)) | 1456 | (setq control-flag (funcall func control-flag)) |
| @@ -1501,8 +1499,8 @@ Return the input string." | |||
| 1501 | ;; translation mode. | 1499 | ;; translation mode. |
| 1502 | (setq quail-translating nil))) | 1500 | (setq quail-translating nil))) |
| 1503 | 1501 | ||
| 1504 | ;; Return the actual definition part of Quail map MAP. | ||
| 1505 | (defun quail-map-definition (map) | 1502 | (defun quail-map-definition (map) |
| 1503 | "Return the actual definition part of Quail map MAP." | ||
| 1506 | (let ((def (car map))) | 1504 | (let ((def (car map))) |
| 1507 | (if (and (consp def) (not (vectorp (cdr def)))) | 1505 | (if (and (consp def) (not (vectorp (cdr def)))) |
| 1508 | (setq def (car def))) | 1506 | (setq def (car def))) |
| @@ -1510,10 +1508,10 @@ Return the input string." | |||
| 1510 | (setq def nil)) | 1508 | (setq def nil)) |
| 1511 | def)) | 1509 | def)) |
| 1512 | 1510 | ||
| 1513 | ;; Return a string to be shown as the current translation of key | ||
| 1514 | ;; sequence of length LEN. DEF is a definition part of Quail map for | ||
| 1515 | ;; the sequence. | ||
| 1516 | (defun quail-get-current-str (len def) | 1511 | (defun quail-get-current-str (len def) |
| 1512 | "Return string to be shown as current translation of key sequence. | ||
| 1513 | LEN is the length of the sequence. DEF is a definition part of the | ||
| 1514 | Quail map for the sequence." | ||
| 1517 | (or (and (consp def) (aref (cdr def) (car (car def)))) | 1515 | (or (and (consp def) (aref (cdr def) (car (car def)))) |
| 1518 | def | 1516 | def |
| 1519 | (and (> len 1) | 1517 | (and (> len 1) |
| @@ -1527,9 +1525,9 @@ Return the input string." | |||
| 1527 | 1525 | ||
| 1528 | (defvar quail-guidance-translations-starting-column 20) | 1526 | (defvar quail-guidance-translations-starting-column 20) |
| 1529 | 1527 | ||
| 1530 | ;; Update `quail-current-translations' to make RELATIVE-INDEX the | ||
| 1531 | ;; current translation. | ||
| 1532 | (defun quail-update-current-translations (&optional relative-index) | 1528 | (defun quail-update-current-translations (&optional relative-index) |
| 1529 | "Update `quail-current-translations'. | ||
| 1530 | Make RELATIVE-INDEX the current translation." | ||
| 1533 | (let* ((indices (car quail-current-translations)) | 1531 | (let* ((indices (car quail-current-translations)) |
| 1534 | (cur (car indices)) | 1532 | (cur (car indices)) |
| 1535 | (start (nth 1 indices)) | 1533 | (start (nth 1 indices)) |
| @@ -1807,8 +1805,8 @@ Remaining args are for FUNC." | |||
| 1807 | 1805 | ||
| 1808 | ;; Guidance, Completion, and Help buffer handlers. | 1806 | ;; Guidance, Completion, and Help buffer handlers. |
| 1809 | 1807 | ||
| 1810 | ;; Make a new one-line frame for Quail guidance buffer. | ||
| 1811 | (defun quail-make-guidance-frame (buf) | 1808 | (defun quail-make-guidance-frame (buf) |
| 1809 | "Make a new one-line frame for Quail guidance buffer." | ||
| 1812 | (let* ((fparam (frame-parameters)) | 1810 | (let* ((fparam (frame-parameters)) |
| 1813 | (top (cdr (assq 'top fparam))) | 1811 | (top (cdr (assq 'top fparam))) |
| 1814 | (border (cdr (assq 'border-width fparam))) | 1812 | (border (cdr (assq 'border-width fparam))) |
| @@ -1825,8 +1823,8 @@ Remaining args are for FUNC." | |||
| 1825 | ;;(set-window-dedicated-p win t) | 1823 | ;;(set-window-dedicated-p win t) |
| 1826 | ))) | 1824 | ))) |
| 1827 | 1825 | ||
| 1828 | ;; Setup Quail completion buffer. | ||
| 1829 | (defun quail-setup-completion-buf () | 1826 | (defun quail-setup-completion-buf () |
| 1827 | "Setup Quail completion buffer." | ||
| 1830 | (unless (buffer-live-p quail-completion-buf) | 1828 | (unless (buffer-live-p quail-completion-buf) |
| 1831 | (let ((default-enable-multibyte-characters enable-multibyte-characters)) | 1829 | (let ((default-enable-multibyte-characters enable-multibyte-characters)) |
| 1832 | (setq quail-completion-buf (get-buffer-create "*Quail Completions*"))) | 1830 | (setq quail-completion-buf (get-buffer-create "*Quail Completions*"))) |
| @@ -1835,9 +1833,8 @@ Remaining args are for FUNC." | |||
| 1835 | (setq quail-overlay (make-overlay 1 1)) | 1833 | (setq quail-overlay (make-overlay 1 1)) |
| 1836 | (overlay-put quail-overlay 'face 'highlight)))) | 1834 | (overlay-put quail-overlay 'face 'highlight)))) |
| 1837 | 1835 | ||
| 1838 | ;; Return t iff the current Quail package requires showing guidance | ||
| 1839 | ;; buffer. | ||
| 1840 | (defun quail-require-guidance-buf () | 1836 | (defun quail-require-guidance-buf () |
| 1837 | "Return t iff the current Quail package requires showing guidance buffer." | ||
| 1841 | (and input-method-verbose-flag | 1838 | (and input-method-verbose-flag |
| 1842 | (if (eq input-method-verbose-flag 'default) | 1839 | (if (eq input-method-verbose-flag 'default) |
| 1843 | (not (and (eq (selected-window) (minibuffer-window)) | 1840 | (not (and (eq (selected-window) (minibuffer-window)) |
| @@ -2094,8 +2091,8 @@ are shown (at most to the depth specified `quail-completion-max-depth')." | |||
| 2094 | (quail-update-guidance))) | 2091 | (quail-update-guidance))) |
| 2095 | (setq this-command 'quail-completion)) | 2092 | (setq this-command 'quail-completion)) |
| 2096 | 2093 | ||
| 2097 | ;; List all completions of KEY in MAP with indentation INDENT. | ||
| 2098 | (defun quail-completion-1 (key map indent) | 2094 | (defun quail-completion-1 (key map indent) |
| 2095 | "List all completions of KEY in MAP with indentation INDENT." | ||
| 2099 | (let ((len (length key))) | 2096 | (let ((len (length key))) |
| 2100 | (indent-to indent) | 2097 | (indent-to indent) |
| 2101 | (insert key ":") | 2098 | (insert key ":") |
| @@ -2120,9 +2117,8 @@ are shown (at most to the depth specified `quail-completion-max-depth')." | |||
| 2120 | (quail-completion-1 newkey (cdr (car l)) indent) | 2117 | (quail-completion-1 newkey (cdr (car l)) indent) |
| 2121 | (setq l (cdr l))))))) | 2118 | (setq l (cdr l))))))) |
| 2122 | 2119 | ||
| 2123 | ;; List all possible translations of KEY in Quail map MAP with | ||
| 2124 | ;; indentation INDENT. | ||
| 2125 | (defun quail-completion-list-translations (map key indent) | 2120 | (defun quail-completion-list-translations (map key indent) |
| 2121 | "List all possible translations of KEY in Quail MAP with indentation INDENT." | ||
| 2126 | (let (beg (translations | 2122 | (let (beg (translations |
| 2127 | (quail-get-translation (car map) key (length key)))) | 2123 | (quail-get-translation (car map) key (length key)))) |
| 2128 | (if (integerp translations) | 2124 | (if (integerp translations) |
| @@ -2162,7 +2158,7 @@ are shown (at most to the depth specified `quail-completion-max-depth')." | |||
| 2162 | "Click on an alternative in the `*Quail Completions*' buffer to choose it." | 2158 | "Click on an alternative in the `*Quail Completions*' buffer to choose it." |
| 2163 | (interactive "e") | 2159 | (interactive "e") |
| 2164 | ;; This function is an exact copy of the mouse.el function | 2160 | ;; This function is an exact copy of the mouse.el function |
| 2165 | ;; `mouse-choose-completion' except that we: | 2161 | ;; `mouse-choose-completion' except that we: |
| 2166 | ;; 1) add two lines from `choose-completion' in simple.el to give | 2162 | ;; 1) add two lines from `choose-completion' in simple.el to give |
| 2167 | ;; the `mouse-2' click a little more leeway. | 2163 | ;; the `mouse-2' click a little more leeway. |
| 2168 | ;; 2) don't bury *Quail Completions* buffer so comment a section, and | 2164 | ;; 2) don't bury *Quail Completions* buffer so comment a section, and |
| @@ -2238,17 +2234,17 @@ are shown (at most to the depth specified `quail-completion-max-depth')." | |||
| 2238 | (select-window (active-minibuffer-window)) | 2234 | (select-window (active-minibuffer-window)) |
| 2239 | (exit-minibuffer)))))) | 2235 | (exit-minibuffer)))))) |
| 2240 | 2236 | ||
| 2241 | ;; Accumulate in the cdr part of DECODE-MAP all pairs of key sequences | ||
| 2242 | ;; vs the corresponding translations defined in the Quail map | ||
| 2243 | ;; specified by the first element MAP-LIST. Each pair has the form | ||
| 2244 | ;; (KEYSEQ . TRANSLATION). DECODE-MAP should have the form | ||
| 2245 | ;; (decode-map . ALIST), where ALIST is an alist of length NUM. KEY | ||
| 2246 | ;; is a key sequence to reach MAP. | ||
| 2247 | ;; Optional 5th arg MAXNUM limits the number of accumulated pairs. | ||
| 2248 | ;; Optional 6th arg IGNORES is a list of translations to ignore. | ||
| 2249 | |||
| 2250 | (defun quail-build-decode-map (map-list key decode-map num | 2237 | (defun quail-build-decode-map (map-list key decode-map num |
| 2251 | &optional maxnum ignores) | 2238 | &optional maxnum ignores) |
| 2239 | "Build a decoding map. | ||
| 2240 | Accumulate in the cdr part of DECODE-MAP all pairs of key sequences | ||
| 2241 | vs the corresponding translations defined in the Quail map | ||
| 2242 | specified by the first element MAP-LIST. Each pair has the form | ||
| 2243 | \(KEYSEQ . TRANSLATION). DECODE-MAP should have the form | ||
| 2244 | \(decode-map . ALIST), where ALIST is an alist of length NUM. KEY | ||
| 2245 | is a key sequence to reach MAP. | ||
| 2246 | Optional 5th arg MAXNUM limits the number of accumulated pairs. | ||
| 2247 | Optional 6th arg IGNORES is a list of translations to ignore." | ||
| 2252 | (let* ((map (car map-list)) | 2248 | (let* ((map (car map-list)) |
| 2253 | (translation (quail-get-translation (car map) key (length key))) | 2249 | (translation (quail-get-translation (car map) key (length key))) |
| 2254 | elt) | 2250 | elt) |
| @@ -2286,11 +2282,10 @@ are shown (at most to the depth specified `quail-completion-max-depth')." | |||
| 2286 | decode-map num maxnum ignores)))) | 2282 | decode-map num maxnum ignores)))) |
| 2287 | num))) | 2283 | num))) |
| 2288 | 2284 | ||
| 2289 | ;; Insert the pairs of key sequences vs the corresponding translations | ||
| 2290 | ;; stored in DECODE-MAP by the concise format. DECODE-MAP should be | ||
| 2291 | ;; made by `quail-build-decode-map' (which see). | ||
| 2292 | |||
| 2293 | (defun quail-insert-decode-map (decode-map) | 2285 | (defun quail-insert-decode-map (decode-map) |
| 2286 | "Insert pairs of key sequences vs the corresponding translations. | ||
| 2287 | These are stored in DECODE-MAP using the concise format. DECODE-MAP | ||
| 2288 | should be made by `quail-build-decode-map' (which see)." | ||
| 2294 | (setq decode-map | 2289 | (setq decode-map |
| 2295 | (sort (cdr decode-map) | 2290 | (sort (cdr decode-map) |
| 2296 | (function (lambda (x y) | 2291 | (function (lambda (x y) |
| @@ -2491,7 +2486,7 @@ KEY BINDINGS FOR CONVERSION | |||
| 2491 | ---------------------------\n")) | 2486 | ---------------------------\n")) |
| 2492 | (help-setup-xref (list #'quail-help (quail-name)) | 2487 | (help-setup-xref (list #'quail-help (quail-name)) |
| 2493 | (interactive-p)) | 2488 | (interactive-p)) |
| 2494 | (setq quail-current-package nil) | 2489 | (setq quail-current-package nil) |
| 2495 | ;; Resize the help window again, now that it has all its contents. | 2490 | ;; Resize the help window again, now that it has all its contents. |
| 2496 | (save-selected-window | 2491 | (save-selected-window |
| 2497 | (select-window (get-buffer-window (current-buffer))) | 2492 | (select-window (get-buffer-window (current-buffer))) |
| @@ -2807,7 +2802,7 @@ of each directory." | |||
| 2807 | (message "Updating %s ... done" leim-list))) | 2802 | (message "Updating %s ... done" leim-list))) |
| 2808 | 2803 | ||
| 2809 | (defun quail-advice (args) | 2804 | (defun quail-advice (args) |
| 2810 | "Advice users about the characters input by the current Quail package. | 2805 | "Advise users about the characters input by the current Quail package. |
| 2811 | The argument is a parameterized event of the form: | 2806 | The argument is a parameterized event of the form: |
| 2812 | (quail-advice STRING) | 2807 | (quail-advice STRING) |
| 2813 | where STRING is a string containing the input characters. | 2808 | where STRING is a string containing the input characters. |
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index d800ee53ec0..0814e0900ab 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el | |||
| @@ -179,8 +179,10 @@ | |||
| 179 | (repeat)))) | 179 | (repeat)))) |
| 180 | 180 | ||
| 181 | "CCL program to decode UTF-8. | 181 | "CCL program to decode UTF-8. |
| 182 | Decoding is done into the charsets ascii, eight-bit-control, | 182 | Basic decoding is done into the charsets ascii, latin-iso8859-1 and |
| 183 | latin-iso8859-1 and mule-unicode-* only.") | 183 | mule-unicode-*. Encodings of un-representable Unicode characters are |
| 184 | decoded asis into eight-bit-control and eight-bit-graphic | ||
| 185 | characters.") | ||
| 184 | 186 | ||
| 185 | (define-ccl-program ccl-encode-mule-utf-8 | 187 | (define-ccl-program ccl-encode-mule-utf-8 |
| 186 | `(1 | 188 | `(1 |
| @@ -266,8 +268,8 @@ latin-iso8859-1 and mule-unicode-* only.") | |||
| 266 | 268 | ||
| 267 | "CCL program to encode into UTF-8. | 269 | "CCL program to encode into UTF-8. |
| 268 | Only characters from the charsets ascii, eight-bit-control, | 270 | Only characters from the charsets ascii, eight-bit-control, |
| 269 | latin-iso8859-1 and mule-unicode-* are recognized. Others are encoded | 271 | eight-bit-graphic, latin-iso8859-1 and mule-unicode-* are recognized. |
| 270 | as U+FFFD.") | 272 | Others are encoded as U+FFFD.") |
| 271 | 273 | ||
| 272 | (make-coding-system | 274 | (make-coding-system |
| 273 | 'mule-utf-8 4 ?u | 275 | 'mule-utf-8 4 ?u |