Mercurial > emacs
comparison src/doc.c @ 11252:f610f9d7e3ca
(get_doc_string): In (STRING . INTEGER), if INTEGER
is negative, negate it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Apr 1995 07:18:00 +0000 |
parents | 9952a5ab70d1 |
children | cee0510aa3aa |
comparison
equal
deleted
inserted
replaced
11251:f6bc91242185 | 11252:f610f9d7e3ca |
---|---|
70 } | 70 } |
71 | 71 |
72 /* Extract a doc string from a file. FILEPOS says where to get it. | 72 /* Extract a doc string from a file. FILEPOS says where to get it. |
73 If it is an integer, use that position in the standard DOC-... file. | 73 If it is an integer, use that position in the standard DOC-... file. |
74 If it is (FILE . INTEGER), use FILE as the file name | 74 If it is (FILE . INTEGER), use FILE as the file name |
75 and INTEGER as the position in that file. */ | 75 and INTEGER as the position in that file. |
76 But if INTEGER is negative, make it positive. | |
77 (A negative integer is used for user variables, so we can distinguish | |
78 them without actually fetching the doc string.) */ | |
76 | 79 |
77 static Lisp_Object | 80 static Lisp_Object |
78 get_doc_string (filepos) | 81 get_doc_string (filepos) |
79 Lisp_Object filepos; | 82 Lisp_Object filepos; |
80 { | 83 { |
97 } | 100 } |
98 else if (CONSP (filepos)) | 101 else if (CONSP (filepos)) |
99 { | 102 { |
100 file = XCONS (filepos)->car; | 103 file = XCONS (filepos)->car; |
101 position = XINT (XCONS (filepos)->cdr); | 104 position = XINT (XCONS (filepos)->cdr); |
105 if (position < 0) | |
106 position = - position; | |
102 } | 107 } |
103 else | 108 else |
104 return Qnil; | 109 return Qnil; |
105 | 110 |
106 if (!STRINGP (Vdoc_directory)) | 111 if (!STRINGP (Vdoc_directory)) |