summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-08-07 10:52:16 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-08-07 10:52:16 +0200
commit08a74ab05a2dcca261fe6adaa839a936b5c123c0 (patch)
tree115570eea3358aeb05bdb2aed3df2a455a24b9c7 /src/lread.c
parent7778f83b3e691716522b30393d33ae20cba9a2b0 (diff)
downloademacs-08a74ab05a2dcca261fe6adaa839a936b5c123c0.tar.gz
emacs-08a74ab05a2dcca261fe6adaa839a936b5c123c0.tar.bz2
emacs-08a74ab05a2dcca261fe6adaa839a936b5c123c0.zip
Cease emitting negative file offsets for user variables
'User variables' were made obsolete in Emacs 24 along with user-variable-p; the sign of the position in (#$ . POS) hasn't mattered since. * lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Don't emit negative position when doc string starts with `*`. * src/lread.c (get_lazy_string): Explain.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index d16df32ca3e..ccccd79cd7c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3486,7 +3486,9 @@ get_lazy_string (Lisp_Object val)
unibyte string. If it is actually a doc string, caller must make
it multibyte. */
- /* Position is negative for user variables. */
+ /* We used to emit negative positions for 'user variables' (whose doc
+ strings started with an asterisk); take the absolute value for
+ compatibility. */
EMACS_INT pos = eabs (XFIXNUM (XCDR (val)));
struct saved_string *ss = &saved_strings[0];
struct saved_string *ssend = ss + ARRAYELTS (saved_strings);