comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: IDE's that support Ada
Date: Wed, 05 Nov 2014 08:25:21 -0600
Date: 2014-11-05T08:25:21-06:00	[thread overview]
Message-ID: <85lhnp7mi6.fsf@stephe-leake.org> (raw)
In-Reply-To: 87tx2eln3v.fsf@adaheads.sparre-andersen.dk

Jacob Sparre Andersen <jacob@jacob-sparre.dk> writes:

> Stephen Leake wrote:
>> Jacob Sparre Andersen <jacob@jacob-sparre.dk> writes:
>
>>> I'm not completely happy with the Emacs Ada mode indentation, but I
>>> mostly just live with it (and have a fix for the inserted TAB
>>> characters in my makefiles).
>>
>> ada-mode has nothing to do with makefiles, so I'm confused.
>
> My English isn't perfect: What I mean is that I have a "standard" rule
> in my makefiles for substituting TAB characters in Ada source files with
> spaces.

Ah, that makes sense. I do that in Emacs with:

      (add-hook 'before-save-hook
		(lambda () (untabify (point-min) (point-max)))
		nil t))

That's in ada-mode-hook (and in other modes where I want it); the full
code is:

(defun sal-ada-mode-setup ()
  (set (make-local-variable 'hippie-expand-try-functions-list)
	(list 'ada-skel-hippie-try
	      'try-expand-dabbrev
	      'try-expand-dabbrev-all-buffers
	      'try-expand-dabbrev-from-kill))

  (let ((case-fold-search t))
    (cond

     ((string-match "arm_info" default-directory)
      ;; Randy keeps tabs in files, indents 'case'
      (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
      (add-hook 'before-save-hook 'copyright-update nil t)
      )

     ((string-match "org.emacs.ada-mode.*/test" default-directory)
      ;; use default ada-mode options for tests
      (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
      (add-hook 'before-save-hook 'copyright-update nil t)
      )

     (t
      ;; my projects
      (setq ada-indent-when 0)
      (setq ada-indent-label 0)
      (setq ada-indent-record-rel-type 0)
      (setq ada-fill-comment-prefix "--  ");; match gnat style
      (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
      (add-hook 'before-save-hook 'copyright-update nil t)
      (add-hook 'before-save-hook
		(lambda () (untabify (point-min) (point-max)))
		nil t))
      )))

(setq ada-skel-initial-string "{header}")
(add-to-list 'ada-prj-parser-alist (cons "prj" 'ada-prj-parse-file-1))
(add-hook 'ada-mode-hook 'sal-ada-mode-setup)

-- 
-- Stephe


  reply	other threads:[~2014-11-05 14:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26 18:34 IDE's that support ADA nathandsash
2014-10-26 18:58 ` Martyn Pike
2014-10-26 19:02 ` Niklas Holsti
2014-11-14 22:38   ` rriehle
2014-11-16  0:38     ` David Botton
2014-10-26 21:33 ` David Botton
2014-10-29  1:52   ` Robert Love
2014-10-29  1:58     ` David Botton
2014-11-05 20:58       ` Wesley Pan
2014-10-28  7:38 ` Stephen Leake
2014-10-28 11:43   ` Peter Chapin
2014-10-29 21:47     ` Stephen Leake
2014-10-29 23:28       ` Peter Chapin
2014-10-29 23:48         ` Adam Beneschan
2014-11-01 21:58           ` Stephen Leake
2014-11-03 17:48             ` Adam Beneschan
2014-10-30  8:19         ` Dmitry A. Kazakov
2014-10-30 14:42           ` Adam Beneschan
2014-10-30 16:22             ` Peter Chapin
2014-11-01 22:01               ` Stephen Leake
2014-11-02 15:13                 ` Peter Chapin
2014-11-03 13:41                   ` Stephen Leake
2014-11-03  9:43                 ` IDE's that support Ada Jacob Sparre Andersen
2014-11-03 18:14                   ` Simon Wright
2014-11-04 17:46                   ` Stephen Leake
2014-11-04 19:35                     ` Simon Wright
2014-11-04 20:36                     ` Jacob Sparre Andersen
2014-11-05 14:25                       ` Stephen Leake [this message]
2014-11-01 21:53         ` IDE's that support ADA Stephen Leake
2014-11-01 22:46           ` Dmitry A. Kazakov
2014-11-02 15:10           ` Peter Chapin
2014-11-03 13:38             ` Stephen Leake
2014-11-03 17:00           ` Luke A. Guest
2014-11-03 18:52             ` David Botton
2014-11-03 19:50               ` Luke A. Guest
2014-11-03 20:46                 ` David Botton
2014-11-03 22:55                   ` Luke A. Guest
2014-11-04 18:11                     ` Stephen Leake
2014-11-04  3:41                 ` Dennis Lee Bieber
2014-11-04 18:10                 ` Stephen Leake
2014-11-04 18:03             ` Stephen Leake
2014-11-03 12:24       ` Florian Weimer
2014-10-28 12:59   ` David Botton
2014-10-29 21:51     ` Stephen Leake
2014-11-11  0:11 ` Hubert
2014-11-11  0:31   ` David Botton
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox