emacs-devel
[Top][All Lists]
Advanced

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

Re: master d067ac5: Remove more compat code from prolog.el


From: Lars Ingebrigtsen
Subject: Re: master d067ac5: Remove more compat code from prolog.el
Date: Fri, 25 Sep 2020 15:49:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> @@ -1999,7 +1997,7 @@ Argument BOUND is a buffer position limiting 
>> searching."
>>           (if (eq prolog-system 'mercury)
>>               (list
>>                (regexp-opt prolog-directives-i 'words)
>> -              0 'prolog-warning-face)))
>> +              0 prolog-warning-face)))
>>          ;; Inferior mode specific patterns
>>          (prompt
>>           ;; FIXME: Should be handled by comint already.
>
> I think this one is wrong: the font-lock data-structure built here
> should contain at this position an *expression* that returns a face when
> passed to `eval`.
>
> IOW with the above change the value held by `prolog-warning-face` needs
> to be "an expression that evaluates to a face" rather than "a face name".

All the other places there used the variable instead of the symbol,
I think?  For instance:

         ;; FIXME: Add to compilation-error-regexp-alist instead.
         (cond
          ((eq prolog-system 'sicstus)
           '("[ \t]*[0-9]+[ \t]+[0-9]+[ \t]*\\(Fail\\):"
             1 prolog-warning-face))
          ((eq prolog-system 'swi)
           '("[ \t]*\\(Fail\\):[ \t]*([ \t0-9]*)" 1 prolog-warning-face))

So I was just trying to make it more consistent.

-- 
(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]