diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-04-07 07:18:00 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-04-07 07:18:00 +0000 |
commit | 0c00bc70d8732e8c3eccadaf1b85886c26aa1781 (patch) | |
tree | ea470551a53d53f7c6983b43b4a56b30eee9e34e /src/doc.c | |
parent | 6541197790761f5abc955f0655ecd31cc42f66af (diff) | |
download | emacs-0c00bc70d8732e8c3eccadaf1b85886c26aa1781.tar.gz emacs-0c00bc70d8732e8c3eccadaf1b85886c26aa1781.tar.bz2 emacs-0c00bc70d8732e8c3eccadaf1b85886c26aa1781.zip |
(get_doc_string): In (STRING . INTEGER), if INTEGER
is negative, negate it.
Diffstat (limited to 'src/doc.c')
-rw-r--r-- | src/doc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c index 52b3ad724f4..696f4539a29 100644 --- a/src/doc.c +++ b/src/doc.c @@ -72,7 +72,10 @@ munge_doc_file_name (name) /* Extract a doc string from a file. FILEPOS says where to get it. If it is an integer, use that position in the standard DOC-... file. If it is (FILE . INTEGER), use FILE as the file name - and INTEGER as the position in that file. */ + and INTEGER as the position in that file. + But if INTEGER is negative, make it positive. + (A negative integer is used for user variables, so we can distinguish + them without actually fetching the doc string.) */ static Lisp_Object get_doc_string (filepos) @@ -99,6 +102,8 @@ get_doc_string (filepos) { file = XCONS (filepos)->car; position = XINT (XCONS (filepos)->cdr); + if (position < 0) + position = - position; } else return Qnil; |