comparison lisp/emacs-lisp/autoload.el @ 92710:123ee50ab055

(autoload-find-destination): Don't force raw-text.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 10 Mar 2008 21:11:32 +0000
parents 606f2d163a64
children 07af23654bc8
comparison
equal deleted inserted replaced
92709:5b93735ecb98 92710:123ee50ab055
482 (let* ((load-name (autoload-file-load-name file)) 482 (let* ((load-name (autoload-file-load-name file))
483 (buf (current-buffer)) 483 (buf (current-buffer))
484 (existing-buffer (if buffer-file-name buf)) 484 (existing-buffer (if buffer-file-name buf))
485 (found nil)) 485 (found nil))
486 (with-current-buffer 486 (with-current-buffer
487 ;; We must read/write the file without any code conversion, 487 ;; We used to use `raw-text' to read this file, but this causes
488 ;; but still decode EOLs. 488 ;; problems when the file contains non-ASCII characters.
489 (let ((coding-system-for-read 'raw-text)) 489 (find-file-noselect
490 (find-file-noselect 490 (autoload-ensure-default-file (autoload-generated-file)))
491 (autoload-ensure-default-file (autoload-generated-file))))
492 ;; This is to make generated-autoload-file have Unix EOLs, so 491 ;; This is to make generated-autoload-file have Unix EOLs, so
493 ;; that it is portable to all platforms. 492 ;; that it is portable to all platforms.
494 (setq buffer-file-coding-system 'raw-text-unix) 493 (unless (zerop (coding-system-eol-type buffer-file-coding-system))
494 (set-buffer-file-coding-system 'unix))
495 (or (> (buffer-size) 0) 495 (or (> (buffer-size) 0)
496 (error "Autoloads file %s does not exist" buffer-file-name)) 496 (error "Autoloads file %s does not exist" buffer-file-name))
497 (or (file-writable-p buffer-file-name) 497 (or (file-writable-p buffer-file-name)
498 (error "Autoloads file %s is not writable" buffer-file-name)) 498 (error "Autoloads file %s is not writable" buffer-file-name))
499 (widen) 499 (widen)