From 8d0c8076c3f2c27bd8ff0dbc72d046c64e1dde44 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Sat, 28 Sep 2024 22:04:19 +0200 Subject: Warn about :reverse-video in defface This attribute keyword has been non-working in defface for 14 years, thus warning about it is both safe and decent. * lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-face-spec): Warn and suggest :inverse-video to be used instead. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-defface-spec): Add a test case. * etc/NEWS: Notify the user. --- test/lisp/emacs-lisp/bytecomp-tests.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/lisp/emacs-lisp/bytecomp-tests.el') diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index cce6b1221fc..39c3732581a 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -2000,6 +2000,10 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \ (bytecomp--with-warning-test (rx "`:inverse' is not a valid face attribute keyword") (df '((t (:background "blue" :inverse t))))) ; old attr list syntax + (bytecomp--with-warning-test + (rx "Face attribute `:reverse-video' is obsolete;" + " use `:inverse-video' instead") + (df '((t :background "red" :reverse-video t)))) (bytecomp--with-warning-test (rx "Value for face attribute `:inherit' should not be quoted") (df '((t :inherit 'other)))) -- cgit v1.2.3