]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak autoloads of defsubsts containing spaces/control chars
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Aug 2022 06:24:29 +0000 (08:24 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Aug 2022 06:24:29 +0000 (08:24 +0200)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Escape control chars in bodies so that we don't end up with
trailing spaces if we're autoloading a defsubst containing
"\\`[ \t\n\r]*\\'".

lisp/emacs-lisp/loaddefs-gen.el

index 31e1514193f778af27ee291e74863ea7c7530fd5..360b3e4521b3f9ab164f2feea3f19d6ce701b945 100644 (file)
@@ -675,7 +675,9 @@ instead of just updating them with the new/changed autoloads."
         (insert "\\\n")))
     (while def
       (insert " ")
-      (prin1 (pop def) (current-buffer) t))
+      (prin1 (pop def) (current-buffer)
+             '(t (escape-newlines . t)
+                 (escape-control-characters . t))))
     (insert ")")))
 
 (defun loaddefs-generate--excluded-files ()