/* Simple built-in editing commands.
Copyright (C) 1985, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 2001 MORIOKA Tomohiko
This file is part of XEmacs.
(count, buffer))
{
struct buffer *buf = decode_buffer (buffer, 1);
- int n;
+ EMACS_INT n;
if (NILP (count))
n = 1;
return Qnil;
}
-DEFUN ("delete-char", Fdelete_char, 1, 2, "*p\nP", /*
+DEFUN ("delete-char", Fdelete_char, 0, 2, "*p\nP", /*
Delete the following COUNT characters (previous, with negative COUNT).
Optional second arg KILLP non-nil means kill instead (save in kill ring).
Interactively, COUNT is the prefix arg, and KILLP is set if
/* This function can GC */
Bufpos pos;
struct buffer *buf = current_buffer;
- int n;
+ EMACS_INT n;
- CHECK_INT (count);
- n = XINT (count);
+ if (NILP (count))
+ n = 1;
+ else
+ {
+ CHECK_INT (count);
+ n = XINT (count);
+ }
pos = BUF_PT (buf) + n;
if (NILP (killp))
return Qnil;
}
-DEFUN ("delete-backward-char", Fdelete_backward_char, 1, 2, "*p\nP", /*
+DEFUN ("delete-backward-char", Fdelete_backward_char, 0, 2, "*p\nP", /*
Delete the previous COUNT characters (following, with negative COUNT).
Optional second arg KILLP non-nil means kill instead (save in kill ring).
Interactively, COUNT is the prefix arg, and KILLP is set if
(count, killp))
{
/* This function can GC */
- CHECK_INT (count);
- return Fdelete_char (make_int (- XINT (count)), killp);
+ EMACS_INT n;
+
+ if (NILP (count))
+ n = 1;
+ else
+ {
+ CHECK_INT (count);
+ n = XINT (count);
+ }
+
+ return Fdelete_char (make_int (- n), killp);
}
static void internal_self_insert (Emchar ch, int noautofill);
/* This function can GC */
Emchar ch;
Lisp_Object c;
- int n;
+ EMACS_INT n;
CHECK_NATNUM (count);
n = XINT (count);
int tab_width;
overwrite = buf->overwrite_mode;
+#ifdef UTF2000
+ syntax_table = XCHAR_TABLE (buf->syntax_table);
+#else
syntax_table = XCHAR_TABLE (buf->mirror_syntax_table);
+#endif
#if 0
/* No, this is very bad, it makes undo *always* undo a character at a time
Such characters have value t in this table.
*/);
Vauto_fill_chars = Fmake_char_table (Qgeneric);
+#ifdef UTF2000
+ put_char_id_table_0 (XCHAR_TABLE (Vauto_fill_chars), ' ', Qt);
+ put_char_id_table_0 (XCHAR_TABLE (Vauto_fill_chars), '\n', Qt);
+#else
XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt;
XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt;
+#endif
}