[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104890: * progmodes/flymake.el (flym
From: |
Lars Magne Ingebrigtsen |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104890: * progmodes/flymake.el (flymake-mode): If the buffer isn't |
Date: |
Sun, 03 Jul 2011 00:55:41 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104890
fixes bug(s): http://debbugs.gnu.org/6084
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 00:55:41 +0200
message:
* progmodes/flymake.el (flymake-mode): If the buffer isn't
associated with a file, refuse to run instead of erroring out
(bug#6084).
modified:
lisp/ChangeLog
lisp/progmodes/flymake.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-07-02 21:42:49 +0000
+++ b/lisp/ChangeLog 2011-07-02 22:55:41 +0000
@@ -1,5 +1,9 @@
2011-07-02 Lars Magne Ingebrigtsen <address@hidden>
+ * progmodes/flymake.el (flymake-mode): If the buffer isn't
+ associated with a file, refuse to run instead of erroring out
+ (bug#6084).
+
* textmodes/fill.el (fill-region): Remove the "Ordinarily" from
the doc string, since it appears that using `fill-column' always
controls the width (bug#7845).
=== modified file 'lisp/progmodes/flymake.el'
--- a/lisp/progmodes/flymake.el 2011-07-01 10:33:50 +0000
+++ b/lisp/progmodes/flymake.el 2011-07-02 22:55:41 +0000
@@ -1339,8 +1339,12 @@
;; Turning the mode ON.
(flymake-mode
- (if (not (flymake-can-syntax-check-file buffer-file-name))
- (flymake-log 2 "flymake cannot check syntax in buffer %s"
(buffer-name))
+ (cond
+ ((not buffer-file-name)
+ (message "Flymake unable to run without a buffer file name"))
+ ((not (flymake-can-syntax-check-file buffer-file-name))
+ (flymake-log 2 "flymake cannot check syntax in buffer %s" (buffer-name)))
+ (t
(add-hook 'after-change-functions 'flymake-after-change-function nil t)
(add-hook 'after-save-hook 'flymake-after-save-hook nil t)
(add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
@@ -1352,7 +1356,7 @@
(run-at-time nil 1 'flymake-on-timer-event (current-buffer)))
(when flymake-start-syntax-check-on-find-file
- (flymake-start-syntax-check))))
+ (flymake-start-syntax-check)))))
;; Turning the mode OFF.
(t
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104890: * progmodes/flymake.el (flymake-mode): If the buffer isn't,
Lars Magne Ingebrigtsen <=