Function: treemacs-do-update-node--inliner

treemacs-do-update-node--inliner is a function defined in treemacs-rendering.el.

Signature

(treemacs-do-update-node--inliner INLINE--FORM PATH &optional FORCE-EXPAND)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-rendering.el
;; Closure converted to defun by helpful.
(defun treemacs-do-update-node--inliner
    (inline--form path &optional force-expand)
  (ignore inline--form)
  (catch 'inline--just-use
    (let*
	((exp path)
	 (path
	  (if
	      (macroexp-copyable-p exp)
	      exp
	    (make-symbol "path")))
	 (body
	  (let*
	      ((exp force-expand)
	       (force-expand
		(if
		    (macroexp-copyable-p exp)
		    exp
		  (make-symbol "force-expand")))
	       (body
		(list 'treemacs-without-recenter
		      (list '-if-let
			    (list 'btn
				  (list 'if force-expand
					(list 'treemacs-goto-node path)
					(list '-some->
					      (list 'treemacs-find-visible-node path)
					      (list 'goto-char))))
			    (list 'if
				  (list 'treemacs-is-node-expanded? 'btn)
				  (list '-let
					[close-func
					 (alist-get
					  (treemacs-button-get btn :state)
					  treemacs-TAB-actions-config)]
					(list 'funcall 'close-func)
					(list 'when
					      (list 'eq 1
						    (list 'funcall
							  (list 'alist-get
								(list 'treemacs-button-get 'btn :state)
								'treemacs-TAB-actions-config)))
					      (list 'funcall 'close-func)))
				  (list 'when force-expand
					(list 'funcall
					      (list 'alist-get
						    (list 'treemacs-button-get 'btn :state)
						    'treemacs-TAB-actions-config))))
			    (list '-when-let
				  (list 'dom-node
					(list 'treemacs-find-in-dom path))
				  (list 'setf
					(list 'treemacs-dom-node->refresh-flag 'dom-node)
					nil))))))
	    (if
		(eq force-expand exp)
		body
	      (macroexp-let*
	       (list
		(list force-expand exp))
	       body)))))
      (if
	  (eq path exp)
	  body
	(macroexp-let*
	 (list
	  (list path exp))
	 body)))))