From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: describe-key: Wrong type argument: sequencep, C-up Date: Fri, 29 Dec 2017 10:01:14 +0000 Message-ID: <20171229100114.GB15274@ACM> References: <20171229091455.GA15274@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1514541768 23126 195.159.176.226 (29 Dec 2017 10:02:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Dec 2017 10:02:48 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: "emacs-devel@gnu.org" To: zhang cc Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 29 11:02:44 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUrUs-0005Fx-My for ged-emacs-devel@m.gmane.org; Fri, 29 Dec 2017 11:02:38 +0100 Original-Received: from localhost ([::1]:35196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUrWq-0002zt-0X for ged-emacs-devel@m.gmane.org; Fri, 29 Dec 2017 05:04:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUrWi-0002zN-8U for emacs-devel@gnu.org; Fri, 29 Dec 2017 05:04:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUrWd-0002MZ-Qv for emacs-devel@gnu.org; Fri, 29 Dec 2017 05:04:32 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:12659 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eUrWd-0002LI-Jo for emacs-devel@gnu.org; Fri, 29 Dec 2017 05:04:27 -0500 Original-Received: (qmail 27433 invoked by uid 3782); 29 Dec 2017 10:04:26 -0000 Original-Received: from acm.muc.de (p548C7879.dip0.t-ipconnect.de [84.140.120.121]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 29 Dec 2017 11:04:25 +0100 Original-Received: (qmail 17147 invoked by uid 1000); 29 Dec 2017 10:01:14 -0000 Content-Disposition: inline In-Reply-To: <20171229091455.GA15274@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:221451 Archived-At: Hello again, Zhang. On Fri, Dec 29, 2017 at 09:14:55 +0000, Alan Mackenzie wrote: > On Fri, Dec 29, 2017 at 04:31:39 +0000, zhang cc wrote: > > Run the command: describe-key, then press the key Control-up, and emacs report the following error message: > > describe-key: Wrong type argument: sequencep, C-up > > Emacs: 26.0.90 > > OS: macOS 10.13.2 > Yes. A careless `copy-sequence' has been used. > I'll fix it. I've committed the following patch to the emacs-26 branch which should fix the bug. Thanks for taking the trouble to report it. commit b240c7846b0d03e9f69af753cd24eb1e550f543c Author: Alan Mackenzie Date: Fri Dec 29 09:54:03 2017 +0000 * lisp/help.el (describe-key): Only (copy-sequence elt) when elt is a list. diff --git a/lisp/help.el b/lisp/help.el index fa7f6b0d5b..8ff27b0b24 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -876,7 +876,7 @@ describe-key (when (vectorp key) (let* ((last (1- (length key))) (elt (aref key last)) - (elt-1 (copy-sequence elt)) + (elt-1 (if (listp elt) (copy-sequence elt) elt)) key-1 down-event-type) (when (and (listp elt-1) (symbolp (car elt-1)) -- Alan Mackenzie (Nuremberg, Germany).