Mercurial > emacs
comparison src/fileio.c @ 90068:eac554634bfa
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-79
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-747
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 25 Dec 2004 02:00:25 +0000 |
parents | cb7f41387eb3 1ee6d4f5d727 |
children | 95879cc1ed20 |
comparison
equal
deleted
inserted
replaced
90067:b481c5870e10 | 90068:eac554634bfa |
---|---|
225 #endif | 225 #endif |
226 | 226 |
227 extern int minibuf_level; | 227 extern int minibuf_level; |
228 | 228 |
229 extern int minibuffer_auto_raise; | 229 extern int minibuffer_auto_raise; |
230 | |
231 extern int history_delete_duplicates; | |
230 | 232 |
231 /* These variables describe handlers that have "already" had a chance | 233 /* These variables describe handlers that have "already" had a chance |
232 to handle the current operation. | 234 to handle the current operation. |
233 | 235 |
234 Vinhibit_file_name_handlers is a list of file name handlers. | 236 Vinhibit_file_name_handlers is a list of file name handlers. |
6297 val = Fsubstitute_in_file_name (val); | 6299 val = Fsubstitute_in_file_name (val); |
6298 | 6300 |
6299 if (replace_in_history) | 6301 if (replace_in_history) |
6300 /* Replace what Fcompleting_read added to the history | 6302 /* Replace what Fcompleting_read added to the history |
6301 with what we will actually return. */ | 6303 with what we will actually return. */ |
6302 XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val)); | 6304 { |
6305 Lisp_Object val1 = double_dollars (val); | |
6306 tem = Fsymbol_value (Qfile_name_history); | |
6307 if (history_delete_duplicates) | |
6308 XSETCDR (tem, Fdelete (val1, XCDR(tem))); | |
6309 XSETCAR (tem, val1); | |
6310 } | |
6303 else if (add_to_history) | 6311 else if (add_to_history) |
6304 { | 6312 { |
6305 /* Add the value to the history--but not if it matches | 6313 /* Add the value to the history--but not if it matches |
6306 the last value already there. */ | 6314 the last value already there. */ |
6307 Lisp_Object val1 = double_dollars (val); | 6315 Lisp_Object val1 = double_dollars (val); |
6308 tem = Fsymbol_value (Qfile_name_history); | 6316 tem = Fsymbol_value (Qfile_name_history); |
6309 if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) | 6317 if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) |
6310 Fset (Qfile_name_history, | 6318 { |
6311 Fcons (val1, tem)); | 6319 if (history_delete_duplicates) tem = Fdelete (val1, tem); |
6320 Fset (Qfile_name_history, Fcons (val1, tem)); | |
6321 } | |
6312 } | 6322 } |
6313 | 6323 |
6314 return val; | 6324 return val; |
6315 } | 6325 } |
6316 | 6326 |