/* undo handling for GNU Emacs.
- Copyright (C) 1990, 1993-1994, 2000-2015 Free Software Foundation,
+ Copyright (C) 1990, 1993-1994, 2000-2016 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
/* Record point as it was at beginning of this command (if necessary)
and prepare the undo info for recording a change.
-/* Prepare the undo info for recording a change. */
+ Prepare the undo info for recording a change. */
static void
-prepare_record ()
+prepare_record (void)
{
/* Allocate a cons cell to be the undo boundary after this command. */
if (NILP (pending_boundary))
at_boundary = ! CONSP (BVAR (current_buffer, undo_list))
|| NILP (XCAR (BVAR (current_buffer, undo_list)));
- prepare_record();
+ prepare_record ();
/* If we are just after an undo boundary, and
point wasn't at start of deleted range, record where it was. */
- if (at_boundary){
+ if (at_boundary)
bset_undo_list (current_buffer,
Fcons (make_number (pt),
BVAR (current_buffer, undo_list)));
- }
}
/* Record an insertion that just happened or is about to happen,
if (EQ (BVAR (current_buffer, undo_list), Qt))
return;
- if (point_before_last_command_or_undo != beg &&
- buffer_before_last_command_or_undo == current_buffer)
- {
- record_point (point_before_last_command_or_undo);
- }
+ if (point_before_last_command_or_undo != beg
+ && buffer_before_last_command_or_undo == current_buffer)
+ record_point (point_before_last_command_or_undo);
if (PT == beg + SCHARS (string))
{