indent.h 2.52 KB
Newer Older
Jim Blandy's avatar
Jim Blandy committed
1
/* Definitions for interface to indent.c
2 3
   Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
                 2005, 2006, 2007  Free Software Foundation, Inc.
Jim Blandy's avatar
Jim Blandy committed
4 5 6 7 8

This file is part of GNU Emacs.

GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Karl Heuer's avatar
Karl Heuer committed
9
the Free Software Foundation; either version 2, or (at your option)
Jim Blandy's avatar
Jim Blandy committed
10 11 12 13 14 15 16 17 18
any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING.  If not, write to
Lute Kamstra's avatar
Lute Kamstra committed
19 20
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.  */
Jim Blandy's avatar
Jim Blandy committed
21

22 23 24 25 26 27 28 29
/* We introduce new member `tab_offset'.  We need it because of the
   existence of wide-column characters.  There is a case that the
   line-break occurs at a wide-column character and the number of
   colums of the line gets less than width.

   Example (where W_ stands for a wide-column character):
	     ----------
	     abcdefgh\\
30
	     W_
31 32
	     ----------

33
   To handle this case, we should not calculate the tab offset by
34 35
  	tab_offset += width;

36
   Instead, we must remember tab_offset of the line.
37 38

 */
Jim Blandy's avatar
Jim Blandy committed
39 40 41 42

struct position
  {
    int bufpos;
43
    int bytepos;
Jim Blandy's avatar
Jim Blandy committed
44 45 46 47
    int hpos;
    int vpos;
    int prevhpos;
    int contin;
48 49 50
    /* Number of characters we have already handled
       from the before and after strings at this position.  */
    int ovstring_chars_done;
51
    int tab_offset;
Jim Blandy's avatar
Jim Blandy committed
52 53
  };

54 55 56 57
struct position *compute_motion P_ ((int, int, int, int, int, int, int,
				     int, int, int, struct window *));
struct position *vmotion P_ ((int, int, struct window *));
int skip_invisible P_ ((int, int *, int, Lisp_Object));
Jim Blandy's avatar
Jim Blandy committed
58 59 60

/* Value of point when current_column was called */
extern int last_known_column_point;
61 62 63 64 65 66

/* Functions for dealing with the column cache.  */

/* Return true iff the display table DISPTAB specifies the same widths
   for characters as WIDTHTAB.  We use this to decide when to
   invalidate the buffer's column_cache.  */
67 68
int disptab_matches_widthtab P_ ((struct Lisp_Char_Table *disptab,
				  struct Lisp_Vector *widthtab));
69 70

/* Recompute BUF's width table, using the display table DISPTAB.  */
71 72 73 74
void recompute_width_table P_ ((struct buffer *buf,
				struct Lisp_Char_Table *disptab));


Miles Bader's avatar
Miles Bader committed
75 76
/* arch-tag: f9feb373-5bff-4f4f-9198-94805d00cfd7
   (do not change this comment) */