From b0d07396e8d970407a17388cdc207b9f3608f90e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 3 Aug 2021 19:02:11 -0400 Subject: [PATCH] * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warning Also remove "WARNING" annotations after confirming that he code was right. --- etc/NEWS | 2 +- lisp/emacs-lisp/cl-generic.el | 12 ++++++------ lisp/frame.el | 6 +----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index fb6eddc754f..86aeea69ca1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -813,7 +813,7 @@ It is now defined as a generalized variable that can be used with --- *** 'form' in '(eql form)' specializers in 'cl-defmethod' is now evaluated. This corresponds to the behaviour of defmethod in Common Lisp Object System. -A warning is issued when old style is used. +For compatibility, '(eql SYMBOL)' does not evaluate SYMBOL, for now. ** New minor mode 'cl-font-lock-built-in-mode' for 'lisp-mode'. The mode provides refined highlighting of built-in functions, types, diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 941e436ff78..db5a5a0c89a 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -1161,7 +1161,12 @@ These match if the argument is `eql' to VAL." (let ((form (cadr specializer))) (puthash (if (or (not (symbolp form)) (macroexp-const-p form)) (eval form t) - (message "Quoting obsolete `eql' form: %S" specializer) + ;; FIXME: Compatibility with Emacs<28. For now emitting + ;; a warning would be annoying for third party packages + ;; which can't use the new form without breaking compatibility + ;; with older Emacsen, but in the future we should emit + ;; a warning. + ;; (message "Quoting obsolete `eql' form: %S" specializer) form) specializer cl--generic-eql-used)) (list cl--generic-eql-generalizer)) @@ -1274,11 +1279,6 @@ Used internally for the (major-mode MODE) context specializers." (cl-generic-define-context-rewriter major-mode (mode &rest modes) `(major-mode ,(if (consp mode) ;;E.g. could be (eql ...) - ;; WARNING: unsure whether this - ;; “could be (eql ...)” commentary (or code) - ;; should be adjusted - ;; following the (planned) changes to eql specializer. - ;; Bug #47327 (progn (cl-assert (null modes)) mode) `(derived-mode ,mode . ,modes)))) diff --git a/lisp/frame.el b/lisp/frame.el index 8c05ad2fe5c..146fe278b3e 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -36,11 +36,7 @@ as its argument.") (cl-generic-define-context-rewriter window-system (value) ;; If `value' is a `consp', it's probably an old-style specializer, ;; so just use it, and anyway `eql' isn't very useful on cons cells. - `(window-system ,(if (consp value) value - ;; WARNING: unsure whether this eql expression - ;; is actually an eql specializer. - ;; Bug #47327 - `(eql ',value)))) + `(window-system ,(if (consp value) value `(eql ',value)))) (cl-defmethod frame-creation-function (params &context (window-system nil)) ;; It's tempting to get rid of tty-create-frame-with-faces and turn it into -- 2.39.2