From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: use correct vector/list syntax for keybindings? Date: Tue, 05 Nov 2019 14:35:53 +0100 Message-ID: References: <8736f2h2v5.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="19601"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 14:36:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iRz0s-0004ue-5I for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 14:36:50 +0100 Original-Received: from localhost ([::1]:44294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRz0r-00046k-1h for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 08:36:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40700) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRz01-00046Z-QY for emacs-devel@gnu.org; Tue, 05 Nov 2019 08:35:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRz00-0004hg-N4 for emacs-devel@gnu.org; Tue, 05 Nov 2019 08:35:57 -0500 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:35498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRz00-0004hK-FR for emacs-devel@gnu.org; Tue, 05 Nov 2019 08:35:56 -0500 Original-Received: by mail-wm1-x332.google.com with SMTP id 8so13142988wmo.0 for ; Tue, 05 Nov 2019 05:35:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=lDhQaHA5o4mb4Pq0lq9ixGO3YrGly7yz7e/nkLUNoKI=; b=lAdxDsQhozgTS6XluBpPWmD0ImNQF58vhJpKaTm/0pta5rvOai1yJ2H9uYen/edznm vHj+zdP+SzNkdWI9sgCnaobO6Gybhbev1F3JISiL9rQJm+MqMMhMa1iIPHJcejem6Qbd 9Y15J1cqMPfzBlLy/CM4rnrh2Y6GhbTpbSsbDFDZadOc6gsZla0eTmWrZlkTaeKVoBw/ Go2l2BtF75CYlTlweL+uySYGS999pY3WYk+fUhH7rYWqpHdLOrep+qyv0Q0UB2am+0E7 LiMocSpnaTm2X4n0OGoR3G5Vk6iwCVqzaJggaAQMKDuxqFOlH8tSg17+fTc5a6/zdHxm gmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=lDhQaHA5o4mb4Pq0lq9ixGO3YrGly7yz7e/nkLUNoKI=; b=fytd/SJb3f3jY01e45G2l/vIhN3+RIMi74FH2gvXTAaOtMd/YNr+oCKyWaPaFj5BL9 wK+S8al0jEgPpJm7xmhLqr6pSkju+iGv58r2jrV/x0FCYWAaYM6c4YT7lpJRxGWcDZPB wv3s/x5zLs3GN+CsSFFUz8BmW5DzShGGEsF0Jpa2QfJW/9GEo6nw7GYt9msigk5Xdh9L 5PE5EVoxr/Bswnetg5MNqQN5FdWEG1ZtIeQ9QdIktrVAXGkNOyVeQ7dGnU8SeBBjjO3D oitwsFW4YeTqbb+b32GCd/WOMisLFJDn+O8XuwPZkak5w7kTS9GJhlonL9GNV0UdVNv/ KHnQ== X-Gm-Message-State: APjAAAVzGX9xnLzSWkQTyQzSut3OGFhWHIml9UHVkLnmNPDeZjvMu4vU d7bbsZjot12++odEpERR/K8RmgmN X-Google-Smtp-Source: APXvYqywfU703Wk/oEfQquLsWdNKlhzKHl3ZqotbMZk0KRdUlV95uDfY4ctfOL8S705Ztad6GSQFHQ== X-Received: by 2002:a7b:c30c:: with SMTP id k12mr4352076wmj.89.1572960954602; Tue, 05 Nov 2019 05:35:54 -0800 (PST) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id f143sm22123771wme.40.2019.11.05.05.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2019 05:35:53 -0800 (PST) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <8736f2h2v5.fsf@igel.home> (Andreas Schwab's message of "Tue, 05 Nov 2019 14:25:18 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241803 Archived-At: >>>>> On Tue, 05 Nov 2019 14:25:18 +0100, Andreas Schwab said: Andreas> On Nov 05 2019, Robert Pluim wrote: >> In "(emacs) Init Rebinding", it says >>=20 >> If a vector element is a character, write it >> as a Lisp character constant: =E2=80=98?=E2=80=99 followed by the ch= aracter as it would >> appear in a string. >>=20 >> There are a fair few bindings in the emacs source that forget the '?' >> and do eg >>=20 >> [(control c)] >>=20 >> Is it worth going through and changing those? Andreas> This is not the syntax the text above is talking about. It is= a vector Andreas> of Lucid-style event type lists, where the characters can be w= ritten as Andreas> symbols (see event-convert-list). It is supported for XEmacs Andreas> compatibility. The elisp manual makes it clear that the intended syntax for single characters is the same in both cases. In "(elisp) Changing Key Bindings": The key definition and lookup functions accept an alternate syntax for event types in a key sequence that is a vector: you can use a list containing modifier names plus one base event (a character or function key name). For example, =E2=80=98(control ?a)=E2=80=99 is equivalent t= o =E2=80=98?\C-a=E2=80=99 and =E2=80=98(hyper control left)=E2=80=99 is equivalent to =E2=80=98C-H-le= ft=E2=80=99. Robert