# HG changeset patch # User Juri Linkov # Date 1094673973 0 # Node ID eda556d106c6d9d6e4b1caef8a71ee135f0a92f4 # Parent 6d1f39d4f8e6a2e7d83b118bd5e3bb2295250e92 (history_delete_duplicates): New variable. (read_minibuf): Use it. (syms_of_minibuf): Create the corresponding lisp variable. diff -r 6d1f39d4f8e6 -r eda556d106c6 src/minibuf.c --- a/src/minibuf.c Wed Sep 08 18:17:56 2004 +0000 +++ b/src/minibuf.c Wed Sep 08 20:06:13 2004 +0000 @@ -61,6 +61,10 @@ Lisp_Object Qhistory_length, Vhistory_length; +/* No duplicates in history. */ + +int history_delete_duplicates; + /* Fread_minibuffer leaves the input here as a string. */ Lisp_Object last_minibuf_string; @@ -749,6 +753,7 @@ { Lisp_Object length; + if (history_delete_duplicates) Fdelete (histstring, histval); histval = Fcons (histstring, histval); Fset (Vminibuffer_history_variable, histval); @@ -2668,6 +2673,12 @@ property of a history variable overrides this default. */); XSETFASTINT (Vhistory_length, 30); + DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates, + doc: /* *Non-nil means to delete duplicates in history. +If set to t when adding a new history element, all previous identical +elements are deleted. */); + history_delete_duplicates = 0; + DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, doc: /* *Non-nil means automatically provide help for invalid completion input. */); Vcompletion_auto_help = Qt;