[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/minibuf.c
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/minibuf.c |
Date: |
Sat, 17 May 2003 11:52:54 -0400 |
Index: emacs/src/minibuf.c
diff -c emacs/src/minibuf.c:1.255 emacs/src/minibuf.c:1.256
*** emacs/src/minibuf.c:1.255 Thu Apr 10 22:06:15 2003
--- emacs/src/minibuf.c Sat May 17 11:52:54 2003
***************
*** 415,421 ****
match the front of that history list exactly. The value is pushed onto
the list as the string that was read.
! DEFALT specifies te default value for the sake of history commands.
If ALLOW_PROPS is nonzero, we do not throw away text properties.
--- 415,421 ----
match the front of that history list exactly. The value is pushed onto
the list as the string that was read.
! DEFALT specifies the default value for the sake of history commands.
If ALLOW_PROPS is nonzero, we do not throw away text properties.
***************
*** 441,446 ****
--- 441,450 ----
Lisp_Object mini_frame, ambient_dir, minibuffer, input_method;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
Lisp_Object enable_multibyte;
+
+ /* String to add to the history. */
+ Lisp_Object histstring;
+
extern Lisp_Object Qfront_sticky;
extern Lisp_Object Qrear_nonsticky;
***************
*** 675,683 ****
last_minibuf_string = val;
! /* Add the value to the appropriate history list unless it is empty. */
! if (SCHARS (val) != 0
! && SYMBOLP (Vminibuffer_history_variable))
{
/* If the caller wanted to save the value read on a history list,
then do so if the value is not already the front of the list. */
--- 679,695 ----
last_minibuf_string = val;
! /* Choose the string to add to the history. */
! if (SCHARS (val) != 0)
! histstring = val;
! else if (STRINGP (defalt))
! histstring = defalt;
! else
! histstring = Qnil;
!
! /* Add the value to the appropriate history list, if any. */
! if (SYMBOLP (Vminibuffer_history_variable)
! && !NILP (histstring))
{
/* If the caller wanted to save the value read on a history list,
then do so if the value is not already the front of the list. */
***************
*** 691,703 ****
/* The value of the history variable must be a cons or nil. Other
values are unacceptable. We silently ignore these values. */
if (NILP (histval)
|| (CONSP (histval)
! && NILP (Fequal (last_minibuf_string, Fcar (histval)))))
{
Lisp_Object length;
! histval = Fcons (last_minibuf_string, histval);
Fset (Vminibuffer_history_variable, histval);
/* Truncate if requested. */
--- 703,717 ----
/* The value of the history variable must be a cons or nil. Other
values are unacceptable. We silently ignore these values. */
+
if (NILP (histval)
|| (CONSP (histval)
! /* Don't duplicate the most recent entry in the history. */
! && NILP (Fequal (histstring, Fcar (histval)))))
{
Lisp_Object length;
! histval = Fcons (histstring, histval);
Fset (Vminibuffer_history_variable, histval);
/* Truncate if requested. */
***************
*** 2058,2064 ****
i++;
buffer_nchars--;
}
! del_range (1, i + 1);
}
UNGCPRO;
}
--- 2072,2078 ----
i++;
buffer_nchars--;
}
! del_range (start_pos, start_pos + buffer_nchars);
}
UNGCPRO;
}
- [Emacs-diffs] Changes to emacs/src/minibuf.c,
Richard M. Stallman <=