aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorJoakim Verona2011-02-05 11:23:09 +0100
committerJoakim Verona2011-02-05 11:23:09 +0100
commit4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch)
tree894801e7308ce4ecc34933f959e28f4b9cff9533 /src/cmds.c
parent13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff)
parent9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff)
downloademacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.tar.gz
emacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.zip
merge from upstream. currently seems to have bitroted and i get segfaults
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/cmds.c b/src/cmds.c
index e12d7c370d9..ce05b19e1c2 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,7 +1,6 @@
1/* Simple built-in editing commands. 1/* Simple built-in editing commands.
2 Copyright (C) 1985, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2
3 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 3Copyright (C) 1985, 1993-1998, 2001-2011 Free Software Foundation, Inc.
4 Free Software Foundation, Inc.
5 4
6This file is part of GNU Emacs. 5This file is part of GNU Emacs.
7 6
@@ -230,7 +229,7 @@ Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
230Interactively, N is the prefix arg, and KILLFLAG is set if 229Interactively, N is the prefix arg, and KILLFLAG is set if
231N was explicitly specified. 230N was explicitly specified.
232 231
233The command `delete-forward' is preferable for interactive use. */) 232The command `delete-forward-char' is preferable for interactive use. */)
234 (Lisp_Object n, Lisp_Object killflag) 233 (Lisp_Object n, Lisp_Object killflag)
235{ 234{
236 EMACS_INT pos; 235 EMACS_INT pos;
@@ -276,7 +275,7 @@ After insertion, the value of `auto-fill-function' is called if the
276 (Lisp_Object n) 275 (Lisp_Object n)
277{ 276{
278 int remove_boundary = 1; 277 int remove_boundary = 1;
279 CHECK_NUMBER (n); 278 CHECK_NATNUM (n);
280 279
281 if (!EQ (Vthis_command, current_kboard->Vlast_command)) 280 if (!EQ (Vthis_command, current_kboard->Vlast_command))
282 nonundocount = 0; 281 nonundocount = 0;
@@ -320,7 +319,7 @@ After insertion, the value of `auto-fill-function' is called if the
320 A value of 2 means this did things that call for an undo boundary. */ 319 A value of 2 means this did things that call for an undo boundary. */
321 320
322static Lisp_Object Qexpand_abbrev; 321static Lisp_Object Qexpand_abbrev;
323static Lisp_Object Qpost_self_insert_hook, Vpost_self_insert_hook; 322static Lisp_Object Qpost_self_insert_hook;
324 323
325static int 324static int
326internal_self_insert (int c, EMACS_INT n) 325internal_self_insert (int c, EMACS_INT n)
@@ -453,7 +452,7 @@ internal_self_insert (int c, EMACS_INT n)
453 && SINGLE_BYTE_CHAR_P (c)) 452 && SINGLE_BYTE_CHAR_P (c))
454 ? UNIBYTE_TO_CHAR (c) : c); 453 ? UNIBYTE_TO_CHAR (c) : c);
455 Lisp_Object string = Fmake_string (make_number (n), make_number (mc)); 454 Lisp_Object string = Fmake_string (make_number (n), make_number (mc));
456 455
457 if (spaces_to_insert) 456 if (spaces_to_insert)
458 { 457 {
459 tem = Fmake_string (make_number (spaces_to_insert), 458 tem = Fmake_string (make_number (spaces_to_insert),
@@ -474,7 +473,7 @@ internal_self_insert (int c, EMACS_INT n)
474 insert_and_inherit (strn, p - strn); 473 insert_and_inherit (strn, p - strn);
475 SAFE_FREE (); 474 SAFE_FREE ();
476 } 475 }
477 else 476 else if (n > 0)
478 insert_and_inherit (str, len); 477 insert_and_inherit (str, len);
479 478
480 if ((CHAR_TABLE_P (Vauto_fill_chars) 479 if ((CHAR_TABLE_P (Vauto_fill_chars)
@@ -523,7 +522,7 @@ syms_of_cmds (void)
523 Qpost_self_insert_hook = intern_c_string ("post-self-insert-hook"); 522 Qpost_self_insert_hook = intern_c_string ("post-self-insert-hook");
524 staticpro (&Qpost_self_insert_hook); 523 staticpro (&Qpost_self_insert_hook);
525 524
526 DEFVAR_LISP ("post-self-insert-hook", &Vpost_self_insert_hook, 525 DEFVAR_LISP ("post-self-insert-hook", Vpost_self_insert_hook,
527 doc: /* Hook run at the end of `self-insert-command'. 526 doc: /* Hook run at the end of `self-insert-command'.
528This is run after inserting the character. */); 527This is run after inserting the character. */);
529 Vpost_self_insert_hook = Qnil; 528 Vpost_self_insert_hook = Qnil;
@@ -561,5 +560,3 @@ keys_of_cmds (void)
561 initial_define_key (global_map, Ctl ('F'), "forward-char"); 560 initial_define_key (global_map, Ctl ('F'), "forward-char");
562} 561}
563 562
564/* arch-tag: 022ba3cd-67f9-4978-9c5d-7d2b18d8644e
565 (do not change this comment) */