[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why different behaviour of concat on OSX and on Lubuntu
From: |
Guido Van Hoecke |
Subject: |
Why different behaviour of concat on OSX and on Lubuntu |
Date: |
Tue, 28 May 2013 20:27:15 +0200 |
Hi,
My main machine is an iMAC (querty keyboard) running GNU Emacs 24.3.1
(x86_64-apple-darwin, NS apple-appkit-1187.37)
I have to use temporarily an old notbook (belgian azerty keyboard)
running Lubuntu GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version
3.6.4) of 2013-04-09 on komainu, modified by Debian.
I use a seldom used key to create some mappings.
Part of the code looks like this:
;; check whether running on OSX
(setq isOSX (equal (expand-file-name "~/") "/Users/guivho/"))
(if isOSX
(setq leader "§")
(setq leader "²"))
(global-set-key (kbd (concat "M-" leader)) 'overwrite-mode)
The last statement maps overwrite-mode to the M-§ sequence on my iMac.
On the Lubuntu machine, it does not map M-² to overwrite-mode, It barks:
(wrong-type-argument integer-or-marker-p (concat "M-" leader))
read-kbd-macro((concat "M-" leader)
On the other hand, the following commands do work on both machines:
(define-prefix-command 'guivho-map nil "guivho-")
(define-key guivho-map leader 'guivho-save-and-kill-buffer)
(define-key guivho-map "-" 'hl-line-mode)
(define-key guivho-map "=" 'vc-diff)
(define-key guivho-map "0" 'delete-window)
...
(define-key guivho-map "z" (lambda() (interactive)
(switch-to-buffer-other-window "*scratch*" t)))
(global-set-key leader guivho-map)
I am puzzled why the concat does not work on lubuntu, and would like
to know how to code it to achieve the desired effect.
Thanks in advance,
Guivho.
- Why different behaviour of concat on OSX and on Lubuntu,
Guido Van Hoecke <=