Mercurial > emacs
comparison lisp/subr.el @ 108655:fe3c51344472
* subr.el (read-quoted-char): Resolve modifiers after key remapping.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 18 May 2010 16:31:44 -0400 |
parents | cd5442b2826b |
children | 8aaae2681a62 |
comparison
equal
deleted
inserted
replaced
108654:131cc6db31f4 | 108655:fe3c51344472 |
---|---|
1866 any other non-digit terminates the character code and is then used as input.")) | 1866 any other non-digit terminates the character code and is then used as input.")) |
1867 (setq char (read-event (and prompt (format "%s-" prompt)) t)) | 1867 (setq char (read-event (and prompt (format "%s-" prompt)) t)) |
1868 (if inhibit-quit (setq quit-flag nil))) | 1868 (if inhibit-quit (setq quit-flag nil))) |
1869 ;; Translate TAB key into control-I ASCII character, and so on. | 1869 ;; Translate TAB key into control-I ASCII character, and so on. |
1870 ;; Note: `read-char' does it using the `ascii-character' property. | 1870 ;; Note: `read-char' does it using the `ascii-character' property. |
1871 ;; We could try and use read-key-sequence instead, but then C-q ESC | 1871 ;; We should try and use read-key instead. |
1872 ;; or C-q C-x might not return immediately since ESC or C-x might be | 1872 (let ((translation (lookup-key local-function-key-map (vector char)))) |
1873 ;; bound to some prefix in function-key-map or key-translation-map. | 1873 (if (arrayp translation) |
1874 (setq translated (aref translation 0)))) | |
1874 (setq translated | 1875 (setq translated |
1875 (if (integerp char) | 1876 (if (integerp char) |
1876 (char-resolve-modifiers char) | 1877 (char-resolve-modifiers char) |
1877 char)) | 1878 char)) |
1878 (let ((translation (lookup-key local-function-key-map (vector char)))) | |
1879 (if (arrayp translation) | |
1880 (setq translated (aref translation 0)))) | |
1881 (cond ((null translated)) | 1879 (cond ((null translated)) |
1882 ((not (integerp translated)) | 1880 ((not (integerp translated)) |
1883 (setq unread-command-events (list char) | 1881 (setq unread-command-events (list char) |
1884 done t)) | 1882 done t)) |
1885 ((/= (logand translated ?\M-\^@) 0) | 1883 ((/= (logand translated ?\M-\^@) 0) |