diff options
| author | Stefan Kangas | 2025-01-24 00:44:21 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-01-24 00:48:17 +0100 |
| commit | f14c24dbe7f65786115f8f62a337be45996c38b8 (patch) | |
| tree | 2c45245d210fa7ce189567f481aec23f8757b1b3 /src | |
| parent | c7f6da7a4141a9f3492b8dbb0c1de710bd4757fa (diff) | |
| download | emacs-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -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; |