summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
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 /lisp/emacs-lisp
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 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el15
1 files changed, 3 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b1f4f01b3ae..d8a5dd20f6c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2451,18 +2451,9 @@ list that represents a doc string reference.
(let (position
(print-symbols-bare t)) ; Possibly redundant binding.
;; Insert the doc string, and make it a comment with #@LENGTH.
- (and (>= (nth 1 info) 0)
- dynamic-docstrings
- (progn
- (setq position
- (byte-compile-output-as-comment
- (nth (nth 1 info) form) nil))
- ;; If the doc string starts with * (a user variable),
- ;; negate POSITION.
- (if (and (stringp (nth (nth 1 info) form))
- (> (length (nth (nth 1 info) form)) 0)
- (eq (aref (nth (nth 1 info) form) 0) ?*))
- (setq position (- position)))))
+ (when (and (>= (nth 1 info) 0) dynamic-docstrings)
+ (setq position (byte-compile-output-as-comment
+ (nth (nth 1 info) form) nil)))
(let ((print-continuous-numbering t)
print-number-table