Created
October 22, 2009 04:56
-
-
Save avdi/215742 to your computer and use it in GitHub Desktop.
Horrible elisp hack to keep flymake from confusing Merb, Rails, etc.
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
;; Hack up emacs-rails/flymake integration to make autotest happy | |
;; adapted from flymake.el | |
(defun abg-flymake-create-temp-inplace-without-ext (file-name prefix) | |
(unless (stringp file-name) | |
(error "Invalid file-name")) | |
(or prefix | |
(setq prefix "flymake")) | |
(let* ((temp-name (concat (file-name-sans-extension file-name) "." prefix))) | |
(flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) | |
temp-name)) | |
;; redefine to use my custom temp buffer naming method | |
(defun flymake-ruby-init () | |
(condition-case er | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'abg-flymake-create-temp-inplace-without-ext)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list rails-ruby-command (list "-c" local-file))) | |
('error ())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment