From 700c5c939927d9e730778fd13320089b2ac9f278 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 17 Apr 2017 12:01:03 +0200
Subject: [PATCH] tweaks: rename a parameter, to be more imperative

---
 src/move.c  | 29 +++++++++++++----------------
 src/proto.h |  8 ++++----
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/src/move.c b/src/move.c
index 48debe73..0608892f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -133,10 +133,9 @@ void do_page_down(void)
 }
 
 #ifndef DISABLE_JUSTIFY
-/* Move up to the beginning of the last beginning-of-paragraph line
- * before the current line.  If allow_update is TRUE, update the screen
- * afterwards. */
-void do_para_begin(bool allow_update)
+/* Move to the beginning of the last beginning-of-paragraph line before the
+ * current line.  If update_screen is TRUE, update the screen afterwards. */
+void do_para_begin(bool update_screen)
 {
     filestruct *was_current = openfile->current;
 
@@ -148,7 +147,7 @@ void do_para_begin(bool allow_update)
 
     openfile->current_x = 0;
 
-    if (allow_update)
+    if (update_screen)
 	edit_redraw(was_current);
 }
 
@@ -160,11 +159,11 @@ void do_para_begin_void(void)
 
 /* Move down to the beginning of the last line of the current paragraph.
  * Then move down one line farther if there is such a line, or to the
- * end of the current line if not.  If allow_update is TRUE, update the
+ * end of the current line if not.  If update_screen is TRUE, update the
  * screen afterwards.  A line is the last line of a paragraph if it is
  * in a paragraph, and the next line either is the beginning line of a
  * paragraph or isn't in a paragraph. */
-void do_para_end(bool allow_update)
+void do_para_end(bool update_screen)
 {
     filestruct *was_current = openfile->current;
 
@@ -184,7 +183,7 @@ void do_para_end(bool allow_update)
     } else
 	openfile->current_x = strlen(openfile->current->data);
 
-    if (allow_update)
+    if (update_screen)
 	edit_redraw(was_current);
 }
 
@@ -236,9 +235,9 @@ void do_next_block(void)
 }
 
 /* Move to the previous word in the file.  If allow_punct is TRUE, treat
- * punctuation as part of a word.  If allow_update is TRUE, update the
+ * punctuation as part of a word.  If update_screen is TRUE, update the
  * screen afterwards. */
-void do_prev_word(bool allow_punct, bool allow_update)
+void do_prev_word(bool allow_punct, bool update_screen)
 {
     filestruct *was_current = openfile->current;
     bool seen_a_word = FALSE, step_forward = FALSE;
@@ -275,8 +274,7 @@ void do_prev_word(bool allow_punct, bool allow_update)
 	openfile->current_x = move_mbright(openfile->current->data,
 						openfile->current_x);
 
-    /* If allow_update is TRUE, update the screen. */
-    if (allow_update) {
+    if (update_screen) {
 	focusing = FALSE;
 	edit_redraw(was_current);
     }
@@ -290,10 +288,10 @@ void do_prev_word_void(void)
 }
 
 /* Move to the next word in the file.  If allow_punct is TRUE, treat
- * punctuation as part of a word.  If allow_update is TRUE, update the
+ * punctuation as part of a word.  If update_screen is TRUE, update the
  * screen afterwards.  Return TRUE if we started on a word, and FALSE
  * otherwise. */
-bool do_next_word(bool allow_punct, bool allow_update)
+bool do_next_word(bool allow_punct, bool update_screen)
 {
     filestruct *was_current = openfile->current;
     bool started_on_word = is_word_mbchar(openfile->current->data +
@@ -325,8 +323,7 @@ bool do_next_word(bool allow_punct, bool allow_update)
 	    break;
     }
 
-    /* If allow_update is TRUE, update the screen. */
-    if (allow_update) {
+    if (update_screen) {
 	focusing = FALSE;
 	edit_redraw(was_current);
     }
diff --git a/src/proto.h b/src/proto.h
index 3e439884..fa9df316 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -350,16 +350,16 @@ void do_last_line(void);
 void do_page_up(void);
 void do_page_down(void);
 #ifndef DISABLE_JUSTIFY
-void do_para_begin(bool allow_update);
+void do_para_begin(bool update_screen);
 void do_para_begin_void(void);
-void do_para_end(bool allow_update);
+void do_para_end(bool update_screen);
 void do_para_end_void(void);
 #endif
 void do_prev_block(void);
 void do_next_block(void);
-void do_prev_word(bool allow_punct, bool allow_update);
+void do_prev_word(bool allow_punct, bool update_screen);
 void do_prev_word_void(void);
-bool do_next_word(bool allow_punct, bool allow_update);
+bool do_next_word(bool allow_punct, bool update_screen);
 void do_next_word_void(void);
 void do_home(bool be_clever);
 void do_home_void(void);
-- 
GitLab