`(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))))
\f
;;; Read/Query Support
(defun mode-local-read-function (prompt &optional initial hist default)
;; 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)
`(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
"") ; 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))))
\f
;;; SUMMARY MODE
;; 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)
(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
(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" "")))))
(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?
;; 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)))