[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fileio.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/fileio.c |
Date: |
Tue, 21 Dec 2004 19:01:59 -0500 |
Index: emacs/src/fileio.c
diff -c emacs/src/fileio.c:1.521 emacs/src/fileio.c:1.522
*** emacs/src/fileio.c:1.521 Sun Nov 7 11:07:21 2004
--- emacs/src/fileio.c Tue Dec 21 11:33:16 2004
***************
*** 228,233 ****
--- 228,235 ----
extern int minibuffer_auto_raise;
+ extern int history_delete_duplicates;
+
/* These variables describe handlers that have "already" had a chance
to handle the current operation.
***************
*** 6383,6389 ****
if (replace_in_history)
/* Replace what Fcompleting_read added to the history
with what we will actually return. */
! XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val));
else if (add_to_history)
{
/* Add the value to the history--but not if it matches
--- 6385,6397 ----
if (replace_in_history)
/* Replace what Fcompleting_read added to the history
with what we will actually return. */
! {
! Lisp_Object val1 = double_dollars (val);
! tem = Fsymbol_value (Qfile_name_history);
! if (history_delete_duplicates)
! XSETCDR (tem, Fdelete (val1, XCDR(tem)));
! XSETCAR (tem, val1);
! }
else if (add_to_history)
{
/* Add the value to the history--but not if it matches
***************
*** 6391,6398 ****
Lisp_Object val1 = double_dollars (val);
tem = Fsymbol_value (Qfile_name_history);
if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1)))
! Fset (Qfile_name_history,
! Fcons (val1, tem));
}
return val;
--- 6399,6408 ----
Lisp_Object val1 = double_dollars (val);
tem = Fsymbol_value (Qfile_name_history);
if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1)))
! {
! if (history_delete_duplicates) tem = Fdelete (val1, tem);
! Fset (Qfile_name_history, Fcons (val1, tem));
! }
}
return val;
- [Emacs-diffs] Changes to emacs/src/fileio.c,
Richard M . Stallman <=