From 4ae315f7c3b5bc370d9d66eab5428685a6097606 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 20 Jun 2022 18:31:05 +0000 Subject: [PATCH] Fix potential (goto-char nil) in byte-compile-warning-prefix * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): Replace a wrong 'or' form involving OFFSET with simply OFFSET. This prevents OFFSET from possibly being nil in the first branch of the containing `if' form. --- lisp/emacs-lisp/bytecomp.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2ae9aa13bb6..198eb4df5c8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1246,8 +1246,7 @@ Order is by depth-first search." load-file-name dir))) (t ""))) (offset (byte-compile--warning-source-offset)) - (pos (if (and byte-compile-current-file - (or offset (not symbols-with-pos-enabled))) + (pos (if (and byte-compile-current-file offset) (with-current-buffer byte-compile-current-buffer (let (new-l new-c) (save-excursion -- 2.39.2