[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aa135e09b67 2/2: Declare `cl-delete` to have important-return-val
From: |
Mattias Engdegård |
Subject: |
master aa135e09b67 2/2: Declare `cl-delete` to have important-return-value (bug#61730) |
Date: |
Mon, 1 May 2023 11:53:16 -0400 (EDT) |
branch: master
commit aa135e09b6735cd50742b1023fc901feb32e6a52
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Declare `cl-delete` to have important-return-value (bug#61730)
* lisp/emacs-lisp/cl-macs.el: Set property on `cl-delete`.
* lisp/progmodes/python.el (python-shell--add-to-path-with-priority):
Prevent warning by cleaner code.
---
lisp/emacs-lisp/cl-macs.el | 3 +--
lisp/progmodes/python.el | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 04567917189..8fdafe18c50 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3683,8 +3683,7 @@ macro that returns its `&whole' argument."
cl-tree-equal
;; Functions that mutate and return a list.
- ;;cl-delete
- cl-delete-if cl-delete-if-not
+ cl-delete cl-delete-if cl-delete-if-not
cl-delete-duplicates
cl-nsubst cl-nsubst-if cl-nsubst-if-not
cl-nsubstitute cl-nsubstitute-if cl-nsubstitute-if-not
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5bb15c60956..f9b645cc3df 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2720,8 +2720,7 @@ dedicated to the current buffer or its project (if one is
found)."
(defmacro python-shell--add-to-path-with-priority (pathvar paths)
"Modify PATHVAR and ensure PATHS are added only once at beginning."
`(dolist (path (reverse ,paths))
- (cl-delete path ,pathvar :test #'string=)
- (cl-pushnew path ,pathvar :test #'string=)))
+ (setq ,pathvar (cons path (cl-delete path ,pathvar :test #'string=)))))
(defun python-shell-calculate-pythonpath ()
"Calculate the PYTHONPATH using `python-shell-extra-pythonpaths'."