1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
Commit graph

32130 commits

Author SHA1 Message Date
Eli Zaretskii
c2ff3c02a4 Fix random crashes while scrolling backwards.
src/xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
 past the beginning of the current glyph matrix.
2011-10-30 20:07:48 +02:00
Jan Djärv
6e56383b57 Fix bug 9869.
xterm.c: Include X11/Xproto.h if HAVE_GTK3.
(x_error_handler): Ignore BadMatch for X_SetInputFocus for
HAVE_GTK3 (Bug#9869).
2011-10-30 19:04:13 +01:00
Jan Djärv
3b574623e9 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
type to GDK_NOTHING so valgrind does not complain.

Fixes: debbugs:9901
2011-10-30 18:31:02 +01:00
Jan Djärv
b77a6a7f9c Fix hang after C-z in gnome-shell.
* 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).
2011-10-30 18:17:48 +01:00
Paul Eggert
196e41e4ae * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
so that this new function doesn't get optimized away by a
whole-program optimizer.  Make the 2nd arg EMACS_INT, not int.
2011-10-29 10:25:44 -07:00
Andreas Schwab
021f2e1a47 * src/frame.h (MOUSE_HL_INFO): Remove excess parens. 2011-10-29 17:50:30 +02:00
Eli Zaretskii
4452fb80c7 Fix attribution for last commit in src/ChangeLog. 2011-10-29 15:38:21 +02:00
Eli Zaretskii
8b058d4474 Fix the `xbytecode' user-defined command in .gdbinit.
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.
2011-10-29 15:35:23 +02:00
Eli Zaretskii
aa4dfba7fd Revert last commit. 2011-10-29 12:02:39 +02:00
Eli Zaretskii
567843934e Fix bug #9902 with crash caused by clearing mouse highlight.
src/xdisp.c (note_mouse_highlight): Don't clear mouse highlight if
 hlinfo->mouse_face_window is nil.
2011-10-29 11:36:42 +02:00
Andreas Schwab
21b7206797 Fixes: debbugs:9903
* src/minibuf.c (read_minibuf_noninteractive): Allow reading empty
line.
2011-10-29 10:54:06 +02:00
Glenn Morris
83ed7b5c7e Revert problematic change to wait_reading_process_output.
* src/process.c (wait_reading_process_output): Revert 2009-08-30 change.
Not clear what it was for, and it causes various bugs.  (Bug#9839)
2011-10-28 20:12:02 -04:00
Eli Zaretskii
5a7a728bb7 Fix use of uninitialized variable.
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.
2011-10-28 20:41:09 +02:00
Chong Yidong
d3d0842fe2 * src/xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
See:
http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg01202.html
2011-10-28 23:17:09 +08:00
Dan Nicolaescu
31b39d1389 * src/window.c (make_window): Initialize phys_cursor_on_p. 2011-10-28 08:34:06 -06:00
Stefan Monnier
9aba60432c * src/lisp.h (struct Lisp_Symbol): Update comments. 2011-10-28 09:48:19 -04:00
Juanma Barranquero
c20992f469 src/w32font.c (w32_load_unicows_or_gdi32): Add missing return. 2011-10-28 12:59:24 +02:00
Eli Zaretskii
db4f02f208 Fix bug #8562 with Emacs display on Windows 9X.
Thanks to oslsachem <oslsachem@gmail.com> for helping to debug this.

 src/w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
 (g_b_init_get_glyph_outline_w): New static variables.
 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
 (GetGlyphOutlineW_Proc): New typedefs.
 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font): New
 functions.
 (w32font_open_internal, compute_metrics): Call
 get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
 instead of calling the "wide" APIs directly.
 src/emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
 src/w32.h (syms_of_w32font): Add prototype.
2011-10-28 11:54:02 +02:00
Juanma Barranquero
87e68db473 src/window.c: Fix typos in docstrings. 2011-10-27 16:35:51 +02:00
Chong Yidong
435c1d6793 More gnutls memory fixes.
* 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.
2011-10-27 16:07:28 +08:00
Chong Yidong
9c6c6f495b Fix a memory leak in the built-in GnuTLS support.
* 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.
2011-10-27 14:07:09 +08:00
Juanma Barranquero
657d08d30a src/image.c, src/w32*.c, lib-src/emacsclient.c: Silence warnings under -Wall. 2011-10-27 02:59:21 +02:00
Juanma Barranquero
a7ef684b46 Fix typos. 2011-10-26 16:07:31 +02:00
Juanma Barranquero
5430d39930 * lisp/term/w32-win.el (w32-default-color-map): Declare obsolete.
* src/w32fns.c (w32_default_color_map): New function, extracted from
  Fw32_default_color_map.
  (Fw32_default_color_map, Fx_open_connection): Use it.
2011-10-26 15:42:33 +02:00
Stefan Monnier
71d4c2a518 * lisp/progmodes/octave-*.el: Update maintainer. 2011-10-25 21:18:13 -04:00
Paul Eggert
fe0055fa74 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2). 2011-10-25 09:36:20 -07:00
Stefan Monnier
e6346438e2 Make function-key-map apply when key is bound to `undefined'.
* src/keyboard.c (test_undefined): New function.
(read_key_sequence): Use it to detect when a key is bound to `undefined'.

Fixes: debbugs:9751
2011-10-25 08:54:04 -04:00
Enami Tsugutomo
e112cc3727 * sysdep.c (init_sys_modes): Fix the check for the controlling terminal.
Fixes: debbugs:6649
2011-10-25 12:27:47 +08:00
Eli Zaretskii
55622b93c9 src/bidi.c: Fix a typo in a comment. 2011-10-20 18:37:10 +02:00
Eli Zaretskii
7b5d6677ec Improve the speedup of bidi display introduced in 2011-10-18T16:56:09Z!eliz@gnu.org for bug#9771.
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.
2011-10-20 14:39:52 +02:00
Paul Eggert
7da0b018f2 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
* 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.
2011-10-19 23:52:55 -07:00
Eli Zaretskii
12b3296319 Followup to 2011-10-19T09:48:35Z!eliz@gnu.org.
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
2011-10-19 13:46:17 +02:00
Eli Zaretskii
8547b010fa Fix part 2 of bug #9771 with lines that start with a display vector.
src/xdisp.c (start_display): If the character at POS is displayed
 via a display vector, reset IT->current.dpvec_index to zero.
2011-10-19 11:48:35 +02:00
Chong Yidong
4e948d153a Have nobreak-char-display handle U+2010 and U+2011.
See discussion at
http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00747.html

* src/xdisp.c (get_next_display_element): Handle U+2010 and U+2011
with nobreak-char-display too.
2011-10-18 17:07:56 -04:00
Eli Zaretskii
4787455fb7 Fix bug #9771 with slow redisplay in long lines full of control characters.
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.
2011-10-18 18:56:09 +02:00
Eli Zaretskii
f2ff9e8894 Fix part 1 of bug #9771 with assertion violation in move_it_by_lines.
src/xdisp.c (move_it_vertically_backward): Don't look for character position
 immediately after the newline when in a continuation line.
2011-10-17 21:13:44 +02:00
Eli Zaretskii
2c91f553b7 Fix part 4 of bug#9771 with assertion violation when wrap-prefix is used
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.
2011-10-17 19:03:20 +02:00
Martin Rudalics
c7b08b0d14 Rewrite and delabelize vertical border check. (Bug#5357) (Bug#9618)
* window.c (coordinates_in_window): Rewrite and delabelize
vertical border check.  (Bug#5357) (Bug#9618)
2011-10-15 12:12:00 +02:00
Stefan Monnier
6b02f655f1 * src/xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
errors in XSetWindowBorder.

Fixes: debbugs:9310
2011-10-14 13:44:39 -04:00
Dmitry Antipov
81d40c9208 Use xfree, not free, to avoid crash with --enable-checking=xmallocoverrun. 2011-10-13 07:55:46 -07:00
Eli Zaretskii
d4172c3be9 Fix the change with paragraph_dir initialization.
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.
2011-10-13 13:17:32 +02:00
Eli Zaretskii
b00eea75d3 Fix bugs #9738 & 9739 with a display string that ends in 2 newlines.
src/xdisp.c (find_row_edges): Handle the case where ROW comes from a
 display string and the previous row comes from the same string and
 is empty.
2011-10-12 22:07:59 +02:00
Stefan Monnier
8fe012c4e6 * doc.c (get_doc_string): Encode file name.
Fixes: debbugs:9735
2011-10-12 15:08:04 -04:00
Eli Zaretskii
79beb1785a Remove incorrect comments about U+2028 LS character.
See http://www.unicode.org/mail-arch/unicode-ml/y2011-m10/0048.html
for more details.

 src/bidi.c (bidi_level_of_next_char):
 src/xdisp.c (get_visually_first_element): Remove old incorrect
 comments regarding the Unicode Line Separator character.
2011-10-12 17:12:52 +02:00
Eli Zaretskii
0074aef227 src/bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR. 2011-10-12 13:32:41 +02:00
Dmitry Antipov
6e4b3fbe6d * alloc.c (Fgc_status): Do not access beyond zombies array
boundary if nzombies > MAX_ZOMBIES.
* alloc.c (dump_zombies): Add missing format specifier.
2011-10-11 23:09:40 -07:00
Paul Eggert
b5525cacc3 * xdisp.c (set_cursor_from_row): Simplify conditionals,
to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
2011-10-11 22:50:15 -07:00
Paul Eggert
0324f3af3d * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
Some packages use them to denote characters with modifiers.
2011-10-11 21:58:43 -07:00
Andreas Schwab
e9b5f88812 * src/lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
(GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
matching a pp-number.  Rename parameter var to var1.
2011-10-11 19:35:16 +02:00
Stefan Monnier
127827c013 * minibuf.c (Finternal_complete_buffer): Fix last change.
Fixes: debbugs:9709
2011-10-11 13:32:38 -04:00