# HG changeset patch # User Richard M. Stallman # Date 886649111 0 # Node ID b06dd0c289775ad220bdc28fa4eb9bbfd9382b60 # Parent 985a277c9b9abdea72dd0282befbaf9f461b9b49 (byte-compile-output-as-comment): Use the size in bytes for the #@ size integer. diff -r 985a277c9b9a -r b06dd0c28977 lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Wed Feb 04 21:04:41 1998 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Thu Feb 05 03:25:11 1998 +0000 @@ -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 @@ ;; 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 @@ (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