* xterm.c: Declare x_handle_net_wm_state to return int.
(handle_one_xevent): Check if we are iconified but don't have
_NET_WM_STATE_HIDDEN. If do, treat as deiconify.
(get_current_wm_state): Return non-zero if not hidden,
check for _NET_WM_STATE_HIDDEN (Bug#9893).
(do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
(x_handle_net_wm_state): Return what get_current_wm_state returns.
(x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
* xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
src/.gdbinit (xprintbytestr): New command.
(xwhichsymbols): Renamed from `which'; all callers changed.
(xbytecode): Print the byte-code string as well.
src/alloc.c (which_symbols): New function.
src/xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
possible random value that matches one of those tested as
condition to clear the mouse face.
* src/gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
non-NULL, regardless of GNUTLS_INITSTAGE.
(Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
an error. Set process slots as soon as we allocate them.
* src/gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
* src/process.c (make_process): Set gnutls_state to NULL.
* src/gnutls.c (emacs_gnutls_deinit): New function. Deallocate
credentials structures as well as calling gnutls_deinit.
(Fgnutls_deinit, Fgnutls_boot): Use it.
* src/process.c (make_process): Initialize GnuTLS credentials to NULL.
(deactivate_process): Call emacs_gnutls_deinit.
src/dispextern.h (struct bidi_it): New member next_en_type.
src/bidi.c (bidi_line_init): Initialize the next_en_type member.
(bidi_resolve_explicit_1): When next_en_pos is valid for the
current character, check also for next_en_type being WEAK_EN.
(bidi_resolve_weak): Don't enter the expensive loop if the current
position is before next_en_pos. Record the bidi type of the first
non-ET, non-BN character we find, in addition to its position.
(bidi_level_of_next_char): Invalidate next_en_type when
next_en_pos is over-stepped.
* configure.in (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, HAVE_TM_GMTOFF):
Remove; no longer needed, now that we defer to strftime for time
zone names.
* src/editfns.c: Rewrite current-time-zone so that it invokes
the equivalent of (format-time-string "%Z") to get the time zone name.
This fixes a bug when the time zone name contains characters that
need converting from the system time locale to Emacs internal format.
This fixes a shortcoming that I introduced in my 1999-10-19 patch:
that patch fixed format-time-string to do the conversion, but
I forgot to fix current-time-zone.
(format_time_string): New function, containing most of
what Fformat_time_string used to contain.
(Fformat_time_string): Rewrite in terms of format_time_string.
This doesn't change this function's behavior.
(current-time-zone): Rewrite to use format_time_string.
This fixes the bug reported by Michael Schierl in
<http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
Jason Rumney's 2007-06-07 change worked around this bug, but
didn't fix it.
* src/systime.h (tzname, timezone): Remove no-longer-used declarations.
src/xdisp.c (try_window_reusing_current_matrix): If a line ends in a display
vector or the next line starts in a display vector, continue
redrawing the window even though the character position of
start_row was reached.
Fixes: debbugs:9771
src/bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
(bidi_resolve_neutral): Don't enter the expensive loop looking for
non-neutral characters if the current character is a paragraph
separator (a.k.a. Newline). This avoids running the same
expensive loop twice, once when we consume the preceding newline
and the other time when the line actually needs to be displayed.
Avoid the loop when we see neutrals on the base embedding level
following a character whose directionality is the same as the
paragraph's. This avoids running the expensive loop when a line
ends in a long sequence of neutrals, like control characters.
Add assertion against STRONG_AL type. Slightly rearrange code
that determines the type of a neutral given the first non-neutral
that follows it.
(bidi_level_of_next_char): Set next_en_pos to zero when
invalidating its info.
for a line that begins with control characters.
src/xdisp.c (push_display_prop): Determine whether to record string
or buffer position by IT->string, not by IT->method. Allow
GET_FROM_DISPLAY_VECTOR as IT->method on entry.
src/bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
some callers set that themselves.
src/xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
cursor motion with <left> and <right> arrow keys.