#include "dispextern.h"
#include "frame.h"
-Lisp_Object Qkill_forward_chars, Qkill_backward_chars;
+static Lisp_Object Qkill_forward_chars, Qkill_backward_chars;
/* A possible value for a buffer's overwrite-mode variable. */
-Lisp_Object Qoverwrite_mode_binary;
+static Lisp_Object Qoverwrite_mode_binary;
static int internal_self_insert (int, EMACS_INT);
\f
Before insertion, `expand-abbrev' is executed if the inserted character does
not have word syntax and the previous character in the buffer does.
After insertion, the value of `auto-fill-function' is called if the
-`auto-fill-chars' table has a non-nil value for the inserted character. */)
+`auto-fill-chars' table has a non-nil value for the inserted character.
+At the end, it runs `post-self-insert-hook'. */)
(Lisp_Object n)
{
int remove_boundary = 1;
{
USE_SAFE_ALLOCA;
char *strn, *p;
- SAFE_ALLOCA (strn, char *, n * len);
+ SAFE_NALLOCA (strn, len, n);
for (p = strn; n > 0; n--, p += len)
memcpy (p, str, len);
insert_and_inherit (strn, p - strn);
void
syms_of_cmds (void)
{
- Qkill_backward_chars = intern_c_string ("kill-backward-chars");
- staticpro (&Qkill_backward_chars);
-
- Qkill_forward_chars = intern_c_string ("kill-forward-chars");
- staticpro (&Qkill_forward_chars);
-
- Qoverwrite_mode_binary = intern_c_string ("overwrite-mode-binary");
- staticpro (&Qoverwrite_mode_binary);
-
- Qexpand_abbrev = intern_c_string ("expand-abbrev");
- staticpro (&Qexpand_abbrev);
-
- Qpost_self_insert_hook = intern_c_string ("post-self-insert-hook");
- staticpro (&Qpost_self_insert_hook);
+ DEFSYM (Qkill_backward_chars, "kill-backward-chars");
+ DEFSYM (Qkill_forward_chars, "kill-forward-chars");
+ DEFSYM (Qoverwrite_mode_binary, "overwrite-mode-binary");
+ DEFSYM (Qexpand_abbrev, "expand-abbrev");
+ DEFSYM (Qpost_self_insert_hook, "post-self-insert-hook");
DEFVAR_LISP ("post-self-insert-hook", Vpost_self_insert_hook,
doc: /* Hook run at the end of `self-insert-command'.