Commit graph

31744 commits

Author SHA1 Message Date
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
Jan Djärv
a258d62771 Fix title and toolbar not shown in OSX 10.7.
* nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
for OSX >= 10.7.
2011-07-23 10:33:06 +02:00
Eli Zaretskii
0f74f7850d Speed up keyboard auto-repeat cursor motion under bidi redisplay.
src/xdisp.c (compute_stop_pos_backwards): New function.
 (next_element_from_buffer): Call compute_stop_pos_backwards to
 find a suitable prev_stop when we find ourselves before
 base_level_stop.
 (reseat): Don't look for prev_stop, as that could mean a very long
 run.
 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
 <cached_disp_overlay_modiff>: Cache for last found display string
 position.
 (compute_display_string_pos): Return the cached position if asked
 about the same buffer in the same area of character positions, and
 the buffer wasn't changed since the time the display string
 position was cached.
2011-07-23 10:42:56 +03:00
Eli Zaretskii
b2d0c91afd Fix bug #9149 with mouse highlight of empty lines.
src/xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
 is an integer, which is important for empty lines.
2011-07-22 20:42:43 +03:00
Eli Zaretskii
b6d5a68964 Fix previous change that broke faces in bidirectional text.
src/xdisp.c (compute_stop_pos_backwards): New function.
 (handle_stop_backwards): Revert last change.
 (next_element_from_buffer): Call compute_stop_pos_backwards to
 find a suitable prev_stop when we find ourselves before
 base_level_stop.  Remove the funky search for 1000 character
 positions back.
2011-07-22 17:09:51 +03:00
Chong Yidong
043604ee51 Fix --reverse-video on ttys.
* src/frame.c (Fmodify_frame_parameters): In tty case, update the
default face if necessary.

Fixes: debbugs:4238
2011-07-22 01:02:24 -04:00
Chong Yidong
da4adb048d Doc fix for string-to-char (Bug#6576).
* editfns.c (Fstring_to_char): No need to explain what a character
is in the docstring.
2011-07-21 14:38:21 -04:00
Lars Magne Ingebrigtsen
9abd053219 * xml.c (parse_region): Make sure we always return a tree. 2011-07-20 22:45:13 +02:00
HAMANO Kiyoto
36881d164d * xml.c (parse_region): If a document contains only comments, return that, too. 2011-07-20 22:05:02 +02:00
Lars Magne Ingebrigtsen
1e98674d93 * xml.c (make_dom): Return comments, too. 2011-07-20 21:58:46 +02:00
Paul Eggert
0d8de0fd0a Merge from trunk. 2011-07-19 13:33:28 -07:00
Eli Zaretskii
e8c17b886b Speed up cursor motion in large fontified buffers.
src/xdisp.c (reseat): Don't look for prev_stop, as that could mean a
 very long run.
 (next_element_from_buffer): When iterator oversteps prev_pos
 backwards, don't search for a new prev_stop more than 1000
 characters back.
 (handle_stop_backwards): Don't assume that CHARPOS is necessarily
 a stop_pos.
 (compute_display_string_pos): Check also BUF_OVERLAY_MODIFF for a
 match, when testing the cached display string position for
 applicability.
2011-07-19 21:04:56 +03:00
Paul Eggert
590bd46743 Port to OpenBSD.
See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
and the surrounding thread.
* minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
rather than fgets, and retry after EINTR.  Otherwise, 'emacs
--batch -f byte-compile-file' fails on OpenBSD if an inactivity
timer goes off.
* s/openbsd.h (BROKEN_SIGIO): Define.
* unexelf.c (unexec) [__OpenBSD__]:
Don't update the .mdebug section of the Alpha COFF symbol table.
2011-07-19 10:33:06 -07:00
Lars Magne Ingebrigtsen
f41628b253 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used 2011-07-19 17:16:58 +02:00
Paul Eggert
15e3a074a6 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
This fixes some race conditions on the permissions of any newly
created file.
2011-07-18 14:01:36 -07:00
Paul Eggert
41bed37d15 * alloc.c (valid_pointer_p): Use pipe, not open.
This fixes some permissions issues when debugging.
2011-07-18 13:24:40 -07:00
Paul Eggert
b59b67c56e * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
If fchown fails to set both uid and gid, try to set just gid,
as that is sometimes allowed.  Adjust the file's mode to eliminate
setuid or setgid bits that are inappropriate if fchown fails.
2011-07-18 10:21:18 -07:00
Stefan Monnier
925a6be733 * src/xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
to compare Lisp_Objects.
* src/gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
global_gnutls_log_level, don't mistake it for a Lisp_Object.
(init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
2011-07-17 22:34:14 -04:00
Andreas Schwab
46cfea45c4 Fix last change 2011-07-17 12:35:42 +02:00
Andreas Schwab
0a6a104b85 Make read-symbol-positions-list more accurate
* src/lread.c (read_integer): Unread even EOF character.
(read1): Likewise.  Properly record start position of symbol.
2011-07-17 12:29:24 +02:00
Andreas Schwab
52968808d6 * src/lread.c (read1): Read `#:' as empty uninterned symbol if no
symbol character follows.
2011-07-17 10:00:53 +02:00
Paul Eggert
c2216f8e3a Merge from trunk. 2011-07-16 18:33:46 -07:00
Paul Eggert
9e381cdd96 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
This works around a problem with the previous change to Fcopy_file.
Recent glibc declares fchown with __attribute__((warn_unused_result)),
and without this change, GCC might complain about discarding
fchown's return value.
2011-07-16 18:18:51 -07:00
Paul Eggert
4f8a454745 Merge from trunk. 2011-07-16 17:37:57 -07:00
Juanma Barranquero
b56414357f src/makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059). 2011-07-17 01:40:44 +02:00
Lars Magne Ingebrigtsen
750c33f71e Move the defintion of `gnutls-log-level' to the C level to avoid loading problems 2011-07-17 00:49:20 +02:00
Paul Eggert
a803145704 * fileio.c (Fcopy_file): Don't diagnose fchown failures.
Fixes: debbugs:9002
2011-07-16 14:53:38 -07:00
Lars Magne Ingebrigtsen
dd88932771 Use the same condition for POLL_FOR_INPUT in both keyboard.c and process.c
Fixes: debbugs:1858
2011-07-16 20:27:08 +02:00
Eli Zaretskii
551918c187 Fix a terrible slowdown in large fully fontified buffers.
src/xdisp.c <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>:
 Cache for last found display string position.
 (compute_display_string_pos): Return the cached position if asked
 about the same buffer.
2011-07-16 20:17:01 +03:00
Lawrence Mitchell
87e8668442 Allow controlling how many prime bits to use during TLS negotiation 2011-07-15 19:41:24 +02:00
Andreas Schwab
64348f4010 * src/doc.c (Fsubstitute_command_keys): Revert last change. 2011-07-15 17:31:36 +02:00
Lars Magne Ingebrigtsen
f863868c45 Clarify that \= only quotes the next character 2011-07-15 16:31:14 +02:00
Lars Magne Ingebrigtsen
1d698799d3 `lexical-binding' doc clarification
* lread.c (syms_of_lread): Clarify that is isn't only
`eval-buffer' and `eval-defun' that's affected by
`lexical-binding'.

Fixes: debbugs:8460
2011-07-15 14:57:20 +02:00
Eli Zaretskii
aa4b6df690 Fix vertical cursor motion in Speedbar frames under bidi display.
src/xdisp.c (move_it_in_display_line_to): Fix vertical motion with
 bidi redisplay when a line includes both an image and is
 truncated.
2011-07-15 13:50:03 +03:00
Paul Eggert
f0eb61e99d * bidi.c (bidi_cache_ensure_space): Also check that the bidi cache size
does not exceed that of the largest Lisp string or buffer.  See Eli
Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
2011-07-14 23:44:47 -07:00
Glenn Morris
ec2bc542a4 No need for ChangeLog entry about quickly reverted change.
(Also confusing since the original ChangeLog entry was removed.)
2011-07-14 22:18:02 -04:00