Closed ptrv closed 7 years ago
I believe the value for :read-only
wants to be t
not nil
. i.e. the timer is read-only.
See my pull request: https://github.com/Malabarba/spinner.el/pull/10
In emacs 25.1 and the current implementation I stepped through with edebug and the value was nil
That makes sense, which makes me think that the (original) usage was incorrect previously. i.e. the intention was for it to be read-only but adding :read-only without a non-nil value actually had no effect.
Does that make sense? What do you think?
(sorry for the double post, I accidentally used my work account)
I still think it should not be read-only
since the timer gets modified later in spinner--start-timer
with timer-set-time
and timer-set-function
which use internally setf
.
Edit:
@Malabarba Does :read-only
apply to the slot or also to the object itself. If it applies only to the slot then :read-only
can be t
?
Indeed, the original usage was wrong. It should be :read-only t
.
IIUC, the timer object itself is modified, but the timer
attribute in the spinner
is not modified.
@Malabarba Thanks for clarifying. I close this PR then.
The slots in defstruct are now checked for the correct amount of options.
See http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=eb610f270ea919107b10bb8ece200a87abac6e0e
Fixes #8