ada-mode-users
[Top][All Lists]
Advanced

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

Re: [Ada-mode-users] Keywords not being identified in ada-mode 5.3.1 (or


From: Jonty Needham
Subject: Re: [Ada-mode-users] Keywords not being identified in ada-mode 5.3.1 (or 5.2.2)
Date: Tue, 13 Nov 2018 15:21:22 +0000

Apologies.

Keyword identification works in Python and Bash. GPR files are correctly coloured too.

When starting emacs with emacs -Q filename.adb, keywords are recognised. The ada-mode-version comes up as 4.00.

I then eval my .emacs file and the keyword identification stays.

Note font-lock-keywords is not nil and global-font-lock-mode is not nil either.

Now, I don't know yet how to step through execution of ada-mode.el (trying to find that out as I'm no lisp guru to say the least) but when I evaluated ada-mode.el from the 5.3.1 area (in my emacs -Q instance) and turned ada-mode off and on I get the following error:

Wrong type argument: sequencep, "\\<\\(a\\(?b\\(?\\(?:ort\\|s\\|s\\(?:tract\\)?\\)\\|cce\\(?:pt\\|ss\\)\\|l\\)?:iased\\|l\\)\\|nd\\|rray\\|t\\)\\|b\\(?:egin\\|ody\\)\\|c\\(?:ase\\|onstant\\)\\|d\\(?:e\\(?:clare\\|l\\(?:ay\\|ta\\)\\)\\|igits\\|o)\\|e\\(?:ls\\)? (and then a few more like this, couldn't copy/paste as it appeared in the command area which disappears when entered).

So this is clearly the keywords that's going wrong here, although I don't know why yet.

On Mon, Nov 12, 2018 at 10:11 PM Stephen Leake <address@hidden> wrote:
You did not answer all of my questions.

Please give a recipe for reproducing this starting from emacs -Q

Jonty Needham <address@hidden> writes:

> This is interesting. When querying the value of font-lock-keywords in
> ada-mode I get:
> font-lock-keywords is a variable defined in ‘font-lock.el’.
> Its value is
> (t
>  (#1=("^[     ]*\\(#.*
> \\)"
>       (1 font-lock-preprocessor-face t))
>      #2=("\\<\\>"
>          (0 font-lock-keyword-face)))
>  #1# #2#)
> Local in buffer my_file.adb; global value is nil
>
>   This variable may be risky if used as a file-local variable.
> ...
>
> However in other languages, I get the full list of keywords.
>
> Jonty
>
>
> On Sun, Nov 11, 2018 at 6:01 PM Stephen Leake <
> address@hidden> wrote:
>
>> Jonty Needham <address@hidden> writes:
>>
>> > That's a helpful check, however font-lock-mode was enabled and disabling
>> it
>> > removes highlighting for comments and constants too. The parser is
>> whether
>> > in font-lock-mode or not, which I think is good. But keywords are not
>> being
>> > identified as such.
>>
>> Does font-lock work in other language files (ie, lisp, C)?
>>
>> In your Ada file:
>>
>> Is font-lock-keywords non-nil?
>>
>> Is global-font-lock-mode non-nil? (ada-mode checks that explicitly)
>>
>> What is the value of ada-language-version?
>>
>> If you are comfortable with elisp debugging, step thru the execution of
>> ada-mode; you may find the problem.
>>
>> Perhaps there is something odd about your file; send it to me?
>>
>>
>> --
>> -- Stephe
>>
>
>

--
-- Stephe

reply via email to

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