Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created October 16, 2012 19:30
Show Gist options
  • Save jorgenschaefer/3901432 to your computer and use it in GitHub Desktop.
Save jorgenschaefer/3901432 to your computer and use it in GitHub Desktop.
(defun tracking-ignored-p (buffer faces)
"Return non-nil when BUFFER with FACES shouldn't be tracked.
This uses `tracking-ignored-buffers'. Actual returned value is
the entry from tracking-ignored-buffers that causes this buffer
to be ignored."
(catch 'return
(let ((buffer-name (buffer-name buffer)))
(dolist (entry tracking-ignored-buffers)
(if (stringp entry)
(and (string-match entry buffer-name)
(throw 'return entry))
(when (and (string-match (car entry) buffer-name)
(not (tracking-any-in (or (cdr entry)
tracking-faces-priorities)
faces)))
(throw 'return entry)))))
nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment