mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* progmodes/flymake.el (flymake-mode): If the buffer isn't
associated with a file, refuse to run instead of erroring out (bug#6084).
This commit is contained in:
parent
a8392169cd
commit
83319045a4
2 changed files with 11 additions and 3 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* 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).
|
||||
|
|
|
|||
|
|
@ -1339,8 +1339,12 @@ With arg, turn Flymake mode on if and only if arg is positive."
|
|||
|
||||
;; 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 @@ With arg, turn Flymake mode on if and only if arg is positive."
|
|||
(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
|
||||
|
|
|
|||
Loading…
Reference in a new issue