+2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ Avoid some portability problems by eschewing 'extern inline' functions.
+ The trivial performance wins aren't worth the portability hassles; see
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
+ et seq.
+ * dispextern.h (window_box, window_box_height, window_text_bottom_y)
+ (window_box_width, window_box_left, window_box_left_offset)
+ (window_box_right, window_box_right_offset): Undo previous change,
+ by removing the "extern"s.
+ * intervals.c (adjust_intervals_for_insertion)
+ (adjust_intervals_for_deletion): Undo previous change,
+ making these static again.
+ (offset_intervals, temp_set_point_both, temp_set_point)
+ (copy_intervals_to_string): No longer inline.
+ * xdisp.c (window_text_bottom_y, window_box_width)
+ (window_box_height, window_box_left_offset)
+ (window_box_right_offset, window_box_left, window_box_right)
+ (window_box): No longer inline.
+
2011-11-08 Chong Yidong <cyd@gnu.org>
* window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
void set_vertical_scroll_bar (struct window *);
#endif
int try_window (Lisp_Object, struct text_pos, int);
-extern void window_box (struct window *, int, int *, int *, int *, int *);
-extern int window_box_height (struct window *);
-extern int window_text_bottom_y (struct window *);
-extern int window_box_width (struct window *, int);
-extern int window_box_left (struct window *, int);
-extern int window_box_left_offset (struct window *, int);
-extern int window_box_right (struct window *, int);
-extern int window_box_right_offset (struct window *, int);
+void window_box (struct window *, int, int *, int *, int *, int *);
+int window_box_height (struct window *);
+int window_text_bottom_y (struct window *);
+int window_box_width (struct window *, int);
+int window_box_left (struct window *, int);
+int window_box_left_offset (struct window *, int);
+int window_box_right (struct window *, int);
+int window_box_right_offset (struct window *, int);
int estimate_mode_line_height (struct frame *, enum face_id);
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
NativeRectangle *, int);
#define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set))
-extern INTERVAL adjust_intervals_for_insertion (INTERVAL,
- EMACS_INT, EMACS_INT);
-extern void adjust_intervals_for_deletion (struct buffer *,
- EMACS_INT, EMACS_INT);
-
static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object);
static INTERVAL merge_interval_right (INTERVAL);
static INTERVAL reproduce_tree (INTERVAL, INTERVAL);
and check the hungry bits of both. Then add the length going back up
to the root. */
-INTERVAL
+static INTERVAL
adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position,
EMACS_INT length)
{
interval. Another possibility would be to create a new interval for
this text, and make it have the merged properties of both ends. */
-INTERVAL
+static INTERVAL
adjust_intervals_for_insertion (INTERVAL tree,
EMACS_INT position, EMACS_INT length)
{
text. The deletion is effected at position START (which is a
buffer position, i.e. origin 1). */
-void
+static void
adjust_intervals_for_deletion (struct buffer *buffer,
EMACS_INT start, EMACS_INT length)
{
compiler that does not allow calling a static function (here,
adjust_intervals_for_deletion) from a non-static inline function. */
-inline void
+void
offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length)
{
if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0)
/* Set point in BUFFER "temporarily" to CHARPOS, which corresponds to
byte position BYTEPOS. */
-inline void
+void
temp_set_point_both (struct buffer *buffer,
EMACS_INT charpos, EMACS_INT bytepos)
{
/* Set point "temporarily", without checking any text properties. */
-inline void
+void
temp_set_point (struct buffer *buffer, EMACS_INT charpos)
{
temp_set_point_both (buffer, charpos,
/* Give STRING the properties of BUFFER from POSITION to LENGTH. */
-inline void
+void
copy_intervals_to_string (Lisp_Object string, struct buffer *buffer,
EMACS_INT position, EMACS_INT length)
{
This is the height of W minus the height of a mode line, if any. */
-inline int
+int
window_text_bottom_y (struct window *w)
{
int height = WINDOW_TOTAL_HEIGHT (w);
means return the total width of W, not including fringes to
the left and right of the window. */
-inline int
+int
window_box_width (struct window *w, int area)
{
int cols = XFASTINT (w->total_cols);
/* Return the pixel height of the display area of window W, not
including mode lines of W, if any. */
-inline int
+int
window_box_height (struct window *w)
{
struct frame *f = XFRAME (w->frame);
area AREA of window W. AREA < 0 means return the left edge of the
whole window, to the right of the left fringe of W. */
-inline int
+int
window_box_left_offset (struct window *w, int area)
{
int x;
area AREA of window W. AREA < 0 means return the right edge of the
whole window, to the left of the right fringe of W. */
-inline int
+int
window_box_right_offset (struct window *w, int area)
{
return window_box_left_offset (w, area) + window_box_width (w, area);
area AREA of window W. AREA < 0 means return the left edge of the
whole window, to the right of the left fringe of W. */
-inline int
+int
window_box_left (struct window *w, int area)
{
struct frame *f = XFRAME (w->frame);
area AREA of window W. AREA < 0 means return the right edge of the
whole window, to the left of the right fringe of W. */
-inline int
+int
window_box_right (struct window *w, int area)
{
return window_box_left (w, area) + window_box_width (w, area);
coordinates of the upper-left corner of the box. Return in
*BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */
-inline void
+void
window_box (struct window *w, int area, int *box_x, int *box_y,
int *box_width, int *box_height)
{