diff options
| author | Richard M. Stallman | 1995-04-07 07:18:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-07 07:18:00 +0000 |
| commit | 0c00bc70d8732e8c3eccadaf1b85886c26aa1781 (patch) | |
| tree | ea470551a53d53f7c6983b43b4a56b30eee9e34e /src | |
| parent | 6541197790761f5abc955f0655ecd31cc42f66af (diff) | |
| download | emacs-0c00bc70d8732e8c3eccadaf1b85886c26aa1781.tar.gz emacs-0c00bc70d8732e8c3eccadaf1b85886c26aa1781.zip | |
(get_doc_string): In (STRING . INTEGER), if INTEGER
is negative, negate it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.c | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -72,7 +72,10 @@ munge_doc_file_name (name) | |||
| 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) |
| @@ -99,6 +102,8 @@ get_doc_string (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; |