history-delete-duplicates

history-delete-duplicates is a variable defined in `C source code'.
Its value is
nil


Documentation:
Non-nil means to delete duplicates in history.
If set to t when adding a new history element, all previous identical
elements are deleted from the history list.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 22.1 of Emacs.