bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46302: 28.0.50; cperl-mode cleanup: Eliminate dead code


From: Lars Ingebrigtsen
Subject: bug#46302: 28.0.50; cperl-mode cleanup: Eliminate dead code
Date: Fri, 05 Feb 2021 09:57:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

haj@posteo.de (Harald Jörg) writes:

> Did I hallucinate?  I had a look: The variable _is_ obsolete as of
> font-lock.el:
>
> (make-obsolete-variable 'font-lock-syntactic-keywords
>                         'syntax-propertize-function "24.1")
>
> Isn't `make-obsolete-variable` supposed to generate a compiler warning?

It is supposed to, but somehow it didn't...  I just tried putting a

        (setq-local font-lock-syntactic-keywords
                    (if cperl-syntaxify-by-font-lock
                        '((cperl-fontify-syntaxically))

into the function, and I got a 

cperl-mode.el:1678:15: Warning: ‘font-lock-syntactic-keywords’ is an obsolete
    variable (as of 24.1); use ‘syntax-propertize-function’ instead.

as expected.

Hm...  perhaps it's because of this?

-  (if cperl-use-syntax-table-text-property
-      (if (eval-when-compile (fboundp 'syntax-propertize-rules))
-          (progn

And the compiler got confused and didn't output a warning (always)?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]