diff options
| author | Stefan Monnier | 2011-10-12 15:08:04 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-10-12 15:08:04 -0400 |
| commit | 8fe012c4e6070eb23a864b8f8006849b6e41e2b7 (patch) | |
| tree | f7ec0f8cf3876c268c4cf7bd5ce8e9f8217a95c1 /src/doc.c | |
| parent | 28dbc92f2ca5d862a9e517dca1ff11a4396b12f8 (diff) | |
| download | emacs-8fe012c4e6070eb23a864b8f8006849b6e41e2b7.tar.gz emacs-8fe012c4e6070eb23a864b8f8006849b6e41e2b7.zip | |
* doc.c (get_doc_string): Encode file name.
Fixes: debbugs:9735
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -116,14 +116,16 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) | |||
| 116 | If it is relative, combine it with Vdoc_directory. */ | 116 | If it is relative, combine it with Vdoc_directory. */ |
| 117 | 117 | ||
| 118 | tem = Ffile_name_absolute_p (file); | 118 | tem = Ffile_name_absolute_p (file); |
| 119 | file = ENCODE_FILE (file); | ||
| 119 | if (NILP (tem)) | 120 | if (NILP (tem)) |
| 120 | { | 121 | { |
| 121 | minsize = SCHARS (Vdoc_directory); | 122 | Lisp_Object docdir = ENCODE_FILE (Vdoc_directory); |
| 123 | minsize = SCHARS (docdir); | ||
| 122 | /* sizeof ("../etc/") == 8 */ | 124 | /* sizeof ("../etc/") == 8 */ |
| 123 | if (minsize < 8) | 125 | if (minsize < 8) |
| 124 | minsize = 8; | 126 | minsize = 8; |
| 125 | name = (char *) alloca (minsize + SCHARS (file) + 8); | 127 | name = (char *) alloca (minsize + SCHARS (file) + 8); |
| 126 | strcpy (name, SSDATA (Vdoc_directory)); | 128 | strcpy (name, SSDATA (docdir)); |
| 127 | strcat (name, SSDATA (file)); | 129 | strcat (name, SSDATA (file)); |
| 128 | } | 130 | } |
| 129 | else | 131 | else |
| @@ -138,7 +140,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) | |||
| 138 | if (!NILP (Vpurify_flag)) | 140 | if (!NILP (Vpurify_flag)) |
| 139 | { | 141 | { |
| 140 | /* Preparing to dump; DOC file is probably not installed. | 142 | /* Preparing to dump; DOC file is probably not installed. |
| 141 | So check in ../etc. */ | 143 | So check in ../etc. */ |
| 142 | strcpy (name, "../etc/"); | 144 | strcpy (name, "../etc/"); |
| 143 | strcat (name, SSDATA (file)); | 145 | strcat (name, SSDATA (file)); |
| 144 | 146 | ||