Skip to content

Instantly share code, notes, and snippets.

Avatar

Uwe Koloska kolewu

  • voice INTER connect GmbH
View GitHub Profile
View describe-hook.el
(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))