From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52237: 29.0.50; [PATCH 2] Doubled separators in context-menu-mode Date: Sun, 05 Dec 2021 11:32:42 +0200 Organization: LINKOV.NET Message-ID: <868rwzcrql.fsf@mail.linkov.net> References: <0bbe5580-8e05-4e18-5b91-04b41b6f19bc@gmail.com> <87wnknmn2a.fsf@gnus.org> <861r2u3num.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 52237@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 05 11:05:58 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtoP7-0002J7-L7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 11:05:57 +0100 Original-Received: from localhost ([::1]:50866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtoP6-0004Kl-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 05:05:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtoOM-0003cH-Nb for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 05:05:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtoOG-0002pi-18 for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 05:05:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtoOF-0004ya-SL for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 05:05:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Dec 2021 10:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 52237-submit@debbugs.gnu.org id=B52237.163869868519006 (code B ref 52237); Sun, 05 Dec 2021 10:05:03 +0000 Original-Received: (at 52237) by debbugs.gnu.org; 5 Dec 2021 10:04:45 +0000 Original-Received: from localhost ([127.0.0.1]:56414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtoNw-0004wP-Lj for submit@debbugs.gnu.org; Sun, 05 Dec 2021 05:04:45 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtoNr-0004vC-Qr for 52237@debbugs.gnu.org; Sun, 05 Dec 2021 05:04:40 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id CF6E31C0006; Sun, 5 Dec 2021 10:04:32 +0000 (UTC) In-Reply-To: (Jim Porter's message of "Thu, 2 Dec 2021 20:46:28 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221605 Archived-At: > Ok, here's a patch to do it. There might be a better way to do this, but it > should work reliably. > > - (while (consp l) > + (while (consp (cdr l)) This change broke flyspell-correct-word. When a context menu is invoked on a misspelled word in flyspell-mode, context-menu-map uses the property context-menu-function to get a command symbol 'flyspell-correct-word' instead of a list of menu items. bug#50851 fixed this error by checking for a list with `(consp l)' like above: (consp 'flyspell-correct-word) => nil but now 'cdr' fails on (consp (cdr 'flyspell-correct-word)).