Function: gptel-make-fsm--cmacro

gptel-make-fsm--cmacro is a function defined in gptel-request.el.

Signature

(gptel-make-fsm--cmacro CL-WHOLE &cl-quote &key STATE TABLE HANDLERS INFO)

Documentation

compiler-macro for gptel-make-fsm.

Source Code

;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel-request.el
;; Could not find source code, showing raw function object.
#[(cl-whole &rest --cl-rest--)
  ((let*
       ((state
	 (car
	  (cdr (or (plist-member --cl-rest-- ':state) '(nil 'INIT)))))
	(table
	 (car
	  (cdr
	   (or (plist-member --cl-rest-- ':table)
	       '(nil gptel-request--transitions)))))
	(handlers
	 (car
	  (cdr
	   (or (plist-member --cl-rest-- ':handlers)
	       '(nil gptel-request--handlers)))))
	(info (car (cdr (plist-member --cl-rest-- ':info)))))
     (progn
       (let ((--cl-keys-- --cl-rest--))
	 (while --cl-keys--
	   (cond
	    ((memq (car --cl-keys--)
		   '(:state :table :handlers :info :allow-other-keys))
	     (unless (cdr --cl-keys--)
	       (error "Missing argument for %s" (car --cl-keys--)))
	     (setq --cl-keys-- (cdr (cdr --cl-keys--))))
	    ((car (cdr (memq ':allow-other-keys --cl-rest--)))
	     (setq --cl-keys-- nil))
	    (t
	     (error
	      "Keyword argument %S not one of (:state :table :handlers :info)"
	      (car --cl-keys--))))))
       (cl-block gptel-make-fsm--cmacro
	 (cl--defsubst-expand '(state table handlers info)
			      '(cl-block gptel-make-fsm
				 (record 'gptel-fsm state table
					 handlers info))
			      nil cl-whole nil state table handlers
			      info)))))
  (cl-struct-gptel-fsm-tags jotain-doc--kind-helpful
			    jotain-doc--sym-pkg jotain-doc--face-syms
			    jotain-doc--var-syms jotain-doc--fun-syms
			    jotain-doc--skipped jotain-doc--pkg-dirs
			    jotain-doc--quick)
  nil
  "compiler-macro for `gptel-make-fsm'.\n\n(fn CL-WHOLE &cl-quote &key STATE TABLE HANDLERS INFO)"]