diff options
author | Tom Willemsen | 2011-04-02 12:41:14 +0200 |
---|---|---|
committer | Tom Willemsen | 2011-04-02 12:41:14 +0200 |
commit | da3357de4c0cf49657fc6374213e934d3ca1b1bb (patch) | |
tree | 50e88c7253162d25d8e27fdf0c902876dce77c63 /emacs.d/00-functions.el | |
parent | 8a637b9d4d3a092ccdb231a7141c75924e474e85 (diff) | |
download | dotfiles-da3357de4c0cf49657fc6374213e934d3ca1b1bb.tar.gz dotfiles-da3357de4c0cf49657fc6374213e934d3ca1b1bb.zip |
Added functions and supercharged my fontlocking for C and PHP
Diffstat (limited to 'emacs.d/00-functions.el')
-rw-r--r-- | emacs.d/00-functions.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/emacs.d/00-functions.el b/emacs.d/00-functions.el new file mode 100644 index 0000000..3e429ec --- /dev/null +++ b/emacs.d/00-functions.el @@ -0,0 +1,21 @@ +(defun what-face (pos) + "Find out which face the current position uses" + (interactive "d") + (let ((face (or (get-char-property (point) 'read-face-name) + (get-char-property (point) 'face)))) + (if face + (message "Face: %s" face) + (message "No face at %d" pos)))) + +(defun my-comp-finish-function (buf str) + "Don't show compilation window if everything went ok" + (if (string-match "exited abnormally" str) + ;; there were errors + (message "compilation errors, press C-x ` to visit") + ;; no errors, make the compilation window go away in 0.5 seconds + (run-at-time 0.5 nil 'delete-windows-on buf) + (message "NO COMPILATION ERRORS!"))) + +(defun show-whitespace () + (interactive) + (whitespace-mode t)) |