]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Bug #876:
authorEli Zaretskii <eliz@gnu.org>
Sat, 10 Jan 2009 10:43:11 +0000 (10:43 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 10 Jan 2009 10:43:11 +0000 (10:43 +0000)
(info-insert-file-contents, Info-insert-dir): Bind inhibit-null-byte-detection
to non-nil.

lisp/ChangeLog
lisp/info.el

index 91bd9efe56007280cd67edb002aea0befa080ed8..3c02c10709a1321c3fc896489b11cd6f0619ea5c 100644 (file)
@@ -1,3 +1,10 @@
+2009-01-10  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix Bug #876:
+
+       * info.el (info-insert-file-contents, Info-insert-dir): Bind
+       inhibit-null-byte-detection to non-nil.
+
 2009-01-10  Martin Rudalics  <rudalics@gmx.at>
 
        * tool-bar.el (tool-bar-mode): Modify all frame parameters when
index 96c7b9d972f293f86581ce35f6d6f8f3b4aaba6c..9ee468f311df20c8d3bcc2c715f74992e764400b 100644 (file)
@@ -461,13 +461,15 @@ Do the right thing if the file has been compressed or zipped."
          (insert-file-contents-literally fullname visit)
          (let ((inhibit-read-only t)
                (coding-system-for-write 'no-conversion)
+               (inhibit-null-byte-detection t) ; Index nodes include null bytes
                (default-directory (or (file-name-directory fullname)
                                       default-directory)))
            (or (consp decoder)
                (setq decoder (list decoder)))
            (apply 'call-process-region (point-min) (point-max)
                   (car decoder) t t nil (cdr decoder))))
-      (insert-file-contents fullname visit))))
+      (let ((inhibit-null-byte-detection t)) ; Index nodes include null bytes
+       (insert-file-contents fullname visit)))))
 
 (defun Info-file-supports-index-cookies (&optional file)
   "Return non-nil value if FILE supports Info index cookies.
@@ -1094,7 +1096,10 @@ a case-insensitive match is tried."
                      (or buffers
                          (message "Composing main Info directory..."))
                      (condition-case nil
-                         (progn
+                         ;; Index nodes include null bytes.  DIR
+                         ;; files should not have indices, but who
+                         ;; knows...
+                         (let ((inhibit-null-byte-detection t))
                            (insert-file-contents file)
                            (set (make-local-variable 'Info-dir-file-name)
                                 file)