Function: treemacs--prev-non-child-button--inliner

treemacs--prev-non-child-button--inliner is a function defined in treemacs-core-utils.el.

Signature

(treemacs--prev-non-child-button--inliner INLINE--FORM BTN)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
;; Closure converted to defun by helpful.
(defun treemacs--prev-non-child-button--inliner
    (inline--form btn)
  (ignore inline--form)
  (catch 'inline--just-use
    (let*
	((exp btn)
	 (btn
	  (if
	      (macroexp-copyable-p exp)
	      exp
	    (make-symbol "btn")))
	 (body
	  (list 'let
		(list
		 (list 'depth
		       (list 'treemacs-button-get btn :depth))
		 (list 'prev
		       (list 'previous-button
			     (list 'treemacs-button-start btn))))
		(list 'while
		      (list 'and 'prev
			    (list '< 'depth
				  (list 'treemacs-button-get 'prev :depth)))
		      (list 'setq 'prev
			    (list 'previous-button
				  (list 'treemacs-button-start 'prev))))
		(list 'when
		      (list 'and 'prev
			    (list '= 'depth
				  (list 'treemacs-button-get 'prev :depth)))
		      'prev))))
      (if
	  (eq btn exp)
	  body
	(macroexp-let*
	 (list
	  (list btn exp))
	 body)))))