Commit 05907bb3 authored by Glenn Morris's avatar Glenn Morris
Browse files

cl-macs `loop' fix for bug#7492.

* lisp/emacs-lisp/cl-macs.el (cl-parse-loop-clause):
Avoid infinite loop over windows.
parent bd77c2ef
2010-12-02 Glenn Morris <>
* emacs-lisp/cl-macs.el (cl-parse-loop-clause):
Avoid infinite loop over windows. (Bug#7492)
* progmodes/flymake.el (flymake-check-file-limit):
Allow nil to mean "no limit".
(flymake-check-patch-master-file-buffer): Update for above change.
......@@ -965,16 +965,25 @@ Valid clauses are:
((memq word '(window windows))
(let ((scr (and (memq (car loop-args) '(in of)) (cl-pop2 loop-args)))
(temp (make-symbol "--cl-var--")))
(temp (make-symbol "--cl-var--"))
(minip (make-symbol "--cl-minip--")))
(push (list var (if scr
(list 'frame-selected-window scr)
;; If we started in the minibuffer, we need to
;; ensure that next-window will bring us back there
;; at some point. (Bug#7492).
;; (Consider using walk-windows instead of loop if
;; you care about such things.)
(push (list minip `(minibufferp (window-buffer ,var)))
(push (list temp nil) loop-for-bindings)
(push (list 'prog1 (list 'not (list 'eq var temp))
(list 'or temp (list 'setq temp var)))
(push (list var (list 'next-window var)) loop-for-steps)))
(push (list var (list 'next-window var minip))
(let ((handler (and (symbolp word)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment