]> git.eshelyaron.com Git - emacs.git/commitdiff
(byte-compile-insert-header): Escape backslashes
authorRichard M. Stallman <rms@gnu.org>
Tue, 1 Nov 1994 09:54:39 +0000 (09:54 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 1 Nov 1994 09:54:39 +0000 (09:54 +0000)
in FILENAME when putting it inside a string constant.

lisp/emacs-lisp/bytecomp.el

index 8ef3d268bfe43e27894f9ba1c368bfe0b6064797..4966ca6e98bd42f3ee1b144992893134a6f93572 100644 (file)
@@ -1355,7 +1355,10 @@ With argument, insert value in current buffer after the form."
               "\n(if (and (boundp 'emacs-version)\n"
               "\t (or (and (boundp 'epoch::version) epoch::version)\n"
               "\t     (string-lessp emacs-version \"19\")))\n"
-              "    (error \"`" filename "' was compiled for Emacs 19\"))\n"
+              "    (error \"`"
+              ;; This escapes all backslashes in FILENAME.  Needed on Windows.
+              (substring (prin1-to-string filename) 1 -1)
+              "' was compiled for Emacs 19\"))\n"
               ))
    ))