[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3c0c47b: Revert "Switch add-to-ordered-list to eql"
From: |
Lars Ingebrigtsen |
Subject: |
master 3c0c47b: Revert "Switch add-to-ordered-list to eql" |
Date: |
Wed, 30 Dec 2020 02:08:13 -0500 (EST) |
branch: master
commit 3c0c47b3a74c4ea851293d0869f956a4644af062
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Revert "Switch add-to-ordered-list to eql"
This reverts commit b4fd857ead728a06380250c5336c1ab94a7c2f7a.
I misunderstood the purposed of the function.
---
doc/lispref/lists.texi | 2 +-
etc/NEWS | 2 --
lisp/subr.el | 4 ++--
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 2e5b193..ae793d5 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -812,7 +812,7 @@ This function sets the variable @var{symbol} by inserting
@var{element} into the old value, which must be a list, at the
position specified by @var{order}. If @var{element} is already a
member of the list, its position in the list is adjusted according
-to @var{order}. Membership is tested using @code{eql}.
+to @var{order}. Membership is tested using @code{eq}.
This function returns the resulting list, whether updated or not.
The @var{order} is typically a number (integer or float), and the
diff --git a/etc/NEWS b/etc/NEWS
index e418999..0231c16 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1861,8 +1861,6 @@ directory instead of the default directory.
* Incompatible Lisp Changes in Emacs 28.1
-** 'add-to-ordered-list' now uses 'eql' instead of 'eq'.
-
** 'set-process-buffer' now updates the process mark.
The mark will be set to point to the end of the new buffer.
diff --git a/lisp/subr.el b/lisp/subr.el
index b3f00cc..384dbb25 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1973,7 +1973,7 @@ can do the job."
(defun add-to-ordered-list (list-var element &optional order)
"Add ELEMENT to the value of LIST-VAR if it isn't there yet.
-The test for presence of ELEMENT is done with `eql'.
+The test for presence of ELEMENT is done with `eq'.
The resulting list is reordered so that the elements are in the
order given by each element's numeric list order. Elements
@@ -1993,7 +1993,7 @@ The return value is the new value of LIST-VAR."
(let ((ordering (get list-var 'list-order)))
(unless ordering
(put list-var 'list-order
- (setq ordering (make-hash-table :weakness 'key))))
+ (setq ordering (make-hash-table :weakness 'key :test 'eq))))
(when order
(puthash element (and (numberp order) order) ordering))
(unless (memq element (symbol-value list-var))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3c0c47b: Revert "Switch add-to-ordered-list to eql",
Lars Ingebrigtsen <=