* ada-mode missing syntax checking
@ 1999-01-31 0:00 Jerry van Dijk
1999-01-31 0:00 ` Matthew Heaney
0 siblings, 1 reply; 4+ messages in thread
From: Jerry van Dijk @ 1999-01-31 0:00 UTC (permalink / raw)
The new ada-mode (well, gnat-mode would be a better name) is quite nice,
I find the project facility especially handy.
However, what I am really missing is the ada-check-syntax (C-c C-v) command.
Although the keys are defined in adamode.el, the implementation of it seems
to have gone missing.
Since I use this command a lot (to do a quick check for stupid and not so
stupid errors) while programming, I wonder if anyone knows how to put this
command back in.
Jerry.
--
-- Jerry van Dijk | Leiden, Holland
-- Team Ada | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ada-mode missing syntax checking
1999-01-31 0:00 ada-mode missing syntax checking Jerry van Dijk
@ 1999-01-31 0:00 ` Matthew Heaney
1999-02-01 0:00 ` Pascal Obry
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Heaney @ 1999-01-31 0:00 UTC (permalink / raw)
jerry@jvdsys.stuyts.nl (Jerry van Dijk) writes:
> The new ada-mode (well, gnat-mode would be a better name) is quite nice,
> I find the project facility especially handy.
>
> However, what I am really missing is the ada-check-syntax (C-c C-v) command.
> Although the keys are defined in adamode.el, the implementation of it seems
> to have gone missing.
>
> Since I use this command a lot (to do a quick check for stupid and not so
> stupid errors) while programming, I wonder if anyone knows how to put this
> command back in.
Actually, I never do just syntax checking. Instead, I prefer to use
gnatf, to do a (very) fast compile without generating any object code.
Here are my ada-mode bindings:
(add-hook 'ada-mode-hook
'(lambda ()
;;; (define-key ada-mode-map "\C-c\C-r" 'mjh-format-record)
(define-key ada-mode-map "\C-c\C-v" 'mjh-ada-check-correctness)
(define-key ada-mode-map "\C-c\C-m" 'mjh-ada-compile)
(define-key ada-mode-map "\C-x'" 'next-error)
(define-key ada-mode-map "\C-cg" 'goto-line)
;;; (define-key ada-mode-map "\C-c\C-n" 'mjh-format-named-list)
(define-key ada-mode-map "\C-c\C-o" 'ff-find-other-file)
(column-number-mode 1)
(turn-on-auto-fill)))
The check-correctness defun just calls gnatf (with the option that says
to generate detailed cross-reference info, but you might not care about
that):
(defun mjh-ada-check-correctness ()
"Checks correctness of Ada unit in current buffer."
(interactive)
(compile (concat "gnatf -x5 " (buffer-file-name))))
Here's my compile command too. (I think there are variables you can use
to specify command line args, but I never bothered playing around with
them.)
(defun mjh-ada-compile ()
"Does an Ada compile of the current buffer."
(interactive)
(compile (concat "gnatmake -gnatao -g " (buffer-file-name))))
If you want to do syntax checking again, then bind the command
gcc -c -gnats <filename>
to the key sequence C-c C-v. Something like
(defun mjh-ada-check-syntax ()
"Check syntax of file associated with current buffer."
(interactive)
(compile (concat "gcc -c -gnats ") (buffer-file-name)))
and then bind it as I've shown above.
Note, however, that I'm using Rolf Ebert's ada-mode, with gnat 3.10p.
ACT has released its own version of ada-mode, so the information I've
given above may have to be adjusted if you're using the ACT version.
You may want to post questions like this to the ada-mode mailing list.
Here is info about how to subscribe:
From: Samuel Tardieu <sam@ada.eu.org>
There is a mailing-list indeed (created a long time ago by Rolf)! It is
located at ada-mode@inf.enst.fr. If someone wants to subscribe, she has
to send a mail with subject "subscribe" to ada-mode-request@inf.enst.fr.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ada-mode missing syntax checking
1999-01-31 0:00 ` Matthew Heaney
@ 1999-02-01 0:00 ` Pascal Obry
1999-02-02 0:00 ` robert_dewar
0 siblings, 1 reply; 4+ messages in thread
From: Pascal Obry @ 1999-02-01 0:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
Matthew Heaney a �crit dans le message ...
>jerry@jvdsys.stuyts.nl (Jerry van Dijk) writes:
>
>> The new ada-mode (well, gnat-mode would be a better name) is quite nice,
>> I find the project facility especially handy.
>>
>> However, what I am really missing is the ada-check-syntax (C-c C-v)
command.
>> Although the keys are defined in adamode.el, the implementation of it
seems
>> to have gone missing.
>>
>> Since I use this command a lot (to do a quick check for stupid and not so
>> stupid errors) while programming, I wonder if anyone knows how to put
this
>> command back in.
>
>
>Actually, I never do just syntax checking. Instead, I prefer to use
>gnatf, to do a (very) fast compile without generating any object code.
>
gnatf does not exist with GNAT 3.11.
Pascal.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ada-mode missing syntax checking
1999-02-01 0:00 ` Pascal Obry
@ 1999-02-02 0:00 ` robert_dewar
0 siblings, 0 replies; 4+ messages in thread
From: robert_dewar @ 1999-02-02 0:00 UTC (permalink / raw)
In article <793r51$7u3$1@cf01.edf.fr>,
"Pascal Obry" <p.obry@der.edf.fr> wrote:
> gnatf does not exist with GNAT 3.11.
the equivalent is gcc -c -gnatc, that was all gnatf
did in any case!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-02-02 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-31 0:00 ada-mode missing syntax checking Jerry van Dijk
1999-01-31 0:00 ` Matthew Heaney
1999-02-01 0:00 ` Pascal Obry
1999-02-02 0:00 ` robert_dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox