X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/2da89232f200f6d390c89d73c1dece3fc3ff9256..37907778d2266ea80e079d015c26281195f6b30b:/packages/ztree/ztree-diff.el diff --git a/packages/ztree/ztree-diff.el b/packages/ztree/ztree-diff.el index ff9b3235f..ea66a6e99 100644 --- a/packages/ztree/ztree-diff.el +++ b/packages/ztree/ztree-diff.el @@ -217,9 +217,11 @@ Argument NODE node containing paths to files to call a diff on." 2 if left or right present - view left or rigth" (let ((left (ztree-diff-node-left-path node)) (right (ztree-diff-node-right-path node)) + ;; FIXME: The GNU convention is to only use "path" for lists of + ;; directories as in load-path. (open-f #'(lambda (path) (if hard (find-file path) - (let ((split-width-threshold nil)) - (view-file-other-window path)))))) + (let ((split-width-threshold nil)) + (view-file-other-window path)))))) (cond ((and left right) (if (not (ztree-diff-node-different node)) (funcall open-f left) @@ -252,11 +254,11 @@ COPY-TO-RIGHT specifies which side of the NODE to update." (progn ; otherwise: ;; assuming all went ok when left and right nodes are the same ;; set both as not different - (ztree-diff-node-set-different node nil) + (setf (ztree-diff-node-different node) nil) ;; update left/right paths (if copy-to-right - (ztree-diff-node-set-right-path node target-path) - (ztree-diff-node-set-left-path node target-path)) + (setf (ztree-diff-node-right-path node) target-path) + (setf (ztree-diff-node-left-path node) target-path)) (ztree-diff-node-update-all-parents-diff node) (ztree-refresh-buffer (line-number-at-pos))))))) @@ -283,10 +285,10 @@ COPY-TO-RIGHT specifies which side of the NODE to update." (progn (message target-full-path) (if copy-to-right - (ztree-diff-node-set-right-path node - target-full-path) - (ztree-diff-node-set-left-path node - target-full-path)) + (setf (ztree-diff-node-right-path node) + target-full-path) + (setf (ztree-diff-node-left-path node) + target-full-path)) (ztree-diff-model-update-node node) (ztree-diff-node-update-all-parents-diff node) (ztree-refresh-buffer (line-number-at-pos))))))) @@ -411,7 +413,7 @@ COPY-TO-RIGHT specifies which side of the NODE to update." (setq children (ztree-filter #'(lambda (x) (not (ztree-diff-node-equal x node))) children)) - (ztree-diff-node-set-children parent children)) + (setf (ztree-diff-node-children parent) children)) (ztree-diff-node-update-all-parents-diff node) ;;(ztree-diff-model-partial-rescan node) (ztree-refresh-buffer (line-number-at-pos))))))))))