]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el: Add mapping for backspace/delete/clear/tab/escape/return
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 14 Sep 2009 01:22:42 +0000 (01:22 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 14 Sep 2009 01:22:42 +0000 (01:22 +0000)
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.

lisp/ChangeLog
lisp/simple.el
lisp/term/internal.el
lisp/term/ns-win.el
lisp/term/x-win.el
lisp/w32-fns.el

index 41362abced0d509ebc0064714e2238cbe89b3fca..72054a6835fe0cb62c8334b280e903763b05c68c 100644 (file)
@@ -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
        * 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>
 
        (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.
index a34d8937cd8a27c5e9added705f173a727796533..e9498c4e6d0c0002c1401182be4d283b8f1744c0 100644 (file)
@@ -6104,7 +6104,17 @@ PREFIX is the string that represents this modifier in an event type symbol."
    (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)
+   ))
 \f
 ;;;;
 ;;;; forking a twin copy of a buffer.
index bbcedf756301a60ed412c855e64325f6948fb2b1..995605bacf0fbc58c82120a3e0aa8658265678f5 100644 (file)
 (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])
     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
index 17ec9306fc891c33c2a37428eb8fd82386ce7ab7..3dbf3c063afb5755dcbcb36e7d04675490b36c79 100644 (file)
@@ -187,33 +187,13 @@ The properties returned may include `top', `left', `height', and `width'."
 ;;;; 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])
index 2648865e0a036bb5ebddbff7e8349c9b5aee0cf2..e10e6c6e2d0a6df537c80af9f235e28d382ec71a 100644 (file)
@@ -272,13 +272,6 @@ exists."
 (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 @@ exists."
         (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)
-
 \f
 ;;;; Keysyms
 
index f118408e400e8bba314f56a5a6a8376ad8781a6c..f1579a97663b9f8f6a8530697f462df0315954b4 100644 (file)
 (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 @@ This function is provided for backward compatibility, since
 (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'.