]> git.eshelyaron.com Git - emacs.git/commitdiff
Adjust loaddefs-generate--print-form comments
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 05:44:53 +0000 (07:44 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 4 Aug 2022 05:44:53 +0000 (07:44 +0200)
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Adjust doc string and comments now that make-docfile doesn't scan
this.

lisp/emacs-lisp/loaddefs-gen.el

index 830799ec363c21c8365a3c3438da5492ca745a09..00b3bac53cc003fda1797d09326e9f160d760933 100644 (file)
@@ -635,18 +635,19 @@ If GENERATE-FULL, don't update, but regenerate all the loaddefs files."
                                t "GEN")))))))
 
 (defun loaddefs-generate--print-form (def)
-  "Print DEF in the way make-docfile.c expects it."
+  "Print DEF in a format that makes sense for version control."
   (if (or (not (consp def))
           (not (symbolp (car def)))
           (memq (car def) '( make-obsolete
                              define-obsolete-function-alias))
           (not (stringp (nth 3 def))))
       (prin1 def (current-buffer) t)
-    ;; The salient point here is that we have to have the doc string
-    ;; that starts with a backslash and a newline, and there mustn't
-    ;; be any newlines before that.  So -- typically
-    ;; (defvar foo 'value "\
-    ;; Doc string" ...).
+    ;; We want to print, for instance, `defvar' values while escaping
+    ;; control characters (so that we don't end up with lines with
+    ;; trailing tab characters and the like), but we don't want to do
+    ;; this for doc strings, because then the doc strings would be on
+    ;; one single line, which would lead to more VC churn.  So --
+    ;; typically (defvar foo 'value "\ Doc string" ...).
     (insert "(")
     (dotimes (_ 3)
       (prin1 (pop def) (current-buffer)