[climacs-devel] Dead escape key

Ignas Mikalajunas ignas.mikalajunas at gmail.com
Mon Jan 17 21:09:55 UTC 2005


  By default in emacs, and on linux in general Esc key serves as meta
modifier. I guess this can be implemented in a more elegand manner yet
here is the patch.

--- gui.lisp	17 Jan 2005 13:35:52 -0000	1.78
+++ gui.lisp	17 Jan 2005 21:04:19 -0000
@@ -791,9 +791,29 @@
 
 (make-command-table 'global-climacs-table :errorp nil)
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; 
+;;; Dead-escape command table
+
+(make-command-table 'dead-escape-climacs-table :errorp nil)
+
+(add-menu-item-to-command-table 'global-climacs-table "dead-escape"
+				:menu 'dead-escape-climacs-table
+				:keystroke '(:escape))
+
+(defun dead-escape-set-key (gesture command)
+  (add-command-to-command-table command 'dead-escape-climacs-table
+				:keystroke gesture :errorp nil))
+
 (defun global-set-key (gesture command)
   (add-command-to-command-table command 'global-climacs-table
-				:keystroke gesture :errorp nil))
+				:keystroke gesture :errorp nil)
+  (when (and 
+	 (listp gesture)
+	 (find :meta gesture))
+    (dead-escape-set-key (remove :meta gesture)  command)))
+
+
 
 (loop for code from (char-code #\space) to (char-code #\~)
       do (global-set-key (code-char code) 'com-self-insert))


  Ignas Mikalajunas



More information about the climacs-devel mailing list