]> git.eshelyaron.com Git - emacs.git/commitdiff
autoload.el: Fix corner case and avoid encoding issues
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 18 Jan 2022 21:40:32 +0000 (16:40 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 18 Jan 2022 21:40:32 +0000 (16:40 -0500)
* lisp/emacs-lisp/autoload.el (autoload-print-form): Don't burp when
autoloading a `cl-defmethod`.
(autoload-rubric): Support non-UTF-8 chars and enforce Unix EOLs.

lisp/emacs-lisp/autoload.el

index a51fd8ca255ac106ec9d8d4bd51d4a7db5f1e6ba..d0bf342b842bae65addef0e9a0eed5ece6fd4644 100644 (file)
@@ -340,7 +340,7 @@ put the output in."
    (t
     (let ((doc-string-elt (function-get (car-safe form) 'doc-string-elt))
          (outbuf autoload-print-form-outbuf))
-      (if (and doc-string-elt (stringp (nth doc-string-elt form)))
+      (if (and (numberp doc-string-elt) (stringp (nth doc-string-elt form)))
          ;; We need to hack the printing because the
          ;; doc-string must be printed specially for
          ;; make-docfile (sigh).
@@ -410,7 +410,7 @@ FILE's name."
            ";; version-control: never\n"
             ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil.
            ";; no-update-autoloads: t\n"
-           ";; coding: utf-8\n"
+           ";; coding: utf-8-emacs-unix\n"
            ";; End:\n"
            ";;; " basename
            " ends here\n")))