From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Why different behaviour of concat on OSX and on Lubuntu Date: Tue, 28 May 2013 22:34:04 +0200 Message-ID: <87mwrezvwj.fsf@web.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369773278 20074 80.91.229.3 (28 May 2013 20:34:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 May 2013 20:34:38 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Guido Van Hoecke Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 28 22:34:37 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UhQbN-0000pL-Et for geh-help-gnu-emacs@m.gmane.org; Tue, 28 May 2013 22:34:37 +0200 Original-Received: from localhost ([::1]:53503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhQbN-0005RL-2V for geh-help-gnu-emacs@m.gmane.org; Tue, 28 May 2013 16:34:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhQbA-0005R8-2E for help-gnu-emacs@gnu.org; Tue, 28 May 2013 16:34:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhQb8-0002SN-V1 for help-gnu-emacs@gnu.org; Tue, 28 May 2013 16:34:23 -0400 Original-Received: from mout.web.de ([212.227.15.3]:62732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhQb8-0002S7-Lt for help-gnu-emacs@gnu.org; Tue, 28 May 2013 16:34:22 -0400 Original-Received: from drachen.dragon ([89.204.139.215]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MGRYe-1Ud2tH1GfA-00DhtT; Tue, 28 May 2013 22:34:20 +0200 Mail-Followup-To: Guido Van Hoecke , "help-gnu-emacs\@gnu.org" In-Reply-To: (Guido Van Hoecke's message of "Tue, 28 May 2013 20:27:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V02:K0:l3cymCLAoS6sIz7WQeFUy4DCabMSNRu+xBGqimFq6gv XSoXlacv2ZjwdaOUNBT0r2iRVBnXrPAOFOg6Hgr874wgRyL7aw tlpac2p3FRYMrqwsmlHyH8e2h2++D2gFyFvNgW6oCgkaGtCRcO J9oolbDxHAg5RMsbYjAElpIJ8twVe+Z6nPOs2SVtXjwXV4hF66 QG8VZiGOfKVoVnWGB2iRdOQBUSwZlhR4phCfH+RsUA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91112 Archived-At: Guido Van Hoecke 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 "=C2=A7") > (setq leader "=C2=B2")) > > (global-set-key (kbd (concat "M-" leader)) 'overwrite-mode) > > The last statement maps overwrite-mode to the M-=C2=A7 sequence on my iMa= c. > > On the Lubuntu machine, it does not map M-=C2=B2 to overwrite-mode, It ba= rks: > > (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.