<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>60617</integer>
    </number>
    <user>
      <string>Nafai</string>
    </user>
    <title>
      <string>flymake mode configuration</string>
    </title>
    <contents>
      <string>(when (load &quot;flymake&quot; t) 
         (defun flymake-pyflakes-init () 
           (let* ((temp-file (flymake-init-create-temp-buffer-copy 
                              'flymake-create-temp-with-folder-structure)) 
              (local-file (file-relative-name 
                           temp-file 
                           (file-name-directory buffer-file-name)))) 
             (list &quot;pyflakes&quot; (list local-file)))) 

         (add-to-list 'flymake-allowed-file-name-masks 
                  '(&quot;\\.py\\'&quot; flymake-pyflakes-init))) 

(load-library &quot;flymake-cursor&quot;)
(add-hook 'find-file-hook 'flymake-find-file-hook)
</string>
    </contents>
    <universal-time>
      <integer>3419557099</integer>
    </universal-time>
    <channel>
      <string>None</string>
    </channel>
    <colorization-mode>
      <string>Emacs Lisp</string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
  </paste>
  <annotation>
    <number>
      <integer>1</integer>
    </number>
    <user>
      <string>Nafai</string>
    </user>
    <title>
      <string>Flymake Cursor</string>
    </title>
    <contents>
      <string>;; -*- emacs-lisp -*-
;; License: Gnu Public License
;;
;; Additional functionality that makes flymake error messages appear
;; in the minibuffer when point is on a line containing a flymake
;; error. This saves having to mouse over the error, which is a
;; keyboard user's annoyance

;;flymake-ler(file line type text &amp;optional full-file)
(defun show-fly-err-at-point ()
  &quot;If the cursor is sitting on a flymake error, display the
message in the minibuffer&quot;
  (interactive)
  (let ((line-no (line-number-at-pos)))
    (dolist (elem flymake-err-info)
      (if (eq (car elem) line-no)
	  (let ((err (car (second elem))))
	    (message &quot;%s&quot; (fly-pyflake-determine-message err)))))))

(defun fly-pyflake-determine-message (err)
  &quot;pyflake is flakey if it has compile problems, this adjusts the
message to display, so there is one ;)&quot;
  (cond ((not (or (eq major-mode 'Python) (eq major-mode 'python-mode) t)))
	((null (flymake-ler-file err))
	 ;; normal message do your thing
	 (flymake-ler-text err))
	(t ;; could not compile err
	 (format &quot;compile error, problem on line %s&quot; (flymake-ler-line err)))))

(defadvice flymake-goto-next-error (after display-message activate compile)
  &quot;Display the error in the mini-buffer rather than having to mouse over it&quot;
  (show-fly-err-at-point))

(defadvice flymake-goto-prev-error (after display-message activate compile)
  &quot;Display the error in the mini-buffer rather than having to mouse over it&quot;
  (show-fly-err-at-point))

(defadvice flymake-mode (before post-command-stuff activate compile)
  &quot;Add functionality to the post command hook so that if the
cursor is sitting on a flymake error the error information is
displayed in the minibuffer (rather than having to mouse over
it)&quot;
  (set (make-local-variable 'post-command-hook)
       (cons 'show-fly-err-at-point post-command-hook))) </string>
    </contents>
    <universal-time>
      <integer>3419557139</integer>
    </universal-time>
    <channel>
      <string>None</string>
    </channel>
    <colorization-mode>
      <string></string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
  </annotation>
</paste-with-annotations>