From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Philip K." Newsgroups: gmane.emacs.bugs Subject: bug#42668: 26.1; Undefined functions when calling invoking project.el Date: Wed, 05 Aug 2020 23:00:50 +0200 Message-ID: <87sgd0q03h.fsf@posteo.net> References: <87r1spfmb4.fsf@bulbul> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42668@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 05 23:02:12 2020 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 1k3QY7-0004Y0-Vd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Aug 2020 23:02:12 +0200 Original-Received: from localhost ([::1]:36676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3QY6-0003BP-4p for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Aug 2020 17:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3QXy-0003B4-J5 for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2020 17:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3QXy-000875-9H for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2020 17:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k3QXy-0001jI-08 for bug-gnu-emacs@gnu.org; Wed, 05 Aug 2020 17:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Philip K." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Aug 2020 21:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42668 X-GNU-PR-Package: emacs Original-Received: via spool by 42668-submit@debbugs.gnu.org id=B42668.15966612626560 (code B ref 42668); Wed, 05 Aug 2020 21:02:01 +0000 Original-Received: (at 42668) by debbugs.gnu.org; 5 Aug 2020 21:01:02 +0000 Original-Received: from localhost ([127.0.0.1]:52314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3QX0-0001hk-BC for submit@debbugs.gnu.org; Wed, 05 Aug 2020 17:01:02 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:59065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k3QWw-0001h1-Jp for 42668@debbugs.gnu.org; Wed, 05 Aug 2020 17:01:01 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 3E31316005F for <42668@debbugs.gnu.org>; Wed, 5 Aug 2020 23:00:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1596661252; bh=YYE388WYZZa3ACuRt3aDuItrxory+yAVirPgs8FhMgo=; h=From:To:Cc:Subject:Date:From; b=iAMrVSayM1tqTOVbsFpeB2GrSn3poCSF+ypQC1D9oUpSe99JJsF9hAQD3QtDNQFzH d1aII6H1Mf2V3nZsKWI3B8M+85JtR60eJfhyK8G58MqNUKphHH//qY91WVoJnFxUGh HUPZue6rWdlSBqH6R12LpCTTBBifmLOu/YqteFKn5xvZaymf6U2ZDJ57dYAtJu8EhP rWwNUgvR4xfCpXAtMS0gDMMFlxpqoBUOzWGykNMEjXb0sU82Vneyi5hUokEFsr+sYV 6yLX8bCxtf2x5pspVNJ+U7KZPKUI308i6iyXYrmIz19kLV2ozMMwi74u91ph8/6V5r OaAGj8iqiutIw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BMPD33VMbz9rxW; Wed, 5 Aug 2020 23:00:51 +0200 (CEST) In-Reply-To: (message from Dmitry Gutov on Mon, 3 Aug 2020 01:16:54 +0300) 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:184132 Archived-At: --=-=-= Content-Type: text/plain (sorry for the delay) Dmitry Gutov writes: > On 03.08.2020 01:02, Philip K. wrote: >> The patch attached below should fix the assoc-delete-all issue. > > Thanks! > > Could you add a commit message as well, formatted according to CONTRIBUTE? Sure, I hope this is ok: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Remove-usages-of-assoc-delete-all-in-project.el.patch >From 47dac7a9e6da05bb6303e4b10a0b8ce98aa12eeb Mon Sep 17 00:00:00 2001 From: Philip K Date: Wed, 5 Aug 2020 22:57:01 +0200 Subject: [PATCH] ; Remove usages of assoc-delete-all in project.el assoc-delete-all is not available for users who have installed project.el via ELPA on older Emacs versions. * lisp/progmodes/project.el (project-remember-project, project--remove-from-project-list): Replace assoc-delete-all with equivalent alternatives --- lisp/progmodes/project.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 51b9347bb9..b6161351f0 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1166,7 +1166,9 @@ project-remember-project (project--ensure-read-project-list) (let ((dir (project-root pr))) (unless (equal (caar project--list) dir) - (setq project--list (assoc-delete-all dir project--list)) + (dolist (ent project--list) + (when (equal dir (car ent)) + (setq project--list (delq ent project--list)))) (push (list dir) project--list) (project--write-project-list)))) @@ -1176,8 +1178,8 @@ project--remove-from-project-list result in `project-list-file'. Announce the project's removal from the list." (project--ensure-read-project-list) - (when (assoc pr-dir project--list) - (setq project--list (assoc-delete-all pr-dir project--list)) + (when-let ((ent (assoc pr-dir project--list))) + (setq project--list (delq ent project--list)) (message "Project `%s' not found; removed from list" pr-dir) (project--write-project-list))) -- 2.20.1 --=-=-= Content-Type: text/plain -- Philip K. --=-=-=--