[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ada-mode 7.0.1 and .gpr files
From: |
Stephen Leake |
Subject: |
Re: ada-mode 7.0.1 and .gpr files |
Date: |
Sat, 15 Feb 2020 15:00:58 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Ludovic Brenta <address@hidden> writes:
> Le 2020-02-12 22:45, Stephen Leake a écrit :
>>> (ada-parse-prj-file prj-file)
>>> (ada-select-prj-file prj-file)
>>>
>>> both functions declared in ada-mode.el. Now, in version 7,
>>> these functions are no longer there.
>>
>> Not quite; they are defined and marked obsolete. They both call
>> ada-select-prj-file-1 (which only needs to be called once, but is fast
>> the second time).
>>
>> Did you get an "obsolete" message, or some other error?
>
> After installing ada-mode 7 and visiting an Ada file,
> C-h f ada-parse-prj-file does say that the function is obsolete but
> I get no such message when executing the function.
Ah. The doc for 'make-obsolete' says the byte compiler warns about it,
_not_ that executing warns. That's pretty useless. I'll add an explicit
warning message when executed.
> Also, C-h f says this function is defined in
> .../share/emacs/26.1/lisp/progmodes/ada-xref.el and when I visit this
> file, it says it is part of GNU Emacs.
This indicates that something is loading/requiring 'ada-xref', which is
not in 7.0.1. You should find and delete that.
> So, it appears I have interference between the old ada-mode 4.00
> shipped with Emacs and ada-mode 7.0.1. How can I avoid this?
> How do you avoid this? Is there a plan to delete ada-mode 4.00
> from GNU emacs altogether?
ada-mode 4.0 is deleted in master, but that won't show up until emacs 27.
ELPA ada-mode used to have a "dummy" ada-xref.el to hide the core one;
clearly I deleted that too soon. I'll put it back; it will have to stay
until I drop support for emacs 26.
Attached are ada-xref.el, ada-stmt.el, ada-prj.el; put them in the
ada-mode-7.0.1 directory. Note that they display a message when loaded.
> Also, with ada-mode 7.0.1, I get no syntax highlighting except
> for comments. Do you think this might be related to the presence
> of ada-mode 4.00 somewhere on the lisp-path?
Could be.
> (I do have an external parser process running and I do have hidden
> buffers named " *Ada_wisi_parse*" and " *code-conversion-work*").
*code-conversion-work* is not related to ada-mode.
Most likely the problem is a version conflict; you may not have
ada_mode_wisi_lr1_parse from 7.0.1 installed, or it is not first on
PATH. The version the elisp is expecting is given by
wisi-process-parse-protocol-version and
ada-wisi-language-protocol-version. The executable will print its
version when executed from the command line; quit with "004quit" (or C-c).
What happens when you explicitly invoke M-x wisi-parse-buffer indent? If
you get no explicit error from that, do C-c C-f (Ada | Misc | Show last
parse error). Also look in the *Ada_wisi_parse* buffer; the first line
has the parse command, which should mention the buffer name. Is there
any mention of an exception, or an error?
--
-- Stephe
ada-xref.el
Description: application/emacs-lisp
ada-prj.el
Description: application/emacs-lisp
ada-stmt.el
Description: application/emacs-lisp