branch: elpa/hyperdrive commit 055840041f19269cf3723b17a6f790e6d40f1665 Author: Joseph Turner <jos...@ushin.org> Commit: Joseph Turner <jos...@ushin.org>
Tidy: (h/ewoc-find-node) Change let-bound var names, remove when --- hyperdrive-ewoc.el | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/hyperdrive-ewoc.el b/hyperdrive-ewoc.el index d58e18e5ee..c4cb0ed800 100644 --- a/hyperdrive-ewoc.el +++ b/hyperdrive-ewoc.el @@ -53,21 +53,20 @@ last node." (defun he//invalidate (entry) "Invalidate the ewoc node for ENTRY in directory buffers." - (when-let* ((buffer (hyperdrive--find-buffer-visiting - (hyperdrive-parent entry))) - (ewoc (buffer-local-value 'h/ewoc buffer)) - (node (and ewoc - (h/ewoc-find-node ewoc entry - :predicate #'he/equal-p)))) - (when node - (ewoc-set-data node entry) - ;; NOTE: Ensure that the buffer's window is selected, - ;; if it has one. (Workaround a possible bug in EWOC.) - (if-let ((buffer-window (get-buffer-window (ewoc-buffer ewoc)))) - (with-selected-window buffer-window - (with-silent-modifications (ewoc-invalidate ewoc node))) - (with-current-buffer (ewoc-buffer ewoc) - (with-silent-modifications (ewoc-invalidate ewoc node))))))) + (when-let* ((dir-buffer (hyperdrive--find-buffer-visiting + (hyperdrive-parent entry))) + (dir-ewoc (buffer-local-value 'h/ewoc dir-buffer)) + (dir-node (and dir-ewoc + (h/ewoc-find-node dir-ewoc entry + :predicate #'he/equal-p)))) + (ewoc-set-data dir-node entry) + ;; NOTE: Ensure that the buffer's window is selected, + ;; if it has one. (Workaround a possible bug in EWOC.) + (if-let ((buffer-window (get-buffer-window dir-buffer))) + (with-selected-window buffer-window + (with-silent-modifications (ewoc-invalidate dir-ewoc dir-node))) + (with-current-buffer dir-buffer + (with-silent-modifications (ewoc-invalidate dir-ewoc dir-node)))))) ;;;; Mode