GNU bug report logs - #42668
26.1; Undefined functions when calling invoking project.el

Previous Next

Package: emacs;

Reported by: philipk <at> posteo.net (Philip K.)

Date: Sun, 2 Aug 2020 09:08:01 UTC

Severity: normal

Found in version 26.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 42668 <at> debbugs.gnu.org (full text, mbox):

From: "Philip K." <philipk <at> posteo.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 42668 <at> debbugs.gnu.org, eliz <at> gnu.org
Subject: Re: bug#42668: 26.1; Undefined functions when calling invoking
 project.el
Date: Wed, 05 Aug 2020 23:00:50 +0200
[Message part 1 (text/plain, inline)]
(sorry for the delay)

Dmitry Gutov <dgutov <at> yandex.ru> 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:

[0001-Remove-usages-of-assoc-delete-all-in-project.el.patch (text/x-diff, inline)]
From 47dac7a9e6da05bb6303e4b10a0b8ce98aa12eeb Mon Sep 17 00:00:00 2001
From: Philip K <philipk <at> posteo.net>
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

[Message part 3 (text/plain, inline)]
-- 
	Philip K.

This bug report was last modified 4 years and 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.