From b5a0cd4f30798a535b4a71241ed86e3c2b22fb4a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 5 Dec 2017 13:33:11 -0800 Subject: [PATCH] Add note in NEWS.md about :requires vs. :if --- etc/USE-PACKAGE-NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/USE-PACKAGE-NEWS b/etc/USE-PACKAGE-NEWS index 5873d699089..b959a7578e7 100644 --- a/etc/USE-PACKAGE-NEWS +++ b/etc/USE-PACKAGE-NEWS @@ -108,6 +108,14 @@ - Documentation added for the `:after`, `:defer-install`, `:delight`, `:requires`, `:when` and `:unless` keywords. +- `:requires SYM` is subtly different from `:if (featurep SYM)`, in that it + happens before the `:preface`. This means that using `:requires` will cause + definitions in the `:preface` to not be visible to the byte-compiler, + leading to possible warnings about unknown functions, or functions that may + not be available at run-time (which can generally be ignored, since + `:requires` is intended as a check for basic system functionality; `:after` + should be used to check for the presence of other modules). + - New undocumented (and currently experimental) keyword `:load` may be used to change the name of the actual package loaded, rather than the package name, and may even add other names. For example: `(use-package auctex :load -- 2.39.2