X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fcmds.c;h=c9020923174d7b5e5de605b2980722f50d1a70b8;hp=547034177642b538515f5f3a026c88da4a448963;hb=2fd9701a4f902054649dde9143a3f77809afee8f;hpb=efab7bccd7d7da13ff3979d2890a417a048ec960 diff --git a/src/cmds.c b/src/cmds.c index 5470341..c902092 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -41,6 +41,9 @@ Lisp_Object Vself_insert_face; /* This is the command that set up Vself_insert_face. */ Lisp_Object Vself_insert_face_command; + +/* A char-table for characters which may invoke auto-filling. */ +Lisp_Object Vauto_fill_chars; DEFUN ("forward-char", Fforward_char, 0, 2, "_p", /* Move point right N characters (left if N negative). @@ -396,7 +399,9 @@ internal_self_insert (Emchar c1, int noautofill) #endif /* FSFmacs */ } } - if ((c1 == ' ' || c1 == '\n') + if ((CHAR_TABLEP (Vauto_fill_chars) + ? !NILP (XCHAR_TABLE_VALUE_UNSAFE (Vauto_fill_chars, c1)) + : (c1 == ' ' || c1 == '\n')) && !noautofill && !NILP (buf->auto_fill_function)) { @@ -498,4 +503,12 @@ Function called, if non-nil, whenever a close parenthesis is inserted. More precisely, a char with closeparen syntax is self-inserted. */ ); Vblink_paren_function = Qnil; + + DEFVAR_LISP ("auto-fill-chars", &Vauto_fill_chars /* +A char-table for characters which invoke auto-filling. +Such characters has value t in this table. +*/); + Vauto_fill_chars = Fmake_char_table (Qgeneric); + XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt; + XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt; }