From: "Philip K." <philipk@posteo.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 42668@debbugs.gnu.org
Subject: bug#42668: 26.1; Undefined functions when calling invoking project.el
Date: Wed, 05 Aug 2020 23:00:50 +0200 [thread overview]
Message-ID: <87sgd0q03h.fsf@posteo.net> (raw)
In-Reply-To: <da366afe-1233-fec8-d842-0f86d84aa0f9@yandex.ru> (message from Dmitry Gutov on Mon, 3 Aug 2020 01:16:54 +0300)
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
(sorry for the delay)
Dmitry Gutov <dgutov@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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-usages-of-assoc-delete-all-in-project.el.patch --]
[-- Type: text/x-diff, Size: 1671 bytes --]
From 47dac7a9e6da05bb6303e4b10a0b8ce98aa12eeb Mon Sep 17 00:00:00 2001
From: Philip K <philipk@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
[-- Attachment #3: Type: text/plain, Size: 16 bytes --]
--
Philip K.
next prev parent reply other threads:[~2020-08-05 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-02 9:07 bug#42668: 26.1; Undefined functions when calling invoking project.el Philip K.
2020-08-02 14:23 ` Eli Zaretskii
2020-08-02 14:36 ` Philip K.
2020-08-02 22:02 ` Philip K.
2020-08-02 22:16 ` Dmitry Gutov
2020-08-05 21:00 ` Philip K. [this message]
2020-08-06 14:51 ` Dmitry Gutov
2020-08-02 22:06 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgd0q03h.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=42668@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).