summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-24 17:47:35 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-26 13:23:57 +0200
commit8c3ec4e3ccf8b675195d173c207ff3accfca5301 (patch)
treec9696e494c8ef45b1a267c5659b1823013239020 /lisp
parentf3a6fe2c7d5943dcf241700aaf5c10c485217f60 (diff)
downloademacs-8c3ec4e3ccf8b675195d173c207ff3accfca5301.tar.gz
emacs-8c3ec4e3ccf8b675195d173c207ff3accfca5301.tar.bz2
emacs-8c3ec4e3ccf8b675195d173c207ff3accfca5301.zip
Fill some auto-generated docstring lines
* lisp/cedet/mode-local.el (define-mode-local-override): * lisp/cedet/semantic/decorate/mode.el (define-semantic-decoration-style): * lisp/cedet/semantic/idle.el (define-semantic-idle-service): * lisp/emacs-lisp/derived.el (derived-mode-make-docstring): * lisp/emacs-lisp/eieio.el (defclass): Fill auto-generated docstring lines.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cedet/mode-local.el9
-rw-r--r--lisp/cedet/semantic/decorate/mode.el5
-rw-r--r--lisp/cedet/semantic/idle.el14
-rw-r--r--lisp/emacs-lisp/cl-macs.el7
-rw-r--r--lisp/emacs-lisp/derived.el16
-rw-r--r--lisp/emacs-lisp/eieio.el5
6 files changed, 32 insertions, 24 deletions
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 02d69a1686c..18fb05e7eb4 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -600,16 +600,17 @@ BODY is the implementation of this function."
`(progn
(eval-and-compile
(defun ,newname ,args
- ,(format "%s\n\nOverride %s in `%s' buffers."
- docstring name mode)
+ ,(concat docstring "\n"
+ (internal--format-docstring-line
+ "Override `%s' in `%s' buffers."
+ name mode))
;; The body for this implementation
,@body)
;; For find-func to locate the definition of NEWNAME.
(put ',newname 'definition-name ',name))
(mode-local-bind '((,name . ,newname))
'(override-flag t)
- ',mode))
- ))
+ ',mode))))
;;; Read/Query Support
(defun mode-local-read-function (prompt &optional initial hist default)
diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el
index c6bf15205fd..27634102df9 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -409,8 +409,9 @@ decoration API found in this library."
;; Create an override method to specify if a given tag belongs
;; to this type of decoration
(define-overloadable-function ,predicate (tag)
- ,(format "Return non-nil to decorate TAG with `%s' style.\n%s"
- name doc))
+ ,(internal--format-docstring-line
+ "Return non-nil to decorate TAG with `%s' style.\n%s"
+ name doc))
;; Create an override method that will perform the highlight
;; operation if the -p method returns non-nil.
(define-overloadable-function ,highlighter (tag)
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index b1805f720d0..a14994424d7 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -577,10 +577,11 @@ This routine creates the following functions and variables:"
`(progn
(define-minor-mode ,global
,(concat "Toggle " (symbol-name global) ".
-With ARG, turn the minor mode on if ARG is positive, off otherwise.
-
-When this minor mode is enabled, `" (symbol-name mode) "' is
-turned on in every Semantic-supported buffer.")
+With ARG, turn the minor mode on if ARG is positive, off otherwise.\n\n"
+ (internal--format-docstring-line
+ "When this minor mode is enabled, `%s' is \
+turned on in every Semantic-supported buffer."
+ (symbol-name mode)))
:global t
:group 'semantic
:group 'semantic-modes
@@ -618,8 +619,9 @@ turned on in every Semantic-supported buffer.")
"") ; idle schedulers are quiet?
(defun ,func ()
- ,(concat "Perform idle activity for the minor mode `"
- (symbol-name mode) "'.")
+ ,(internal--format-docstring-line
+ "Perform idle activity for the minor mode `%s'."
+ (symbol-name mode))
,@forms))))
;;; SUMMARY MODE
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 6d6482c3497..833c1d19737 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3083,9 +3083,10 @@ Supported keywords for slots are:
;; The arg "cl-x" is referenced by name in eg pred-form
;; and pred-check, so changing it is not straightforward.
(push `(,defsym ,accessor (cl-x)
- ,(format "Access slot \"%s\" of `%s' struct CL-X.%s"
- slot name
- (if doc (concat "\n" doc) ""))
+ ,(internal--format-docstring-line
+ "Access slot \"%s\" of `%s' struct CL-X.%s"
+ slot name
+ (if doc (concat "\n" doc) ""))
(declare (side-effect-free t))
,access-body)
forms)
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 5aa745262ad..dd30846546b 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -321,7 +321,7 @@ No problems result if this variable is not bound.
(format "Major mode derived from `%s' by `define-derived-mode'.
It inherits all of the parent's attributes, but has its own keymap%s:
- `%s'%s
+%s
which more-or-less shadow%s %s's corresponding table%s."
parent
@@ -330,12 +330,14 @@ which more-or-less shadow%s %s's corresponding table%s."
(abbrev "\nand abbrev table")
(syntax "\nand syntax table")
(t ""))
- map
- (cond ((and abbrev syntax)
- (format ", `%s' and `%s'" abbrev syntax))
- ((or abbrev syntax)
- (format " and `%s'" (or abbrev syntax)))
- (t ""))
+ (internal--format-docstring-line
+ " `%s'%s"
+ map
+ (cond ((and abbrev syntax)
+ (format ", `%s' and `%s'" abbrev syntax))
+ ((or abbrev syntax)
+ (format " and `%s'" (or abbrev syntax)))
+ (t "")))
(if (or abbrev syntax) "" "s")
parent
(if (or abbrev syntax) "s" "")))))
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index c16d8e110ec..2dc3e0aeffa 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -205,7 +205,7 @@ and reference them using the function `class-option'."
(eieio-oset this ',sname value))
accessors)
(push `(cl-defmethod ,acces ((this ,name))
- ,(format
+ ,(internal--format-docstring-line
"Retrieve the slot `%S' from an object of class `%S'."
sname name)
;; FIXME: Why is this different from the :reader case?
@@ -285,7 +285,8 @@ This method is obsolete."
;; Non-abstract classes need a constructor.
`(defun ,name (&rest slots)
- ,(format "Create a new object of class type `%S'." name)
+ ,(internal--format-docstring-line
+ "Create a new object of class type `%S'." name)
(declare (compiler-macro
(lambda (whole)
(if (not (stringp (car slots)))