[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 f32c79d: Fix minor problems found by static check
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-25 f32c79d: Fix minor problems found by static checking |
Date: |
Sat, 28 Nov 2015 06:09:33 +0000 |
branch: emacs-25
commit f32c79dd0ee40b882a12d58d51294356e844c4dd
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix minor problems found by static checking
* src/undo.c (prepare_record): Add proper prototype for C.
---
src/undo.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/undo.c b/src/undo.c
index 7659224..1cc6de4 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -33,9 +33,9 @@ static Lisp_Object pending_boundary;
/* 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))
@@ -60,15 +60,14 @@ record_point (ptrdiff_t pt)
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,
@@ -164,11 +163,9 @@ record_delete (ptrdiff_t beg, Lisp_Object string, bool
record_markers)
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))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 f32c79d: Fix minor problems found by static checking,
Paul Eggert <=