From 1715f2dbca4b516432569892b708e9c1c0e9a2dd Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Sat, 8 Sep 2012 22:30:09 +0800 Subject: [PATCH] * subr.el (add-to-history): Fix delete usage. Fixes: debbugs:12314 --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d6210a16b9..b45d2fd8235 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-09-08 Drew Adams + + * subr.el (add-to-history): Fix delete usage (Bug#12314). + 2012-09-08 Chong Yidong * subr.el (syntax-after, syntax-class): Doc fix. diff --git a/lisp/subr.el b/lisp/subr.el index 4f273a92a62..21dd270caef 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1548,7 +1548,7 @@ if it is empty or a duplicate." (or keep-all (not (equal (car history) newelt)))) (if history-delete-duplicates - (delete newelt history)) + (setq history (delete newelt history))) (setq history (cons newelt history)) (when (integerp maxelt) (if (= 0 maxelt) -- 2.39.2