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'."