Skip to content

Instantly share code, notes, and snippets.

@ijp
Last active August 29, 2015 14:11
Show Gist options
  • Save ijp/267be1c6a677db51277f to your computer and use it in GitHub Desktop.
Save ijp/267be1c6a677db51277f to your computer and use it in GitHub Desktop.
;; not tested
(defun galex-assoc-string (regexp alist)
(catch 'done
(while alist
(cond ((consp (car alist))
(if (string-match regexp (caar alist))
(throw 'done (car alist))))
((stringp (car alist))
(if (string-match regexp (car alist))
(throw 'done (car alist)))))
(setq alist (cdr alist)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment