aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
authorPaul Eggert2011-10-13 00:03:41 -0700
committerPaul Eggert2011-10-13 00:03:41 -0700
commit7ebd31ee0740d85527a498100d1f14dad5e0350f (patch)
treee2ca3fcb527b8a6cf62846ad764c9f1c22d27855 /src/doc.c
parentd83cf4ccb94a5d4ea15980d76f7b16ee19909200 (diff)
parent2be4956d356f48ae65127679994a6ef6fa208914 (diff)
downloademacs-7ebd31ee0740d85527a498100d1f14dad5e0350f.tar.gz
emacs-7ebd31ee0740d85527a498100d1f14dad5e0350f.zip
Merge from trunk.
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc.c b/src/doc.c
index 9fbeb0b5ed5..b5a57d7d6f2 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -118,14 +118,16 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
118 If it is relative, combine it with Vdoc_directory. */ 118 If it is relative, combine it with Vdoc_directory. */
119 119
120 tem = Ffile_name_absolute_p (file); 120 tem = Ffile_name_absolute_p (file);
121 file = ENCODE_FILE (file);
121 if (NILP (tem)) 122 if (NILP (tem))
122 { 123 {
123 minsize = SCHARS (Vdoc_directory); 124 Lisp_Object docdir = ENCODE_FILE (Vdoc_directory);
125 minsize = SCHARS (docdir);
124 /* sizeof ("../etc/") == 8 */ 126 /* sizeof ("../etc/") == 8 */
125 if (minsize < 8) 127 if (minsize < 8)
126 minsize = 8; 128 minsize = 8;
127 SAFE_ALLOCA (name, char *, minsize + SCHARS (file) + 8); 129 SAFE_ALLOCA (name, char *, minsize + SCHARS (file) + 8);
128 strcpy (name, SSDATA (Vdoc_directory)); 130 strcpy (name, SSDATA (docdir));
129 strcat (name, SSDATA (file)); 131 strcat (name, SSDATA (file));
130 } 132 }
131 else 133 else
@@ -140,7 +142,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
140 if (!NILP (Vpurify_flag)) 142 if (!NILP (Vpurify_flag))
141 { 143 {
142 /* Preparing to dump; DOC file is probably not installed. 144 /* Preparing to dump; DOC file is probably not installed.
143 So check in ../etc. */ 145 So check in ../etc. */
144 strcpy (name, "../etc/"); 146 strcpy (name, "../etc/");
145 strcat (name, SSDATA (file)); 147 strcat (name, SSDATA (file));
146 148