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: Simon Wright
Subject: Re: [Ada-mode-users] Keywords not being identified in ada-mode 5.3.1 (or 5.2.2)
Date: Tue, 13 Nov 2018 18:41:32 +0000

I'm pretty sure I've been replying just to Jonty, not to the list. Sorry for confusion.

On 12 Nov 2018, at 10:42, Jonty Needham <address@hidden> wrote:

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.

I just downloaded GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31 and I see exactly the same as Jonty so long as I use ada-mode from elpa.

I'm pretty sure the problem is at the end of (ada-mode) in ada-mode.el, where the latest code from mtn has

 (if (<= emacs-major-version 25)
     ;; run-mode-hooks does _not_ call hack-local-variables
     (add-hook 'hack-local-variables-hook 'ada-mode-post-local-vars nil t)
   ;; >= 26; run-mode-hooks _does_ call hack-local-variables
   (ada-mode-post-local-vars))

vs elpa, just

 (add-hook 'hack-local-variables-hook 'ada-mode-post-local-vars nil t)

reply via email to

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