Mercurial > hg > xemacs-beta
comparison src/cmds.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 2f8bb876ab1d |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
39 /* Non-nil means put this face on the next self-inserting character. */ | 39 /* Non-nil means put this face on the next self-inserting character. */ |
40 Lisp_Object Vself_insert_face; | 40 Lisp_Object Vself_insert_face; |
41 | 41 |
42 /* This is the command that set up Vself_insert_face. */ | 42 /* This is the command that set up Vself_insert_face. */ |
43 Lisp_Object Vself_insert_face_command; | 43 Lisp_Object Vself_insert_face_command; |
44 | |
45 /* A char-table for characters which may invoke auto-filling. */ | |
46 Lisp_Object Vauto_fill_chars; | |
47 | 44 |
48 DEFUN ("forward-char", Fforward_char, 0, 2, "_p", /* | 45 DEFUN ("forward-char", Fforward_char, 0, 2, "_p", /* |
49 Move point right N characters (left if N negative). | 46 Move point right N characters (left if N negative). |
50 On attempt to pass end of buffer, stop and signal `end-of-buffer'. | 47 On attempt to pass end of buffer, stop and signal `end-of-buffer'. |
51 On attempt to pass beginning of buffer, stop and signal `beginning-of-buffer'. | 48 On attempt to pass beginning of buffer, stop and signal `beginning-of-buffer'. |
328 /* This function can GC */ | 325 /* This function can GC */ |
329 /* int hairy = 0; -- unused */ | 326 /* int hairy = 0; -- unused */ |
330 REGISTER enum syntaxcode synt; | 327 REGISTER enum syntaxcode synt; |
331 REGISTER Emchar c2; | 328 REGISTER Emchar c2; |
332 Lisp_Object overwrite; | 329 Lisp_Object overwrite; |
333 Lisp_Char_Table *syntax_table; | 330 struct Lisp_Char_Table *syntax_table; |
334 struct buffer *buf = current_buffer; | 331 struct buffer *buf = current_buffer; |
335 int tab_width; | 332 int tab_width; |
336 | 333 |
337 overwrite = buf->overwrite_mode; | 334 overwrite = buf->overwrite_mode; |
338 syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); | 335 syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); |
397 return; | 394 return; |
398 } | 395 } |
399 #endif /* FSFmacs */ | 396 #endif /* FSFmacs */ |
400 } | 397 } |
401 } | 398 } |
402 if ((CHAR_TABLEP (Vauto_fill_chars) | 399 if ((c1 == ' ' || c1 == '\n') |
403 ? !NILP (XCHAR_TABLE_VALUE_UNSAFE (Vauto_fill_chars, c1)) | |
404 : (c1 == ' ' || c1 == '\n')) | |
405 && !noautofill | 400 && !noautofill |
406 && !NILP (buf->auto_fill_function)) | 401 && !NILP (buf->auto_fill_function)) |
407 { | 402 { |
408 buffer_insert_emacs_char (buf, c1); | 403 buffer_insert_emacs_char (buf, c1); |
409 if (c1 == '\n') | 404 if (c1 == '\n') |
501 DEFVAR_LISP ("blink-paren-function", &Vblink_paren_function /* | 496 DEFVAR_LISP ("blink-paren-function", &Vblink_paren_function /* |
502 Function called, if non-nil, whenever a close parenthesis is inserted. | 497 Function called, if non-nil, whenever a close parenthesis is inserted. |
503 More precisely, a char with closeparen syntax is self-inserted. | 498 More precisely, a char with closeparen syntax is self-inserted. |
504 */ ); | 499 */ ); |
505 Vblink_paren_function = Qnil; | 500 Vblink_paren_function = Qnil; |
506 | 501 } |
507 DEFVAR_LISP ("auto-fill-chars", &Vauto_fill_chars /* | |
508 A char-table for characters which invoke auto-filling. | |
509 Such characters has value t in this table. | |
510 */); | |
511 Vauto_fill_chars = Fmake_char_table (Qgeneric); | |
512 XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt; | |
513 XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt; | |
514 } |