diff options
| author | Stefan Monnier | 2009-09-14 01:22:42 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-14 01:22:42 +0000 |
| commit | 31cd2dd4e14916714a5178b57dfda171a219cc93 (patch) | |
| tree | 21ca6729695d3bf2e72c9e03ec7abb16173edb33 | |
| parent | d62e5bf28f90f609646a57bf43c566626faaafa1 (diff) | |
| download | emacs-31cd2dd4e14916714a5178b57dfda171a219cc93.tar.gz emacs-31cd2dd4e14916714a5178b57dfda171a219cc93.zip | |
* simple.el: Add mapping for backspace/delete/clear/tab/escape/return
to function-key-map, and give them ascii-character property.
* term/x-win.el (x-alternatives-map):
* term/ns-win.el (ns-alternatives-map):
* term/internal.el (msdos-key-remapping-map):
* w32-fns.el (x-alternatives-map): Remove redundant mappings.
| -rw-r--r-- | lisp/ChangeLog | 23 | ||||
| -rw-r--r-- | lisp/simple.el | 12 | ||||
| -rw-r--r-- | lisp/term/internal.el | 16 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 20 | ||||
| -rw-r--r-- | lisp/term/x-win.el | 18 | ||||
| -rw-r--r-- | lisp/w32-fns.el | 17 |
6 files changed, 26 insertions, 80 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41362abced0..72054a6835f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2009-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el: Add mapping for backspace/delete/clear/tab/escape/return | ||
| 4 | to function-key-map, and give them ascii-character property. | ||
| 5 | * term/x-win.el (x-alternatives-map): | ||
| 6 | * term/ns-win.el (ns-alternatives-map): | ||
| 7 | * term/internal.el (msdos-key-remapping-map): | ||
| 8 | * w32-fns.el (x-alternatives-map): Remove redundant mappings. | ||
| 9 | |||
| 1 | 2009-09-14 Glenn Morris <rgm@gnu.org> | 10 | 2009-09-14 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * emacs-lisp/elint.el (elint-add-required-env): Revert to not using | 12 | * emacs-lisp/elint.el (elint-add-required-env): Revert to not using |
| @@ -28,16 +37,16 @@ | |||
| 28 | * progmodes/cperl-mode.el (cperl-init-faces): Revert last change. | 37 | * progmodes/cperl-mode.el (cperl-init-faces): Revert last change. |
| 29 | 38 | ||
| 30 | * eshell/em-hist.el: | 39 | * eshell/em-hist.el: |
| 31 | * eshell/em-dirs.el (eshell-complete-user-reference): Declare | 40 | * eshell/em-dirs.el (eshell-complete-user-reference): |
| 32 | pcomplete functions and variables to avoid compiler warnings. | 41 | Declare pcomplete functions and variables to avoid compiler warnings. |
| 33 | 42 | ||
| 34 | 2009-09-13 Leo <sdl.web@gmail.com> (tiny change) | 43 | 2009-09-13 Leo <sdl.web@gmail.com> (tiny change) |
| 35 | 44 | ||
| 36 | * eshell/em-script.el (eshell-login-script, eshell-rc-script): | 45 | * eshell/em-script.el (eshell-login-script, eshell-rc-script): |
| 37 | * eshell/em-dirs.el (eshell-last-dir-ring-file-name): | 46 | * eshell/em-dirs.el (eshell-last-dir-ring-file-name): |
| 38 | * eshell/em-alias.el (eshell-aliases-file): | 47 | * eshell/em-alias.el (eshell-aliases-file): |
| 39 | * eshell/em-hist.el (eshell-history-file-name): Use | 48 | * eshell/em-hist.el (eshell-history-file-name): |
| 40 | expand-file-name instead of concat to make file names (Bug#4308). | 49 | Use expand-file-name instead of concat to make file names (Bug#4308). |
| 41 | 50 | ||
| 42 | 2009-09-13 Glenn Morris <rgm@gnu.org> | 51 | 2009-09-13 Glenn Morris <rgm@gnu.org> |
| 43 | 52 | ||
| @@ -1541,11 +1550,9 @@ | |||
| 1541 | (cperl-forward-re): Check cperl-brace-recursing. | 1550 | (cperl-forward-re): Check cperl-brace-recursing. |
| 1542 | (cperl-highlight-charclass): New function. | 1551 | (cperl-highlight-charclass): New function. |
| 1543 | (cperl-find-pods-heres): Use it. | 1552 | (cperl-find-pods-heres): Use it. |
| 1544 | (cperl-fill-paragraph): Synch to save-excursion placement used | 1553 | (cperl-fill-paragraph): Synch to save-excursion placement used upstream. |
| 1545 | upstream. | ||
| 1546 | (cperl-beautify-regexp-piece): Fix column calculation. | 1554 | (cperl-beautify-regexp-piece): Fix column calculation. |
| 1547 | (cperl-make-regexp-x): Handle case where point is between "q" and | 1555 | (cperl-make-regexp-x): Handle case where point is between "q" and "rs". |
| 1548 | "rs". | ||
| 1549 | (cperl-beautify-level): Don't process entire regexp. | 1556 | (cperl-beautify-level): Don't process entire regexp. |
| 1550 | (cperl-build-manpage, cperl-perldoc): Bind Man-switches before | 1557 | (cperl-build-manpage, cperl-perldoc): Bind Man-switches before |
| 1551 | calling man. | 1558 | calling man. |
diff --git a/lisp/simple.el b/lisp/simple.el index a34d8937cd8..e9498c4e6d0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6104,7 +6104,17 @@ PREFIX is the string that represents this modifier in an event type symbol." | |||
| 6104 | (kp-subtract ?-) | 6104 | (kp-subtract ?-) |
| 6105 | (kp-decimal ?.) | 6105 | (kp-decimal ?.) |
| 6106 | (kp-divide ?/) | 6106 | (kp-divide ?/) |
| 6107 | (kp-equal ?=))) | 6107 | (kp-equal ?=) |
| 6108 | ;; Do the same for various keys that are represented as symbols under | ||
| 6109 | ;; GUIs but naturally correspond to characters. | ||
| 6110 | (backspace 127) | ||
| 6111 | (delete 127) | ||
| 6112 | (tab ?\t) | ||
| 6113 | (linefeed ?\n) | ||
| 6114 | (clear ?\C-l) | ||
| 6115 | (return ?\C-m) | ||
| 6116 | (escape ?\e) | ||
| 6117 | )) | ||
| 6108 | 6118 | ||
| 6109 | ;;;; | 6119 | ;;;; |
| 6110 | ;;;; forking a twin copy of a buffer. | 6120 | ;;;; forking a twin copy of a buffer. |
diff --git a/lisp/term/internal.el b/lisp/term/internal.el index bbcedf75630..995605bacf0 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el | |||
| @@ -28,13 +28,6 @@ | |||
| 28 | (defvar msdos-key-remapping-map | 28 | (defvar msdos-key-remapping-map |
| 29 | (let ((map (make-sparse-keymap))) | 29 | (let ((map (make-sparse-keymap))) |
| 30 | ;; keyboard setup -- that's simple! | 30 | ;; keyboard setup -- that's simple! |
| 31 | (define-key map [backspace] "\177") ; Normal behavior for BS | ||
| 32 | (define-key map [delete] "\C-d") ; ... and Delete | ||
| 33 | (define-key map [tab] [?\t]) | ||
| 34 | (define-key map [linefeed] [?\n]) | ||
| 35 | (define-key map [clear] [11]) | ||
| 36 | (define-key map [return] [13]) | ||
| 37 | (define-key map [escape] [?\e]) | ||
| 38 | (define-key map [M-backspace] [?\M-\d]) | 31 | (define-key map [M-backspace] [?\M-\d]) |
| 39 | (define-key map [M-delete] [?\M-d]) | 32 | (define-key map [M-delete] [?\M-d]) |
| 40 | (define-key map [M-tab] [?\M-\t]) | 33 | (define-key map [M-tab] [?\M-\t]) |
| @@ -45,15 +38,6 @@ | |||
| 45 | map) | 38 | map) |
| 46 | "Keymap for remapping special keys on MS-DOS keyboard.") | 39 | "Keymap for remapping special keys on MS-DOS keyboard.") |
| 47 | 40 | ||
| 48 | ;; These tell read-char how to convert these special chars to ASCII. | ||
| 49 | (put 'backspace 'ascii-character 127) | ||
| 50 | (put 'delete 'ascii-character 127) | ||
| 51 | (put 'tab 'ascii-character ?\t) | ||
| 52 | (put 'linefeed 'ascii-character ?\n) | ||
| 53 | (put 'clear 'ascii-character 12) | ||
| 54 | (put 'return 'ascii-character 13) | ||
| 55 | (put 'escape 'ascii-character ?\e) | ||
| 56 | |||
| 57 | (defun msdos-setup-keyboard (frame) | 41 | (defun msdos-setup-keyboard (frame) |
| 58 | "Setup `local-function-key-map' for MS-DOS keyboard." | 42 | "Setup `local-function-key-map' for MS-DOS keyboard." |
| 59 | ;; Don't do this twice on the same display, or it would break | 43 | ;; Don't do this twice on the same display, or it would break |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 17ec9306fc8..3dbf3c063af 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -187,33 +187,13 @@ The properties returned may include `top', `left', `height', and `width'." | |||
| 187 | ;;;; Keyboard mapping. | 187 | ;;;; Keyboard mapping. |
| 188 | 188 | ||
| 189 | ;; These tell read-char how to convert these special chars to ASCII. | 189 | ;; These tell read-char how to convert these special chars to ASCII. |
| 190 | ;;TODO: all terms have these, and at least the return mapping is necessary | ||
| 191 | ;; for tramp to recognize the enter key. | ||
| 192 | ;; Perhaps they should be moved into common code somewhere | ||
| 193 | ;; (when a window system is active). | ||
| 194 | ;; Remove if no problems for some time after 2008-08-06. | ||
| 195 | (put 'backspace 'ascii-character 127) | ||
| 196 | (put 'delete 'ascii-character 127) | ||
| 197 | (put 'tab 'ascii-character ?\t) | ||
| 198 | (put 'S-tab 'ascii-character (logior 16 ?\t)) | 190 | (put 'S-tab 'ascii-character (logior 16 ?\t)) |
| 199 | (put 'linefeed 'ascii-character ?\n) | ||
| 200 | (put 'clear 'ascii-character 12) | ||
| 201 | (put 'return 'ascii-character 13) | ||
| 202 | (put 'escape 'ascii-character ?\e) | ||
| 203 | |||
| 204 | 191 | ||
| 205 | (defvar ns-alternatives-map | 192 | (defvar ns-alternatives-map |
| 206 | (let ((map (make-sparse-keymap))) | 193 | (let ((map (make-sparse-keymap))) |
| 207 | ;; Map certain keypad keys into ASCII characters | 194 | ;; Map certain keypad keys into ASCII characters |
| 208 | ;; that people usually expect. | 195 | ;; that people usually expect. |
| 209 | (define-key map [backspace] [?\d]) | ||
| 210 | (define-key map [delete] [?\d]) | ||
| 211 | (define-key map [tab] [?\t]) | ||
| 212 | (define-key map [S-tab] [25]) | 196 | (define-key map [S-tab] [25]) |
| 213 | (define-key map [linefeed] [?\n]) | ||
| 214 | (define-key map [clear] [?\C-l]) | ||
| 215 | (define-key map [return] [?\C-m]) | ||
| 216 | (define-key map [escape] [?\e]) | ||
| 217 | (define-key map [M-backspace] [?\M-\d]) | 197 | (define-key map [M-backspace] [?\M-\d]) |
| 218 | (define-key map [M-delete] [?\M-\d]) | 198 | (define-key map [M-delete] [?\M-\d]) |
| 219 | (define-key map [M-tab] [?\M-\t]) | 199 | (define-key map [M-tab] [?\M-\t]) |
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 2648865e0a0..e10e6c6e2d0 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -272,13 +272,6 @@ exists." | |||
| 272 | (defvar x-alternatives-map | 272 | (defvar x-alternatives-map |
| 273 | (let ((map (make-sparse-keymap))) | 273 | (let ((map (make-sparse-keymap))) |
| 274 | ;; Map certain keypad keys into ASCII characters that people usually expect. | 274 | ;; Map certain keypad keys into ASCII characters that people usually expect. |
| 275 | (define-key map [backspace] [127]) | ||
| 276 | (define-key map [delete] [127]) | ||
| 277 | (define-key map [tab] [?\t]) | ||
| 278 | (define-key map [linefeed] [?\n]) | ||
| 279 | (define-key map [clear] [?\C-l]) | ||
| 280 | (define-key map [return] [?\C-m]) | ||
| 281 | (define-key map [escape] [?\e]) | ||
| 282 | (define-key map [M-backspace] [?\M-\d]) | 275 | (define-key map [M-backspace] [?\M-\d]) |
| 283 | (define-key map [M-delete] [?\M-\d]) | 276 | (define-key map [M-delete] [?\M-\d]) |
| 284 | (define-key map [M-tab] [?\M-\t]) | 277 | (define-key map [M-tab] [?\M-\t]) |
| @@ -302,17 +295,6 @@ exists." | |||
| 302 | (set-keymap-parent map (keymap-parent local-function-key-map)) | 295 | (set-keymap-parent map (keymap-parent local-function-key-map)) |
| 303 | (set-keymap-parent local-function-key-map map))) | 296 | (set-keymap-parent local-function-key-map map))) |
| 304 | (set-terminal-parameter frame 'x-setup-function-keys t))) | 297 | (set-terminal-parameter frame 'x-setup-function-keys t))) |
| 305 | |||
| 306 | ;; These tell read-char how to convert | ||
| 307 | ;; these special chars to ASCII. | ||
| 308 | (put 'backspace 'ascii-character 127) | ||
| 309 | (put 'delete 'ascii-character 127) | ||
| 310 | (put 'tab 'ascii-character ?\t) | ||
| 311 | (put 'linefeed 'ascii-character ?\n) | ||
| 312 | (put 'clear 'ascii-character 12) | ||
| 313 | (put 'return 'ascii-character 13) | ||
| 314 | (put 'escape 'ascii-character ?\e) | ||
| 315 | |||
| 316 | 298 | ||
| 317 | ;;;; Keysyms | 299 | ;;;; Keysyms |
| 318 | 300 | ||
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index f118408e400..f1579a97663 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -34,13 +34,6 @@ | |||
| 34 | (defvar x-alternatives-map | 34 | (defvar x-alternatives-map |
| 35 | (let ((map (make-sparse-keymap))) | 35 | (let ((map (make-sparse-keymap))) |
| 36 | ;; Map certain keypad keys into ASCII characters that people usually expect. | 36 | ;; Map certain keypad keys into ASCII characters that people usually expect. |
| 37 | (define-key map [backspace] [127]) | ||
| 38 | (define-key map [delete] [127]) | ||
| 39 | (define-key map [tab] [?\t]) | ||
| 40 | (define-key map [linefeed] [?\n]) | ||
| 41 | (define-key map [clear] [?\C-l]) | ||
| 42 | (define-key map [return] [?\C-m]) | ||
| 43 | (define-key map [escape] [?\e]) | ||
| 44 | (define-key map [M-backspace] [?\M-\d]) | 37 | (define-key map [M-backspace] [?\M-\d]) |
| 45 | (define-key map [M-delete] [?\M-\d]) | 38 | (define-key map [M-delete] [?\M-\d]) |
| 46 | (define-key map [M-tab] [?\M-\t]) | 39 | (define-key map [M-tab] [?\M-\t]) |
| @@ -369,16 +362,6 @@ This function is provided for backward compatibility, since | |||
| 369 | (global-set-key [lwindow] 'ignore) | 362 | (global-set-key [lwindow] 'ignore) |
| 370 | (global-set-key [rwindow] 'ignore) | 363 | (global-set-key [rwindow] 'ignore) |
| 371 | 364 | ||
| 372 | ;; These tell read-char how to convert | ||
| 373 | ;; these special chars to ASCII. | ||
| 374 | (put 'tab 'ascii-character ?\t) | ||
| 375 | (put 'linefeed 'ascii-character ?\n) | ||
| 376 | (put 'clear 'ascii-character 12) | ||
| 377 | (put 'return 'ascii-character 13) | ||
| 378 | (put 'escape 'ascii-character ?\e) | ||
| 379 | (put 'backspace 'ascii-character 127) | ||
| 380 | (put 'delete 'ascii-character 127) | ||
| 381 | |||
| 382 | (defun w32-add-charset-info (xlfd-charset windows-charset codepage) | 365 | (defun w32-add-charset-info (xlfd-charset windows-charset codepage) |
| 383 | "Function to add character sets to display with Windows fonts. | 366 | "Function to add character sets to display with Windows fonts. |
| 384 | Creates entries in `w32-charset-info-alist'. | 367 | Creates entries in `w32-charset-info-alist'. |