diff options
| author | Noam Postavsky | 2019-09-07 17:00:39 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-09-07 17:00:39 -0400 |
| commit | 8c0ae0f93ad28d9ef419ec589170d8a670ec0932 (patch) | |
| tree | 53d273a6f558d4e75611b3b56c7d866b99f8de56 | |
| parent | 8d588f09e91e315c715cf824a9819a538a85cd9c (diff) | |
| download | emacs-8c0ae0f93ad28d9ef419ec589170d8a670ec0932.tar.gz emacs-8c0ae0f93ad28d9ef419ec589170d8a670ec0932.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | 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 40b4e2f4671..2fab11c79df 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." | |||
| 4071 | ,condition '(fboundp functionp) | 4071 | ,condition '(fboundp functionp) |
| 4072 | byte-compile-unresolved-functions)) | 4072 | byte-compile-unresolved-functions)) |
| 4073 | (bound-list (byte-compile-find-bound-condition | 4073 | (bound-list (byte-compile-find-bound-condition |
| 4074 | ,condition '(boundp default-boundp))) | 4074 | ,condition '(boundp default-boundp local-variable-p))) |
| 4075 | ;; Maybe add to the bound list. | 4075 | ;; Maybe add to the bound list. |
| 4076 | (byte-compile-bound-variables | 4076 | (byte-compile-bound-variables |
| 4077 | (append bound-list byte-compile-bound-variables))) | 4077 | (append bound-list byte-compile-bound-variables))) |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 8630ac07e6d..9c7c91eb58a 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -727,9 +727,8 @@ was inserted." | |||
| 727 | jka-compr-really-do-compress)) | 727 | jka-compr-really-do-compress)) |
| 728 | ;; This means the buffer holds the | 728 | ;; This means the buffer holds the |
| 729 | ;; decrypted content (bug#21870). | 729 | ;; decrypted content (bug#21870). |
| 730 | (not (and (boundp 'epa-file-encrypt-to) | 730 | (not (local-variable-p |
| 731 | (local-variable-p | 731 | 'epa-file-encrypt-to))))) |
| 732 | 'epa-file-encrypt-to)))))) | ||
| 733 | (file-or-data | 732 | (file-or-data |
| 734 | (if data-p | 733 | (if data-p |
| 735 | (let ((str | 734 | (let ((str |