diff options
| author | Lars Ingebrigtsen | 2019-06-12 15:59:19 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-12 15:59:19 +0200 |
| commit | f2071b6de417ea079ab55298e8ca8f7bb2ad8d14 (patch) | |
| tree | bbdc2892ff80632a5ffbfda98eb2ff7f20f8131e /etc | |
| parent | b8350e52ef6201103b12db5ad8b9268452feb8b6 (diff) | |
| download | emacs-f2071b6de417ea079ab55298e8ca8f7bb2ad8d14.tar.gz emacs-f2071b6de417ea079ab55298e8ca8f7bb2ad8d14.zip | |
Add the new macro with-suppressed-warnings
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro.
* doc/lispref/compile.texi (Compiler Errors): Document
with-suppressed-warnings and deemphasise with-no-warnings
slightly.
* lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings):
New internal variable.
(byte-compile-warning-enabled-p): Heed
byte-compile--suppressed-warnings, bound via with-suppressed-warnings.
(byte-compile-initial-macro-environment): Provide a macro
expansion of with-suppressed-warnings.
(byte-compile-file-form-with-suppressed-warnings): New byte hunk
handler for the suppressed symbol machinery.
(byte-compile-suppressed-warnings): Ditto for the byteop.
(byte-compile-file-form-defmumble): Ditto.
(byte-compile-form, byte-compile-normal-call)
(byte-compile-normal-call, byte-compile-variable-ref)
(byte-compile-set-default, byte-compile-variable-set)
(byte-compile-function-form, byte-compile-set-default)
(byte-compile-warn-obsolete, byte-compile--declare-var): Pass the
symbol being warned in to byte-compile-warning-enabled-p.
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New
function.
(bytecomp-test--with-suppressed-warnings): Tests.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -1693,6 +1693,10 @@ valid event type. | |||
| 1693 | * Lisp Changes in Emacs 27.1 | 1693 | * Lisp Changes in Emacs 27.1 |
| 1694 | 1694 | ||
| 1695 | +++ | 1695 | +++ |
| 1696 | ** The new macro `with-suppressed-warnings' can be used to suppress | ||
| 1697 | specific byte-compile warnings. | ||
| 1698 | |||
| 1699 | +++ | ||
| 1696 | ** The 'append' arg of 'add-hook' is generalized to a finer notion of 'depth' | 1700 | ** The 'append' arg of 'add-hook' is generalized to a finer notion of 'depth' |
| 1697 | This makes it possible to control the ordering of functions more precisely, | 1701 | This makes it possible to control the ordering of functions more precisely, |
| 1698 | as was already possible in 'add-function' and `advice-add`. | 1702 | as was already possible in 'add-function' and `advice-add`. |