[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8c0ae0f 2/2: Let byte-compiler recognize that local
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 8c0ae0f 2/2: Let byte-compiler recognize that local-variable-p implies boundp |
Date: |
Sat, 7 Sep 2019 17:04:20 -0400 (EDT) |
branch: master
commit 8c0ae0f93ad28d9ef419ec589170d8a670ec0932
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Let byte-compiler recognize that local-variable-p implies boundp
* lisp/emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Add
arguments to local-variable-p to the bound list.
* lisp/image-mode.el (image-toggle-display-image): Remove no longer
needed boundp check.
---
lisp/emacs-lisp/bytecomp.el | 2 +-
lisp/image-mode.el | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 40b4e2f..2fab11c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4071,7 +4071,7 @@ that suppresses all warnings during execution of BODY."
,condition '(fboundp functionp)
byte-compile-unresolved-functions))
(bound-list (byte-compile-find-bound-condition
- ,condition '(boundp default-boundp)))
+ ,condition '(boundp default-boundp local-variable-p)))
;; Maybe add to the bound list.
(byte-compile-bound-variables
(append bound-list byte-compile-bound-variables)))
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 8630ac0..9c7c91e 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -727,9 +727,8 @@ was inserted."
jka-compr-really-do-compress))
;; This means the buffer holds the
;; decrypted content (bug#21870).
- (not (and (boundp 'epa-file-encrypt-to)
- (local-variable-p
- 'epa-file-encrypt-to))))))
+ (not (local-variable-p
+ 'epa-file-encrypt-to)))))
(file-or-data
(if data-p
(let ((str