diff options
| author | Joakim Verona | 2011-02-05 11:23:09 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-02-05 11:23:09 +0100 |
| commit | 4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch) | |
| tree | 894801e7308ce4ecc34933f959e28f4b9cff9533 /src/cmds.c | |
| parent | 13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff) | |
| parent | 9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff) | |
| download | emacs-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.c | 19 |
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 | 3 | Copyright (C) 1985, 1993-1998, 2001-2011 Free Software Foundation, Inc. |
| 4 | Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | This file is part of GNU Emacs. | 5 | This 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). | |||
| 230 | Interactively, N is the prefix arg, and KILLFLAG is set if | 229 | Interactively, N is the prefix arg, and KILLFLAG is set if |
| 231 | N was explicitly specified. | 230 | N was explicitly specified. |
| 232 | 231 | ||
| 233 | The command `delete-forward' is preferable for interactive use. */) | 232 | The 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 | ||
| 322 | static Lisp_Object Qexpand_abbrev; | 321 | static Lisp_Object Qexpand_abbrev; |
| 323 | static Lisp_Object Qpost_self_insert_hook, Vpost_self_insert_hook; | 322 | static Lisp_Object Qpost_self_insert_hook; |
| 324 | 323 | ||
| 325 | static int | 324 | static int |
| 326 | internal_self_insert (int c, EMACS_INT n) | 325 | internal_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'. |
| 528 | This is run after inserting the character. */); | 527 | This 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) */ | ||