aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-05-07 20:49:01 +0000
committerKim F. Storm2006-05-07 20:49:01 +0000
commitae9d1ae3b878d499663a6ae0798117bdbeab6bc0 (patch)
tree3f18c91cbb9e06f2f25aef073dffc3fb6b9c43cd
parente2fa249f30abc45e1c94833d26bbc9a964f4d0d7 (diff)
downloademacs-ae9d1ae3b878d499663a6ae0798117bdbeab6bc0.tar.gz
emacs-ae9d1ae3b878d499663a6ae0798117bdbeab6bc0.zip
(add-to-history): Remove keep-dups arg.
-rw-r--r--lisp/subr.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 82d60a34d5f..d4167724ca0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1123,21 +1123,20 @@ The return value is the new value of LIST-VAR."
1123 (< oa ob) 1123 (< oa ob)
1124 oa))))))) 1124 oa)))))))
1125 1125
1126(defun add-to-history (history-var newelt &optional maxelt keep-dups) 1126(defun add-to-history (history-var newelt &optional maxelt)
1127 "Add NEWELT to the history list stored in the variable HISTORY-VAR. 1127 "Add NEWELT to the history list stored in the variable HISTORY-VAR.
1128Return the new history list. 1128Return the new history list.
1129If MAXELT is non-nil, it specifies the maximum length of the history. 1129If MAXELT is non-nil, it specifies the maximum length of the history.
1130Otherwise, the maximum history length is the value of the `history-length' 1130Otherwise, the maximum history length is the value of the `history-length'
1131property on symbol HISTORY-VAR, if set, or the value of the `history-length' 1131property on symbol HISTORY-VAR, if set, or the value of the `history-length'
1132variable. 1132variable.
1133Remove duplicates of NEWELT unless `history-delete-duplicates' is nil 1133Remove duplicates of NEWELT unless `history-delete-duplicates' is nil."
1134or KEEP-DUPS is non-nil."
1135 (unless maxelt 1134 (unless maxelt
1136 (setq maxelt (or (get history-var 'history-length) 1135 (setq maxelt (or (get history-var 'history-length)
1137 history-length))) 1136 history-length)))
1138 (let ((history (symbol-value history-var)) 1137 (let ((history (symbol-value history-var))
1139 tail) 1138 tail)
1140 (if (and history-delete-duplicates (not keep-dups)) 1139 (if history-delete-duplicates
1141 (setq history (delete newelt history))) 1140 (setq history (delete newelt history)))
1142 (setq history (cons newelt history)) 1141 (setq history (cons newelt history))
1143 (when (integerp maxelt) 1142 (when (integerp maxelt)