indent.h 2.12 KB
Newer Older
Jim Blandy's avatar
Jim Blandy committed
1
/* Definitions for interface to indent.c
Paul Eggert's avatar
Paul Eggert committed
2
   Copyright (C) 1985-1986, 2001-2019 Free Software Foundation, Inc.
Jim Blandy's avatar
Jim Blandy committed
3 4 5

This file is part of GNU Emacs.

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

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
17
along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
Jim Blandy's avatar
Jim Blandy committed
18

19 20 21 22 23
#ifndef EMACS_INDENT_H
#define EMACS_INDENT_H

#include "lisp.h"

Jim Blandy's avatar
Jim Blandy committed
24 25
struct position
  {
26 27
    ptrdiff_t bufpos;
    ptrdiff_t bytepos;
Stefan Monnier's avatar
Stefan Monnier committed
28 29 30
    EMACS_INT hpos;
    EMACS_INT vpos;
    EMACS_INT prevhpos;
31
    int contin;
Jim Blandy's avatar
Jim Blandy committed
32 33
  };

34 35 36 37
struct position *compute_motion (ptrdiff_t from, ptrdiff_t frombyte,
				 EMACS_INT fromvpos, EMACS_INT fromhpos,
				 bool did_motion, ptrdiff_t to,
				 EMACS_INT tovpos, EMACS_INT tohpos,
38
                                 EMACS_INT width, ptrdiff_t hscroll,
39
                                 int tab_offset, struct window *);
40 41
struct position *vmotion (ptrdiff_t from, ptrdiff_t from_byte,
			  EMACS_INT vtarget, struct window *);
42 43
ptrdiff_t skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p,
                          ptrdiff_t to, Lisp_Object window);
Jim Blandy's avatar
Jim Blandy committed
44 45

/* Value of point when current_column was called */
46
extern ptrdiff_t last_known_column_point;
47 48 49

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

Glenn Morris's avatar
Glenn Morris committed
50
/* Return true if the display table DISPTAB specifies the same widths
51 52
   for characters as WIDTHTAB.  We use this to decide when to
   invalidate the buffer's column_cache.  */
53 54
bool disptab_matches_widthtab (struct Lisp_Char_Table *disptab,
			       struct Lisp_Vector *widthtab);
55 56

/* Recompute BUF's width table, using the display table DISPTAB.  */
Jan D's avatar
Jan D committed
57 58
void recompute_width_table (struct buffer *buf,
                            struct Lisp_Char_Table *disptab);
59 60

#endif /* EMACS_INDENT_H */