| 452 | | @defun add-to-history history-var newelt &optional maxelt |
|---|
| 453 | | This function adds a new element @var{newelt} to the history list |
|---|
| 454 | | stored in the variable @var{history-var}, and returns the updated |
|---|
| 455 | | history list. By default, the list length is limited by the value |
|---|
| 456 | | specified by @code{history-length} (described below), but the optional |
|---|
| 457 | | argument @var{maxelt} overrides that. The possible values of |
|---|
| 458 | | @var{maxelt} have the same meaning as the values of |
|---|
| 459 | | @code{history-length}. |
|---|
| 460 | | |
|---|
| 461 | | Duplicate members are removed from the history list, unless |
|---|
| 462 | | @code{history-delete-duplicates} is @code{nil}. |
|---|
| | 452 | @defun add-to-history history-var newelt &optional maxelt keep-all |
|---|
| | 453 | This function adds a new element @var{newelt}, if it isn't the empty |
|---|
| | 454 | string, to the history list stored in the variable @var{history-var}, |
|---|
| | 455 | and returns the updated history list. It limits the list length to |
|---|
| | 456 | the value of @var{maxelt} (if non-@code{nil}) or @code{history-length} |
|---|
| | 457 | (described below). The possible values of @var{maxelt} have the same |
|---|
| | 458 | meaning as the values of @code{history-length}. |
|---|
| | 459 | |
|---|
| | 460 | Normally, @code{add-to-history} removes duplicate members from the |
|---|
| | 461 | history list if @code{history-delete-duplicates} is non-@code{nil}. |
|---|
| | 462 | However, if @var{keep-all} is non-@code{nil}, that says not to remove |
|---|
| | 463 | duplicates, and to add @var{newelt} to the list even if it is empty. |
|---|