diff options
author | Kenichi Handa <handa@m17n.org> | 1998-08-28 12:22:39 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-08-28 12:22:39 +0000 |
commit | 2d5975faa83dc3b3c5506e09c7690177e6a23374 (patch) | |
tree | f2b13afec3473cb572b69e8c62a65c37f76c2aaf /lisp/emacs-lisp | |
parent | 0cba3a0f8168421429577948841be399c1a844bb (diff) | |
download | emacs-2d5975faa83dc3b3c5506e09c7690177e6a23374.tar.gz emacs-2d5975faa83dc3b3c5506e09c7690177e6a23374.tar.bz2 emacs-2d5975faa83dc3b3c5506e09c7690177e6a23374.zip |
(byte-compile-output-as-comment):
Calculate the total bytes using position-bytes instead of
char-bytes.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8107571d032..af8d12b2151 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.49 $") +(defconst byte-compile-version "$Revision: 2.50 $") ;; This file is part of GNU Emacs. @@ -1907,8 +1907,7 @@ 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)) - total-bytes) + (let ((position (point))) (set-buffer (prog1 (current-buffer) (set-buffer outbuffer) @@ -1932,12 +1931,8 @@ list that represents a doc string reference. (goto-char (point-max)) (insert "\037") (goto-char 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)) + (insert "#@" (format "%d" (- (position-bytes (point-max)) + (position-bytes position)))) ;; Save the file position of the object. ;; Note we should add 1 to skip the space |