[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/term/wyse50.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/term/wyse50.el,v |
Date: |
Mon, 22 Oct 2007 15:20:16 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 07/10/22 15:20:16
Index: wyse50.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/term/wyse50.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- wyse50.el 29 Aug 2007 05:28:00 -0000 1.28
+++ wyse50.el 22 Oct 2007 15:20:15 -0000 1.29
@@ -38,14 +38,10 @@
;;; Code:
-(defun terminal-init-wyse50 ()
- "Terminal initialization function for wyse50."
- (define-key local-function-key-map "\C-a" (make-keymap))
- (mapcar (function (lambda (key-definition)
- (define-key local-function-key-map
- (car key-definition) (nth 1 key-definition))))
- '(
- ;; These might be set up by termcap and terminfo
+(defvar wyse50-terminal-map
+ (let ((map (make-sparse-keymap)))
+ (dolist (key-definition
+ '( ;; These might be set up by termcap and terminfo
("\C-k" [up])
("\C-j" [down])
("\C-l" [right])
@@ -108,6 +104,18 @@
("\^a\^m\^m" [funct-return]) ;; Not an X keysym
("\^a\^i\^m" [funct-tab]) ;; Not an X keysym
))
+ (define-key map
+ (car key-definition) (nth 1 key-definition)))
+ map))
+
+(defun terminal-init-wyse50 ()
+ "Terminal initialization function for wyse50."
+ ;; Use inheritance to let the main keymap override these defaults.
+ ;; This way we don't override terminfo-derived settings or settings
+ ;; made in the .emacs file.
+ (let ((m (copy-keymap wyse50-terminal-map)))
+ (set-keymap-parent m (keymap-parent input-decode-map))
+ (set-keymap-parent input-decode-map m))
;; Miscellaneous hacks
@@ -126,29 +134,29 @@
(concat "\ea23R" (1+ (frame-width)) "C\eG0"))))))
(defun enable-arrow-keys ()
- "To be called by term-setup-hook. Overrides 6 Emacs standard keys
+ "To be called by `term-setup-hook'. Overrides 6 Emacs standard keys
whose functions are then typed as follows:
C-a Funct Left-arrow
C-h M-?
LFD Funct Return, some modes override down-arrow via LFD
C-k CLR Line
C-l Scrn CLR
-M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar
-"
+M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar"
(interactive)
- (mapcar (function (lambda (key-definition)
- (global-set-key (car key-definition)
- (nth 1 key-definition))))
- ;; By unsetting C-a and then binding it to a prefix, we
- ;; allow the rest of the function keys which start with C-a
- ;; to be recognized.
- '(("\C-a" nil)
- ("\C-k" nil)
- ("\C-j" nil)
- ("\C-l" nil)
- ("\C-h" nil)
- ("\er" nil)))
+ ;; Not needed any more now that we use input-decode-map.
+ ;; (dolist (key-definition
+ ;; ;; By unsetting C-a and then binding it to a prefix, we
+ ;; ;; allow the rest of the function keys which start with C-a
+ ;; ;; to be recognized.
+ ;; '(("\C-a" nil)
+ ;; ("\C-k" nil)
+ ;; ("\C-j" nil)
+ ;; ("\C-l" nil)
+ ;; ("\C-h" nil)
+ ;; ("\er" nil)))
+ ;; (global-set-key (car key-definition)
+ ;; (nth 1 key-definition)))
(fset 'enable-arrow-keys nil))
-;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c
+;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c
;;; wyse50.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/term/wyse50.el,v,
Stefan Monnier <=