summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-06-20 18:31:05 +0000
committerAlan Mackenzie <acm@muc.de>2022-06-20 18:31:05 +0000
commit4ae315f7c3b5bc370d9d66eab5428685a6097606 (patch)
tree0b7cea569565de36bba458f1e0e144727ae68785 /lisp
parent54e350977148df1c2e26d83492ee3c6668c047d1 (diff)
downloademacs-4ae315f7c3b5bc370d9d66eab5428685a6097606.tar.gz
emacs-4ae315f7c3b5bc370d9d66eab5428685a6097606.tar.bz2
emacs-4ae315f7c3b5bc370d9d66eab5428685a6097606.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el3
1 files changed, 1 insertions, 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