[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Towards a cleaner build
From: |
Lars Ingebrigtsen |
Subject: |
Re: Towards a cleaner build |
Date: |
Sun, 09 Jun 2019 17:40:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Some of these warnings are perhaps not, like, very useful to be able to
suppress, but I thought it'd be nice if the warnings you could suppress
is the same as you can do via byte-compile-warnings, so I've implemented
almost all of them.
So now the following monstrosity compiles without a single warning. :-)
;;; stest.el --- -*- lexical-binding: t -*-
(require 'stest-defs)
(defun obsolete ()
(declare (obsolete foo "22.1")))
(defun wrong-params (foo &optional _unused)
foo)
(with-suppressed-warnings ((lexical prefixless))
(defvar prefixless))
(with-suppressed-warnings ((redefine redefine))
(defun redefine (foo bar)
(cons foo bar)))
(defun tests ()
(with-suppressed-warnings ((constants nil))
(let ((nil t))
(message-mail)))
(with-suppressed-warnings ((obsolete obsolete))
(obsolete))
(with-suppressed-warnings ((callargs wrong-params))
(wrong-params 1 2 3))
(with-suppressed-warnings ((obsolete obsolete-variable))
obsolete-variable)
(with-suppressed-warnings ((mapcar mapcar))
(mapcar #'list '(1 2 3)))
(with-suppressed-warnings ((free-vars free-variable))
free-variable)
(with-suppressed-warnings ((suspicious set-buffer))
(save-excursion
(set-buffer (get-buffer-create "foo"))
nil))
)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: Towards a cleaner build: viper-ex, (continued)
- Re: Towards a cleaner build: viper-ex, Dmitry Gutov, 2019/06/13
- Re: Towards a cleaner build: viper-ex, Lars Ingebrigtsen, 2019/06/13
- Re: Towards a cleaner build: viper-ex, Dmitry Gutov, 2019/06/13
- Re: Towards a cleaner build, Stefan Monnier, 2019/06/09
- Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/10
- Re: Towards a cleaner build, Stefan Monnier, 2019/06/10
Re: Towards a cleaner build, Andreas Schwab, 2019/06/09
Re: Towards a cleaner build, Stefan Monnier, 2019/06/09
Re: Towards a cleaner build,
Lars Ingebrigtsen <=
Re: Towards a cleaner build, Stefan Monnier, 2019/06/09
Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09
Re: Towards a cleaner build, Stefan Monnier, 2019/06/09
Re: Towards a cleaner build, Lars Ingebrigtsen, 2019/06/09