From 3760ceb0488965c1966eb8927284352c718789c9 Mon Sep 17 00:00:00 2001 From: Janfel <33464477+Janfel@users.noreply.github.com> Date: Fri, 7 Aug 2020 18:28:36 +0200 Subject: [PATCH] Fix deduplication in add-load-path! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, `add-load-path!` doesn’t check for duplicates in `load-path`, because `cl-pushnew` tests for equality with `eql`. This changes the predicate to `string=`, fixing the bug. --- core/core-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-lib.el b/core/core-lib.el index 8ee68e8e4..27812766d 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -328,7 +328,7 @@ The current file is the file from which `add-to-load-path!' is used." `(let ((default-directory ,(dir!)) file-name-handler-alist) (dolist (dir (list ,@dirs)) - (cl-pushnew (expand-file-name dir) load-path)))) + (cl-pushnew (expand-file-name dir) load-path :test #'string=)))) (defmacro after! (package &rest body) "Evaluate BODY after PACKAGE have loaded.