emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 375e874: Omit "V" at the start of DEFVAR_BOOL vars


From: Paul Eggert
Subject: master 375e874: Omit "V" at the start of DEFVAR_BOOL vars
Date: Tue, 25 Aug 2020 17:28:32 -0400 (EDT)

branch: master
commit 375e87409a3a016615db6a1bc67ac143d39254d9
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Omit "V" at the start of DEFVAR_BOOL vars
    
    Problem noted by Stefan Monnier in:
    https://lists.gnu.org/r/emacs-devel/2020-08/msg00846.html
    * src/font.c (xft_ignore_color_fonts):
    * src/syntax.c (comment_end_can_be_escaped):
    * src/xdisp.c (word_wrap_by_category, display_fill_column_indicator):
    Rename these DEFVAR_BOOL variables to avoid the initial "V"
    that wrongly suggests that they are Lisp_Object variables.
    All uses changed.
---
 src/font.c   |  4 ++--
 src/ftfont.c |  4 ++--
 src/syntax.c | 10 +++++-----
 src/window.c |  6 +++---
 src/xdisp.c  | 16 ++++++++--------
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/font.c b/src/font.c
index 5c01c7f..2786a77 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5521,11 +5521,11 @@ footprint in sessions that use lots of different fonts. 
 */);
 #endif
 
   DEFVAR_BOOL ("xft-ignore-color-fonts",
-              Vxft_ignore_color_fonts,
+              xft_ignore_color_fonts,
               doc: /*
 Non-nil means don't query fontconfig for color fonts, since they often
 cause Xft crashes.  Only has an effect in Xft builds.  */);
-  Vxft_ignore_color_fonts = 1;
+  xft_ignore_color_fonts = true;
 
 #ifdef HAVE_WINDOW_SYSTEM
 #ifdef HAVE_FREETYPE
diff --git a/src/ftfont.c b/src/ftfont.c
index a904007..6fca9c8 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -768,7 +768,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, 
struct OpenTypeSpec **ots
 #if defined HAVE_XFT && defined FC_COLOR
   /* We really don't like color fonts, they cause Xft crashes.  See
      Bug#30874.  */
-  if (Vxft_ignore_color_fonts
+  if (xft_ignore_color_fonts
       && ! FcPatternAddBool (pattern, FC_COLOR, FcFalse))
     goto err;
 #endif
@@ -911,7 +911,7 @@ ftfont_list (struct frame *f, Lisp_Object spec)
            returns them even when it shouldn't really do so, so we
            need to manually skip them here (Bug#37786).  */
         FcBool b;
-        if (Vxft_ignore_color_fonts
+        if (xft_ignore_color_fonts
             && FcPatternGetBool (fontset->fonts[i], FC_COLOR, 0, &b)
             == FcResultMatch && b != FcFalse)
             continue;
diff --git a/src/syntax.c b/src/syntax.c
index 9f77ea5..7f0fc34 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -807,7 +807,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, 
ptrdiff_t stop,
 
       /* Ignore escaped characters, except comment-enders which cannot
          be escaped.  */
-      if ((Vcomment_end_can_be_escaped || code != Sendcomment)
+      if ((comment_end_can_be_escaped || code != Sendcomment)
           && char_quoted (from, from_byte))
        continue;
 
@@ -2336,7 +2336,7 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, 
ptrdiff_t stop,
          && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style
          && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ?
              (nesting > 0 && --nesting == 0) : nesting < 0)
-          && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte)))
+          && !(comment_end_can_be_escaped && char_quoted (from, from_byte)))
        /* We have encountered a comment end of the same style
           as the comment sequence which began this comment
           section.  */
@@ -2569,7 +2569,7 @@ between them, return t; otherwise return nil.  */)
            }
          else if (code == Sendcomment)
            {
-              found = (!quoted || !Vcomment_end_can_be_escaped)
+              found = (!quoted || !comment_end_can_be_escaped)
                 && back_comment (from, from_byte, stop, comnested, comstyle,
                                  &out_charpos, &out_bytepos);
              if (!found)
@@ -3760,9 +3760,9 @@ character of that word.
 In both cases, LIMIT bounds the search. */);
   Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil);
 
-  DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped,
+  DEFVAR_BOOL ("comment-end-can-be-escaped", comment_end_can_be_escaped,
                doc: /* Non-nil means an escaped ender inside a comment doesn't 
end the comment.  */);
-  Vcomment_end_can_be_escaped = 0;
+  comment_end_can_be_escaped = false;
   DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped");
   Fmake_variable_buffer_local (Qcomment_end_can_be_escaped);
 
diff --git a/src/window.c b/src/window.c
index ef58f43..e743396 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5462,7 +5462,7 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool 
whole, bool noerror)
 
   wset_redisplay (XWINDOW (window));
 
-  if (whole && Vfast_but_imprecise_scrolling)
+  if (whole && fast_but_imprecise_scrolling)
     specbind (Qfontification_functions, Qnil);
 
   /* On GUI frames, use the pixel-based version which is much slower
@@ -8398,7 +8398,7 @@ pixelwise even if this option is nil.  */);
   window_resize_pixelwise = false;
 
   DEFVAR_BOOL ("fast-but-imprecise-scrolling",
-               Vfast_but_imprecise_scrolling,
+               fast_but_imprecise_scrolling,
                doc: /* When non-nil, accelerate scrolling operations.
 This comes into play when scrolling rapidly over previously
 unfontified buffer regions.  Only those portions of the buffer which
@@ -8406,7 +8406,7 @@ are actually going to be displayed get fontified.
 
 Note that this optimization can cause the portion of the buffer
 displayed after a scrolling operation to be somewhat inaccurate.  */);
-  Vfast_but_imprecise_scrolling = false;
+  fast_but_imprecise_scrolling = false;
 
   defsubr (&Sselected_window);
   defsubr (&Sold_selected_window);
diff --git a/src/xdisp.c b/src/xdisp.c
index ed1d248..dd73758 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -538,7 +538,7 @@ it_char_has_category(struct it *it, int cat)
 static bool
 char_can_wrap_before (struct it *it)
 {
-  if (!Vword_wrap_by_category)
+  if (!word_wrap_by_category)
     return !IT_DISPLAYING_WHITESPACE (it);
 
   /* For CJK (LTR) text in RTL paragraph, EOL and BOL are flipped.
@@ -560,7 +560,7 @@ char_can_wrap_before (struct it *it)
 static bool
 char_can_wrap_after (struct it *it)
 {
-  if (!Vword_wrap_by_category)
+  if (!word_wrap_by_category)
     return IT_DISPLAYING_WHITESPACE (it);
 
   /* For CJK (LTR) text in RTL paragraph, EOL and BOL are flipped.
@@ -589,7 +589,7 @@ char_can_wrap_after (struct it *it)
 static int
 fill_column_indicator_column (struct it *it, int char_width)
 {
-  if (Vdisplay_fill_column_indicator
+  if (display_fill_column_indicator
       && !it->w->pseudo_window_p
       && it->continuation_lines_width == 0
       && CHARACTERP (Vdisplay_fill_column_indicator_character))
@@ -21929,7 +21929,7 @@ extend_face_to_end_of_line (struct it *it)
       && !face->stipple
 #endif
       && !it->glyph_row->reversed_p
-      && !Vdisplay_fill_column_indicator)
+      && !display_fill_column_indicator)
     return;
 
   /* Set the glyph row flag indicating that the face of the last glyph
@@ -34772,7 +34772,7 @@ A value of nil means to respect the value of 
`truncate-lines'.
 If `word-wrap' is enabled, you might want to reduce this.  */);
   Vtruncate_partial_width_windows = make_fixnum (50);
 
-  DEFVAR_BOOL("word-wrap-by-category", Vword_wrap_by_category, doc: /*
+  DEFVAR_BOOL("word-wrap-by-category", word_wrap_by_category, doc: /*
     Non-nil means also wrap after characters of a certain category.
 Normally when `word-wrap' is on, Emacs only breaks lines after
 whitespace characters.  When this option is turned on, Emacs also
@@ -34787,7 +34787,7 @@ when breaking lines.  That means characters with the 
">" category
 don't appear at the beginning of a line (e.g., FULLWIDTH COMMA), and
 characters with the "<" category don't appear at the end of a line
 (e.g., LEFT DOUBLE ANGLE BRACKET).  */);
-  Vword_wrap_by_category = false;
+  word_wrap_by_category = false;
 
   DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit,
     doc: /* Maximum buffer size for which line number should be displayed.
@@ -35184,10 +35184,10 @@ It has no effect when set to 0, or when line numbers 
are not absolute.  */);
   DEFSYM (Qdisplay_line_numbers_offset, "display-line-numbers-offset");
   Fmake_variable_buffer_local (Qdisplay_line_numbers_offset);
 
-  DEFVAR_BOOL ("display-fill-column-indicator", Vdisplay_fill_column_indicator,
+  DEFVAR_BOOL ("display-fill-column-indicator", display_fill_column_indicator,
     doc: /* Non-nil means display the fill column indicator.
 See Info node `Displaying Boundaries' for details.  */);
-  Vdisplay_fill_column_indicator = false;
+  display_fill_column_indicator = false;
   DEFSYM (Qdisplay_fill_column_indicator, "display-fill-column-indicator");
   Fmake_variable_buffer_local (Qdisplay_fill_column_indicator);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]