[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0a40120b40: Fix overly wide docstrings generated by eieio
From: |
Stefan Kangas |
Subject: |
master 0a40120b40: Fix overly wide docstrings generated by eieio |
Date: |
Sun, 2 Oct 2022 11:28:40 -0400 (EDT) |
branch: master
commit 0a40120b40356ce43c084f44cedba8566a5685be
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Fix overly wide docstrings generated by eieio
* lisp/emacs-lisp/eieio-core.el (eieio-make-class-predicate)
(eieio-make-child-predicate, eieio-defclass-internal): Don't generate
overly wide docstrings. (Bug#58252)
---
lisp/emacs-lisp/eieio-core.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 5e7b5cbfb2..65aa6aa6df 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -249,16 +249,22 @@ use '%s or turn off `eieio-backward-compatibility'
instead" cname)
(defun eieio-make-class-predicate (class)
(lambda (obj)
(:documentation
- (format "Return non-nil if OBJ is an object of type `%S'.\n\n(fn OBJ)"
- class))
+ (concat
+ (internal--format-docstring-line
+ "Return non-nil if OBJ is an object of type `%S'."
+ class)
+ "\n\n(fn OBJ)"))
(and (eieio-object-p obj)
(same-class-p obj class))))
(defun eieio-make-child-predicate (class)
(lambda (obj)
(:documentation
- (format "Return non-nil if OBJ is an object of type `%S' or a subclass.
-\n(fn OBJ)" class))
+ (concat
+ (internal--format-docstring-line
+ "Return non-nil if OBJ is an object of type `%S' or a subclass."
+ class)
+ "\n\n(fn OBJ)"))
(and (eieio-object-p obj)
(object-of-class-p obj class))))
@@ -353,8 +359,8 @@ See `defclass' for more information."
(defalias csym
(lambda (obj)
(:documentation
- (format
- "Test OBJ to see if it a list of objects which are a child of
type %s"
+ (internal--format-docstring-line
+ "Test OBJ to see if it a list of objects which are a child of
type `%s'."
cname))
(when (listp obj)
(let ((ans t)) ;; nil is valid
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0a40120b40: Fix overly wide docstrings generated by eieio,
Stefan Kangas <=