Commit e18afed7 authored by Chong Yidong's avatar Chong Yidong
Browse files

Merge from emacs-24; up to 2012-04-22T13:58:00Z!cyd@gnu.org

parents ac9f0b75 c8fb9dc6
2012-05-12 Andreas Schwab <schwab@linux-m68k.org>
* cc-mode.texi: Avoid space before macro in 4th argument of cross
reference commands. (Bug#11461)
* Makefile.in (gnus.dvi): Use $@ instead of $*.dvi.
2012-05-12 Glenn Morris <rgm@gnu.org>
* Makefile.in (mostlyclean): Add more TeX intermediates.
......
......@@ -415,7 +415,7 @@ $(infodir)/gnus$(INFO_EXT): ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
gnus.dvi: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
$(ENVADD) $(TEXI2DVI) gnustmp.texi
cp gnustmp.dvi $*.dvi
cp gnustmp.dvi $@
rm gnustmp.*
gnus.pdf: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
......
......@@ -701,7 +701,7 @@ in some circumstances---@code{c-insert-tab-function} then defines
precisely what sort of ``whitespace'' this will be. Set the standard
Emacs variable @code{indent-tabs-mode} to @code{t} if you want real
@samp{tab} characters to be used in the indentation, to @code{nil} if
you want only spaces. @xref{Just Spaces,,, @emacsman{},
you want only spaces. @xref{Just Spaces,,,@emacsman{},
@emacsmantitle{}}.
@defopt c-tab-always-indent
......@@ -1058,8 +1058,8 @@ set this up for you, so you probably won't have to bother.
@cindex Auto Fill mode
@cindex paragraph filling
Line breaks are by default handled (almost) the same regardless of
whether they are made by auto fill mode (@pxref{Auto Fill,,,
@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with
whether they are made by auto fill mode (@pxref{Auto
Fill,,,@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with
@kbd{M-q}), or explicitly with @kbd{M-j} or similar methods. In
string literals, the new line gets the same indentation as the
previous nonempty line.@footnote{You can change this default by
......@@ -1402,7 +1402,7 @@ continuation of the preceding @code{if}.
@vindex abbrev-mode
@findex abbrev-mode
@cindex Abbrev mode
@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,, @emacsman{}, @emacsmantitle{}})
@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,,@emacsman{}, @emacsmantitle{}})
to accomplish this. It's therefore turned on by default in all language
modes except IDL mode, since CORBA IDL doesn't have any statements.
@end deffn
......@@ -2295,14 +2295,14 @@ to create them.
A @dfn{file local variable setting} is a setting which applies to an
individual source file. You put this in a @dfn{local variables list},
a special block at the end of the source file (@pxref{Specifying File
Variables,,, @emacsman{}}).
Variables,,,@emacsman{}}).
@item File Styles
A @dfn{file style} is a rarely used variant of the ``style'' mechanism
described above, which applies to an individual source file.
@xref{File Styles}. You use this by setting certain special variables
in a local variables list (@pxref{Specifying File Variables,,,
@emacsman{}}).
in a local variables list (@pxref{Specifying File
Variables,,,@emacsman{}}).
@item Hooks with Styles
For ultimate flexibility, you can use hooks and styles together. For
......@@ -2897,7 +2897,7 @@ these offsets or the parent style name.
The Emacs manual describes how you can customize certain variables on a
per-file basis by including a @dfn{file local variable} block at the end
of the file (@pxref{File Variables,, Local Variables in Files, @emacsman{},
of the file (@pxref{File Variables,, Local Variables in Files,@emacsman{},
@emacsmantitle{}}).
So far, you've only seen a functional interface for setting styles in
......@@ -3139,8 +3139,9 @@ results in the current implementation.
@end defopt
@vindex comment-multi-line
If inside a comment and @code{comment-multi-line} (@pxref{Auto Fill,,,
@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the indentation and
If inside a comment and @code{comment-multi-line} (@pxref{Auto
Fill,,,@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the
indentation and
line prefix are preserved. If inside a comment and
@code{comment-multi-line} is @code{nil}, a new comment of the same
type is started on the next line and indented as appropriate for
......@@ -6771,7 +6772,7 @@ The stuff that didn't fit in anywhere else is documented here.
Controls whether a final newline is enforced when the file is saved.
The value is an association list that for each language mode specifies
the value to give to @code{require-final-newline} (@pxref{Saving
Buffers,,, @lispref{}, @lispreftitle{}}) at mode initialization. If a
Buffers,,,@lispref{}, @lispreftitle{}}) at mode initialization. If a
language isn't present on the association list, CC Mode won't touch
@code{require-final-newline} in buffers for that language.
......
2012-05-14 Troels Nielsen <bn.troels@gmail.com> (tiny change)
* progmodes/compile.el (compilation-internal-error-properties):
Calculate start position correctly when end-col is set but
end-line is not (Bug#11382).
2012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
* net/rlogin.el (rlogin-mode-map): Fix last change.
2012-05-14 Jason L. Wright <jason.wright@inl.gov> (tiny change)
* mail/smtpmail.el (smtpmail-send-command): Send the command and
the following \r\n using a single `process-send-string', since the
Lotus SMTP server refuses to accept any commands if they are sent
with two `process-send-string's (Bug#11444).
2012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
* shell.el (shell-parse-pcomplete-arguments): Obey
pcomplete-arg-quote-list inside double-quoted args (Bug#11348).
2012-05-14 Wolfgang Jenkner <wjenkner@inode.at>
* image-mode.el: Fit to width/height for rotated images (bug#11431).
* image-mode.el: Fit to width/height for rotated images (Bug#11431).
(image-transform-scale, image-transform-right-angle-fudge): New vars.
(image-transform-width, image-transform-fit-width): New functions.
(image-transform-properties): Use them.
......
......@@ -932,8 +932,7 @@ Returns an error if the server cannot be contacted."
(insert (match-string 0 command) "<omitted>\r\n")
(insert command "\r\n"))
(setq smtpmail-read-point (point))
(process-send-string process command)
(process-send-string process "\r\n"))
(process-send-string process (concat command "\r\n")))
(defun smtpmail-send-data-1 (process data)
(goto-char (point-max))
......
......@@ -114,12 +114,12 @@ this variable is set from that."
(let ((map (if (consp shell-mode-map)
(cons 'keymap shell-mode-map)
(copy-keymap shell-mode-map))))
(define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C)
(define-key rlogin-mode-map "\C-c\C-d" 'rlogin-send-Ctrl-D)
(define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
(define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
(define-key rlogin-mode-map "\C-d" 'rlogin-delchar-or-send-Ctrl-D)
(define-key rlogin-mode-map "\C-i" 'rlogin-tab-or-complete)
(define-key map "\C-c\C-c" 'rlogin-send-Ctrl-C)
(define-key map "\C-c\C-d" 'rlogin-send-Ctrl-D)
(define-key map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
(define-key map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
(define-key map "\C-d" 'rlogin-delchar-or-send-Ctrl-D)
(define-key map "\C-i" 'rlogin-tab-or-complete)
map)
"Keymap for `rlogin-mode'.")
......
......@@ -400,8 +400,9 @@ Thus, this does not include the shell's current directory.")
(t (match-string 3)))
arg))
((match-beginning 2) ;Double quote.
(push (replace-regexp-in-string
"\\\\\\(.\\)" "\\1" (match-string 2))
(push (if (null pcomplete-arg-quote-list) (match-string 2)
(replace-regexp-in-string
"\\\\\\(.\\)" "\\1" (match-string 2)))
arg))
((match-beginning 1) ;Single quote.
(push (match-string 1) arg))
......
2012-05-14 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
already have overlays loaded.
(handle_single_display_spec): Before returning without displaying
fringe bitmap, synchronize the bidi iterator with the main display
iterator, by calling iterate_out_of_display_property.
(iterate_out_of_display_property): Detect buffer iteration by
testing that it->string is a Lisp string.
(get_next_display_element): When the current object is exhausted,
and there's something on it->stack, call set_iterator_to_next to
proceed with what's on the stack, instead of returning zero.
(set_iterator_to_next): If called at the end of a Lisp string,
proceed to consider_string_end without incrementing string
position. Don't increment display vector index past the end of
the display vector. (Bug#11417)
(pos_visible_p): Don't report a position visible when move_it_to
stopped at the last line of window, which happens to be scanned
backwards by the bidi iteration. (Bug#11464)
2012-05-14 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (handle_single_display_spec): Return 1 for left-margin
and right-margin display specs even if the spec is invalid or we
are on a TTY, and thus unable to display on the fringes. That's
because the text with the property will not be displayed anyway,
so we need to signal to the caller that this is a "replacing"
display spec. This fixes display when the spec is invalid or we
are on a TTY.
2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
* unexaix.c (make_hdr): Fix typo in prototype.
This bug broke the build on AIX. Problem reported by Gilles Pion.
2012-05-14 Michael Albinus <michael.albinus@gmx.de>
* keyboard.c (kbd_buffer_get_event): Read special events also in
......
......@@ -110,7 +110,7 @@ report_error_1 (int fd, char *msg, int a1, int a2)
error (msg, a1, a2);
}
static int make_hdr (int, int, unsigned, unsigned, unsigned, char *, char *);
static int make_hdr (int, int, char *, char *);
static void mark_x (char *);
static int copy_text_and_data (int);
static int copy_sym (int, int, char *, char *);
......
......@@ -849,6 +849,7 @@ static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
static int trailing_whitespace_p (EMACS_INT);
static intmax_t message_log_check_duplicate (EMACS_INT, EMACS_INT);
static void push_it (struct it *, struct text_pos *);
static void iterate_out_of_display_property (struct it *);
static void pop_it (struct it *);
static void sync_frame_with_window_matrix_rows (struct window *);
static void select_frame_for_redisplay (Lisp_Object);
......@@ -1313,8 +1314,8 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
glyph. */
int top_x = it.current_x;
int top_y = it.current_y;
enum it_method it_method = it.method;
/* Calling line_bottom_y may change it.method, it.position, etc. */
enum it_method it_method = it.method;
int bottom_y = (last_height = 0, line_bottom_y (&it));
int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
 
......@@ -1322,6 +1323,31 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y,
visible_p = bottom_y > window_top_y;
else if (top_y < it.last_visible_y)
visible_p = 1;
if (bottom_y >= it.last_visible_y
&& it.bidi_p && it.bidi_it.scan_dir == -1
&& IT_CHARPOS (it) < charpos)
{
/* When the last line of the window is scanned backwards
under bidi iteration, we could be duped into thinking
that we have passed CHARPOS, when in fact move_it_to
simply stopped short of CHARPOS because it reached
last_visible_y. To see if that's what happened, we call
move_it_to again with a slightly larger vertical limit,
and see if it actually moved vertically; if it did, we
didn't really reach CHARPOS, which is beyond window end. */
struct it save_it = it;
/* Why 10? because we don't know how many canonical lines
will the height of the next line(s) be. So we guess. */
int ten_more_lines =
10 * FRAME_LINE_HEIGHT (XFRAME (WINDOW_FRAME (w)));
move_it_to (&it, charpos, -1, bottom_y + ten_more_lines, -1,
MOVE_TO_POS | MOVE_TO_Y);
if (it.current_y > top_y)
visible_p = 0;
it = save_it;
}
if (visible_p)
{
if (it_method == GET_FROM_DISPLAY_VECTOR)
......@@ -3135,7 +3161,15 @@ handle_stop (struct it *it)
overlays even if the actual buffer text is replaced. */
if (!handle_overlay_change_p
|| it->sp > 1
|| !get_overlay_strings_1 (it, 0, 0))
/* Don't call get_overlay_strings_1 if we already
have overlay strings loaded, because doing so
will load them again and push the iterator state
onto the stack one more time, which is not
expected by the rest of the code that processes
overlay strings. */
|| (it->n_overlay_strings <= 0
? !get_overlay_strings_1 (it, 0, 0)
: 0))
{
if (it->ellipsis_p)
setup_for_ellipsis (it, 0);
......@@ -4691,10 +4725,22 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
if (!FRAME_WINDOW_P (it->f))
/* If we return here, POSITION has been advanced
across the text with this property. */
return 0;
{
/* Synchronize the bidi iterator with POSITION. This is
needed because we are not going to push the iterator
on behalf of this display property, so there will be
no pop_it call to do this synchronization for us. */
if (it->bidi_p)
{
it->position = *position;
iterate_out_of_display_property (it);
*position = it->position;
}
return 1;
}
}
else if (!frame_window_p)
return 0;
return 1;
 
#ifdef HAVE_WINDOW_SYSTEM
value = XCAR (XCDR (spec));
......@@ -4702,7 +4748,15 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|| !(fringe_bitmap = lookup_fringe_bitmap (value)))
/* If we return here, POSITION has been advanced
across the text with this property. */
return 0;
{
if (it && it->bidi_p)
{
it->position = *position;
iterate_out_of_display_property (it);
*position = it->position;
}
return 1;
}
 
if (it)
{
......@@ -5621,7 +5675,7 @@ push_it (struct it *it, struct text_pos *position)
static void
iterate_out_of_display_property (struct it *it)
{
int buffer_p = BUFFERP (it->object);
int buffer_p = !STRINGP (it->string);
EMACS_INT eob = (buffer_p ? ZV : it->end_charpos);
EMACS_INT bob = (buffer_p ? BEGV : 0);
 
......@@ -6790,6 +6844,16 @@ get_next_display_element (struct it *it)
&& FACE_FROM_ID (it->f, face_id)->box == FACE_NO_BOX);
}
}
/* If we reached the end of the object we've been iterating (e.g., a
display string or an overlay string), and there's something on
IT->stack, proceed with what's on the stack. It doesn't make
sense to return zero if there's unprocessed stuff on the stack,
because otherwise that stuff will never be displayed. */
if (!success_p && it->sp > 0)
{
set_iterator_to_next (it, 0);
success_p = get_next_display_element (it);
}
 
/* Value is 0 if end of buffer or string reached. */
return success_p;
......@@ -6971,7 +7035,7 @@ set_iterator_to_next (struct it *it, int reseat_p)
display vector entry (these entries may contain faces). */
it->face_id = it->saved_face_id;
 
if (it->dpvec + it->current.dpvec_index == it->dpend)
if (it->dpvec + it->current.dpvec_index >= it->dpend)
{
int recheck_faces = it->ellipsis_p;
 
......@@ -7009,6 +7073,26 @@ set_iterator_to_next (struct it *it, int reseat_p)
case GET_FROM_STRING:
/* Current display element is a character from a Lisp string. */
xassert (it->s == NULL && STRINGP (it->string));
/* Don't advance past string end. These conditions are true
when set_iterator_to_next is called at the end of
get_next_display_element, in which case the Lisp string is
already exhausted, and all we want is pop the iterator
stack. */
if (it->current.overlay_string_index >= 0)
{
/* This is an overlay string, so there's no padding with
spaces, and the number of characters in the string is
where the string ends. */
if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string))
goto consider_string_end;
}
else
{
/* Not an overlay string. There could be padding, so test
against it->end_charpos . */
if (IT_STRING_CHARPOS (*it) >= it->end_charpos)
goto consider_string_end;
}
if (it->cmp_it.id >= 0)
{
int i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment