[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Sat Aug 4 07:23:01 EDT 2007)
From: |
Karl Berry |
Subject: |
texinfo update (Sat Aug 4 07:23:01 EDT 2007) |
Date: |
Sat, 04 Aug 2007 07:23:04 -0400 |
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.743
retrieving revision 1.744
diff -u -r1.743 -r1.744
--- ChangeLog 30 Jul 2007 15:50:20 -0000 1.743
+++ ChangeLog 4 Aug 2007 11:02:08 -0000 1.744
@@ -1,3 +1,23 @@
+2007-08-04 Sergey Poznyakoff <address@hidden>
+
+ * doc/info-stnd.texi: Document cursor-movement-scrolls variable.
+ Document different spellings of scroll-behaviour variable.
+ * info/info-utils.c (info_references_internal): Initialize
+ line_number.
+ * info/infodoc.c (info_internal_help_text): Update docstrings
+ for move-to-next-xref and move-to-prev-xref.
+ * info/session.c (forward_move_node_structure)
+ (backward_move_node_structure): Return int
+ (cursor_movement_scrolls_p): New variable.
+ (info_next_line,info_prev_line,info_forward_char,info_backward_char)
+ (info_forward_word,info_backward_word): Scroll through the
+ entire document if cursor_movement_scrolls_p is set.
+ (info_move_to_xref,info_move_to_prev_xref): Return int
+ * info/session.h (cursor_movement_scrolls_p): New variable
+ * info/variables.h: Likewise
+ * info/variables.c (scroll-behavior): Alias for scroll-behaviour
+ (cursor-movement-scrolls): New variable.
+
2007-07-30 Karl Berry <address@hidden>
* doc/texinfo.tex (\badparencount, \badbrackcount): make these
Index: doc/info-stnd.texi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/info-stnd.texi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- doc/info-stnd.texi 15 Jul 2007 17:34:37 -0000 1.14
+++ doc/info-stnd.texi 4 Aug 2007 10:59:24 -0000 1.15
@@ -1,5 +1,5 @@
\input texinfo.tex @c -*-texinfo-*-
address@hidden $Id: info-stnd.texi,v 1.14 2007/07/15 17:34:37 karl Exp $
address@hidden $Id: info-stnd.texi,v 1.15 2007/08/04 10:59:24 gray Exp $
@c We must \input texinfo.tex instead of texinfo, otherwise make
@c distcheck in the Texinfo distribution fails, because the texinfo Info
@c file is made first, and texi2dvi must include . first in the path.
@@ -1860,6 +1860,13 @@
windows @samp{*Completions*} and @samp{*Footnotes*} are @emph{not}
resized through automatic tiling; they remain their original size.
address@hidden
address@hidden cursor-movement-scrolls
+Normally, cursor movement commands (@pxref{Cursor Commands}) stop when
+top or bottom of a node is reached. When this variable is set to
address@hidden, cursor movement commands act as scrolling ones and their
+behavior is controlled by @code{scroll-behavior} variable (see below).
+
@item errors-ring-bell
@vindex errors-ring-bell
When set to @code{On}, errors cause the bell to ring. The default
@@ -1890,6 +1897,7 @@
Info, as well as display them.
@item scroll-behavior
address@hidden scroll-behaviour
@vindex scroll-behavior
Control what happens when forward scrolling is requested at the end of
a node, or when backward scrolling is requested at the beginning of a
@@ -1913,6 +1921,9 @@
viewed.
@end table
+This variable normally affects only scrolling commands.
address@hidden, for information on how to widen its scope.
+
@item scroll-step
@vindex scroll-step
The number of lines to scroll when the cursor moves out of the window.
Index: info/info-utils.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/info-utils.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- info/info-utils.c 1 Jul 2007 21:20:30 -0000 1.7
+++ info/info-utils.c 4 Aug 2007 10:59:45 -0000 1.8
@@ -1,5 +1,5 @@
/* info-utils.c -- miscellanous.
- $Id: info-utils.c,v 1.7 2007/07/01 21:20:30 karl Exp $
+ $Id: info-utils.c,v 1.8 2007/08/04 10:59:45 gray Exp $
Copyright (C) 1993, 1998, 2003, 2004, 2007 Free Software Foundation, Inc.
@@ -289,7 +289,8 @@
strncpy (entry->label, refdef, offset - 1);
entry->label[offset - 1] = '\0';
canonicalize_whitespace (entry->label);
-
+ entry->line_number = 0;
+
refdef += offset;
entry->start = start;
entry->end = refdef - binding->buffer;
@@ -395,6 +396,7 @@
dest->nodename = src->nodename ? xstrdup (src->nodename) : NULL;
dest->start = src->start;
dest->end = src->end;
+ dest->line_number = 0;
return dest;
}
Index: info/infodoc.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/infodoc.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- info/infodoc.c 1 Jul 2007 21:20:30 -0000 1.12
+++ info/infodoc.c 4 Aug 2007 11:00:07 -0000 1.13
@@ -1,5 +1,5 @@
/* infodoc.c -- functions which build documentation nodes.
- $Id: infodoc.c,v 1.12 2007/07/01 21:20:30 karl Exp $
+ $Id: infodoc.c,v 1.13 2007/08/04 11:00:07 gray Exp $
Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
@@ -58,12 +58,15 @@
Picking a menu item causes another node to be selected.\n"),
N_("\\%-10[xref-item] Follow a cross reference. Reads name of
reference.\n"),
N_("\\%-10[history-node] Move to the last node seen in this window.\n"),
- N_("\\%-10[move-to-next-xref] Skip to next hypertext link within this
node.\n"),
- N_("\\%-10[move-to-prev-xref] Skip to previous hypertext link within this
node.\n"),
+ N_("\\%-10[move-to-next-xref] Skip to next hypertext link [*].\n"),
+ N_("\\%-10[move-to-prev-xref] Skip to previous hypertext link [*].\n"),
N_("\\%-10[select-reference-this-line] Follow the hypertext link under
cursor.\n"),
N_("\\%-10[dir-node] Move to the `directory' node. Equivalent to
`\\[goto-node] (DIR)'.\n"),
N_("\\%-10[top-node] Move to the Top node. Equivalent to `\\[goto-node]
Top'.\n"),
"\n",
+ N_("[*] Command acts within this node or the entire document, depending
on\n"
+ "the value of cursor-movement-scrolls variable\n"),
+ "\n",
N_("Moving within a node:\n\
---------------------\n"),
N_("\\%-10[beginning-of-node] Go to the beginning of this node.\n"),
Index: info/session.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/session.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- info/session.c 1 Jul 2007 21:20:31 -0000 1.19
+++ info/session.c 4 Aug 2007 11:00:43 -0000 1.20
@@ -1,5 +1,5 @@
/* session.c -- user windowing interface to Info.
- $Id: session.c,v 1.19 2007/07/01 21:20:31 karl Exp $
+ $Id: session.c,v 1.20 2007/08/04 11:00:43 gray Exp $
Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2007 Free Software Foundation, Inc.
@@ -604,8 +604,8 @@
int goal;
if (new >= window->line_count || new < 0)
- return;
-
+ return;
+
goal = window_get_goal_column (window);
window->goal_column = goal;
@@ -615,6 +615,9 @@
}
}
+static int forward_move_node_structure (WINDOW *window, int behaviour);
+static int backward_move_node_structure (WINDOW *window, int behaviour);
+
/* Move WINDOW's point down to the next line if possible. */
DECLARE_INFO_COMMAND (info_next_line, _("Move down to the next line"))
{
@@ -623,11 +626,32 @@
if (count < 0)
info_prev_line (window, -count, key);
else
- {
- old_line = window_line_of_point (window);
- new_line = old_line + count;
- move_to_new_line (old_line, new_line, window);
- }
+ while (count)
+ {
+ int diff;
+
+ old_line = window_line_of_point (window);
+ diff = window->line_count - old_line;
+ if (diff > count)
+ diff = count;
+
+ count -= diff;
+ new_line = old_line + diff;
+ if (new_line >= window->line_count)
+ {
+ if (cursor_movement_scrolls_p)
+ {
+ if (forward_move_node_structure (window,
+ info_scroll_behaviour))
+ break;
+ move_to_new_line (0, 0, window);
+ }
+ else
+ break;
+ }
+ else
+ move_to_new_line (old_line, new_line, window);
+ }
}
/* Move WINDOW's point up to the previous line if possible. */
@@ -638,11 +662,31 @@
if (count < 0)
info_next_line (window, -count, key);
else
- {
- old_line = window_line_of_point (window);
- new_line = old_line - count;
- move_to_new_line (old_line, new_line, window);
- }
+ while (count)
+ {
+ int diff;
+
+ old_line = window_line_of_point (window);
+ diff = old_line + 1;
+ if (diff > count)
+ diff = count;
+
+ count -= diff;
+ new_line = old_line - diff;
+
+ if (new_line < 0
+ && cursor_movement_scrolls_p)
+ {
+ if (backward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ if (window->line_count > window->height)
+ set_window_pagetop (window, window->line_count - window->height);
+ move_to_new_line (window->line_count,
+ window->line_count - 1, window);
+ }
+ else
+ move_to_new_line (old_line, new_line, window);
+ }
}
/* Move WINDOW's point to the end of the true line. */
@@ -691,11 +735,27 @@
info_backward_char (window, -count, key);
else
{
- window->point += count;
-
- if (window->point >= window->node->nodelen)
- window->point = window->node->nodelen - 1;
-
+ while (count)
+ {
+ int diff = window->node->nodelen - window->point;
+
+ if (diff > count)
+ diff = count;
+ window->point += diff;
+ count -= diff;
+ if (window->point >= window->node->nodelen)
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ window->point = 0;
+ else
+ {
+ window->point = window->node->nodelen - 1;
+ break;
+ }
+ }
+ }
info_show_point (window);
}
}
@@ -707,11 +767,34 @@
info_forward_char (window, -count, key);
else
{
- window->point -= count;
+ while (count)
+ {
+ int diff = count;
- if (window->point < 0)
- window->point = 0;
+ if (window->point < diff)
+ diff = window->point + 1;
+
+ window->point -= diff;
+ count -= diff;
+ if (window->point < 0)
+ {
+ if (cursor_movement_scrolls_p
+ && backward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ window->point = window->node->nodelen - 1;
+ if (window->line_count > window->height)
+ set_window_pagetop (window,
+ window->line_count - window->height);
+ }
+ else
+ {
+ window->point = 0;
+ break;
+ }
+ }
+ }
info_show_point (window);
}
}
@@ -738,8 +821,19 @@
while (count)
{
if (point + 1 >= end)
- return;
-
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ point = 0;
+ buffer = window->node->contents;
+ end = window->node->nodelen;
+ }
+ else
+ return;
+ }
+
/* If we are not in a word, move forward until we are in one.
Then, move forward until we hit a non-alphabetic character. */
c = buffer[point];
@@ -754,7 +848,20 @@
}
}
- if (point >= end) return;
+ if (point >= end)
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ point = 0;
+ buffer = window->node->contents;
+ end = window->node->nodelen;
+ }
+ else
+ return;
+ }
+
while (++point < end)
{
@@ -786,8 +893,21 @@
while (count)
{
if (point == 0)
- break;
-
+ {
+ if (cursor_movement_scrolls_p
+ && backward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ if (window->line_count > window->height)
+ set_window_pagetop (window,
+ window->line_count - window->height);
+ buffer = window->node->contents;
+ point = window->node->nodelen;
+ }
+ else
+ break;
+ }
+
/* Like info_forward_word (), except that we look at the
characters just before point. */
@@ -835,6 +955,9 @@
"Continuous", "Next Only", "Page Only", (char *)NULL
};
+/* Controls whether scroll-behavior affects line movement commands */
+int cursor_movement_scrolls_p = 0;
+
/* Default window sizes for scrolling commands. */
int default_window_size = -1; /* meaning 1 window-full */
int default_scroll_size = -1; /* meaning half screen size */
@@ -844,19 +967,22 @@
&& !is_dir_name (info_parsed_filename)))
/* Move to 1st menu item, Next, Up/Next, or error in this window. */
-static void
+static int
forward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
info_error ((char *) msg_at_node_bottom, NULL, NULL);
- break;
+ return 1;
case IS_NextOnly:
info_next_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error ((char *) msg_no_pointer, (char *) _("Next"), NULL);
+ {
+ info_error ((char *) msg_no_pointer, (char *) _("Next"), NULL);
+ return 1;
+ }
else
{
window_message_in_echo_area ((char *) _("Following Next node..."),
@@ -880,7 +1006,7 @@
window_message_in_echo_area ((char *) _("Selecting first menu
item..."),
NULL, NULL);
info_menu_digit (window, 1, '1');
- return;
+ return 0;
}
}
@@ -892,7 +1018,7 @@
window_message_in_echo_area ((char *) _("Selecting Next node..."),
NULL, NULL);
info_handle_pointer ("Next", window);
- return;
+ return 0;
}
/* Okay, there wasn't a "Next:" for this node. Move "Up:" until we
@@ -964,7 +1090,7 @@
(void *) (long) up_counter, NULL);
info_handle_pointer ("Next", window);
- return;
+ return 0;
}
else
{
@@ -986,28 +1112,33 @@
window->flags |= W_UpdateWindow;
info_error ((char *) _("No more nodes within this
document."),
NULL, NULL);
+ return 1;
}
}
}
break;
}
}
+ return info_error_was_printed; /*FIXME*/
}
/* Move Prev, Up or error in WINDOW depending on BEHAVIOUR. */
-static void
+static int
backward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
info_error ((char *) msg_at_node_top, NULL, NULL);
- break;
+ return 1;
case IS_NextOnly:
info_prev_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error ((char *) _("No `Prev' for this node."), NULL, NULL);
+ {
+ info_error ((char *) _("No `Prev' for this node."), NULL, NULL);
+ return 1;
+ }
else
{
window_message_in_echo_area ((char *) _("Moving Prev in this
window."),
@@ -1025,9 +1156,12 @@
info_up_label_of_node (window->node);
if (!info_parsed_nodename && (!info_parsed_filename
|| is_dir_name (info_parsed_filename)))
- info_error ((char *)
- _("No `Prev' or `Up' for this node within this document."),
- NULL, NULL);
+ {
+ info_error ((char *)
+ _("No `Prev' or `Up' for this node within this document."),
+ NULL, NULL);
+ return 1;
+ }
else
{
window_message_in_echo_area ((char *) _("Moving Up in this
window."),
@@ -1087,6 +1221,7 @@
}
break;
}
+ return 0;
}
/* Move continuously forward through the node structure of this info file. */
@@ -1148,10 +1283,10 @@
/* If there are no more lines to scroll here, error, or get
another node, depending on BEHAVIOUR. */
if (desired_top > window->line_count)
- {
- forward_move_node_structure (window, behaviour);
- return;
- }
+ {
+ forward_move_node_structure (window, behaviour);
+ return;
+ }
}
else
desired_top = window->pagetop + count;
@@ -1185,10 +1320,10 @@
desired_top = window->pagetop - (window->height - 2);
if ((desired_top < 0) && (window->pagetop == 0))
- {
- backward_move_node_structure (window, behaviour);
- return;
- }
+ {
+ backward_move_node_structure (window, behaviour);
+ return;
+ }
}
else
desired_top = window->pagetop - count;
@@ -4226,7 +4361,7 @@
/* **************************************************************** */
/* Move to the next or previous cross reference in this node. */
-static void
+static int
info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
{
long firstmenu, firstxref;
@@ -4270,7 +4405,7 @@
if (firstmenu == -1 && firstxref == -1)
{
info_error ((char *) msg_no_xref_node, NULL, NULL);
- return;
+ return cursor_movement_scrolls_p;
}
/* There is at least one cross reference or menu entry in this node.
@@ -4317,22 +4452,28 @@
point, choose the first menu or xref entry appearing in this node. */
if (placement == -1)
{
- if (firstmenu != -1 && firstxref != -1)
- {
- if (((dir == 1) && (firstmenu < firstxref)) ||
- ((dir == -1) && (firstmenu > firstxref)))
- placement = firstmenu + 1;
- else
- placement = firstxref;
- }
- else if (firstmenu != -1)
- placement = firstmenu + 1;
+ if (cursor_movement_scrolls_p)
+ return 1;
else
- placement = firstxref;
+ {
+ if (firstmenu != -1 && firstxref != -1)
+ {
+ if (((dir == 1) && (firstmenu < firstxref)) ||
+ ((dir == -1) && (firstmenu > firstxref)))
+ placement = firstmenu + 1;
+ else
+ placement = firstxref;
+ }
+ else if (firstmenu != -1)
+ placement = firstmenu + 1;
+ else
+ placement = firstxref;
+ }
}
window->point = placement;
window_adjust_pagetop (window);
window->flags |= W_UpdateWindow;
+ return 0;
}
DECLARE_INFO_COMMAND (info_move_to_prev_xref,
@@ -4341,7 +4482,16 @@
if (count < 0)
info_move_to_prev_xref (window, -count, key);
else
- info_move_to_xref (window, count, key, -1);
+ {
+ while (info_move_to_xref (window, count, key, -1))
+ {
+ info_error_was_printed = 0;
+ if (backward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ move_to_new_line (window->line_count, window->line_count - 1,
+ window);
+ }
+ }
}
DECLARE_INFO_COMMAND (info_move_to_next_xref,
@@ -4350,7 +4500,19 @@
if (count < 0)
info_move_to_next_xref (window, -count, key);
else
- info_move_to_xref (window, count, key, 1);
+ {
+ /* Note: This can cause some blinking when the next cross reference is
+ located several nodes further. This effect can be easily suppressed
+ by setting display_inhibited to 1, however this will also make
+ error messages to be dumped on stderr, instead on the echo area. */
+ while (info_move_to_xref (window, count, key, 1))
+ {
+ info_error_was_printed = 0;
+ if (forward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ move_to_new_line (0, 0, window);
+ }
+ }
}
/* Select the menu item or reference that appears on this line. */
Index: info/session.h
===================================================================
RCS file: /sources/texinfo/texinfo/info/session.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- info/session.h 1 Jul 2007 21:20:31 -0000 1.6
+++ info/session.h 4 Aug 2007 11:01:02 -0000 1.7
@@ -1,5 +1,5 @@
/* session.h -- Functions found in session.c.
- $Id: session.h,v 1.6 2007/07/01 21:20:31 karl Exp $
+ $Id: session.h,v 1.7 2007/08/04 11:01:02 gray Exp $
Copyright (C) 1993, 1998, 1999, 2001, 2002, 2004, 2007
Free Software Foundation, Inc.
@@ -59,6 +59,8 @@
#define IS_NextOnly 1 /* Try to get "Next:" menu item. */
#define IS_PageOnly 2 /* Simply give up at the bottom of a node. */
+extern int cursor_movement_scrolls_p;
+
/* Utility functions found in session.c */
extern void info_dispatch_on_key (unsigned char key, Keymap map);
extern unsigned char info_get_input_char (void);
Index: info/variables.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/variables.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- info/variables.c 1 Jul 2007 21:20:31 -0000 1.6
+++ info/variables.c 4 Aug 2007 11:01:22 -0000 1.7
@@ -1,5 +1,5 @@
/* variables.c -- how to manipulate user visible variables in Info.
- $Id: variables.c,v 1.6 2007/07/01 21:20:31 karl Exp $
+ $Id: variables.c,v 1.7 2007/08/04 11:01:22 gray Exp $
Copyright (C) 1993, 1997, 2001, 2002, 2004, 2007
Free Software Foundation, Inc.
@@ -60,10 +60,19 @@
N_("Controls what happens when scrolling is requested at the end of a
node"),
&info_scroll_behaviour, (char **)info_scroll_choices },
+ /* Alternate spelling */
+ { "scroll-behavior",
+ N_("Same as scroll-behaviour"),
+ &info_scroll_behaviour, (char **)info_scroll_choices },
+
{ "scroll-step",
N_("The number lines to scroll when the cursor moves out of the window"),
&window_scroll_step, (char **)NULL },
+ { "cursor-movement-scrolls",
+ N_("Controls whether scroll-behavior affects cursor movement commands"),
+ &cursor_movement_scrolls_p, (char **)on_off_choices },
+
{ "ISO-Latin",
N_("When \"On\", Info accepts and displays ISO Latin characters"),
&ISO_Latin_p, (char **)on_off_choices },
Index: info/variables.h
===================================================================
RCS file: /sources/texinfo/texinfo/info/variables.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- info/variables.h 1 Jul 2007 21:20:31 -0000 1.6
+++ info/variables.h 4 Aug 2007 11:01:02 -0000 1.7
@@ -1,5 +1,5 @@
/* variables.h -- Description of user visible variables in Info.
- $Id: variables.h,v 1.6 2007/07/01 21:20:31 karl Exp $
+ $Id: variables.h,v 1.7 2007/08/04 11:01:02 gray Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
@@ -60,6 +60,7 @@
extern int show_index_match;
extern int info_scroll_behaviour;
extern int window_scroll_step;
+extern int cursor_movement_scrolls_p;
extern int ISO_Latin_p;
#endif /* not INFO_VARIABLES_H */
P ChangeLog
P doc/info-stnd.texi
P info/info-utils.c
P info/infodoc.c
P info/session.c
P info/session.h
P info/variables.c
P info/variables.h
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Sat Aug 4 07:23:01 EDT 2007),
Karl Berry <=