all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Guido Van Hoecke <guivho@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Why different behaviour of concat on OSX and on Lubuntu
Date: Tue, 28 May 2013 22:34:04 +0200	[thread overview]
Message-ID: <87mwrezvwj.fsf@web.de> (raw)
In-Reply-To: <CAEySM9G4gwEmcz11=wf63wBAeLQzfAqhGkX3=JhGTQmSU10XEw@mail.gmail.com> (Guido Van Hoecke's message of "Tue, 28 May 2013 20:27:15 +0200")

Guido Van Hoecke <guivho@gmail.com> writes:

> 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)
> [...]
> 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.

`kbd' was a (quite strange) macro in Emacs 23.  It changed to a function
in Emacs 24.  Your code works only in the last case.  Call it a bug in
Emacs 23.

As long as you need to use both Emacs versions in parallel, you should
be safe when you use `read-kbd-macro' instead of `kbd'.  It does the
same, but should work in both versions.


Regards,

Michael.



  reply	other threads:[~2013-05-28 20:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 18:27 Why different behaviour of concat on OSX and on Lubuntu Guido Van Hoecke
2013-05-28 20:34 ` Michael Heerdegen [this message]
2013-05-29 20:42   ` Guido Van Hoecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwrezvwj.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=guivho@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.