unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17432: 24.4.50; minibuffer history forgets the first entry
@ 2014-05-07  8:56 BONSOFT Jaroslaw Czekalski
  2014-05-07 18:27 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: BONSOFT Jaroslaw Czekalski @ 2014-05-07  8:56 UTC (permalink / raw)
  To: 17432

[-- Attachment #1: Type: text/html, Size: 5489 bytes --]

[-- Attachment #2: history_1_00.patch --]
[-- Type: text/plain, Size: 1061 bytes --]

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2014-05-06 21:13:37 +0000
+++ src/ChangeLog	2014-05-07 08:54:40 +0000
@@ -1,3 +1,8 @@
+2014-05-07  Jarek Czekalski  <jarekczek@poczta.onet.pl>
+
+	Fix initialization of minibuffer history variable (Bug#xxxxx).
+	* minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
+
 2014-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* image.c: Do not use libpng if HAVE_NS, as NS does its own thing.

=== modified file 'src/minibuf.c'
--- src/minibuf.c	2014-03-21 17:04:50 +0000
+++ src/minibuf.c	2014-05-07 08:54:21 +0000
@@ -708,8 +708,10 @@
       /* If variable is unbound, make it nil.  */
 
       histval = find_symbol_value (Vminibuffer_history_variable);
-      if (EQ (histval, Qunbound))
-	Fset (Vminibuffer_history_variable, Qnil);
+      if (EQ (histval, Qunbound)) {
+        Fset (Vminibuffer_history_variable, Qnil);
+        histval = Qnil;
+      }
 
       /* The value of the history variable must be a cons or nil.  Other
 	 values are unacceptable.  We silently ignore these values.  */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#17432: 24.4.50; minibuffer history forgets the first entry
  2014-05-07  8:56 bug#17432: 24.4.50; minibuffer history forgets the first entry BONSOFT Jaroslaw Czekalski
@ 2014-05-07 18:27 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-05-07 18:27 UTC (permalink / raw)
  To: BONSOFT Jaroslaw Czekalski; +Cc: 17432

> +      if (EQ (histval, Qunbound)) {
> +        Fset (Vminibuffer_history_variable, Qnil);
> +        histval = Qnil;
> +      }

Oh, and the "{" should be on its own line.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-07 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07  8:56 bug#17432: 24.4.50; minibuffer history forgets the first entry BONSOFT Jaroslaw Czekalski
2014-05-07 18:27 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).