# HG changeset patch # User Eli Zaretskii # Date 1231584128 0 # Node ID edc1b75fdb159821e2a9809722020503d1d0a018 # Parent 23f3fc056f3bf5a133c750c6e7e363c76c49d4df Fix Bug #876: (info-insert-file-contents, Info-insert-dir): Bind inhibit-null-byte-detection to non-nil. diff -r 23f3fc056f3b -r edc1b75fdb15 lisp/info.el --- a/lisp/info.el Sat Jan 10 10:41:23 2009 +0000 +++ b/lisp/info.el Sat Jan 10 10:42:08 2009 +0000 @@ -461,13 +461,15 @@ (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 @@ (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)