summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-08-16 13:16:49 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-08-16 13:17:11 -0700
commit4b1b8dd80a287ec5e726e0672d94d5399c09b94c (patch)
treefa37900984e980f16d2c2aa7d8be41f6c69e82b4 /src
parentc7119916dc958eeb8e6e2ef50d4a9f262db5be32 (diff)
Omit substitute-command-keys code no longer needed
* src/doc.c (Fsubstitute_command_keys): Remove duplicate initializations.
Diffstat (limited to 'src')
-rw-r--r--src/doc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/doc.c b/src/doc.c
index 37a731bfce..4b91831c70 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);