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

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

Re: Gnu Emacs Ada mode 8.1.0 released.


From: Stephen Leake
Subject: Re: Gnu Emacs Ada mode 8.1.0 released.
Date: Sun, 29 Oct 2023 15:01:32 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (windows-nt)

Manuel Gómez <mgrojo@gmail.com> writes:

> El 28/10/23 a las 19:50, Stephen Leake escribió:
>> Manuel Gómez <mgrojo@gmail.com> writes:
>>> Also, running M-x ada-find-file gives this error:
>>>
>>> cl-no-applicable-method: No applicable method: project-roots,
>>> #s(ada-prj "emacs_gpr_mode" nil
>> Sigh. the Emacs project API keeps changing, it's hard to keep up.
>> project-roots is officially obsolete.
>> However, I don't see 'project-roots' called anywhere in gpr-mode or
>> related ELPA packages. Can you set debug-on-error to find out where it
>> is?
>> 
>
> Sure. This is Emacs 27.1, by the way.

I think there's a way to tell the debugger not to list the full record
elements in a stack trace; that would make this easier to read.

It seems project-roots is being called by project-find-file. In core
emacs 29, that's defined in lisp/progmodes/project.el, and does not call
project-roots.

But in emacs 27, it does call project-roots.

So wisi-projects should provide a body for project-roots, since it says
it's compatible with emacs 27.

The simplest is:

(cl-defmethod project-roots ((project wisi-prj))
  "Return the list containing the current project root."
  (list (project-root project)))

This should nominally go in wisi-prj.el, but you can put it anywhere.

Avoiding the warning about project-roots being obsolete when
byte-compiling with emacs 29 is black magic; I can never get that to
work right.

>   project-roots(#s(project))
>   project-find-file()
>   ada-find-file()
>   funcall-interactively(ada-find-file)
>   call-interactively(ada-find-file record nil)
>   command-execute(ada-find-file record)
>   execute-extended-command(nil "ada-find-file" "ada-find-file")
>   funcall-interactively(execute-extended-command nil "ada-find-file"
> "ada-find-file")
>   call-interactively(execute-extended-command nil nil)
>   command-execute(execute-extended-command)
>
>

-- 
-- Stephe



reply via email to

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