Eli Zaretskii [Wed, 28 Sep 2011 14:37:27 +0000 (17:37 +0300)]
Fix bug #9624 with crashes in Muse mode.
src/xdisp.c (compute_display_string_end): If there's no display
string at CHARPOS, return -1.
src/bidi.c (bidi_fetch_char): When compute_display_string_end
returns a negative value, treat the character as a normal
character not covered by a display string.
Eli Zaretskii [Tue, 27 Sep 2011 17:18:31 +0000 (20:18 +0300)]
Fix bug #9610 with slow cursor motion in buffers with invisible text.
src/xdisp.c (handle_invisible_prop): If invisible text ends on a
newline, reseat the iterator instead of bidi-iterating there one
character at a time. (Bug#9610)
(BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
TO_CHARPOS if the bidi iterator is at base embedding level.
Eli Zaretskii [Tue, 27 Sep 2011 16:46:17 +0000 (19:46 +0300)]
Force left-to-right paragraphs in Org buffers.
lisp/org/org.el (org-mode): Force left-to-right paragraphs in Org
buffers. For a related discussions, see
https://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00349.html.
Paul Eggert [Tue, 27 Sep 2011 15:58:20 +0000 (08:58 -0700)]
* coding.c: Integer and buffer overflow fixes.
(Funencodable_char_position, Fcheck_coding_systems_region)
(get_translation, handle_composition_annotation, consume_chars):
Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
(consume_chars): Rewrite to avoid calculating an address outside buffer.
nnimap.el (nnimap-wait-for-response): Message less (bug#9540).
nnheader.el (nnheader-message-maybe): New function.
shr.el (shr-tag-table): Render totally broken tables better.
mml.el (mml-generate-mime-1): Don't alter the contents if we're computing the boundary.
pop3.el (pop3-number-of-responses): Removed.
(pop3-wait-for-messages): Rewrite to take linear time instead of exponential time.
Paul Eggert [Mon, 26 Sep 2011 21:30:18 +0000 (14:30 -0700)]
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
* lisp/progmodes/cfengine.el (cfengine-auto-mode): Add convenience
function that picks between cfengine 2 and 3 support
automatically. Update docs accordingly.
Martin Rudalics [Sun, 25 Sep 2011 10:11:25 +0000 (12:11 +0200)]
Some minor changes in windows section.
* windows.texi (Windows and Frames, Display Action Functions)
(Switching Buffers): Fix some typos.
(Buffers and Windows): Remove reference to window-auto-delete.
Reword description of replace-buffer-in-windows.
(Window History): Fix some typos and refer to frame local buffer
list.
Paul Eggert [Sun, 25 Sep 2011 01:27:19 +0000 (18:27 -0700)]
* charset.h (DECODE_CHAR): Return int, not unsigned;
this is what was intended anyway, and it avoids undefined behavior.
(CHARSET_OFFSET): Remove unused macro, instead of fixing its
integer-overflow issues.
(ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
Formerly, it returned EMACS_INT on 64-bit hosts in the common case
where the argument is EMACS_INT, and this behavior is not intended.
Paul Eggert [Sun, 25 Sep 2011 01:22:30 +0000 (18:22 -0700)]
* charset.c: Integer overflow fixes.
Don't rely on undefined behavior with signed left shift overflow.
Don't assume unsigned int fits into fixnum, or that fixnum fits
into unsigned int. Don't require max_code to be a valid fixnum;
that's not true for gb10830 4-byte on a 32-bit host. Allow
invalid_code to be a cons, for the same reason. Require code_offset
to be a character. Avoid int overflow if max_char is close
to INT_MAX.
(CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
this is intended anyway and avoids some undefined behavior.
(load_charset_map): Pass unsigned, not int, as 2nd arg of
INDEX_TO_CODE_POINT, as that's what it expects.
(Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
Support a new variable `shr-ignore-cache' to re-fetch images when hitting `g' in Gnus.
gnus-sum.el (gnus-summary-show-article): Bind `shr-ignore-cache' to re-fetch images.
shr.el (shr-tag-img): Support a new variable `shr-ignore-cache' to re-fetch images when hitting `g' in Gnus.
Document display-buffer and other window changes in Lisp manual.
* doc/lispref/windows.texi (Window History): New node. Move text here
from Buffers and Windows.
(Switching Buffers): Rename from Displaying Buffers, since we
don't document display-buffer here; callers changed. Document
FORCE-SAME-WINDOW arg to switch-to-buffer and
switch-to-buffer-other-frame. Delete duplicate
replace-buffer-in-windows doc.
(Choosing Window): Document display actions.
Ken Manheimer [Sat, 24 Sep 2011 20:58:23 +0000 (16:58 -0400)]
* allout.el (allout-this-command-hid-stuff): Buffer-local variable that's
true if the current command involved collapsing of text. It's reset to
false at the beginning of the next command.
(allout-post-command-business): Move the cursor to the beginning of entry
if the cursor is hidden and collapsing activity just happened.
* etc/NEWS: Reorganize, placing user options in Changes section.
* doc/emacs/buffers.texi (Select Buffer): Clarify description of
buffer-switching commands. Add xref to Window Display node.
Don't repeat confirm-nonexistent-file-or-buffer description from
Visiting node. Remove even-window-heights.
* doc/emacs/frames.texi (Special Buffer Frames): Add xref to Window Choice.
* doc/emacs/windows.texi (Pop Up Window): Defer discussion of window
splitting to the Window Choice node. Add index entries.
(Force Same Window): Node deleted.
(Displaying Buffers, Window Choice): New nodes.
Eli Zaretskii [Sat, 24 Sep 2011 14:38:16 +0000 (17:38 +0300)]
Change the default value of redisplay-dont-pause to t.
src/dispnew.c (syms_of_display) <redisplay-dont-pause>: Default
value is now t. Doc fix.
doc/lispref/display.texi (Forcing Redisplay): Update the description of
redisplay-dont-pause due to change in the default value.
etc/NEWS: Mention the change of the default value.
newsticker: automatically load html rendering packages.
lisp/ChangeLog:
2011-09-24 Ulf Jasper <ulf.jasper@web.de>
* net/newst-reader.el (newsticker-html-renderer)
(newsticker-show-news): Automatically load html rendering package
if newsticker-html-renderer is set. Fixes "Warning: defvar ignored
because w3m-fill-column is let-bound" and the error "Symbol's
value as variable is void: w3m-fill-column".
Eli Zaretskii [Sat, 24 Sep 2011 13:23:58 +0000 (16:23 +0300)]
Fix vertical cursor motion when the newline is covered by a display string.
src/indent.c (Fvertical_motion): Compute and apply the overshoot
logic when moving up, not only when moving down. Fix the
confusing name and values of the it_overshoot_expected variable;
logic changes accordingly. (Bug#9254) (Bug#9549)
src/xdisp.c (pos_visible_p): Produce correct pixel coordinates when
CHARPOS is covered by a display string which includes newlines.
(move_it_vertically_backward): Avoid inflooping when START_CHARPOS
is covered by a display string with embedded newlines.
Jim Meyering [Sat, 24 Sep 2011 09:22:06 +0000 (11:22 +0200)]
do not ignore write error for any output size
The previous change was incomplete.
While it makes emacs --batch detect the vast majority of stdout
write failures, errors were still ignored whenever the output size is
k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
$ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
&& echo FAIL: ignored write error
FAIL: ignored write error
$ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
&& echo FAIL: ignored write error
FAIL: ignored write error
* emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)