1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-22 10:26:20 +00:00

Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de.

This commit is contained in:
Glenn Morris 2011-05-12 00:07:06 -07:00
commit d2fc7e3d0f
14 changed files with 143 additions and 46 deletions

View File

@ -1,3 +1,15 @@
2011-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
* modes.texi (Region to Refontify): Rename from "Region to Fontify".
(Multiline Font Lock):
* vol2.texi (Top):
* vol1.texi (Top):
* elisp.texi (Top): Update menu accordingly.
2011-05-12 Drew Adams <drew.adams@oracle.com>
* modes.texi (Region to Fontify): Fix typo.
2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
* numbers.texi (Integer Basics): Large integers are treated as floats.

View File

@ -828,7 +828,7 @@ Font Lock Mode
Multiline Font Lock Constructs
* Font Lock Multiline:: Marking multiline chunks with a text property.
* Region to Fontify:: Controlling which region gets refontified
* Region to Refontify:: Controlling which region gets refontified
after a buffer change.
Documentation

View File

@ -251,7 +251,7 @@ literally, i.e. without conversions of any kind. The command
@code{find-file-literally} sets this variable's local value, but other
equivalent functions and commands can do that as well, e.g.@: to avoid
automatic addition of a newline at the end of the file. This variable
us permanent local, so it is unaffected by changes of major modes.
is permanent local, so it is unaffected by changes of major modes.
@end defvar
@node Subroutines of Visiting

View File

@ -3174,7 +3174,7 @@ subsequent lines.
@menu
* Font Lock Multiline:: Marking multiline chunks with a text property.
* Region to Fontify:: Controlling which region gets refontified
* Region to Refontify:: Controlling which region gets refontified
after a buffer change.
@end menu
@ -3226,7 +3226,7 @@ place the @code{font-lock-multiline} property on the text before
Font-Lock looks at it, or use
@code{font-lock-fontify-region-function}.
@node Region to Fontify
@node Region to Refontify
@subsubsection Region to Fontify after a Buffer Change
When a buffer is changed, the region that Font Lock refontifies is
@ -3235,15 +3235,15 @@ While this works well most of the time, sometimes it doesn't---for
example, when a change alters the syntactic meaning of text on an
earlier line.
You can enlarge (or even reduce) the region to fontify by setting
one the following variables:
You can enlarge (or even reduce) the region to refontify by setting
the following variable:
@defvar font-lock-extend-after-change-region-function
This buffer-local variable is either @code{nil} or a function for
Font-Lock to call to determine the region to scan and fontify.
The function is given three parameters, the standard @var{beg},
@var{end}, and @var{old-len} from after-change-functions
@var{end}, and @var{old-len} from @code{after-change-functions}
(@pxref{Change Hooks}). It should return either a cons of the
beginning and end buffer positions (in that order) of the region to
fontify, or @code{nil} (which means choose the region in the standard

View File

@ -847,7 +847,7 @@ Font Lock Mode
Multiline Font Lock Constructs
* Font Lock Multiline:: Marking multiline chunks with a text property.
* Region to Fontify:: Controlling which region gets refontified
* Region to Refontify:: Controlling which region gets refontified
after a buffer change.
Documentation

View File

@ -846,7 +846,7 @@ Font Lock Mode
Multiline Font Lock Constructs
* Font Lock Multiline:: Marking multiline chunks with a text property.
* Region to Fontify:: Controlling which region gets refontified
* Region to Refontify:: Controlling which region gets refontified
after a buffer change.
Documentation

View File

@ -1,3 +1,19 @@
2011-05-12 Eli Zaretskii <eliz@gnu.org>
* smerge-mode.el (smerge-resolve): Use null-device rather than a
literal "/dev/null".
2011-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/lisp.el (lisp-complete-symbol, lisp-completion-at-point):
Fix typo.
2011-05-12 Ralph Schleicher <rs@ralph-schleicher.de>
* progmodes/which-func.el (which-function):
Use add-log-current-defun instead of add-log-current-defun-function,
which might not be defined (Bug#8260).
2011-05-12 Glenn Morris <rgm@gnu.org>
* emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):

View File

@ -637,7 +637,7 @@ considered."
(if (null data)
(minibuffer-message "Nothing to complete")
(let ((completion-annotate-function
(plist-get plist :annotate-function)))
(plist-get plist :annotation-function)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
(plist-get plist :predicate))))))
@ -685,7 +685,7 @@ considered."
(when end
(list beg end obarray
:predicate predicate
:annotate-function
:annotation-function
(unless (eq predicate 'fboundp)
(lambda (str) (if (fboundp (intern-soft str)) " <f>"))))))))

View File

@ -270,7 +270,7 @@ It calls them sequentially, and if any returns non-nil,
(defun which-function ()
"Return current function name based on point.
Uses `which-func-functions', `imenu--index-alist'
or `add-log-current-defun-function'.
or `add-log-current-defun'.
If no function name is found, return nil."
(let ((name
;; Try the `which-func-functions' functions first.
@ -320,9 +320,8 @@ If no function name is found, return nil."
(reverse (cons (car pair) namestack))))))))))))
;; Try using add-log support.
(when (and (null name) (boundp 'add-log-current-defun-function)
add-log-current-defun-function)
(setq name (funcall add-log-current-defun-function)))
(when (null name)
(setq name (add-log-current-defun)))
;; Filter the name if requested.
(when name
(if which-func-cleanup-function

View File

@ -566,7 +566,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work."
(with-current-buffer buf
(zerop (call-process-region
(point-min) (point-max) "patch" t nil nil
"-r" "/dev/null" "--no-backup-if-mismatch"
"-r" null-device "--no-backup-if-mismatch"
"-fl" o))))
(save-restriction
(narrow-to-region m0b m0e)
@ -582,7 +582,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work."
(with-current-buffer buf
(zerop (call-process-region
(point-min) (point-max) "patch" t nil nil
"-r" "/dev/null" "--no-backup-if-mismatch"
"-r" null-device "--no-backup-if-mismatch"
"-fl" m))))
(save-restriction
(narrow-to-region m0b m0e)

View File

@ -1,3 +1,19 @@
2011-05-12 Drew Adams <drew.adams@oracle.com>
* textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
`width' to `bar_area_x' and `bar_area_width', respectively.
(x_scroll_run): Take account of fringe background extension.
* xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename
local vars `left' and `width' to `bar_area_x' and
`bar_area_width', respectively.
(x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
background extension.
2011-05-10 Juanma Barranquero <lekktu@gmail.com>
* image.c (Finit_image_library): Return t for built-in image types,

View File

@ -838,8 +838,8 @@ In a buffer, it runs to (point-min), and the value cannot be less than that.
The property values are compared with `eq'.
If the property is constant all the way to the start of OBJECT, return the
first valid position in OBJECT.
If the optional fourth argument LIMIT is non-nil, don't search
back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
If the optional fourth argument LIMIT is non-nil, don't search back past
position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */)
(Lisp_Object position, Lisp_Object prop, Lisp_Object object, Lisp_Object limit)
{
if (STRINGP (object))

View File

@ -715,22 +715,22 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
if (sb_width > 0)
{
int left = WINDOW_SCROLL_BAR_AREA_X (w);
int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
* FRAME_COLUMN_WIDTH (f));
if (bx < 0)
{
/* Bitmap fills the fringe. */
if (left + width == p->x)
bx = left + sb_width;
else if (p->x + p->wd == left)
bx = left;
if (bar_area_x + bar_area_width == p->x)
bx = bar_area_x + sb_width;
else if (p->x + p->wd == bar_area_x)
bx = bar_area_x;
if (bx >= 0)
{
int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
nx = width - sb_width;
nx = bar_area_width - sb_width;
by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y));
ny = row->visible_height;
@ -738,13 +738,13 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
}
else
{
if (left + width == bx)
if (bar_area_x + bar_area_width == bx)
{
bx = left + sb_width;
nx += width - sb_width;
bx = bar_area_x + sb_width;
nx += bar_area_width - sb_width;
}
else if (bx + nx == left)
nx += width - sb_width;
else if (bx + nx == bar_area_x)
nx += bar_area_width - sb_width;
}
}
}
@ -2619,6 +2619,32 @@ x_scroll_run (struct window *w, struct run *run)
fringes of W. */
window_box (w, -1, &x, &y, &width, &height);
/* If the fringe is adjacent to the left (right) scroll bar of a
leftmost (rightmost, respectively) window, then extend its
background to the gap between the fringe and the bar. */
if ((WINDOW_LEFTMOST_P (w)
&& WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
|| (WINDOW_RIGHTMOST_P (w)
&& WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
{
int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
if (sb_width > 0)
{
int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
* FRAME_COLUMN_WIDTH (f));
if (bar_area_x + bar_area_width == x)
{
x = bar_area_x + sb_width;
width += bar_area_width - sb_width;
}
else if (x + width == bar_area_x)
width += bar_area_width - sb_width;
}
}
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
bottom_y = y + height;

View File

@ -753,22 +753,22 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
if (sb_width > 0)
{
int left = WINDOW_SCROLL_BAR_AREA_X (w);
int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
* FRAME_COLUMN_WIDTH (f));
if (bx < 0)
{
/* Bitmap fills the fringe. */
if (left + width == p->x)
bx = left + sb_width;
else if (p->x + p->wd == left)
bx = left;
if (bar_area_x + bar_area_width == p->x)
bx = bar_area_x + sb_width;
else if (p->x + p->wd == bar_area_x)
bx = bar_area_x;
if (bx >= 0)
{
int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
nx = width - sb_width;
nx = bar_area_width - sb_width;
by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
row->y));
ny = row->visible_height;
@ -776,13 +776,13 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
}
else
{
if (left + width == bx)
if (bar_area_x + bar_area_width == bx)
{
bx = left + sb_width;
nx += width - sb_width;
bx = bar_area_x + sb_width;
nx += bar_area_width - sb_width;
}
else if (bx + nx == left)
nx += width - sb_width;
else if (bx + nx == bar_area_x)
nx += bar_area_width - sb_width;
}
}
}
@ -3232,6 +3232,34 @@ x_scroll_run (struct window *w, struct run *run)
fringe of W. */
window_box (w, -1, &x, &y, &width, &height);
#ifdef USE_TOOLKIT_SCROLL_BARS
/* If the fringe is adjacent to the left (right) scroll bar of a
leftmost (rightmost, respectively) window, then extend its
background to the gap between the fringe and the bar. */
if ((WINDOW_LEFTMOST_P (w)
&& WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
|| (WINDOW_RIGHTMOST_P (w)
&& WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
{
int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
if (sb_width > 0)
{
int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
* FRAME_COLUMN_WIDTH (f));
if (bar_area_x + bar_area_width == x)
{
x = bar_area_x + sb_width;
width += bar_area_width - sb_width;
}
else if (x + width == bar_area_x)
width += bar_area_width - sb_width;
}
}
#endif
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
bottom_y = y + height;