diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-11-27 18:24:29 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-11-27 18:24:29 +0200 |
commit | 0a85d12474e6551581bcf87de9129359c0f8c233 (patch) | |
tree | 2795ececf233c62949db15c42c40d801165f569a /doc/lispref/tips.texi | |
parent | 06d05fec84ded5d48aafc8649f861884afdec0b7 (diff) | |
download | emacs-0a85d12474e6551581bcf87de9129359c0f8c233.tar.gz emacs-0a85d12474e6551581bcf87de9129359c0f8c233.tar.bz2 emacs-0a85d12474e6551581bcf87de9129359c0f8c233.zip |
Fix ELisp "Warning Tips"
* doc/lispref/tips.texi (Warning Tips): Clarify when to use
'require' wrapped by 'eval-when-compile'. (Bug#29462)
Diffstat (limited to 'doc/lispref/tips.texi')
-rw-r--r-- | doc/lispref/tips.texi | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 17fd4a1027e..42a68677f58 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -534,9 +534,17 @@ that you know @emph{will} be defined, use a @code{declare-function} statement (@pxref{Declaring Functions}). @item -If you use many functions and variables from a certain file, you can -add a @code{require} for that package to avoid compilation warnings -for them. For instance, +If you use many functions, macros, and variables from a certain file, +you can add a @code{require} (@pxref{Named Features, require}) for +that package to avoid compilation warnings for them, like this: + +@example +(require 'foo) +@end example + +@noindent +If you need only macros from some file, you can require it only at +compile time (@pxref{Eval During Compile}). For instance, @example (eval-when-compile |