> Besides, the code can be simpler. > Thanks for your suggestions; simplified patch to tls.el attached. A few questions below: > + ;; advance point to after all informational messages that > + ;; `openssl s_client' and `gnutls' print > + (lexical-let ((attempts tls-end-of-info-match-attempts) > + (start-of-data nil)) > > Why not ordinary let? Out of curiosity: why would ordinary `let' be better here? > + (not (= 0 (if (> attempts 0) (decf attempts) -1))) > > I think there should not be a limit -- it should just keep looping > until it finds what it is looking for. > Yes, but this will result in a endless loop if the regex does not match the program output for some reason (for instance, a new version of `gnutls' changes the wording of the messages). I understand that this problem may occur in many places, and that tls.el would already loop forever if `tls-success' does not match; but I would rather add more "watchdog" counters instead... Anyway, I removed the `attempts' counter and related code, as per your suggestion. -- Riccardo Murri, via Galeazzo Alessi 61, 00176 Roma