Mercurial > emacs
comparison lisp/international/quail.el @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | ee12d75eb214 2c4be4c0eb6f |
children | c358d0861b16 |
comparison
equal
deleted
inserted
replaced
90260:0ca0d9181b5e | 90261:7beb78bc1f8e |
---|---|
1584 LEN is the length of the sequence. DEF is a definition part of the | 1584 LEN is the length of the sequence. DEF is a definition part of the |
1585 Quail map for the sequence." | 1585 Quail map for the sequence." |
1586 (or (and (consp def) (aref (cdr def) (car (car def)))) | 1586 (or (and (consp def) (aref (cdr def) (car (car def)))) |
1587 def | 1587 def |
1588 (and (> len 1) | 1588 (and (> len 1) |
1589 (let ((str (quail-get-current-str | 1589 (let* ((str (quail-get-current-str |
1590 (1- len) | 1590 (1- len) |
1591 (quail-map-definition (quail-lookup-key | 1591 (quail-map-definition (quail-lookup-key |
1592 quail-current-key (1- len)))))) | 1592 quail-current-key (1- len))))) |
1593 (substr1 (substring quail-current-key (1- len) len)) | |
1594 (str1 (and (quail-deterministic) | |
1595 (quail-get-current-str | |
1596 1 | |
1597 (quail-map-definition (quail-lookup-key | |
1598 substr1 1)))))) | |
1593 (if str | 1599 (if str |
1594 (concat (if (stringp str) str (char-to-string str)) | 1600 (concat (if (stringp str) str (char-to-string str)) |
1595 (substring quail-current-key (1- len) len))))))) | 1601 (if str1 |
1602 (if (stringp str1) str1 (char-to-string str1)) | |
1603 substr1))))))) | |
1596 | 1604 |
1597 (defvar quail-guidance-translations-starting-column 20) | 1605 (defvar quail-guidance-translations-starting-column 20) |
1598 | 1606 |
1599 (defun quail-update-current-translations (&optional relative-index) | 1607 (defun quail-update-current-translations (&optional relative-index) |
1600 "Update `quail-current-translations'. | 1608 "Update `quail-current-translations'. |
1705 ;; We treat key 1,2..,9,0 as specifying 0,1,..8,9. | 1713 ;; We treat key 1,2..,9,0 as specifying 0,1,..8,9. |
1706 (setq ch (if (= ch ?0) 9 (- ch ?1))) | 1714 (setq ch (if (= ch ?0) 9 (- ch ?1))) |
1707 (quail-update-current-translations ch) | 1715 (quail-update-current-translations ch) |
1708 ;; And, we can terminate the current translation. | 1716 ;; And, we can terminate the current translation. |
1709 t) | 1717 t) |
1718 | |
1719 ((quail-deterministic) | |
1720 ;; No way to handle the last character in this context. | |
1721 ;; Commit the longest successfully translated characters, and | |
1722 ;; handle the remaining characters in a new loop. | |
1723 (setq def nil) | |
1724 (while (and (not def) (> len 1)) | |
1725 (setq len (1- len)) | |
1726 (setq def (quail-map-definition | |
1727 (quail-lookup-key quail-current-key len)))) | |
1728 (if def (setq quail-current-str | |
1729 (quail-get-current-str len def)) | |
1730 (setq quail-current-str (aref quail-current-key 0))) | |
1731 len) | |
1710 | 1732 |
1711 (t | 1733 (t |
1712 ;; No way to handle the last character in this context. | 1734 ;; No way to handle the last character in this context. |
1713 (setq def (quail-map-definition | 1735 (setq def (quail-map-definition |
1714 (quail-lookup-key quail-current-key (1- len)))) | 1736 (quail-lookup-key quail-current-key (1- len)))) |