branch: elpa/hyperdrive commit d53fe79960ddea16cecd934e6c96dca302465ce0 Author: Joseph Turner <jos...@ushin.org> Commit: Joseph Turner <jos...@ushin.org>
Tidy: (h/history-find-buffer-visiting) Move into h/history.el --- hyperdrive-history.el | 9 +++++++++ hyperdrive-lib.el | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hyperdrive-history.el b/hyperdrive-history.el index 064bb85cc5..5ed85a709c 100644 --- a/hyperdrive-history.el +++ b/hyperdrive-history.el @@ -41,6 +41,15 @@ ;;;; Functions +(defun h/history-find-buffer-visiting (entry) + "Return a buffer showing ENTRY's history, or nil if none exists." + ;; There should only ever be one buffer showing ENTRY's history, so it's safe + ;; to return the first value in the list. + (car (match-buffers + (lambda (buffer) + (and-let* ((local-entry (buffer-local-value 'h/history-current-entry buffer))) + (he/equal-p entry local-entry t)))))) + (defun h/history-find-at-point (event) "Find entry at EVENT's position." (interactive "e") diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 85c4746e3b..cdaec1da96 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -1622,15 +1622,6 @@ version." (and-let* ((local-entry (buffer-local-value 'h/current-entry buffer))) (he/equal-p entry local-entry any-version-p)))))) -(defun h/history-find-buffer-visiting (entry) - "Return a buffer showing ENTRY's history, or nil if none exists." - ;; There should only ever be one buffer showing ENTRY's history, so it's safe - ;; to return the first value in the list. - (car (match-buffers - (lambda (buffer) - (and-let* ((local-entry (buffer-local-value 'h/history-current-entry buffer))) - (he/equal-p entry local-entry t)))))) - (defun h//format-entry (entry &optional format formats) "Return ENTRY formatted according to FORMAT. FORMAT is a `format-spec' specifier string which maps to specifications