]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some minor quoting issues with grave accent
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Aug 2015 23:21:05 +0000 (16:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 9 Aug 2015 23:23:06 +0000 (16:23 -0700)
* src/dispnew.c (add_window_display_history) [GLYPH_DEBUG]:
Remove redundant quotes.
* src/doc.c (uLSQM, uRSQM): New macros.
* src/doc.c (Fsubstitute_command_keys):
* src/syntax.c (Finternal_describe_syntax_value): Follow the user
preference for quotes rather than hardcoding the ‘grave’ style.
* src/regex.c (PUSH_FAILURE_POINT, POP_FAILURE_POINT)
(re_match_2_internal) [DEBUG]: In debugging output, quote C
strings with "...", not `...'.

src/dispnew.c
src/doc.c
src/regex.c
src/syntax.c

index 7833fe3d01c96d4e9265596f98ea5a3fc2151dc2..18afe50dd9b70e18e2844bf4096942f0e3df560f 100644 (file)
@@ -177,7 +177,7 @@ add_window_display_history (struct window *w, const char *msg, bool paused_p)
   ++history_idx;
 
   snprintf (buf, sizeof redisplay_history[0].trace,
-           "%"pMu": window %p (`%s')%s\n%s",
+           "%"pMu": window %p (%s)%s\n%s",
            history_tick++,
            ptr,
            ((BUFFERP (w->contents)
index 36619e1142e700f717bbd386b667941be25f0bf6..a079cd27493530f890e65e8282b19fa88e5ca734 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -695,6 +695,8 @@ enum
   };
 static unsigned char const LSQM[] = { uLSQM0, uLSQM1, uLSQM2 };
 static unsigned char const RSQM[] = { uRSQM0, uRSQM1, uRSQM2 };
+#define uLSQM "\xE2\x80\x98"
+#define uRSQM "\xE2\x80\x99"
 
 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
        Ssubstitute_command_keys, 1, 1, 0,
@@ -921,11 +923,14 @@ Otherwise, return a new string.  */)
          if (NILP (tem))
            {
              name = Fsymbol_name (name);
-             insert_string ("\nUses keymap `");
+             insert1 (Fsubstitute_command_keys
+                      (build_string ("\nUses keymap "uLSQM)));
              insert_from_string (name, 0, 0,
                                  SCHARS (name),
                                  SBYTES (name), 1);
-             insert_string ("', which is not currently defined.\n");
+             insert1 (Fsubstitute_command_keys
+                      (build_string
+                       (uRSQM", which is not currently defined.\n")));
              if (start[-1] == '<') keymap = Qnil;
            }
          else if (start[-1] == '<')
index 38c5e350541942daefde69e5c54d1a89ef7a141a..dcf286454b30cce0fe1ad1859f19711cbde92ed3 100644 (file)
@@ -1544,9 +1544,9 @@ do {                                                                      \
   DEBUG_PRINT ("  Push frame index: %zd\n", fail_stack.frame);         \
   PUSH_FAILURE_INT (fail_stack.frame);                                 \
                                                                        \
-  DEBUG_PRINT ("  Push string %p: `", string_place);                   \
+  DEBUG_PRINT ("  Push string %p: \"", string_place);                  \
   DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, size2);\
-  DEBUG_PRINT ("'\n");                                                 \
+  DEBUG_PRINT ("\"\n");                                                        \
   PUSH_FAILURE_POINTER (string_place);                                 \
                                                                        \
   DEBUG_PRINT ("  Push pattern %p: ", pattern);                                \
@@ -1598,9 +1598,9 @@ do {                                                                      \
      on_failure_keep_string_jump opcode, and we want to throw away the \
      saved NULL, thus retaining our current position in the string.  */        \
   str = POP_FAILURE_POINTER ();                                                \
-  DEBUG_PRINT ("  Popping string %p: `", str);                         \
+  DEBUG_PRINT ("  Popping string %p: \"", str);                                \
   DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2);     \
-  DEBUG_PRINT ("'\n");                                                 \
+  DEBUG_PRINT ("\"\n");                                                        \
                                                                        \
   fail_stack.frame = POP_FAILURE_INT ();                               \
   DEBUG_PRINT ("  Popping  frame index: %zd\n", fail_stack.frame);     \
@@ -5127,9 +5127,9 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
 
   DEBUG_PRINT ("The compiled pattern is: ");
   DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
-  DEBUG_PRINT ("The string to match is: `");
+  DEBUG_PRINT ("The string to match is: \"");
   DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
-  DEBUG_PRINT ("'\n");
+  DEBUG_PRINT ("\"\n");
 
   /* This loops over pattern commands.  It exits by returning from the
      function if the match is complete, or it drops through if the match
@@ -5435,7 +5435,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
                    && buf_ch == '\000'))
              goto fail;
 
-           DEBUG_PRINT ("  Matched `%d'.\n", *d);
+           DEBUG_PRINT ("  Matched \"%d\".\n", *d);
            d += buf_charlen;
          }
          break;
index 0d8b08c01b6d688b8fb25c5cce141376c07c4974..d45936b2b28d267594eaedce34565f18c1c35826 100644 (file)
@@ -1333,7 +1333,9 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
     insert_string (" (nestable)");
 
   if (prefix)
-    insert_string (",\n\t  is a prefix character for `backward-prefix-chars'");
+    insert1 (Fsubstitute_command_keys
+            (build_string
+             (",\n\t  is a prefix character for `backward-prefix-chars'")));
 
   return syntax;
 }