Commit 31cd2dd4 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* 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.
parent d62e5bf2
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.
......
......@@ -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)
))
;;;;
;;;; forking a twin copy of a buffer.
......
......@@ -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
......
......@@ -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])
......
......@@ -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)
;;;; Keysyms
......
......@@ -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 @@ 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'.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment