diff options
| author | Paul Eggert | 2015-11-27 22:08:14 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-11-27 22:09:11 -0800 |
| commit | f32c79dd0ee40b882a12d58d51294356e844c4dd (patch) | |
| tree | c4b1db61885d60ae9c650289f3f9f3d4926797f9 /src/undo.c | |
| parent | 60d8c804cf1ee613324a853de3d183663bb77f83 (diff) | |
| download | emacs-f32c79dd0ee40b882a12d58d51294356e844c4dd.tar.gz emacs-f32c79dd0ee40b882a12d58d51294356e844c4dd.zip | |
Fix minor problems found by static checking
* src/undo.c (prepare_record): Add proper prototype for C.
Diffstat (limited to 'src/undo.c')
| -rw-r--r-- | src/undo.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/undo.c b/src/undo.c index 7659224b6c6..1cc6de48393 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -33,9 +33,9 @@ static Lisp_Object pending_boundary; | |||
| 33 | 33 | ||
| 34 | /* Record point as it was at beginning of this command (if necessary) | 34 | /* Record point as it was at beginning of this command (if necessary) |
| 35 | and prepare the undo info for recording a change. | 35 | and prepare the undo info for recording a change. |
| 36 | /* Prepare the undo info for recording a change. */ | 36 | Prepare the undo info for recording a change. */ |
| 37 | static void | 37 | static void |
| 38 | prepare_record () | 38 | prepare_record (void) |
| 39 | { | 39 | { |
| 40 | /* Allocate a cons cell to be the undo boundary after this command. */ | 40 | /* Allocate a cons cell to be the undo boundary after this command. */ |
| 41 | if (NILP (pending_boundary)) | 41 | if (NILP (pending_boundary)) |
| @@ -60,15 +60,14 @@ record_point (ptrdiff_t pt) | |||
| 60 | at_boundary = ! CONSP (BVAR (current_buffer, undo_list)) | 60 | at_boundary = ! CONSP (BVAR (current_buffer, undo_list)) |
| 61 | || NILP (XCAR (BVAR (current_buffer, undo_list))); | 61 | || NILP (XCAR (BVAR (current_buffer, undo_list))); |
| 62 | 62 | ||
| 63 | prepare_record(); | 63 | prepare_record (); |
| 64 | 64 | ||
| 65 | /* If we are just after an undo boundary, and | 65 | /* If we are just after an undo boundary, and |
| 66 | point wasn't at start of deleted range, record where it was. */ | 66 | point wasn't at start of deleted range, record where it was. */ |
| 67 | if (at_boundary){ | 67 | if (at_boundary) |
| 68 | bset_undo_list (current_buffer, | 68 | bset_undo_list (current_buffer, |
| 69 | Fcons (make_number (pt), | 69 | Fcons (make_number (pt), |
| 70 | BVAR (current_buffer, undo_list))); | 70 | BVAR (current_buffer, undo_list))); |
| 71 | } | ||
| 72 | } | 71 | } |
| 73 | 72 | ||
| 74 | /* Record an insertion that just happened or is about to happen, | 73 | /* Record an insertion that just happened or is about to happen, |
| @@ -164,11 +163,9 @@ record_delete (ptrdiff_t beg, Lisp_Object string, bool record_markers) | |||
| 164 | if (EQ (BVAR (current_buffer, undo_list), Qt)) | 163 | if (EQ (BVAR (current_buffer, undo_list), Qt)) |
| 165 | return; | 164 | return; |
| 166 | 165 | ||
| 167 | if (point_before_last_command_or_undo != beg && | 166 | if (point_before_last_command_or_undo != beg |
| 168 | buffer_before_last_command_or_undo == current_buffer) | 167 | && buffer_before_last_command_or_undo == current_buffer) |
| 169 | { | 168 | record_point (point_before_last_command_or_undo); |
| 170 | record_point (point_before_last_command_or_undo); | ||
| 171 | } | ||
| 172 | 169 | ||
| 173 | if (PT == beg + SCHARS (string)) | 170 | if (PT == beg + SCHARS (string)) |
| 174 | { | 171 | { |