aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd2024-09-28 22:04:19 +0200
committerMattias EngdegÄrd2024-09-29 12:19:19 +0200
commit8d0c8076c3f2c27bd8ff0dbc72d046c64e1dde44 (patch)
treeb4e89553c1c2605cdc761a010f07fd1338dd118e /lisp
parentdfdeee839ac5475a7788707228dcbc998426ad7f (diff)
downloademacs-8d0c8076c3f2c27bd8ff0dbc72d046c64e1dde44.tar.gz
emacs-8d0c8076c3f2c27bd8ff0dbc72d046c64e1dde44.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 1c84fe0804b..47df26f01d6 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5396,15 +5396,18 @@ FORM is used to provide location, `bytecomp--cus-function' and
5396 :underline :overline :strike-through :box 5396 :underline :overline :strike-through :box
5397 :inverse-video :stipple :font 5397 :inverse-video :stipple :font
5398 ;; FIXME: obsolete keywords, warn about them too? 5398 ;; FIXME: obsolete keywords, warn about them too?
5399 ;; `:reverse-video' is very rare.
5400 :bold ; :bold t = :weight bold 5399 :bold ; :bold t = :weight bold
5401 :italic ; :italic t = :slant italic 5400 :italic ; :italic t = :slant italic
5402 :reverse-video ; alias for :inverse-video
5403 )) 5401 ))
5404 (when (eq (car-safe val) 'quote) 5402 (when (eq (car-safe val) 'quote)
5405 (bytecomp--cus-warn 5403 (bytecomp--cus-warn
5406 (list val atts sp spec) 5404 (list val atts sp spec)
5407 "Value for face attribute `%s' should not be quoted" attr))) 5405 "Value for face attribute `%s' should not be quoted" attr)))
5406 ((eq attr :reverse-video)
5407 (bytecomp--cus-warn
5408 (list atts sp spec)
5409 (concat "Face attribute `:reverse-video' is obsolete;"
5410 " use `:inverse-video' instead")))
5408 (t 5411 (t
5409 (bytecomp--cus-warn 5412 (bytecomp--cus-warn
5410 (list atts sp spec) 5413 (list atts sp spec)