Correct tags, add docstring

This commit is contained in:
contrapunctus 2022-02-13 16:03:48 +05:30
parent 7f4e5e9c7c
commit d69944b81c
2 changed files with 3 additions and 1 deletions

View File

@ -1105,6 +1105,7 @@ hash table values must be in chronological order.")
;; [[file:chronometrist.org::*on-file-path-change][on-file-path-change:1]]
(cl-defmethod chronometrist-on-file-path-change ((backend chronometrist-file-backend-mixin) _old-path new-path)
"Update path and file slots of BACKEND to use NEW-PATH when `chronometrist-file' is changed."
(with-slots (path extension file) backend
(setf path new-path
file (concat path "." extension))))

View File

@ -1810,9 +1810,10 @@ These can be implemented in terms of the minimal protocol above.
(find-file-noselect file)))))
#+END_SRC
**** on-file-path-change :generic:function:
**** on-file-path-change :writer:method:
#+BEGIN_SRC emacs-lisp
(cl-defmethod chronometrist-on-file-path-change ((backend chronometrist-file-backend-mixin) _old-path new-path)
"Update path and file slots of BACKEND to use NEW-PATH when `chronometrist-file' is changed."
(with-slots (path extension file) backend
(setf path new-path
file (concat path "." extension))))