| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cj/timeformat was defvar'd inside cj/add-timestamp-to-org-entry, so the symbol
wasn't special until the command had run once. Until then a let around the call
bound it lexically and never reached the function. I moved it to top level with
a docstring. It has no other callers.
The nested defvar also poisons tests. ERT runs alphabetically, so an earlier
test that calls the command makes the symbol special retroactively. A later
special-variable-p check then passes on test ordering rather than on the code,
reading green in a full-file run and red in isolation. The new guard snapshots
special-variable-p into a defconst at load, before any test body runs.
I filled in the missing coverage: point and the following line survive the
insert, empty and unicode time strings, an empty buffer, and a read-only buffer
signalling rather than dropping the stamp. The empty-string case pins a trailing
space (current behavior, characterized rather than changed).
|