Mercurial > emacs
changeset 105009:b520d55cdd72
* 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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 14 Sep 2009 01:22:42 +0000 |
parents | b9b9c3b2718d |
children | b3c2589ed19e |
files | lisp/ChangeLog lisp/simple.el lisp/term/internal.el lisp/term/ns-win.el lisp/term/x-win.el lisp/w32-fns.el |
diffstat | 6 files changed, 26 insertions(+), 80 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/ChangeLog Mon Sep 14 01:22:42 2009 +0000 @@ -1,3 +1,12 @@ +2009-09-14 Stefan Monnier <monnier@iro.umontreal.ca> + + * 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. + 2009-09-14 Glenn Morris <rgm@gnu.org> * emacs-lisp/elint.el (elint-add-required-env): Revert to not using @@ -28,16 +37,16 @@ * progmodes/cperl-mode.el (cperl-init-faces): Revert last change. * eshell/em-hist.el: - * eshell/em-dirs.el (eshell-complete-user-reference): Declare - pcomplete functions and variables to avoid compiler warnings. + * eshell/em-dirs.el (eshell-complete-user-reference): + Declare pcomplete functions and variables to avoid compiler warnings. 2009-09-13 Leo <sdl.web@gmail.com> (tiny change) * eshell/em-script.el (eshell-login-script, eshell-rc-script): * eshell/em-dirs.el (eshell-last-dir-ring-file-name): * eshell/em-alias.el (eshell-aliases-file): - * eshell/em-hist.el (eshell-history-file-name): Use - expand-file-name instead of concat to make file names (Bug#4308). + * eshell/em-hist.el (eshell-history-file-name): + Use expand-file-name instead of concat to make file names (Bug#4308). 2009-09-13 Glenn Morris <rgm@gnu.org> @@ -1541,11 +1550,9 @@ (cperl-forward-re): Check cperl-brace-recursing. (cperl-highlight-charclass): New function. (cperl-find-pods-heres): Use it. - (cperl-fill-paragraph): Synch to save-excursion placement used - upstream. + (cperl-fill-paragraph): Synch to save-excursion placement used upstream. (cperl-beautify-regexp-piece): Fix column calculation. - (cperl-make-regexp-x): Handle case where point is between "q" and - "rs". + (cperl-make-regexp-x): Handle case where point is between "q" and "rs". (cperl-beautify-level): Don't process entire regexp. (cperl-build-manpage, cperl-perldoc): Bind Man-switches before calling man.
--- a/lisp/simple.el Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/simple.el Mon Sep 14 01:22:42 2009 +0000 @@ -6104,7 +6104,17 @@ (kp-subtract ?-) (kp-decimal ?.) (kp-divide ?/) - (kp-equal ?=))) + (kp-equal ?=) + ;; Do the same for various keys that are represented as symbols under + ;; GUIs but naturally correspond to characters. + (backspace 127) + (delete 127) + (tab ?\t) + (linefeed ?\n) + (clear ?\C-l) + (return ?\C-m) + (escape ?\e) + )) ;;;; ;;;; forking a twin copy of a buffer.
--- a/lisp/term/internal.el Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/term/internal.el Mon Sep 14 01:22:42 2009 +0000 @@ -28,13 +28,6 @@ (defvar msdos-key-remapping-map (let ((map (make-sparse-keymap))) ;; keyboard setup -- that's simple! - (define-key map [backspace] "\177") ; Normal behavior for BS - (define-key map [delete] "\C-d") ; ... and Delete - (define-key map [tab] [?\t]) - (define-key map [linefeed] [?\n]) - (define-key map [clear] [11]) - (define-key map [return] [13]) - (define-key map [escape] [?\e]) (define-key map [M-backspace] [?\M-\d]) (define-key map [M-delete] [?\M-d]) (define-key map [M-tab] [?\M-\t]) @@ -45,15 +38,6 @@ map) "Keymap for remapping special keys on MS-DOS keyboard.") -;; These tell read-char how to convert these special chars to ASCII. -(put 'backspace 'ascii-character 127) -(put 'delete 'ascii-character 127) -(put 'tab 'ascii-character ?\t) -(put 'linefeed 'ascii-character ?\n) -(put 'clear 'ascii-character 12) -(put 'return 'ascii-character 13) -(put 'escape 'ascii-character ?\e) - (defun msdos-setup-keyboard (frame) "Setup `local-function-key-map' for MS-DOS keyboard." ;; Don't do this twice on the same display, or it would break
--- a/lisp/term/ns-win.el Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/term/ns-win.el Mon Sep 14 01:22:42 2009 +0000 @@ -187,33 +187,13 @@ ;;;; Keyboard mapping. ;; These tell read-char how to convert these special chars to ASCII. -;;TODO: all terms have these, and at least the return mapping is necessary -;; for tramp to recognize the enter key. -;; Perhaps they should be moved into common code somewhere -;; (when a window system is active). -;; Remove if no problems for some time after 2008-08-06. -(put 'backspace 'ascii-character 127) -(put 'delete 'ascii-character 127) -(put 'tab 'ascii-character ?\t) (put 'S-tab 'ascii-character (logior 16 ?\t)) -(put 'linefeed 'ascii-character ?\n) -(put 'clear 'ascii-character 12) -(put 'return 'ascii-character 13) -(put 'escape 'ascii-character ?\e) - (defvar ns-alternatives-map (let ((map (make-sparse-keymap))) ;; Map certain keypad keys into ASCII characters ;; that people usually expect. - (define-key map [backspace] [?\d]) - (define-key map [delete] [?\d]) - (define-key map [tab] [?\t]) (define-key map [S-tab] [25]) - (define-key map [linefeed] [?\n]) - (define-key map [clear] [?\C-l]) - (define-key map [return] [?\C-m]) - (define-key map [escape] [?\e]) (define-key map [M-backspace] [?\M-\d]) (define-key map [M-delete] [?\M-\d]) (define-key map [M-tab] [?\M-\t])
--- a/lisp/term/x-win.el Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/term/x-win.el Mon Sep 14 01:22:42 2009 +0000 @@ -272,13 +272,6 @@ (defvar x-alternatives-map (let ((map (make-sparse-keymap))) ;; Map certain keypad keys into ASCII characters that people usually expect. - (define-key map [backspace] [127]) - (define-key map [delete] [127]) - (define-key map [tab] [?\t]) - (define-key map [linefeed] [?\n]) - (define-key map [clear] [?\C-l]) - (define-key map [return] [?\C-m]) - (define-key map [escape] [?\e]) (define-key map [M-backspace] [?\M-\d]) (define-key map [M-delete] [?\M-\d]) (define-key map [M-tab] [?\M-\t]) @@ -302,17 +295,6 @@ (set-keymap-parent map (keymap-parent local-function-key-map)) (set-keymap-parent local-function-key-map map))) (set-terminal-parameter frame 'x-setup-function-keys t))) - -;; These tell read-char how to convert -;; these special chars to ASCII. -(put 'backspace 'ascii-character 127) -(put 'delete 'ascii-character 127) -(put 'tab 'ascii-character ?\t) -(put 'linefeed 'ascii-character ?\n) -(put 'clear 'ascii-character 12) -(put 'return 'ascii-character 13) -(put 'escape 'ascii-character ?\e) - ;;;; Keysyms
--- a/lisp/w32-fns.el Mon Sep 14 00:48:06 2009 +0000 +++ b/lisp/w32-fns.el Mon Sep 14 01:22:42 2009 +0000 @@ -34,13 +34,6 @@ (defvar x-alternatives-map (let ((map (make-sparse-keymap))) ;; Map certain keypad keys into ASCII characters that people usually expect. - (define-key map [backspace] [127]) - (define-key map [delete] [127]) - (define-key map [tab] [?\t]) - (define-key map [linefeed] [?\n]) - (define-key map [clear] [?\C-l]) - (define-key map [return] [?\C-m]) - (define-key map [escape] [?\e]) (define-key map [M-backspace] [?\M-\d]) (define-key map [M-delete] [?\M-\d]) (define-key map [M-tab] [?\M-\t]) @@ -369,16 +362,6 @@ (global-set-key [lwindow] 'ignore) (global-set-key [rwindow] 'ignore) -;; These tell read-char how to convert -;; these special chars to ASCII. -(put 'tab 'ascii-character ?\t) -(put 'linefeed 'ascii-character ?\n) -(put 'clear 'ascii-character 12) -(put 'return 'ascii-character 13) -(put 'escape 'ascii-character ?\e) -(put 'backspace 'ascii-character 127) -(put 'delete 'ascii-character 127) - (defun w32-add-charset-info (xlfd-charset windows-charset codepage) "Function to add character sets to display with Windows fonts. Creates entries in `w32-charset-info-alist'.