"Push the srecoder template ST onto the active stack."
(oset st active (cons st (oref st active))))
-(cl-defmethod srecode-pop ((st (subclass srecode-template)))
- "Pop the srecoder template ST onto the active stack.
-ST can be a class, or an object."
+(cl-defmethod srecode-pop ((st srecode-template))
+ "Pop the srecoder template ST onto the active stack."
(oset st active (cdr (oref st active))))
-(cl-defmethod srecode-peek ((st (subclass srecode-template)))
- "Fetch the topmost active template record. ST can be a class."
+(cl-defmethod srecode-peek ((st srecode-template))
+ "Fetch the topmost active template record."
(car (oref st active)))
(cl-defmethod srecode-insert-method ((st srecode-template) dictionary)
((stringp i)
(princ i))))))
-(cl-defmethod srecode-dump ((ins srecode-template-inserter-newline) indent)
+(cl-defmethod srecode-dump ((ins srecode-template-inserter-newline) _indent)
"Dump the state of the SRecode template inserter INS."
(cl-call-next-method)
(when (oref ins hard)
)
"Allow comments within template coding. This inserts nothing.")
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-comment))
- escape-start escape-end)
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-comment))
+ escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
(princ " ")
(terpri)
)
-(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-comment)
- dictionary)
+(cl-defmethod srecode-insert-method ((_sti srecode-template-inserter-comment)
+ _dictionary)
"Don't insert anything for comment macros in STI."
nil)
(setq val (srecode-insert-variable-secondname-handler
sti dictionary val fcnpart)))
;; Compound data value
- ((srecode-dictionary-compound-value-child-p val)
+ ((cl-typep val 'srecode-dictionary-compound-value)
;; Force FCN to be a symbol
(when fcnpart (setq fcnpart (read fcnpart)))
;; Convert compound value to a string with the fcn.
(setq do-princ nil)))
;; Dictionaries... not allowed in this style
- ((srecode-dictionary-child-p val)
+ ((cl-typep val 'srecode-dictionary)
(srecode-insert-report-error
dictionary
"Macro %s cannot insert a dictionary - use section macros instead"
;; across multiple locations.
compound-value))
-(cl-defmethod srecode-dump ((ins srecode-template-inserter-ask) indent)
+(cl-defmethod srecode-dump ((ins srecode-template-inserter-ask) _indent)
"Dump the state of the SRecode template inserter INS."
(cl-call-next-method)
(princ " : \"")
spaces to the right.")
(cl-defmethod srecode-insert-variable-secondname-handler
- ((sti srecode-template-inserter-width) dictionary value width)
+ ((_sti srecode-template-inserter-width) dictionary value width)
"For VALUE handle WIDTH behaviors for this variable inserter.
Return the result as a string.
By default, treat as a function name."
(concat padchars value)
(concat value padchars))))))
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-width))
- escape-start escape-end)
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-width))
+ escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
(princ " ")
Some inserter macros, such as `srecode-template-inserter-include-wrap'
will place text at the ^ macro from the included macro.")
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-point))
- escape-start escape-end)
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-point))
+ escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
(princ " ")
"Wrap a section of a template under the control of a macro."
:abstract t)
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-subtemplate))
- escape-start escape-end)
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-subtemplate))
+ escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
(cl-call-next-method)
dict slot)
"Insert a subtemplate for the inserter STI with dictionary DICT."
;; Make sure that only dictionaries are used.
- (unless (srecode-dictionary-child-p dict)
+ (unless (cl-typep dict 'srecode-dictionary)
(srecode-insert-report-error
dict
"Only section dictionaries allowed for `%s'"
"All template segments between the section-start and section-end
are treated specially.")
-(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-section-end)
- dictionary)
+(cl-defmethod srecode-insert-method ((_sti srecode-template-inserter-section-end)
+ _dictionary)
"Insert the STI inserter."
)
The included template will have additional dictionary entries from the subdictionary
stored specified by this macro.")
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include))
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-include))
escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
then the text between this macro and the end macro will be inserted at
the ^ macro.")
-(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include-wrap))
+(cl-defmethod srecode-inserter-prin-example ((_ins (subclass srecode-template-inserter-include-wrap))
escape-start escape-end)
"Insert an example using inserter INS.
Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."