aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-07 07:18:00 +0000
committerRichard M. Stallman1995-04-07 07:18:00 +0000
commit0c00bc70d8732e8c3eccadaf1b85886c26aa1781 (patch)
treeea470551a53d53f7c6983b43b4a56b30eee9e34e /src
parent6541197790761f5abc955f0655ecd31cc42f66af (diff)
downloademacs-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.c7
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)
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
77static Lisp_Object 80static Lisp_Object
78get_doc_string (filepos) 81get_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;