]> git.eshelyaron.com Git - emacs.git/commitdiff
Let byte-compiler recognize that local-variable-p implies boundp
authorNoam Postavsky <npostavs@gmail.com>
Sat, 7 Sep 2019 21:00:39 +0000 (17:00 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 7 Sep 2019 21:00:39 +0000 (17:00 -0400)
* 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
lisp/image-mode.el

index 40b4e2f4671f0d2545ded4aaad3e7147798735ca..2fab11c79df9bfecba934c96d4ee279697d354f9 100644 (file)
@@ -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)))
index 8630ac07e6d3d16690c51a499e3e5f67b82ab553..9c7c91eb58a11db65061dc9003337ce6954eabd5 100644 (file)
@@ -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