]> code.delx.au - gnu-emacs/blobdiff - src/cmds.c
Protoize
[gnu-emacs] / src / cmds.c
index 5e6884c0807e3e64c73d6dee511c4969eed37629..f49cfc221be995d291a6316b2fd7fab7487b5782 100644 (file)
@@ -31,10 +31,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #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
@@ -352,7 +352,7 @@ internal_self_insert (int c, EMACS_INT n)
     {
       str[0] = (SINGLE_BYTE_CHAR_P (c)
                ? c
-               : multibyte_char_to_unibyte (c, Qnil));
+               : multibyte_char_to_unibyte (c));
       len = 1;
     }
   if (!NILP (overwrite)
@@ -485,23 +485,23 @@ internal_self_insert (int c, EMACS_INT n)
        : (c == ' ' || c == '\n'))
       && !NILP (BVAR (current_buffer, auto_fill_function)))
     {
-      Lisp_Object tem;
+      Lisp_Object auto_fill_result;
 
       if (c == '\n')
        /* After inserting a newline, move to previous line and fill
           that.  Must have the newline in place already so filling and
           justification, if any, know where the end is going to be.  */
        SET_PT_BOTH (PT - 1, PT_BYTE - 1);
-      tem = call0 (BVAR (current_buffer, auto_fill_function));
+      auto_fill_result = call0 (BVAR (current_buffer, auto_fill_function));
       /* Test PT < ZV in case the auto-fill-function is strange.  */
       if (c == '\n' && PT < ZV)
        SET_PT_BOTH (PT + 1, PT_BYTE + 1);
-      if (!NILP (tem))
+      if (!NILP (auto_fill_result))
        hairy = 2;
     }
 
   /* Run hooks for electric keys.  */
-  call1 (Vrun_hooks, Qpost_self_insert_hook);
+  Frun_hooks (1, &Qpost_self_insert_hook);
 
   return hairy;
 }
@@ -511,20 +511,11 @@ internal_self_insert (int c, EMACS_INT n)
 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'.