[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnu Emacs Ada mode beta test 7.0.0
From: |
Stephen Leake |
Subject: |
Re: Gnu Emacs Ada mode beta test 7.0.0 |
Date: |
Sun, 29 Dec 2019 12:15:20 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Simon Wright <address@hidden> writes:
> Now building & installing fine (while recovering from partial
> installs, I had to stop and restart emacs - more than once, I _think_
> - to end up with a consistent mode).
That makes sense.
> There used to be a command in gpr-mode, C-c C-p, which set the current
> file as the current GPR. I miss this!
> There's a line
> (define-key map "\C-c\C-P" 'gpr-set-as-project)
> in gpr-mode.el but no such function. (why P and not p?)
Here's a patch:
============================================================
--- gpr-mode.el 2c7b9a523c0b99641a63acbfa48691fc6ece3bf3
+++ gpr-mode.el babdd054c675212db8a73439103c638197e34d0e
@@ -352,6 +352,11 @@ Must match wisi-gpr.ads Language_Protoco
:type 'string
:group 'gpr)
+(defun gpr-set-as-project ()
+ "Set current buffer (a gpr file) as current project file."
+ (interactive)
+ (wisi-prj-dtrt-parse-file (buffer-file-name) (gpr-prj-default
(buffer-file-name)) (buffer-file-name)))
+
;;;;
;;;###autoload
(defun gpr-mode ()
============================================================
I don't know why P and not p.
> When in ada-mode, there's the "Wisi Prj Select" menu which could have
> a better name ("Ada Projects"?)
wisi projects can be used for any language; I use them for .wy and java
(both Android and windows).
They are competing with EDE projects.
> Was pleased to see that, if there's more than one project open,
> compiling an Ada source does so in the context of the correct GPR.
Good. Although that can get confusing, depending on which wisi function
you have in project-find-functions.
> I find that Ada source isn't fontified when opened (GPR source is): I
> toggled font-lock-mode to get fontification.
Do you have global-font-lock-mode enabled? If not, you need to add
font-lock-mode to ada-mode-hook.
Although you should also need to add it to gpr-mode-hook; is that true?
>
> Season's greetings!
Happy solstice
> & many thanks for the work.
Thanks for the feedback.
--
-- Stephe