aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Kangas2025-01-24 00:44:21 +0100
committerStefan Kangas2025-01-24 00:48:17 +0100
commitf14c24dbe7f65786115f8f62a337be45996c38b8 (patch)
tree2c45245d210fa7ce189567f481aec23f8757b1b3 /src
parentc7f6da7a4141a9f3492b8dbb0c1de710bd4757fa (diff)
downloademacs-f14c24dbe7f65786115f8f62a337be45996c38b8.tar.gz
emacs-f14c24dbe7f65786115f8f62a337be45996c38b8.zip
Support loading dynamic docstrings from Emacs <29
* src/doc.c (get_doc_string): Take absolute value to be compatible with bytecode from Emacs <29.
Diffstat (limited to 'src')
-rw-r--r--src/doc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c
index 0ce1274fe12..6f4ce79f1f1 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -127,7 +127,10 @@ get_doc_string (Lisp_Object filepos, bool unibyte)
127 else 127 else
128 return Qnil; 128 return Qnil;
129 129
130 EMACS_INT position = XFIXNUM (pos); 130 /* We used to emit negative positions for 'user variables' (whose doc
131 strings started with an asterisk); take the absolute value for
132 compatibility with bytecode from Emacs <29. */
133 EMACS_INT position = eabs (XFIXNUM (pos));
131 134
132 if (!STRINGP (dir)) 135 if (!STRINGP (dir))
133 return Qnil; 136 return Qnil;