Function: treemacs-set-annotation-suffix--inliner

treemacs-set-annotation-suffix--inliner is a function defined in treemacs-annotations.el.

Signature

(treemacs-set-annotation-suffix--inliner INLINE--FORM PATH SUFFIX SOURCE)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-annotations.el
;; Closure converted to defun by helpful.
(defun treemacs-set-annotation-suffix--inliner
    (inline--form path suffix source)
  (ignore inline--form)
  (catch 'inline--just-use
    (let*
	((exp source)
	 (source
	  (if
	      (macroexp-copyable-p exp)
	      exp
	    (make-symbol "source")))
	 (body
	  (let*
	      ((exp path)
	       (path
		(if
		    (macroexp-copyable-p exp)
		    exp
		  (make-symbol "path")))
	       (body
		(let*
		    ((exp suffix)
		     (suffix
		      (if
			  (macroexp-copyable-p exp)
			  exp
			(make-symbol "suffix")))
		     (body
		      (list 'progn
			    (list 'put-text-property 0
				  (list 'length suffix)
				  (list 'quote 'treemacs-suffix-annotation)
				  t suffix)
			    (list '-if-let
				  (list 'ann
					(list 'treemacs-get-annotation path))
				  (list 'let*
					(list
					 (list 'suffix-list
					       (list 'treemacs-annotation->suffix 'ann))
					 (list 'old-suffix
					       (list '--first
						     (list 'string= source
							   (list 'car 'it))
						     'suffix-list)))
					(list 'if 'old-suffix
					      (list 'setcdr 'old-suffix suffix)
					      (list 'setf
						    (list 'treemacs-annotation->suffix 'ann)
						    (list '--sort
							  (list 'string<
								(list 'car 'it)
								(list 'car 'other))
							  (list 'cons
								(list 'cons source suffix)
								'suffix-list))))
					(list 'setf
					      (list 'treemacs-annotation->suffix-value 'ann)
					      (list 'mapconcat
						    (list 'function 'identity)
						    (list 'mapcar
							  (list 'function 'cdr)
							  (list 'treemacs-annotation->suffix 'ann))
						    " ")))
				  (list 'ht-set! 'treemacs--annotation-store path
					(list 'treemacs-annotation->create! :suffix
					      (list 'list
						    (list 'cons source suffix))
					      :suffix-value suffix))))))
		  (if
		      (eq suffix exp)
		      body
		    (macroexp-let*
		     (list
		      (list suffix exp))
		     body)))))
	    (if
		(eq path exp)
		body
	      (macroexp-let*
	       (list
		(list path exp))
	       body)))))
      (if
	  (eq source exp)
	  body
	(macroexp-let*
	 (list
	  (list source exp))
	 body)))))