/* Indentation functions.
Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "lisp.h"
#include "buffer.h"
-#include "charset.h"
+#include "character.h"
#include "category.h"
#include "indent.h"
#include "keyboard.h"
/* Indentation can insert tabs if this is non-zero;
otherwise always uses spaces. */
-int indent_tabs_mode;
+static int indent_tabs_mode;
#define CR 015
Some things in set last_known_column_point to -1
to mark the memorized value as invalid. */
-double last_known_column;
+static double last_known_column;
/* Value of point when current_column was called. */
/* Value of MODIFF when current_column was called. */
-int last_known_column_modified;
+static int last_known_column_modified;
static double current_column_1 P_ ((void));
static double position_indentation P_ ((int));
int *len, *len_byte, *width;
{
Lisp_Object prop;
- int start, end;
+ EMACS_INT start, end;
int id;
if (! find_composition (pos, -1, &start, &end, &prop, Qnil)
if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c))) \
width = XVECTOR (DISP_CHAR_VECTOR (dp, c))->size; \
else \
- width = WIDTH_BY_CHAR_HEAD (*p); \
+ width = CHAR_WIDTH (c); \
if (width > 1) \
wide_column = width; \
} \
next_element_from_display_vector does it. */
Lisp_Object entry = AREF (charvec, i);
- if (INTEGERP (entry)
- && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
- c = FAST_GLYPH_CHAR (XFASTINT (entry));
+ if (GLYPH_CODE_P (entry)
+ && GLYPH_CODE_CHAR_VALID_P (entry))
+ c = GLYPH_CODE_CHAR (entry);
else
c = ' ';
}
{
/* This should be handled the same as
next_element_from_display_vector does it. */
- Lisp_Object entry;
- entry = AREF (charvec, i);
+ Lisp_Object entry = AREF (charvec, i);
- if (INTEGERP (entry)
- && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
- c = FAST_GLYPH_CHAR (XFASTINT (entry));
+ if (GLYPH_CODE_P (entry)
+ && GLYPH_CODE_CHAR_VALID_P (entry))
+ c = GLYPH_CODE_CHAR (entry);
else
c = ' ';
{
/* This should be handled the same as
next_element_from_display_vector does it. */
+ Lisp_Object entry = AREF (charvec, i);
- Lisp_Object entry;
- entry = AREF (charvec, i);
-
- if (INTEGERP (entry)
- && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
- c = FAST_GLYPH_CHAR (XFASTINT (entry));
+ if (GLYPH_CODE_P (entry)
+ && GLYPH_CODE_CHAR_VALID_P (entry))
+ c = GLYPH_CODE_CHAR (entry);
else
c = ' ';
next_element_from_display_vector does it. */
Lisp_Object entry = AREF (charvec, i);
- if (INTEGERP (entry)
- && GLYPH_CHAR_VALID_P (XFASTINT (entry)))
- c = FAST_GLYPH_CHAR (XFASTINT (entry));
+ if (GLYPH_CODE_P (entry)
+ && GLYPH_CODE_CHAR_VALID_P (entry))
+ c = GLYPH_CODE_CHAR (entry);
else
c = ' ';
}
syms_of_indent ()
{
DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode,
- doc: /* *Indentation can insert tabs if this is non-nil.
-Setting this variable automatically makes it local to the current buffer. */);
+ doc: /* *Indentation can insert tabs if this is non-nil. */);
indent_tabs_mode = 1;
defsubr (&Scurrent_indentation);