This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |