Function: treemacs-icon-for-dir--inliner

treemacs-icon-for-dir--inliner is a function defined in treemacs-icons.el.

Signature

(treemacs-icon-for-dir--inliner INLINE--FORM DIR STATE)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-icons.el
;; Could not find source code, showing raw function object.
#[(inline--form dir state)
  ((ignore inline--form)
   (catch 'inline--just-use
     (let*
	 ((exp dir)
	  (dir (if (macroexp-copyable-p exp) exp (make-symbol "dir")))
	  (body
	   (let*
	       ((exp state)
		(state
		 (if (macroexp-copyable-p exp) exp
		   (make-symbol "state")))
		(body
		 (list 'let
		       (list
			(list 'name-downcased
			      (list '-> dir (list 'treemacs--filename)
				    (list 'downcase))))
		       (list 'when
			     (list 'eq 46
				   (list 'aref 'name-downcased 0))
			     (list 'setf 'name-downcased
				   (list 'substring 'name-downcased 1)))
		       (list 'pcase-exhaustive state
			     (list (list '\` 'open)
				   (list 'let
					 (list
					  (list 'name
						(list 'format "%s-%s"
						      'name-downcased
						      "open")))
					 (list 'or
					       (list 'ht-get
						     'treemacs-icons
						     'name)
					       (list 'ht-get
						     'treemacs-icons
						     (list 'quote
							   'dir-open)))))
			     (list (list '\` 'closed)
				   (list 'let
					 (list
					  (list 'name
						(list 'format "%s-%s"
						      'name-downcased
						      "closed")))
					 (list 'or
					       (list 'ht-get
						     'treemacs-icons
						     'name)
					       (list 'ht-get
						     'treemacs-icons
						     (list 'quote
							   'dir-closed)))))))))
	     (if (eq state exp) body
	       (macroexp-let* (list (list state exp)) body)))))
       (if (eq dir exp) body
	 (macroexp-let* (list (list dir exp)) body)))))
  (t)]