Currently I'm using a fairly inefficient way to check if one list uses another list at it's end. Is there a more efficient way to do this?
(defun is-in-list (ls-haystack ls-ends-with)
(catch 'found
(while (not (or (eq ls-haystack t) (null ls-haystack)))
(when (eq ls-haystack ls-ends-with)
(throw 'found t))
(setq ls-haystack (cdr ls-haystack)))))