Function: nnselect-categorize--inliner

nnselect-categorize--inliner is a function defined in nnselect.el.gz.

Signature

(nnselect-categorize--inliner INLINE--FORM SEQUENCE KEYFUNC &optional VALUEFUNC)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnselect.el.gz
;; Closure converted to defun by helpful.
(defun nnselect-categorize--inliner
    (inline--form sequence keyfunc &optional valuefunc)
  (ignore inline--form)
  (catch 'inline--just-use
    (let*
	((exp sequence)
	 (sequence
	  (if
	      (macroexp-copyable-p exp)
	      exp
	    (make-symbol "sequence")))
	 (body
	  (let*
	      ((exp keyfunc)
	       (keyfunc
		(if
		    (macroexp-copyable-p exp)
		    exp
		  (make-symbol "keyfunc")))
	       (body
		(let*
		    ((exp valuefunc)
		     (valuefunc
		      (if
			  (macroexp-copyable-p exp)
			  exp
			(make-symbol "valuefunc")))
		     (body
		      (list 'let
			    (list
			     (list 'valuefunc
				   (list 'or valuefunc
					 (list 'quote 'identity)))
			     'result)
			    (list 'unless
				  (list 'null sequence)
				  (list 'mapc
					(list 'lambda
					      (list 'member)
					      (list 'let*
						    (list
						     (list 'key
							   (list 'funcall keyfunc 'member))
						     (list 'value
							   (list 'funcall 'valuefunc 'member))
						     (list 'kr
							   (list 'assoc 'key 'result)))
						    (list 'if 'kr
							  (list 'push 'value
								(list 'cdr 'kr))
							  (list 'push
								(list 'list 'key 'value)
								'result))))
					(list 'reverse sequence))
				  'result))))
		  (if
		      (eq valuefunc exp)
		      body
		    (macroexp-let*
		     (list
		      (list valuefunc exp))
		     body)))))
	    (if
		(eq keyfunc exp)
		body
	      (macroexp-let*
	       (list
		(list keyfunc exp))
	       body)))))
      (if
	  (eq sequence exp)
	  body
	(macroexp-let*
	 (list
	  (list sequence exp))
	 body)))))