comparison lisp/emacs-lisp/autoload.el @ 111620:d7f360c219d0

autoload.el fix for bug#7414. * lisp/emacs-lisp/autoload.el (autoload-find-destination): The function coding-system-eol-type may return non-numeric values.
author Glenn Morris <rgm@gnu.org>
date Tue, 16 Nov 2010 19:47:16 -0800
parents 1d1d5d9bd884
children 3655cc4062e4 376148b31b5e
comparison
equal deleted inserted replaced
111619:1753163664ab 111620:d7f360c219d0
1 ;; autoload.el --- maintain autoloads in loaddefs.el 1 ;; autoload.el --- maintain autoloads in loaddefs.el
2 2
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, 3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002,
4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4 ;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 ;; Free Software Foundation, Inc.
5 6
6 ;; Author: Roland McGrath <roland@gnu.org> 7 ;; Author: Roland McGrath <roland@gnu.org>
7 ;; Keywords: maint 8 ;; Keywords: maint
8 9
9 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
523 ;; problems when the file contains non-ASCII characters. 524 ;; problems when the file contains non-ASCII characters.
524 (find-file-noselect 525 (find-file-noselect
525 (autoload-ensure-default-file (autoload-generated-file))) 526 (autoload-ensure-default-file (autoload-generated-file)))
526 ;; This is to make generated-autoload-file have Unix EOLs, so 527 ;; This is to make generated-autoload-file have Unix EOLs, so
527 ;; that it is portable to all platforms. 528 ;; that it is portable to all platforms.
528 (unless (zerop (coding-system-eol-type buffer-file-coding-system)) 529 (or (eq 0 (coding-system-eol-type buffer-file-coding-system))
529 (set-buffer-file-coding-system 'unix)) 530 (set-buffer-file-coding-system 'unix))
530 (or (> (buffer-size) 0) 531 (or (> (buffer-size) 0)
531 (error "Autoloads file %s does not exist" buffer-file-name)) 532 (error "Autoloads file %s does not exist" buffer-file-name))
532 (or (file-writable-p buffer-file-name) 533 (or (file-writable-p buffer-file-name)
533 (error "Autoloads file %s is not writable" buffer-file-name)) 534 (error "Autoloads file %s is not writable" buffer-file-name))
534 (widen) 535 (widen)
733 (setq command-line-args-left nil) 734 (setq command-line-args-left nil)
734 (apply 'update-directory-autoloads args))) 735 (apply 'update-directory-autoloads args)))
735 736
736 (provide 'autoload) 737 (provide 'autoload)
737 738
738 ;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6
739 ;;; autoload.el ends here 739 ;;; autoload.el ends here