Skip to content

Instantly share code, notes, and snippets.

View kolewu's full-sized avatar

Uwe Koloska kolewu

  • voice INTER connect GmbH
View GitHub Profile
@jordonbiondo
jordonbiondo / describe-hook.el
Created September 25, 2014 13:32
describe-hook
(defun guess-all-hooks ()
"Return a list of all variables that are probably hook lists."
(let ((syms '()))
(mapatoms (lambda (sym)
(if (ignore-errors (symbol-value sym))
(let ((name (symbol-name sym)))
(when (string-match "-\\(hook[s]?\\|functions\\)$" name)
(push sym syms))))))
syms))