aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-02-05 03:25:11 +0000
committerRichard M. Stallman1998-02-05 03:25:11 +0000
commit17ceb934e47926a6433aadba2331eba7d6f20f04 (patch)
tree9631e2a5b344e0c40f45092d2d5138e39c9751be
parent4fb17037312adb9922775cceb40f49d45035e3b5 (diff)
downloademacs-17ceb934e47926a6433aadba2331eba7d6f20f04.tar.gz
emacs-17ceb934e47926a6433aadba2331eba7d6f20f04.zip
(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 @@
9 9
10;;; This version incorporates changes up to version 2.10 of the 10;;; This version incorporates changes up to version 2.10 of the
11;;; Zawinski-Furuseth compiler. 11;;; Zawinski-Furuseth compiler.
12(defconst byte-compile-version "$Revision: 2.36 $") 12(defconst byte-compile-version "$Revision: 2.37 $")
13 13
14;; This file is part of GNU Emacs. 14;; This file is part of GNU Emacs.
15 15
@@ -1836,7 +1836,8 @@ list that represents a doc string reference.
1836;; and return the file position it will have. 1836;; and return the file position it will have.
1837;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting. 1837;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting.
1838(defun byte-compile-output-as-comment (exp quoted) 1838(defun byte-compile-output-as-comment (exp quoted)
1839 (let ((position (point))) 1839 (let ((position (point))
1840 total-bytes)
1840 (set-buffer 1841 (set-buffer
1841 (prog1 (current-buffer) 1842 (prog1 (current-buffer)
1842 (set-buffer outbuffer) 1843 (set-buffer outbuffer)
@@ -1860,7 +1861,12 @@ list that represents a doc string reference.
1860 (goto-char (point-max)) 1861 (goto-char (point-max))
1861 (insert "\037") 1862 (insert "\037")
1862 (goto-char position) 1863 (goto-char position)
1863 (insert "#@" (format "%d" (- (point-max) position))) 1864 (setq total-bytes 0)
1865 (while (not (eobp))
1866 (setq total-bytes (+ total-bytes (char-bytes (char-after (point)))))
1867 (forward-char 1))
1868 (goto-char position)
1869 (insert "#@" (format "%d" total-bytes))
1864 1870
1865 ;; Save the file position of the object. 1871 ;; Save the file position of the object.
1866 ;; Note we should add 1 to skip the space 1872 ;; Note we should add 1 to skip the space