Skip to content

Commit

Permalink
emulate-mac-keyboard-mode: allow ESC combinations to function as bind…
Browse files Browse the repository at this point in the history
…ings to original functions

fix emmkm-key-binding.
  • Loading branch information
davidswelt committed May 10, 2009
1 parent d5b5e3d commit c9f9686
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions aquamacs/src/site-lisp/macosx/emulate-mac-keyboard-mode.el
Expand Up @@ -134,21 +134,19 @@ Example:
("\M-2" . ,emmkm--euro) ;; euro symbol
("\M-6" . "§")))))

;; (define-emulate-mac-keyboard-modes)
;; (make-emulate-mac-keyboard-mode-map 'finnish)
;; (progn (define-emulate-mac-keyboard-modes) (make-emulate-mac-keyboard-mode-map 'german) (emulate-mac-german-keyboard-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'aquamacs-tools) ;; aq-list-contains


(defun emmkm-key-binding (key)
(let ((key-char (vector (string-to-char "£"))))
;; (emmkm-key-binding emm-k)
(defun emmkm-key-binding (key-char)
(or
(if overriding-terminal-local-map
(lookup-key overriding-terminal-local-map key-char)
(key-binding key-char))
;; not all keys are bound to self-insert-command -- e.g. the pound sign.
'self-insert-command)))
'self-insert-command))

;; also add it to isearch-mode-map
(defun make-emulate-mac-keyboard-mode-map (language)
Expand Down Expand Up @@ -188,7 +186,7 @@ This command is part of `%s'." string-rep language mode-name mode-name)
;; we call the original binding to preserve
;; functionality (e.g. in isearch)
(call-interactively kb)))

;; otherwise: called using Esc prefix.
;; call original binding
(let* ((,mode-name nil)
Expand Down

0 comments on commit c9f9686

Please sign in to comment.