summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-10-03 00:03:34 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-10-03 00:04:23 +0200
commit655c92ce4aa9ba2d21622074f74064c86f7f2fad (patch)
treef21fb7331ff8075a3be2907b3e445ce7fe822375 /lisp/emacs-lisp/eieio.el
parent190582adf416790e072ec5a605bd43048a82784a (diff)
downloademacs-655c92ce4aa9ba2d21622074f74064c86f7f2fad.tar.gz
emacs-655c92ce4aa9ba2d21622074f74064c86f7f2fad.tar.bz2
emacs-655c92ce4aa9ba2d21622074f74064c86f7f2fad.zip
Fix more overly long docstrings in eieio
* lisp/emacs-lisp/eieio.el (defclass): Fix more overly long docstrings. (Bug#58252)
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r--lisp/emacs-lisp/eieio.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index a6c900a3355..8351d97b13d 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -218,10 +218,11 @@ and reference them using the function `class-option'."
(when (and eieio-backward-compatibility (eq alloc :class))
;; FIXME: How could I declare this *method* as obsolete.
(push `(cl-defmethod ,acces ((this (subclass ,name)))
- ,(format
- "Retrieve the class slot `%S' from a class `%S'.
-This method is obsolete."
- sname name)
+ ,(concat
+ (internal--format-docstring-line
+ "Retrieve the class slot `%S' from a class `%S'."
+ sname name)
+ "\nThis method is obsolete.")
(if (slot-boundp this ',sname)
(eieio-oref-default this ',sname)))
accessors)))
@@ -230,16 +231,18 @@ This method is obsolete."
;; name whose purpose is to set the value of the slot.
(if writer
(push `(cl-defmethod ,writer ((this ,name) value)
- ,(format "Set the slot `%S' of an object of class `%S'."
- sname name)
+ ,(internal--format-docstring-line
+ "Set the slot `%S' of an object of class `%S'."
+ sname name)
(setf (slot-value this ',sname) value))
accessors))
;; If a reader is defined, then create a generic method
;; of that name whose purpose is to access this slot value.
(if reader
(push `(cl-defmethod ,reader ((this ,name))
- ,(format "Access the slot `%S' from object of class `%S'."
- sname name)
+ ,(internal--format-docstring-line
+ "Access the slot `%S' from object of class `%S'."
+ sname name)
(slot-value this ',sname))
accessors))
))