Skip to content

Commit

Permalink
Fix some doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Joost Kremers committed Jun 13, 2024
1 parent 929cd74 commit f03befb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions ebib-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ Currently, the following problems are marked:
(defvar ebib--entry-history '(:head 0 :history nil)
"History of entries visited.
`:history' is a list of all entries visited, with more recent
entries nearer the beginning. `:head' is a 0-based index
entries nearer the beginning. `:head' is a 0-based index
indicating where in the `:history' list we are currently.
Commands which navigate between entries (including those which
Expand All @@ -1300,8 +1300,8 @@ navigate the history) should (in order):
`:history' list, reverse the result, and prepend it to the history
list (unless the `:head' value is less than 2, in which case nothing
would be prepended).
- prepend the key of the entry arrived at to the `:history' list.
- set `:head' to 0
- Prepend the key of the entry arrived at to the `:history' list.
- Set `:head' to 0
Passing the relevant key to `ebib--history-mutate' will achieve
all of this in a convenient way.")
Expand Down Expand Up @@ -2689,15 +2689,14 @@ specified in `ebib-field-sort-functions-alist', with
;; Now return the list of keys.
keys)

;; History commands

;;; History commands

(defun ebib--history-mutate (key)
"Alter `ebib--entry-history' list.
Copy everything from the second element to the element at
`ebib--history-get-head' in the `:history' list in
`ebib--entry-history', reverse the result, and prepend it to the
history list. Then prepend KEY to the history list as well.
history list. Then prepend KEY to the history list as well.
Finally, set `:head' in `ebib--entry-history' to 0."
(when-let ((head (ebib--history-get-head))
;; Only bother if head is sufficiently large, otherwise
Expand Down
4 changes: 2 additions & 2 deletions ebib.el
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ interactively."
(defun ebib-history-back ()
"Jump to the last visited entry.
Repeated invocations of this function and `ebib-history-forward'
move back and forward in history without changing it. After this,
move back and forward in history without changing it. After this,
moving somewhere else copies the sequence of moves through
history into the history record, so that they can still be
accessed."
Expand All @@ -1671,7 +1671,7 @@ accessed."
(defun ebib-history-forward ()
"Jump to the entry visited before the current one in the history.
Repeated invocations of this function and `ebib-history-back'
move forward and back in history without changing it. After this,
move forward and back in history without changing it. After this,
moving somewhere else copies the sequence of moves through
history into the history record, so that they can still be
accessed."
Expand Down

0 comments on commit f03befb

Please sign in to comment.