aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/doc.c b/src/doc.c
index 0a455fed37a..82a2391c424 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -57,6 +57,8 @@ static Lisp_Object Vbuild_files;
57 57
58extern Lisp_Object Voverriding_local_map; 58extern Lisp_Object Voverriding_local_map;
59 59
60extern Lisp_Object Qremap;
61
60/* For VMS versions with limited file name syntax, 62/* For VMS versions with limited file name syntax,
61 convert the name to something VMS will allow. */ 63 convert the name to something VMS will allow. */
62static void 64static void
@@ -812,6 +814,7 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
812 else if (strp[0] == '\\' && strp[1] == '[') 814 else if (strp[0] == '\\' && strp[1] == '[')
813 { 815 {
814 int start_idx; 816 int start_idx;
817 int follow_remap = 1;
815 818
816 changed = 1; 819 changed = 1;
817 strp += 2; /* skip \[ */ 820 strp += 2; /* skip \[ */
@@ -830,11 +833,21 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
830 idx = strp - SDATA (string); 833 idx = strp - SDATA (string);
831 name = Fintern (make_string (start, length_byte), Qnil); 834 name = Fintern (make_string (start, length_byte), Qnil);
832 835
836 do_remap:
833 /* Ignore remappings unless there are no ordinary bindings. */ 837 /* Ignore remappings unless there are no ordinary bindings. */
834 tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qt); 838 tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qt);
835 if (NILP (tem)) 839 if (NILP (tem))
836 tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil); 840 tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil);
837 841
842 if (VECTORP (tem) && XVECTOR (tem)->size > 1
843 && EQ (AREF (tem, 0), Qremap) && SYMBOLP (AREF (tem, 1))
844 && follow_remap)
845 {
846 name = AREF (tem, 1);
847 follow_remap = 0;
848 goto do_remap;
849 }
850
838 /* Note the Fwhere_is_internal can GC, so we have to take 851 /* Note the Fwhere_is_internal can GC, so we have to take
839 relocation of string contents into account. */ 852 relocation of string contents into account. */
840 strp = SDATA (string) + idx; 853 strp = SDATA (string) + idx;