Created
October 25, 2013 10:00
-
-
Save jorgenschaefer/7152351 to your computer and use it in GitHub Desktop.
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 elisp-check () | |
"Check the current buffer for possible elisp problems. | |
This actually byte compiles the buffer, but throws away the | |
result and keeps only the warnings." | |
(interactive) | |
(let ((lisp (buffer-substring-no-properties (point-min) | |
(point-max)))) | |
(with-temp-buffer | |
(setq buffer-file-coding-system nil) | |
(set-buffer-multibyte t) | |
(insert lisp) | |
(let ((byte-compile-log-buffer (format "*Check for %s*" | |
(buffer-name))) | |
(byte-compile-verbose nil)) | |
(byte-compile-from-buffer (current-buffer)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment