]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_doc_string): In (STRING . INTEGER), if INTEGER
authorRichard M. Stallman <rms@gnu.org>
Fri, 7 Apr 1995 07:18:00 +0000 (07:18 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 7 Apr 1995 07:18:00 +0000 (07:18 +0000)
is negative, negate it.

src/doc.c

index 52b3ad724f4a3fa63361dda26a368a8bb6ada15d..696f4539a29d80e5f5c9f0882b5095fbbfb00b90 100644 (file)
--- 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;