diff options
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 22 |
1 files changed, 14 insertions, 8 deletions
| @@ -215,14 +215,20 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) | |||
| 215 | if (CONSP (filepos)) | 215 | if (CONSP (filepos)) |
| 216 | { | 216 | { |
| 217 | int test = 1; | 217 | int test = 1; |
| 218 | if (get_doc_string_buffer[offset - test++] != ' ') | 218 | /* A dynamic docstring should be either at the very beginning of a "#@ |
| 219 | return Qnil; | 219 | comment" or right after a dynamic docstring delimiter (in case we |
| 220 | while (get_doc_string_buffer[offset - test] >= '0' | 220 | pack several such docstrings within the same comment). */ |
| 221 | && get_doc_string_buffer[offset - test] <= '9') | 221 | if (get_doc_string_buffer[offset - test] != '\037') |
| 222 | test++; | 222 | { |
| 223 | if (get_doc_string_buffer[offset - test++] != '@' | 223 | if (get_doc_string_buffer[offset - test++] != ' ') |
| 224 | || get_doc_string_buffer[offset - test] != '#') | 224 | return Qnil; |
| 225 | return Qnil; | 225 | while (get_doc_string_buffer[offset - test] >= '0' |
| 226 | && get_doc_string_buffer[offset - test] <= '9') | ||
| 227 | test++; | ||
| 228 | if (get_doc_string_buffer[offset - test++] != '@' | ||
| 229 | || get_doc_string_buffer[offset - test] != '#') | ||
| 230 | return Qnil; | ||
| 231 | } | ||
| 226 | } | 232 | } |
| 227 | else | 233 | else |
| 228 | { | 234 | { |