[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: get-or-remove-footnotes
From: |
Gavin D. Smith |
Subject: |
branch master updated: get-or-remove-footnotes |
Date: |
Mon, 03 Jan 2022 17:05:31 -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 50b88fa594 get-or-remove-footnotes
50b88fa594 is described below
commit 50b88fa5946a46e69ebf99b8e4431b078a4f3411
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Jan 3 22:05:18 2022 +0000
get-or-remove-footnotes
* info/footnotes.c (info_show_footnotes): Unconditionally
toggle a footnote window. Previously it required a negative
argument to close the footnote window (e.g with 'C-u - M-C-f')
which was laborious.
---
ChangeLog | 9 +++++++++
info/footnotes.c | 41 ++++++++++++++++++-----------------------
2 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d661f3af40..00b070b7c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-01-03 Gavin Smith <gavinsmith0123@gmail.com>
+
+ get-or-remove-footnotes
+
+ * info/footnotes.c (info_show_footnotes): Unconditionally
+ toggle a footnote window. Previously it required a negative
+ argument to close the footnote window (e.g with 'C-u - M-C-f')
+ which was laborious.
+
2022-01-03 Gavin Smith <gavinsmith0123@gmail.com>
* TODO, NEWS: Change a couple of items.
diff --git a/info/footnotes.c b/info/footnotes.c
index eeedc667e5..aa7d2ea845 100644
--- a/info/footnotes.c
+++ b/info/footnotes.c
@@ -1,6 +1,6 @@
/* footnotes.c -- Some functions for manipulating footnotes.
- Copyright 1993-2019 Free Software Foundation, Inc.
+ Copyright 1993-2022 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -248,31 +248,26 @@ info_get_or_remove_footnotes (WINDOW *window)
DECLARE_INFO_COMMAND (info_show_footnotes,
_("Show the footnotes associated with this node in another window"))
{
- /* A negative argument means just make the window go away. */
- if (count < 0)
- {
- WINDOW *fn_win = find_footnotes_window ();
+ /* Make the window go away if it is already showing. */
+ WINDOW *fn_win = find_footnotes_window ();
- /* If there is an old footnotes window, and it isn't the only window
- on the screen, delete it. */
- if (fn_win && windows->next)
+ /* If there is an old footnotes window, and it isn't the only window
+ on the screen, delete it. */
+ if (fn_win && windows->next)
+ {
info_delete_window_internal (fn_win);
- }
- else
- {
- int result;
+ return;
+ }
- result = info_get_or_remove_footnotes (window);
- switch (result)
- {
- case FN_UNFOUND:
- info_error ("%s", msg_no_foot_node);
- break;
+ switch (info_get_or_remove_footnotes (window))
+ {
+ case FN_UNFOUND:
+ info_error ("%s", msg_no_foot_node);
+ break;
- case FN_UNABLE:
- info_error ("%s", msg_win_too_small);
- break;
- }
- }
+ case FN_UNABLE:
+ info_error ("%s", msg_win_too_small);
+ break;
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: get-or-remove-footnotes,
Gavin D. Smith <=