Mercurial > emacs
comparison lisp/international/quail.el @ 102030:1e6acde5f33a
(quail-input-string-to-events, quail-store-decode-map-key, quail-char-equal-p):
Use `with-no-warnings' around forms that refer to translation-table-for-input.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 14 Feb 2009 09:05:59 +0000 |
parents | 70db2d7b280c |
children | 5e87087c3a58 |
comparison
equal
deleted
inserted
replaced
102029:3223937a77f8 | 102030:1e6acde5f33a |
---|---|
1288 "Convert input string STR to a list of events. | 1288 "Convert input string STR to a list of events. |
1289 If STR has `advice' text property, append the following special event: | 1289 If STR has `advice' text property, append the following special event: |
1290 \(quail-advice STR)" | 1290 \(quail-advice STR)" |
1291 (let ((events (mapcar | 1291 (let ((events (mapcar |
1292 (lambda (c) | 1292 (lambda (c) |
1293 ;; This gives us the chance to unify on input | 1293 (or |
1294 ;; (e.g. using ucs-tables.el). | 1294 ;; Avoid "obsolete" warnings for translation-table-for-input. |
1295 (or (and translation-table-for-input | 1295 (with-no-warnings |
1296 (aref translation-table-for-input c)) | 1296 (and translation-table-for-input |
1297 c)) | 1297 (aref translation-table-for-input c))) |
1298 c)) | |
1298 str))) | 1299 str))) |
1299 (if (or (get-text-property 0 'advice str) | 1300 (if (or (get-text-property 0 'advice str) |
1300 (next-single-property-change 0 'advice str)) | 1301 (next-single-property-change 0 'advice str)) |
1301 (setq events | 1302 (setq events |
1302 (nconc events (list (list 'quail-advice str))))) | 1303 (nconc events (list (list 'quail-advice str))))) |
2643 (or (member key elt) | 2644 (or (member key elt) |
2644 (aset table char (cons key elt))) | 2645 (aset table char (cons key elt))) |
2645 (or (string= key elt) | 2646 (or (string= key elt) |
2646 (aset table char (list key elt)))) | 2647 (aset table char (list key elt)))) |
2647 (aset table char key)) | 2648 (aset table char key)) |
2648 (if (and translation-table-for-input | 2649 ;; Avoid "obsolete" warnings for translation-table-for-input. |
2649 (setq char (aref translation-table-for-input char))) | 2650 (with-no-warnings |
2650 (let ((translation-table-for-input nil)) | 2651 (if (and translation-table-for-input |
2651 (quail-store-decode-map-key table char key))))) | 2652 (setq char (aref translation-table-for-input char))) |
2653 (let ((translation-table-for-input nil)) | |
2654 (quail-store-decode-map-key table char key)))))) | |
2652 | 2655 |
2653 ;; Helper function for quail-gen-decode-map. Store key strings to | 2656 ;; Helper function for quail-gen-decode-map. Store key strings to |
2654 ;; type each character under MAP in TABLE (char-table). MAP is an | 2657 ;; type each character under MAP in TABLE (char-table). MAP is an |
2655 ;; element of the current Quail map reached by typing keys in KEY | 2658 ;; element of the current Quail map reached by typing keys in KEY |
2656 ;; (string). | 2659 ;; (string). |
2695 ;; Check if CHAR equals to TARGET while also trying to translate CHAR | 2698 ;; Check if CHAR equals to TARGET while also trying to translate CHAR |
2696 ;; by translation-table-for-input. | 2699 ;; by translation-table-for-input. |
2697 | 2700 |
2698 (defsubst quail-char-equal-p (char target) | 2701 (defsubst quail-char-equal-p (char target) |
2699 (or (= char target) | 2702 (or (= char target) |
2700 (and translation-table-for-input | 2703 ;; Avoid "obsolete" warnings for translation-table-for-input. |
2701 (setq char (aref translation-table-for-input char)) | 2704 (with-no-warnings |
2702 (= char target)))) | 2705 (and translation-table-for-input |
2706 (setq char (aref translation-table-for-input char)) | |
2707 (= char target))))) | |
2703 | 2708 |
2704 ;; Helper function for quail-find-key. Prepend key strings to type | 2709 ;; Helper function for quail-find-key. Prepend key strings to type |
2705 ;; for inputting CHAR by the current input method to KEY-LIST and | 2710 ;; for inputting CHAR by the current input method to KEY-LIST and |
2706 ;; return the result. MAP is an element of the current Quail map | 2711 ;; return the result. MAP is an element of the current Quail map |
2707 ;; reached by typing keys in KEY. | 2712 ;; reached by typing keys in KEY. |