From aa135e09b6735cd50742b1023fc901feb32e6a52 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Mon, 1 May 2023 17:22:02 +0200 Subject: 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/progmodes/python.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/progmodes/python.el') 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'." -- cgit v1.2.1