Hi - The attached patch switches bug-reference.el to use lexical binding. There don't appear to be any tests for bug-reference, but I've tested it locally and everything seems to work just fine. The patch also updates .dir-locals so that bug-reference-url-format is set in all modes, not just changelog mode. This helps users who e.g. use magit. Arguably that should be two commits. Just let me know if you'd prefer that and I can split it out. Thanks, Alex