diff options
author | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
---|---|---|
committer | Tom Willemsen | 2011-03-07 09:04:49 +0100 |
commit | 94d2fc1815a919734353c942f224db1de4b4fcb8 (patch) | |
tree | 4168e816ead132bfa3510e272427837c3895f5e2 /emacs.d/nxhtml/related/flymake-helpers.el | |
parent | d0e7674fdb1de12c8de202d4028a5d7ed3669a6e (diff) | |
download | dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.tar.gz dotfiles-94d2fc1815a919734353c942f224db1de4b4fcb8.zip |
Django, org
* Added nxhtml, mostly for django support.
* Changed some org settings.
Diffstat (limited to 'emacs.d/nxhtml/related/flymake-helpers.el')
-rw-r--r-- | emacs.d/nxhtml/related/flymake-helpers.el | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/emacs.d/nxhtml/related/flymake-helpers.el b/emacs.d/nxhtml/related/flymake-helpers.el new file mode 100644 index 0000000..34468d5 --- /dev/null +++ b/emacs.d/nxhtml/related/flymake-helpers.el @@ -0,0 +1,78 @@ +;;; flymake-helpers.el --- Helper functions for flymake +;; +;; Author: Lennart Borgman (lennart O borgman A gmail O com) +;; Created: 2008-07-21T14:30:20+0200 Mon +;; Version: +;; Last-Updated: +;; URL: +;; Keywords: +;; Compatibility: +;; +;; Features that might be required by this library: +;; +;; None +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Commentary: +;; +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Change log: +;; +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth +;; Floor, Boston, MA 02110-1301, USA. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;;; Code: + +(eval-when-compile (require 'flymake)) + +;; (flymake-create-temp-intemp buffer-file-name nil) +(defun flymake-create-temp-intemp (file-name prefix) + "Return file name in temporary directory for checking FILE-NAME. +This is a replacement for `flymake-create-temp-inplace'. The +only difference is that it gives a file name in +`temporary-file-directory' instead of the same directory as +FILE-NAME. + +For the use of PREFIX see that function. + +Note that not making the temporary file in another directory +\(like here) will not work if the file you are checking depends +on relative paths to other files \(for the type of checks flymake +makes)." + (unless (stringp file-name) + (error "Invalid file-name")) + (or prefix + (setq prefix "flymake")) + (let* ((prefix (concat + (file-name-nondirectory (file-name-sans-extension file-name)) + "_" prefix)) + (suffix (concat "." (file-name-extension file-name))) + (temp-name (make-temp-file prefix nil suffix))) + (flymake-log 3 "create-temp-intemp: file=%s temp=%s" file-name temp-name) + temp-name)) + + +(provide 'flymake-helpers) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; flymake-helpers.el ends here |