1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 19:10:37 -08:00
Commit graph

31779 commits

Author SHA1 Message Date
Eli Zaretskii
412b635880 Bug #9224 was fixed together with bug #9221. 2011-08-05 17:31:40 +03:00
Eli Zaretskii
ec7cc85b39 Make bidi_cache_total_alloc static.
src/bidi.c <bidi_cache_total_alloc>: Now static.
 (bidi_initialize): Initialize bidi_cache_total_alloc.
2011-08-05 17:08:16 +03:00
Eli Zaretskii
5009803bda Fix bug #9221 with memory leak in bidi display.
Add code to monitor memory allocation for bidi cache shelving.

 src/xdisp.c (display_line): Release buffer allocated for shelved bidi
 cache.
 src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
 amount allocated this far in `bidi_cache_total_alloc'.
 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
 non-zero, only free the data buffer without restoring the cache
 contents.  All callers changed.
 src/dispextern.h (bidi_unshelve_cache): Update prototype.
 src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
 (move_it_in_display_line, move_it_to)
 (move_it_vertically_backward, move_it_by_lines): Replace the call
 to xfree to an equivalent call to bidi_unshelve_cache.
 (move_it_in_display_line_to): Fix logic of returning
 MOVE_POS_MATCH_OR_ZV in the bidi case.
2011-08-05 14:04:44 +03:00
Eli Zaretskii
3592834967 Fix bug #9221 with resource allocation under word-wrap.
Add diagnostic facility for monitoring memory allocated for cache shelving.

 src/xdisp.c (display_line): Release buffer allocated for shelved bidi
 cache.  (Bug#9221)
 src/bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
 amount allocated this far in `bidi_cache_total_alloc'.
 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
 non-zero, only free the data buffer without restoring the cache
 contents.  All callers changed.
 src/dispextern.h (bidi_unshelve_cache): Update prototype.
 src/xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
 (move_it_in_display_line, move_it_to)
 (move_it_vertically_backward, move_it_by_lines): Replace the call
 to xfree to an equivalent call to bidi_unshelve_cache.
 (move_it_in_display_line_to): Fix logic of returning
 MOVE_POS_MATCH_OR_ZV in the bidi case.
2011-08-05 13:48:37 +03:00
Eli Zaretskii
e2e2423bf2 Fix bug #9229 with cursor positioning on display strings.
src/xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
 came from a string character with a `cursor' property.
2011-08-05 13:32:06 +03:00
Jan Djärv
ae9e757af1 Check for pthread and use it if found.
* configure.in (HAVE_PTHREAD): Add check for -lpthread.
(HAVE_GTK_AND_PTHREAD): Remove.

* src/Makefile.in (LIB_PTHREAD): New variable.
(LIBES): Add LIB_PTHREAD (Bug#9216).

* src/alloc.c, src/emacs.c, src/gmalloc.c, src/gtkutil.c, src/keyboard.c, src/syssignal.h:
Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
2011-08-04 19:04:39 +02:00
Andreas Schwab
213bd7f2f1 * regex.c (re_iswctype): Remove some redundant boolean conversions. 2011-08-04 16:25:21 +02:00
Jan Djärv
99aaf75f7c Set _NET_WM_WINDOW_OPACITY on outer window manager window also.
* xterm.c (x_find_topmost_parent): New function.
(x_set_frame_alpha): Find topmost parent window with
x_find_topmost_parent and set the property there also.
(handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.

Fixes: debbugs:9181
2011-08-04 13:06:22 +02:00
Paul Eggert
c74e9d8682 * callproc.c (Fcall_process): Avoid vfork clobbering
the local vars buffer, coding_systems, current_dir.
2011-08-03 20:08:01 -07:00
Stefan Monnier
640c8776f6 * src/keymap.c (Fmake_composed_keymap): Move to subr.el.
* lisp/subr.el (make-composed-keymap): Move from C.  Change calling
convention, and improve docstring to bring attention to a subtle point.
* lisp/minibuffer.el (completing-read-default): Adjust accordingly.
2011-08-03 17:40:06 -04:00
Paul Eggert
8a10d76c87 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
so that it is not optimized away.
2011-08-03 12:54:12 -07:00
Paul Eggert
f26d0e4c33 * xdisp.c (compute_display_string_pos): Remove unused local. 2011-08-02 22:24:30 -07:00
Eli Zaretskii
55439c615b Fix bug #9218 with slow cursor motion and scrolling Org Mode buffers.
src/dispextern.h (struct bidi_it): New member disp_prop_p.
 src/xdisp.c: Remove one-slot cache of display string positions.
 (compute_display_string_pos): Accept an additional argument
 DISP_PROP_P; callers changed. Scan at most 5K characters forward
 for a display string or property.  If found, set DISP_PROP_P
 non-zero.
 src/bidi.c (bidi_fetch_char): Accept an additional argument
 DISP_PROP_P, and pass it to compute_display_string_pos.  Only
 handle text covered by a display string if DISP_PROP_P is returned
 non-zero.  All callers of bidi_fetch_char changed.
2011-08-02 22:16:32 +03:00
Stefan Monnier
fb33fa43b4 * src/keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. 2011-08-02 12:02:52 -04:00
Don March
b099e06392 Fix non-prefix key error message when last character M-[char] is translated to ESC [char] 2011-08-02 17:27:38 +02:00
Kenichi Handa
d0fffa3f69 src/ChangeLog: Fix format. 2011-08-02 12:50:38 +09:00
Kenichi Handa
5cc7f7afed Make uniprop_table non-static. 2011-08-02 12:49:09 +09:00
Eli Zaretskii
ffc21858b7 Fix last change for bug#9212. 2011-08-01 20:59:35 +03:00
Eli Zaretskii
525d5e6efa Fix bug #9212 with selective-display under bidi.
src/xdisp.c (forward_to_next_line_start): Accept additional argument
 BIDI_IT_PREV, and store into it the state of the bidi iterator had
 on the newline.
 (reseat_at_next_visible_line_start): Use the bidi iterator state
 returned by forward_to_next_line_start to restore the state of
 it->bidi_it after backing up to previous newline.  (Bug#9212)
2011-08-01 20:34:04 +03:00
Juanma Barranquero
e8500ff4af src/w32term.c: Fix typos in comments. 2011-07-31 22:38:48 +02:00
Andreas Schwab
31011111a1 * src/regex.c (re_comp): Protoize.
(re_exec): Fix return type.
(regexec): Fix type of `ret'.
2011-07-30 15:20:04 +02:00
Paul Eggert
e5d76069f0 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
This is needed if max-image-size is a floating-point number.
2011-07-29 00:05:17 -07:00
Andreas Schwab
9a79b20c28 Implement ## reader macro
* src/lread.c (read1): Read ## as empty symbol.

* src/print.c (print_object): Print empty symbol as ##.
2011-07-28 22:23:19 +02:00
Alp Aker
d55e9c533f Fix for raise display property on NS (Bug#8913).
* src/nsfont.m (nsfont_open): Remove assignment to voffset and
unnecessary vars hshink, expand, hd, full_height, min_height.
(nsfont_draw): Use s->ybase as baseline for glyph drawing.

* src/nsterm.h (nsfont_info): Remove voffset field.
2011-07-28 14:50:05 -04:00
Alp Aker
bf3492a57e Fix display artifacts from ns_dumpglyphs_stretch (Bug#8470).
* src/nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
or scroll bar.
2011-07-28 14:41:21 -04:00
Alp Aker
ffe57a7a0e Fix tooltip dimensions on NS (Bug#9176).
* src/nsmenu.m (-setText): Size tooltip dimensions precisely to
contents.
(EmacsTooltip -init): Remove bezels and add shadows to
tooltip windows.
2011-07-28 14:30:59 -04:00
Alp Aker
d8c2fa7879 Fix image fg and bg colors on NS (Bug#9175).
* nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
setting frame foreground color.
(x_set_background_color): Likewise.
2011-07-28 14:29:09 -04:00
Alp Aker
4843aac304 Implement strike-through and overline on NextStep (Bug#8863).
* src/nsfont.m (nsfont_open): Use underline position provided by font,
instead of hard-coded value of 2.
(nsfont_draw): Call ns_draw_text_decoration instead.

* src/nsterm.h: Add declaration for ns_draw_text_decoration.

* src/nsterm.m (ns_draw_text_decoration): New function for drawing
underline, overline, and strike-through.
(ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
ns_draw_text_decoration.  Change treatment of cursor drawing to
accomodate underlining, etc.
2011-07-28 14:26:29 -04:00
Eli Zaretskii
bc7ece8713 src/buffer.c: Fix last change. 2011-07-28 20:46:21 +03:00
Eli Zaretskii
4cc60b9b85 Turn on bidi-display-reordering by default.
src/buffer.c (init_buffer_once, syms_of_buffer): Set
 bidi-display-reordering to t by default.
 doc/emacs/mule.texi (Bidirectional Editing): Document the fact that
 bidi-display-reordering is t by default.
 lispref/display.texi (Bidirectional Display): Document the fact that
 bidi-display-reordering is t by default.
2011-07-28 20:18:25 +03:00
Paul Eggert
66606eea1f * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
Without this fix, if a signal arrives just after memory fills up,
'malloc' might be invoked reentrantly.
2011-07-28 10:05:33 -07:00
Paul Eggert
476371c4fd * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
In other words, assume that every image size is allowed, on non-X
hosts.  This assumption is probably wrong, but it lets Emacs compile.
2011-07-28 02:40:05 -07:00
Andreas Schwab
f3fcc40d5e * regex.c (re_iswctype): Convert return values to boolean. 2011-07-28 11:34:13 +02:00
Eli Zaretskii
350c992fe3 Fix bug #9184 with org-agenda crashing under bidi redisplay.
src/xdisp.c (compute_display_string_pos): Don't use cached display
 string position if the buffer had its restriction changed.
2011-07-28 02:44:45 -04:00
Paul Eggert
5266b4bb60 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. 2011-07-27 18:46:23 -07:00
Paul Eggert
8265d3bb30 * bidi.c (bidi_dump_cached_states): Merge ptrdiff_t fix. 2011-07-27 17:24:58 -07:00
Paul Eggert
2573a8376a Merge from trunk. 2011-07-27 17:15:43 -07:00
Lars Magne Ingebrigtsen
dbf38e02c9 Silence error message we get in gnutls when the peer hangs up
* gnutls.c (emacs_gnutls_read): Don't message anything if the peer
closes the connection while we're reading.

Fixes: debbugs:9182
2011-07-27 22:45:56 +02:00
Jan Djärv
d6f0886cf1 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
are specified.

Fixes: debbugs:9168
2011-07-25 23:49:42 +02:00
Paul Eggert
2eb1f9e6a5 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
Found by GCC static checking and --with-wide-int on a 32-bit host.
2011-07-25 09:39:39 -07:00
Eli Zaretskii
2238127283 Fix logic of caching display string positions for bidi display.
src/xdisp.c (compute_display_string_pos): Fix logic of caching
 previous display string position.  Initialize cached_prev_pos to -1.
 Fixes slow-down at the beginning of a buffer.
2011-07-25 18:36:47 +03:00
Eli Zaretskii
7daee9109e Fix cursor motion slowdown at the beginning of buffer.
src/xdisp.c (compute_display_string_pos): Fix logic of caching
 previous display string position.  Initialize cached_prev_pos to -1.
2011-07-24 21:19:10 +03:00
Stefan Monnier
14486a1036 * src/xml.c: Fix Lisp_Object/int mixup. 2011-07-24 10:01:58 -04:00
Eli Zaretskii
f25e39b45a Fix crash at startup under XASSERTS.
src/xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
 for attrs[LFACE_FONTSET_INDEX].
2011-07-24 01:30:09 -04:00
Paul Eggert
04c4b52e0a * xml.c (parse_region): Remove unused local
that was recently introduced.
2011-07-23 11:31:25 -07:00
Eli Zaretskii
8719d1dcad src/bidi.c: Backport from trunk a bugfix for bidi_paragraph_init at EOB. 2011-07-23 17:34:51 +03:00
Eli Zaretskii
be18c5a51f Fix compilation with GLYPH_DEBUG.
src/xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
2011-07-23 08:15:53 -04:00
Eli Zaretskii
a2709514e6 src/xdisp.c: Fix a typo in a comment. 2011-07-23 06:58:44 -04:00
Eli Zaretskii
a9269c1877 Fix pos-visible-in-window-p under bidi redisplay.
src/xdisp.c (move_it_in_display_line_to): Record the best matching
 position for TO_CHARPOS while scanning the line, and restore it on
 exit if none of the characters scanned was an exact match.  Fixes
 vertical-motion and pos-visible-in-window-p under bidi redisplay
 when exact match is impossible due to invisible text, and the
 lines are truncated.
2011-07-23 13:46:21 +03:00
Eli Zaretskii
c1734fbd6f Fix pos-visible-in-window-p under bidi redisplay when lines are truncated.
src/xdisp.c (move_it_in_display_line_to): Record the best matching
 position for TO_CHARPOS while scanning the line, and restore it on
 exit if none of the characters scanned was an exact match.  Fixes
 vertical-motion and pos-visible-in-window-p when exact match is
 impossible due to invisible text, and the lines are truncated.
2011-07-23 13:42:24 +03:00