summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2014-04-30 21:54:52 +0200
committerJuanma Barranquero <lekktu@gmail.com>2014-04-30 21:54:52 +0200
commit09b911adf4e22bbcac8c588bc14ade801276732e (patch)
tree0d9eb9708479bb491d7e1e2bb030aa3e90299526 /src
parentb0e36b7048c88aa24f6955c53fbe790bb9ebc54f (diff)
parent426b5dafdd837328d624a8ec5bfd567f2865c9f5 (diff)
Merge from emacs-24; up to 2014-05-01T10:21:17Z!rgm@gnu.org
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog20
-rw-r--r--src/process.c6
-rw-r--r--src/term.c20
3 files changed, 45 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0fba7894443..152bcad9470 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,23 @@
+2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * term.c (tty_menu_activate): Don't assume row and col are initialized.
+ GCC 4.9.0 warned about this, and I couldn't easily prove to my own
+ satisfaction that they would always be initialized.
+
+2014-04-30 Eli Zaretskii <eliz@gnu.org>
+
+ * term.c (tty_menu_display): Move the cursor to the active menu item.
+ (tty_menu_activate): Return the cursor to the active menu item
+ after displaying the menu and after displaying help-echo. See
+ http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
+ for the details of why this is needed by screen readers and
+ Braille displays.
+
+2014-04-30 Glenn Morris <rgm@gnu.org>
+
+ * process.c (handle_child_signal):
+ Handle systems without WCONTINUED. (Bug#15110, 17339)
+
2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
* window.c (struct saved_window): Remove mark.
diff --git a/src/process.c b/src/process.c
index fdb0501f9ec..655f083fc33 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6226,7 +6226,11 @@ handle_child_signal (int sig)
int status;
if (p->alive
- && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED))
+#ifndef WCONTINUED
+ && child_status_changed (p->pid, &status, WUNTRACED))
+#else
+ && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED))
+#endif
{
/* Change the status of the process that was found. */
p->tick = ++process_tick;
diff --git a/src/term.c b/src/term.c
index 6ea9a4eba9a..c636b8cac8b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2924,6 +2924,13 @@ tty_menu_display (tty_menu *menu, int x, int y, int pn, int *faces,
menu_help_paneno = pn - 1;
menu_help_itemno = j;
}
+ /* Take note of the coordinates of the active menu item, to
+ display the cursor there. */
+ if (mousehere)
+ {
+ row = y + i;
+ col = x;
+ }
display_tty_menu_item (menu->text[j], max_width, face, x, y + i,
menu->submenu[j] != NULL);
}
@@ -3204,6 +3211,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
bool first_time;
Lisp_Object selectface;
int first_item = 0;
+ int col, row;
/* Don't allow non-positive x0 and y0, lest the menu will wrap
around the display. */
@@ -3391,7 +3399,14 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
faces, x, y, first_item, 1);
tty_hide_cursor (tty);
fflush (tty->output);
+ /* The call to display help-echo below will move the cursor,
+ so remember its current position as computed by
+ tty_menu_display. */
+ col = cursorX (tty);
+ row = cursorY (tty);
}
+ else
+ row = -1;
/* Display the help-echo message for the currently-selected menu
item. */
@@ -3400,6 +3415,11 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
{
help_callback (menu_help_message,
menu_help_paneno, menu_help_itemno);
+ /* Move the cursor to the beginning of the current menu
+ item, so that screen readers and other accessibility aids
+ know where the active region is. */
+ if (0 <= row)
+ cursor_to (sf, row, col);
tty_hide_cursor (tty);
fflush (tty->output);
prev_menu_help_message = menu_help_message;