Fix iCalendar macro (debug ...) forms and indentation

As discussed in Bug#74994.

* lisp/calendar/icalendar-ast.el (icalendar-make-param)
(icalendar-make-property, icalendar-make-component)
(icalendar-make-node-from-templates)
* lisp/calendar/icalendar-macs.el (icalendar-with-node-children)
(icalendar-with-node-value, icalendar-with-param)
(icalendar-with-child-of, icalendar-with-property-of): Remove extraneous
arguments in (debug ...) forms.
* lisp/calendar/icalendar-recur.el
* lisp/calendar/diary-icalendar.el: Fix indentation of calls to them.

Plus one other minor fix:

* lisp/calendar/diary-icalendar.el
(diary-icalendar-current-tz-to-vtimezone): Ignore unused error
variable (fixes a byte compiler warning).
This commit is contained in:
Richard Lawrence 2026-01-07 18:19:13 +01:00 committed by Stefan Monnier
parent 74750e269b
commit 4db3be2001
4 changed files with 38 additions and 38 deletions

View file

@ -3110,7 +3110,7 @@ times according to `diary-icalendar-time-zone-export-strategy'."
See `icalendar-recur-current-tz-to-vtimezone' for arguments' meanings.
This function wraps that one, but signals `icalendar-diary-export-error'
instead if TZ cannot be converted."
(condition-case err
(condition-case _
(icr:current-tz-to-vtimezone tz tzid start-year)
((ical:tz-insufficient-data ical:tz-unsupported)
(di:signal-export-error

View file

@ -416,7 +416,7 @@ will return an `icalendar-deltoparam' node whose value is a list of
The resulting syntax node is checked for validity by
`icalendar-ast-node-valid-p' before it is returned."
(declare (debug (symbolp form form)))
(declare (debug (symbolp form)))
;; TODO: support `ical:otherparam'
(unless (ical:param-type-symbol-p type)
(error "Not an iCalendar param type: %s" type))
@ -490,7 +490,7 @@ The resulting syntax node is checked for validity by
`icalendar-ast-node-valid-p' before it is returned."
;; TODO: support `ical:other-property', maybe like
;; (ical:other-property "X-NAME" value ...)
(declare (debug (symbolp form form &rest form))
(declare (debug (symbolp form &rest form))
(indent 2))
(unless (ical:property-type-symbol-p type)
(error "Not an iCalendar property type: %s" type))
@ -554,7 +554,7 @@ properties.
The resulting syntax node is checked for validity by
`icalendar-ast-node-valid-p' before it is returned."
(declare (debug (symbolp form &rest form))
(declare (debug (symbolp &rest form))
(indent 1))
;; TODO: support `ical:other-component', maybe like
;; (ical:other-component (:x-name "X-NAME") templates ...)
@ -662,7 +662,7 @@ For example, an iCalendar VEVENT could be written like this:
Before the constructed node is returned, it is validated by
`icalendar-ast-node-valid-p'."
(declare (debug (symbolp form &rest form))
(declare (debug (symbolp &rest form))
(indent 1))
(cond
((not (ical:type-symbol-p type))

View file

@ -830,7 +830,7 @@ Each binding in BINDINGS should be a list of one of the following forms:
nodes), or the :value-nodes themselves (if they are not).
It is a compile-time error to use the singular keywords with a TYPE that
takes multiple values, or the plural keywords with a TYPE that does not."
(declare (debug (symbolp form form &rest form))
(declare (debug (form form &rest form))
(indent 2))
;; Static checks on the bindings prevent various annoying bugs:
(dolist (b bindings)
@ -1004,7 +1004,7 @@ is equivalent to
BINDINGS are passed on to `icalendar-with-node-children' and will be
available in BODY; see its docstring for their form."
(declare (debug (symbolp form &optional form &rest form))
(declare (debug (form &optional form &rest form))
(indent 2))
(let ((vn (gensym "icalendar-node"))
(val (gensym "icalendar-value"))
@ -1069,7 +1069,7 @@ node's value.
If PARAMETER's value is not a syntax node, then `value' is bound
directly to PARAMETER's value, and `value-type' and `value-node' are
bound to nil."
(declare (debug (symbolp form &rest form))
(declare (debug (form &rest form))
(indent 1))
`(ical:with-node-value ,parameter nil ,@body))
@ -1089,7 +1089,7 @@ is equivalent to
(icalendar-with-child-of some-node some-type nil value)
See `icalendar-with-node-children' for the form of BINDINGS."
(declare (debug (symbolp form form &optional form &rest form))
(declare (debug (form form &optional form &rest form))
(indent 3))
(let ((child (gensym "icalendar-node")))
`(let ((,child (ical:ast-node-first-child-of ,type ,node)))
@ -1123,7 +1123,7 @@ symbol `value'; thus
(icalendar-with-param-of some-property some-type)
is equivalent to
(icalendar-with-param-of some-property some-type nil value)"
(declare (debug (symbolp form form &rest form))
(declare (debug (form form &rest form))
(indent 2))
`(ical:with-child-of ,node ,type nil ,@body))