228 |
|
|
229 |
extern int minibuffer_auto_raise; |
extern int minibuffer_auto_raise; |
230 |
|
|
231 |
|
extern int history_delete_duplicates; |
232 |
|
|
233 |
/* These variables describe handlers that have "already" had a chance |
/* These variables describe handlers that have "already" had a chance |
234 |
to handle the current operation. |
to handle the current operation. |
235 |
|
|
6385 |
if (replace_in_history) |
if (replace_in_history) |
6386 |
/* Replace what Fcompleting_read added to the history |
/* Replace what Fcompleting_read added to the history |
6387 |
with what we will actually return. */ |
with what we will actually return. */ |
6388 |
XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val)); |
{ |
6389 |
|
Lisp_Object val1 = double_dollars (val); |
6390 |
|
tem = Fsymbol_value (Qfile_name_history); |
6391 |
|
if (history_delete_duplicates) |
6392 |
|
XSETCDR (tem, Fdelete (val1, XCDR(tem))); |
6393 |
|
XSETCAR (tem, val1); |
6394 |
|
} |
6395 |
else if (add_to_history) |
else if (add_to_history) |
6396 |
{ |
{ |
6397 |
/* Add the value to the history--but not if it matches |
/* Add the value to the history--but not if it matches |
6399 |
Lisp_Object val1 = double_dollars (val); |
Lisp_Object val1 = double_dollars (val); |
6400 |
tem = Fsymbol_value (Qfile_name_history); |
tem = Fsymbol_value (Qfile_name_history); |
6401 |
if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) |
if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) |
6402 |
Fset (Qfile_name_history, |
{ |
6403 |
Fcons (val1, tem)); |
if (history_delete_duplicates) tem = Fdelete (val1, tem); |
6404 |
|
Fset (Qfile_name_history, Fcons (val1, tem)); |
6405 |
|
} |
6406 |
} |
} |
6407 |
|
|
6408 |
return val; |
return val; |