[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4ebdc558f6: Adjust loaddefs-generate--print-form comments
From: |
Lars Ingebrigtsen |
Subject: |
master 4ebdc558f6: Adjust loaddefs-generate--print-form comments |
Date: |
Thu, 4 Aug 2022 01:45:11 -0400 (EDT) |
branch: master
commit 4ebdc558f62a4cb5101490e11b7f746d651c513a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Adjust loaddefs-generate--print-form comments
* 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 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 830799ec36..00b3bac53c 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4ebdc558f6: Adjust loaddefs-generate--print-form comments,
Lars Ingebrigtsen <=