From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guido Van Hoecke Newsgroups: gmane.emacs.help Subject: Re: Why different behaviour of concat on OSX and on Lubuntu Date: Wed, 29 May 2013 22:42:50 +0200 Message-ID: References: <87mwrezvwj.fsf@web.de> 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 1369860212 10484 80.91.229.3 (29 May 2013 20:43:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 May 2013 20:43:32 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 29 22:43:32 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 1UhnDX-0007NU-R1 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 May 2013 22:43:31 +0200 Original-Received: from localhost ([::1]:45991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhnDX-0006pb-Dg for geh-help-gnu-emacs@m.gmane.org; Wed, 29 May 2013 16:43:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhnDI-0006pJ-1i for help-gnu-emacs@gnu.org; Wed, 29 May 2013 16:43:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhnDD-0002tT-Hv for help-gnu-emacs@gnu.org; Wed, 29 May 2013 16:43:15 -0400 Original-Received: from mail-vc0-f172.google.com ([209.85.220.172]:48250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhnDD-0002tN-EG for help-gnu-emacs@gnu.org; Wed, 29 May 2013 16:43:11 -0400 Original-Received: by mail-vc0-f172.google.com with SMTP id hf12so6744726vcb.31 for ; Wed, 29 May 2013 13:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=l7pfqHaAvnIhI7H8ZDmD4WKSB0q5DKFfCoIyV4Yep90=; b=Dfv8xac1hMCq+NWCNri3YE4ePxF08YF86FHlHDAz5RxG1DK+QRqTgzQ+mhAYVlTZIS Do5DfGf71Y+BqchrXDsY09Zqh30AsZrg23PCWyEjsPEs2RQ/fy3PLYe0IBMvmnquCKeX 3/IivxXj20ATqt6MClbmpMyR6lUCOC6TlTWT9wMzXq3Jq+OUZpghKwBnLqvpcfIdgDFt OwgNlP9pKhUNzBfuwTaXki6037xXK011PfomD67H+OzfCYtr4larqR86UIKvYp5xmr+H LJxs/z3zsLx9lnzfZS3tXyiSAfydTco3+emvkan4shfBMrM+5ZttCdVXMNYdhTcd9OKO Ge2w== X-Received: by 10.220.49.195 with SMTP id w3mr2856509vcf.0.1369860190460; Wed, 29 May 2013 13:43:10 -0700 (PDT) Original-Received: by 10.52.120.83 with HTTP; Wed, 29 May 2013 13:42:50 -0700 (PDT) In-Reply-To: <87mwrezvwj.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.172 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:91148 Archived-At: Hi Michael, Thanks for your reply. I couldn't get this to work. Being pressed for time I just changed to (if isOSX (global-set-key (kbd "M-=C2=A7") 'overwrite-mode) (global-set-key (kbd "M-=C2=B2") 'overwrite-mode)) With kind regards, Guido. On 28 May 2013 22:34, Michael Heerdegen wrote: > 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 iM= ac. >> >> On the Lubuntu machine, it does not map M-=C2=B2 to overwrite-mode, It b= arks: >> >> (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.