[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/variables.c (set_variable_to_value): Reord
From: |
Gavin D. Smith |
Subject: |
branch master updated: * info/variables.c (set_variable_to_value): Reorder code slightly. No functional change. |
Date: |
Sun, 11 Feb 2024 08:33:17 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new f7f1ada4a1 * info/variables.c (set_variable_to_value): Reorder code
slightly. No functional change.
f7f1ada4a1 is described below
commit f7f1ada4a1c789d2d4c5a462b455f6e47b78c0b0
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Feb 11 13:33:08 2024 +0000
* info/variables.c (set_variable_to_value): Reorder code
slightly. No functional change.
---
ChangeLog | 5 +++++
info/variables.c | 14 +++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe360b9a19..727f972ed5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-02-11 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/variables.c (set_variable_to_value): Reorder code
+ slightly. No functional change.
+
2024-02-11 Gavin Smith <gavinsmith0123@gmail.com>
Avoid "M-x set-variable RET highlight-searches" inconsistency
diff --git a/info/variables.c b/info/variables.c
index 85f4c74ae2..a4dc24d7e6 100644
--- a/info/variables.c
+++ b/info/variables.c
@@ -511,14 +511,18 @@ set_variable_to_value (VARIABLE_ALIST *var, char *value,
int where)
if (var->choices)
{
- register int j;
-
if (var->value == &highlight_searches)
{
update_highlight_searches (value);
}
- else if (var->choices != (char **) &rendition_choices)
+ else if (var->choices == (char **) &rendition_choices)
+ {
+ update_rendition_from_string ((RENDITION *) var->value, value);
+ }
+ else
{
+ register int j;
+
/* Find the choice in our list of choices. */
for (j = 0; var->choices[j]; j++)
if (strcmp (var->choices[j], value) == 0)
@@ -528,10 +532,6 @@ set_variable_to_value (VARIABLE_ALIST *var, char *value,
int where)
return 1;
}
}
- else
- {
- update_rendition_from_string ((RENDITION *) var->value, value);
- }
return 1;
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/variables.c (set_variable_to_value): Reorder code slightly. No functional change.,
Gavin D. Smith <=