[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108025: Fix long filename handlin
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108025: Fix long filename handling of byte-compile-fix-header. |
Date: |
Thu, 31 May 2012 13:56:57 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108025
fixes bug: http://debbugs.gnu.org/11585
author: Stefan Monnier <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Thu 2012-05-31 13:56:57 +0800
message:
Fix long filename handling of byte-compile-fix-header.
* lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle
arbitrary file name lengths (Bug#11585).
modified:
lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-05-28 09:48:29 +0000
+++ b/lisp/ChangeLog 2012-05-31 05:56:57 +0000
@@ -1,3 +1,8 @@
+2012-05-31 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle
+ arbitrary file name lengths (Bug#11585).
+
2012-05-28 Martin Rudalics <address@hidden>
* desktop.el (desktop-read): Clear previous and next buffers for
=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el 2012-03-26 19:10:00 +0000
+++ b/lisp/emacs-lisp/bytecomp.el 2012-05-31 05:56:57 +0000
@@ -1931,7 +1931,7 @@
(byte-compile-fix-header byte-compile-current-file)))))
byte-compile--outbuffer))
-(defun byte-compile-fix-header (filename)
+(defun byte-compile-fix-header (_filename)
"If the current buffer has any multibyte characters, insert a version test."
(when (< (point-max) (position-bytes (point-max)))
(goto-char (point-min))
@@ -1956,12 +1956,10 @@
;; don't try to check the version number.
" (< (aref emacs-version (1- (length emacs-version))) ?A)\n"
(format " (string-lessp emacs-version \"%s\")\n" minimum-version)
- " (error \"`"
- ;; prin1-to-string is used to quote backslashes.
- (substring (prin1-to-string (file-name-nondirectory filename))
- 1 -1)
- (format "' was compiled for Emacs %s or later\"))\n\n"
- minimum-version))
+ ;; Because the header must fit in a fixed width, we cannot
+ ;; insert arbitrary-length file names (Bug#11585).
+ " (error \"`%s' was compiled for "
+ (format "Emacs %s or later\" load-file-name))\n\n" minimum-version))
;; Now compensate for any change in size, to make sure all
;; positions in the file remain valid.
(setq delta (- (point-max) old-header-end))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108025: Fix long filename handling of byte-compile-fix-header.,
Chong Yidong <=