aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorPaul Eggert2011-02-14 21:41:07 -0800
committerPaul Eggert2011-02-14 21:41:07 -0800
commitfae95934b8edae3f538063e756ac799ed94313b2 (patch)
tree3bb814c43cd50db54591bf685e5cb72b863b5833 /src/cmds.c
parent6d302144c218f12bd380344ae2d3ed87a6ea9327 (diff)
parentbb55f713d2e4ea089a861a257d7d000432642ce9 (diff)
downloademacs-fae95934b8edae3f538063e756ac799ed94313b2.tar.gz
emacs-fae95934b8edae3f538063e756ac799ed94313b2.zip
Merge from mainline.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cmds.c b/src/cmds.c
index 93b7e2b7651..e82ada6f03c 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -292,10 +292,10 @@ After insertion, the value of `auto-fill-function' is called if the
292 } 292 }
293 293
294 if (remove_boundary 294 if (remove_boundary
295 && CONSP (current_buffer->undo_list) 295 && CONSP (B_ (current_buffer, undo_list))
296 && NILP (XCAR (current_buffer->undo_list))) 296 && NILP (XCAR (B_ (current_buffer, undo_list))))
297 /* Remove the undo_boundary that was just pushed. */ 297 /* Remove the undo_boundary that was just pushed. */
298 current_buffer->undo_list = XCDR (current_buffer->undo_list); 298 B_ (current_buffer, undo_list) = XCDR (B_ (current_buffer, undo_list));
299 299
300 /* Barf if the key that invoked this was not a character. */ 300 /* Barf if the key that invoked this was not a character. */
301 if (!CHARACTERP (last_command_event)) 301 if (!CHARACTERP (last_command_event))
@@ -335,12 +335,12 @@ internal_self_insert (int c, EMACS_INT n)
335 EMACS_INT chars_to_delete = 0; 335 EMACS_INT chars_to_delete = 0;
336 EMACS_INT spaces_to_insert = 0; 336 EMACS_INT spaces_to_insert = 0;
337 337
338 overwrite = current_buffer->overwrite_mode; 338 overwrite = B_ (current_buffer, overwrite_mode);
339 if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions)) 339 if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions))
340 hairy = 1; 340 hairy = 1;
341 341
342 /* At first, get multi-byte form of C in STR. */ 342 /* At first, get multi-byte form of C in STR. */
343 if (!NILP (current_buffer->enable_multibyte_characters)) 343 if (!NILP (B_ (current_buffer, enable_multibyte_characters)))
344 { 344 {
345 len = CHAR_STRING (c, str); 345 len = CHAR_STRING (c, str);
346 if (len == 1) 346 if (len == 1)
@@ -416,11 +416,11 @@ internal_self_insert (int c, EMACS_INT n)
416 416
417 synt = SYNTAX (c); 417 synt = SYNTAX (c);
418 418
419 if (!NILP (current_buffer->abbrev_mode) 419 if (!NILP (B_ (current_buffer, abbrev_mode))
420 && synt != Sword 420 && synt != Sword
421 && NILP (current_buffer->read_only) 421 && NILP (B_ (current_buffer, read_only))
422 && PT > BEGV 422 && PT > BEGV
423 && (SYNTAX (!NILP (current_buffer->enable_multibyte_characters) 423 && (SYNTAX (!NILP (B_ (current_buffer, enable_multibyte_characters))
424 ? XFASTINT (Fprevious_char ()) 424 ? XFASTINT (Fprevious_char ())
425 : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) 425 : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ())))
426 == Sword)) 426 == Sword))
@@ -448,7 +448,7 @@ internal_self_insert (int c, EMACS_INT n)
448 448
449 if (chars_to_delete) 449 if (chars_to_delete)
450 { 450 {
451 int mc = ((NILP (current_buffer->enable_multibyte_characters) 451 int mc = ((NILP (B_ (current_buffer, enable_multibyte_characters))
452 && SINGLE_BYTE_CHAR_P (c)) 452 && SINGLE_BYTE_CHAR_P (c))
453 ? UNIBYTE_TO_CHAR (c) : c); 453 ? UNIBYTE_TO_CHAR (c) : c);
454 Lisp_Object string = Fmake_string (make_number (n), make_number (mc)); 454 Lisp_Object string = Fmake_string (make_number (n), make_number (mc));
@@ -479,7 +479,7 @@ internal_self_insert (int c, EMACS_INT n)
479 if ((CHAR_TABLE_P (Vauto_fill_chars) 479 if ((CHAR_TABLE_P (Vauto_fill_chars)
480 ? !NILP (CHAR_TABLE_REF (Vauto_fill_chars, c)) 480 ? !NILP (CHAR_TABLE_REF (Vauto_fill_chars, c))
481 : (c == ' ' || c == '\n')) 481 : (c == ' ' || c == '\n'))
482 && !NILP (current_buffer->auto_fill_function)) 482 && !NILP (B_ (current_buffer, auto_fill_function)))
483 { 483 {
484 Lisp_Object tem; 484 Lisp_Object tem;
485 485
@@ -488,7 +488,7 @@ internal_self_insert (int c, EMACS_INT n)
488 that. Must have the newline in place already so filling and 488 that. Must have the newline in place already so filling and
489 justification, if any, know where the end is going to be. */ 489 justification, if any, know where the end is going to be. */
490 SET_PT_BOTH (PT - 1, PT_BYTE - 1); 490 SET_PT_BOTH (PT - 1, PT_BYTE - 1);
491 tem = call0 (current_buffer->auto_fill_function); 491 tem = call0 (B_ (current_buffer, auto_fill_function));
492 /* Test PT < ZV in case the auto-fill-function is strange. */ 492 /* Test PT < ZV in case the auto-fill-function is strange. */
493 if (c == '\n' && PT < ZV) 493 if (c == '\n' && PT < ZV)
494 SET_PT_BOTH (PT + 1, PT_BYTE + 1); 494 SET_PT_BOTH (PT + 1, PT_BYTE + 1);