aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/doc.c b/src/doc.c
index 76008295add..16c0d4090a0 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,6 +1,7 @@
1/* Record indices of function doc strings stored in a file. 1/* Record indices of function doc strings stored in a file.
2 2
3Copyright (C) 1985-1986, 1993-1995, 1997-2012 Free Software Foundation, Inc. 3Copyright (C) 1985-1986, 1993-1995, 1997-2013 Free Software Foundation,
4Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
@@ -83,24 +84,23 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
83 ptrdiff_t minsize; 84 ptrdiff_t minsize;
84 int offset; 85 int offset;
85 EMACS_INT position; 86 EMACS_INT position;
86 Lisp_Object file, tem; 87 Lisp_Object file, tem, pos;
87 USE_SAFE_ALLOCA; 88 USE_SAFE_ALLOCA;
88 89
89 if (INTEGERP (filepos)) 90 if (INTEGERP (filepos))
90 { 91 {
91 file = Vdoc_file_name; 92 file = Vdoc_file_name;
92 position = XINT (filepos); 93 pos = filepos;
93 } 94 }
94 else if (CONSP (filepos)) 95 else if (CONSP (filepos))
95 { 96 {
96 file = XCAR (filepos); 97 file = XCAR (filepos);
97 position = XINT (XCDR (filepos)); 98 pos = XCDR (filepos);
98 } 99 }
99 else 100 else
100 return Qnil; 101 return Qnil;
101 102
102 if (position < 0) 103 position = eabs (XINT (pos));
103 position = - position;
104 104
105 if (!STRINGP (Vdoc_directory)) 105 if (!STRINGP (Vdoc_directory))
106 return Qnil; 106 return Qnil;