maint.mk: use more readable (yet functionally equivalent) quoting
authorJim Meyering <meyering@redhat.com>
Sat, 28 Jan 2012 09:16:25 +0000 (10:16 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 28 Jan 2012 09:16:25 +0000 (10:16 +0100)
It is common to quote a single quote in a single quoted string like
this:  '...'\''...'.  Unless you know the idiom, that looks like
gibberish, so prefer to double-quote the string when possible.
Then you can use a more readable, lone single quote: "...'..."
* top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
"don't" is more readable than the equivalent 'don'\''t'.
(sc_cast_of_x_alloc_return_value): Likewise.
(sc_cast_of_alloca_return_value): Likewise.
(sc_makefile_path_separator_check): Similar: use ":" in '...',
rather than '\'':'\''.

ChangeLog
top/maint.mk

index b5fd92e..d37f933 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-01-28  Jim Meyering  <meyering@redhat.com>
+
+       maint.mk: use more readable (yet functionally equivalent) quoting
+       It is common to quote a single quote in a single quoted string like
+       this:  '...'\''...'.  Unless you know the idiom, that looks like
+       gibberish, so prefer to double-quote the string when possible.
+       Then you can use a more readable, lone single quote: "...'..."
+       * top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
+       "don't" is more readable than the equivalent 'don'\''t'.
+       (sc_cast_of_x_alloc_return_value): Likewise.
+       (sc_cast_of_alloca_return_value): Likewise.
+       (sc_makefile_path_separator_check): Similar: use ":" in '...',
+       rather than '\'':'\''.
+
 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
 
        stdalign: relax _Alignof and tighten _Alignas test
index 2668655..5a23185 100644 (file)
@@ -276,17 +276,17 @@ sc_avoid_if_before_free:
            exit 1; } || :
 
 sc_cast_of_argument_to_free:
-       @prohibit='\<free *\( *\(' halt='don'\''t cast free argument'   \
+       @prohibit='\<free *\( *\(' halt="don't cast free argument"      \
          $(_sc_search_regexp)
 
 sc_cast_of_x_alloc_return_value:
        @prohibit='\*\) *x(m|c|re)alloc\>'                              \
-       halt='don'\''t cast x*alloc return value'                       \
+       halt="don't cast x*alloc return value"                          \
          $(_sc_search_regexp)
 
 sc_cast_of_alloca_return_value:
        @prohibit='\*\) *alloca\>'                                      \
-       halt='don'\''t cast alloca return value'                        \
+       halt="don't cast alloca return value"                           \
          $(_sc_search_regexp)
 
 sc_space_tab:
@@ -1079,7 +1079,7 @@ sc_po_check:
 # Sometimes it is useful to change the PATH environment variable
 # in Makefiles.  When doing so, it's better not to use the Unix-centric
 # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
+msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
        @prohibit='PATH[=].*:'                                          \
        in_vc_files='akefile|\.mk$$'                                    \