Good (or morning afternoon evening night) emacs -Q: ;; OK (with-temp-buffer (looking-at "^")) t ;; OK (with-temp-buffer (looking-back "^")) t ;; Bad: endless loop (with-temp-buffer (require 'thingatpt) (thing-at-point-looking-at "^")) In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.29) Repository revision: 27d343070d02210316e69e4f7da1faeea2d87608