summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-02-05 03:25:11 +0000
committerRichard M. Stallman <rms@gnu.org>1998-02-05 03:25:11 +0000
commitf134248a80a312a82b8a854379f66205df0c3655 (patch)
treedda1595cbf02f578a91ad403a90350c271e89541
parent7a6a75671cfccb625062b9df61dc0958f1ebc201 (diff)
downloademacs-f134248a80a312a82b8a854379f66205df0c3655.tar.gz
(byte-compile-output-as-comment):
Use the size in bytes for the #@ size integer.
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 51f7aa307be..4487b97b63b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -9,7 +9,7 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.36 $")
+(defconst byte-compile-version "$Revision: 2.37 $")
;; This file is part of GNU Emacs.
@@ -1836,7 +1836,8 @@ list that represents a doc string reference.
;; and return the file position it will have.
;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting.
(defun byte-compile-output-as-comment (exp quoted)
- (let ((position (point)))
+ (let ((position (point))
+ total-bytes)
(set-buffer
(prog1 (current-buffer)
(set-buffer outbuffer)
@@ -1860,7 +1861,12 @@ list that represents a doc string reference.
(goto-char (point-max))
(insert "\037")
(goto-char position)
- (insert "#@" (format "%d" (- (point-max) position)))
+ (setq total-bytes 0)
+ (while (not (eobp))
+ (setq total-bytes (+ total-bytes (char-bytes (char-after (point)))))
+ (forward-char 1))
+ (goto-char position)
+ (insert "#@" (format "%d" total-bytes))
;; Save the file position of the object.
;; Note we should add 1 to skip the space