diff options
| author | Jarek Czekalski | 2014-05-07 17:03:47 +0200 |
|---|---|---|
| committer | Jarek Czekalski | 2014-05-07 17:03:47 +0200 |
| commit | 73b60c4af9c5dea00158d22f91f05984202b6e64 (patch) | |
| tree | cd78bfa76c4d382d60c47299ec4df2a165b22fa9 /src | |
| parent | 1ddb2150e64c2d07bd91a3883a0028a0b8599d76 (diff) | |
| download | emacs-73b60c4af9c5dea00158d22f91f05984202b6e64.tar.gz emacs-73b60c4af9c5dea00158d22f91f05984202b6e64.zip | |
Fix initialization of minibuffer history variable, bug #17430.
* minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
Move the initialization up to prevent any "value void" message.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/minibuf.c | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c1d45f1df40..027d0fc0d25 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-05-07 Jarek Czekalski <jarekczek@poczta.onet.pl> | ||
| 2 | |||
| 3 | Fix initialization of minibuffer history variable (Bug#17430). | ||
| 4 | * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound. | ||
| 5 | Move the initialization up to prevent any "value void" message. | ||
| 6 | |||
| 1 | 2014-05-06 Samuel Bronson <naesten@gmail.com> | 7 | 2014-05-06 Samuel Bronson <naesten@gmail.com> |
| 2 | 8 | ||
| 3 | * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level | 9 | * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level |
diff --git a/src/minibuf.c b/src/minibuf.c index f325381d1ca..03d6104f226 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -535,6 +535,13 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 535 | if (!NILP (Vminibuffer_completing_file_name)) | 535 | if (!NILP (Vminibuffer_completing_file_name)) |
| 536 | Vminibuffer_completing_file_name = Qlambda; | 536 | Vminibuffer_completing_file_name = Qlambda; |
| 537 | 537 | ||
| 538 | /* If variable is unbound, make it nil. */ | ||
| 539 | Lisp_Object histval = find_symbol_value (Vminibuffer_history_variable); | ||
| 540 | if (EQ (histval, Qunbound)) { | ||
| 541 | Fset (Vminibuffer_history_variable, Qnil); | ||
| 542 | histval = Qnil; | ||
| 543 | } | ||
| 544 | |||
| 538 | if (inherit_input_method) | 545 | if (inherit_input_method) |
| 539 | { | 546 | { |
| 540 | /* `current-input-method' is buffer local. So, remember it in | 547 | /* `current-input-method' is buffer local. So, remember it in |
| @@ -703,13 +710,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 703 | { | 710 | { |
| 704 | /* If the caller wanted to save the value read on a history list, | 711 | /* If the caller wanted to save the value read on a history list, |
| 705 | then do so if the value is not already the front of the list. */ | 712 | then do so if the value is not already the front of the list. */ |
| 706 | Lisp_Object histval; | ||
| 707 | |||
| 708 | /* If variable is unbound, make it nil. */ | ||
| 709 | |||
| 710 | histval = find_symbol_value (Vminibuffer_history_variable); | ||
| 711 | if (EQ (histval, Qunbound)) | ||
| 712 | Fset (Vminibuffer_history_variable, Qnil); | ||
| 713 | 713 | ||
| 714 | /* The value of the history variable must be a cons or nil. Other | 714 | /* The value of the history variable must be a cons or nil. Other |
| 715 | values are unacceptable. We silently ignore these values. */ | 715 | values are unacceptable. We silently ignore these values. */ |