>> Sure, but here the loop is explicit in the looping program, so it >> could prevent the infloop. > > Indeed, I thought a loop like this would work without changing the documented behaviour as far as I can see: > > ,---- > | (let ((current-frame (selected-frame)) > | prev-frame > | frame) > | (while (and > | (not (eq frame current-frame)) > | (not (eq frame prev-frame))) > | (setq > | prev-frame frame > | frame (next-frame frame 0)))) > `---- Whatever we do here we won't fix the principal problem with next_frame namely that (progn (set-frame-parameter nil 'no-other-frame t) (next-frame nil 0)) can loop forever. I attach a patch that should fix the problems with 'make-frame-names-alist' and 'delete-other-frames' using 'frame-list' as base. martin