emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 4b1b8dd: Omit substitute-command-keys code no longe


From: Paul Eggert
Subject: [Emacs-diffs] master 4b1b8dd: Omit substitute-command-keys code no longer needed
Date: Tue, 16 Aug 2016 20:17:15 +0000 (UTC)

branch: master
commit 4b1b8dd80a287ec5e726e0672d94d5399c09b94c
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Omit substitute-command-keys code no longer needed
    
    * src/doc.c (Fsubstitute_command_keys):
    Remove duplicate initializations.
---
 src/doc.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/doc.c b/src/doc.c
index 37a731b..4b91831 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -743,10 +743,12 @@ Otherwise, return a new string.  */)
   if (NILP (string))
     return Qnil;
 
+  /* If STRING contains non-ASCII unibyte data, process its
+     properly-encoded multibyte equivalent instead.  This simplifies
+     the implementation and is OK since substitute-command-keys is
+     intended for use only on text strings.  Keep STRING around, since
+     it will be returned if no changes occur.  */
   Lisp_Object str = Fstring_make_multibyte (string);
-  tem = Qnil;
-  keymap = Qnil;
-  name = Qnil;
 
   enum text_quoting_style quoting_style = text_quoting_style ();
 
@@ -905,6 +907,8 @@ Otherwise, return a new string.  */)
         }
 
        subst_string:
+         /* Convert non-ASCII unibyte data to properly-encoded multibyte,
+            for the same reason STRING was converted to STR.  */
          tem = Fstring_make_multibyte (tem);
          start = SDATA (tem);
          length = SCHARS (tem);



reply via email to

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