mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
*** empty log message ***
This commit is contained in:
parent
e4801b31ff
commit
b7cceaf12a
10 changed files with 178 additions and 74 deletions
18
lisp/subr.el
18
lisp/subr.el
|
|
@ -338,13 +338,17 @@ With optional non-nil ALL then force then force redisplay of all mode-lines."
|
|||
"Translate character FROM to TO at a low level.
|
||||
This function creates a `keyboard-translate-table' if necessary
|
||||
and then modifies one entry in it."
|
||||
(or (boundp 'keyboard-translate-table)
|
||||
(let ((table (make-string 256))
|
||||
(i 0))
|
||||
(while (< i 256)
|
||||
(aset table i i)
|
||||
(setq i (1+ i)))
|
||||
(setq keyboard-translate-table table)))
|
||||
(or (arrayp keyboard-translate-table)
|
||||
(setq keyboard-translate-table ""))
|
||||
(if (or (> from (length keyboard-translate-table))
|
||||
(> to (length keyboard-translate-table)))
|
||||
(progn
|
||||
(let* ((i (length keyboard-translate-table))
|
||||
(table (make-string (- 256 i) 0)))
|
||||
(while (< i 256)
|
||||
(aset table i i)
|
||||
(setq i (1+ i)))
|
||||
(setq keyboard-translate-table table))))
|
||||
(aset keyboard-translate-table from to))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue