comp.lang.ada
 help / color / mirror / Atom feed
* Need help w/ ada-mode.el under Emacs 21.
@ 2003-07-29 10:28 Bobby D. Bryant
  2003-07-29 13:18 ` John McCabe
  2003-07-29 14:20 ` Stephen Leake
  0 siblings, 2 replies; 7+ messages in thread
From: Bobby D. Bryant @ 2003-07-29 10:28 UTC (permalink / raw)



After a general system upgrade my Ada-mode for Emacs is behaving
differently, and I'm having trouble restoring the earlier behavior.

The behavior that I want to suppress is that whenever you press return on
an empty line to create more whitespace I get an indentation on the new
line, and I want the cursor to stay at the left margin unless I press the
tab key.  Previously it would guess an indentation if I were in the middle
of a declaration or a statement, but not otherwise, and that is the
behavior that I would like to restore.

I see that I can suppress re-indentation of the *current* line by adding
(setq ada-indent-after-return nil) to my ~/.emacs, but that's not what I
want to change -- I want to change indentation of the line where the
cursor ends up after pressing return.  Nor do I want to disable
indentation altogether; I just want to disable contextless indentation. 
(While working on complicated problems I like to put "lose end" comments at
the left margin so I can find them more easily by skimming, and it's
really annoying to have to move every line back to the margin by hand.)

Any help would be appreciated.

-- 
Bobby Bryant
Austin, Texas




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-29 10:28 Need help w/ ada-mode.el under Emacs 21 Bobby D. Bryant
@ 2003-07-29 13:18 ` John McCabe
  2003-07-29 13:44   ` Bobby D. Bryant
  2003-07-29 14:20 ` Stephen Leake
  1 sibling, 1 reply; 7+ messages in thread
From: John McCabe @ 2003-07-29 13:18 UTC (permalink / raw)


On Tue, 29 Jul 2003 04:28:20 -0600, "Bobby D. Bryant"
<bdbryant@mail.utexas.edu> wrote:

>
>After a general system upgrade my Ada-mode for Emacs is behaving
>differently, and I'm having trouble restoring the earlier behavior.
>
>The behavior that I want to suppress is that whenever you press return on
>an empty line to create more whitespace I get an indentation on the new
>line, and I want the cursor to stay at the left margin unless I press the
>tab key.  Previously it would guess an indentation if I were in the middle
>of a declaration or a statement, but not otherwise, and that is the
>behavior that I would like to restore.
>
>I see that I can suppress re-indentation of the *current* line by adding
>(setq ada-indent-after-return nil) to my ~/.emacs, but that's not what I
>want to change -- I want to change indentation of the line where the
>cursor ends up after pressing return.  Nor do I want to disable
>indentation altogether; I just want to disable contextless indentation. 
>(While working on complicated problems I like to put "lose end" comments at
>the left margin so I can find them more easily by skimming, and it's
>really annoying to have to move every line back to the margin by hand.)
>
>Any help would be appreciated.

Are you now using a different version of ada-mode than before?

Has there been any change to your .emacs?

John

Best Regards
John McCabe

To reply by email replace 'nospam' with 'assen'



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-29 13:18 ` John McCabe
@ 2003-07-29 13:44   ` Bobby D. Bryant
  2003-07-29 13:58     ` John McCabe
  0 siblings, 1 reply; 7+ messages in thread
From: Bobby D. Bryant @ 2003-07-29 13:44 UTC (permalink / raw)


On Tue, 29 Jul 2003 13:18:50 +0000, John McCabe wrote:

> Are you now using a different version of ada-mode than before?

Presumably so, since the upgrade provided a newer version of Emacs.  I
tried to look at ada-mode on my system that hasn't been upgraded, but for
some reason it only had the compiled version of the ada-mode.el, so I had
trouble comparing them for changes.


> Has there been any change to your .emacs?

No, not before I started trying to fix it.

-- 
Bobby Bryant
Austin, Texas




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-29 13:44   ` Bobby D. Bryant
@ 2003-07-29 13:58     ` John McCabe
  2003-07-30  7:44       ` J�r�me Haguet
  0 siblings, 1 reply; 7+ messages in thread
From: John McCabe @ 2003-07-29 13:58 UTC (permalink / raw)


On Tue, 29 Jul 2003 07:44:01 -0600, "Bobby D. Bryant"
<bdbryant@mail.utexas.edu> wrote:

>On Tue, 29 Jul 2003 13:18:50 +0000, John McCabe wrote:
>
>> Are you now using a different version of ada-mode than before?
>
>Presumably so, since the upgrade provided a newer version of Emacs.  I
>tried to look at ada-mode on my system that hasn't been upgraded, but for
>some reason it only had the compiled version of the ada-mode.el, so I had
>trouble comparing them for changes.
>
>
>> Has there been any change to your .emacs?
>
>No, not before I started trying to fix it.

The reason I asked about the version is that the version that comes
with Emacs is different to the ACT version. You may want to try to
install the ACT version from
http://libre.act-europe.fr/adamode/main.html and make sure it is
loaded before the default version to see if that helps.


Best Regards
John McCabe

To reply by email replace 'nospam' with 'assen'



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-29 10:28 Need help w/ ada-mode.el under Emacs 21 Bobby D. Bryant
  2003-07-29 13:18 ` John McCabe
@ 2003-07-29 14:20 ` Stephen Leake
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Leake @ 2003-07-29 14:20 UTC (permalink / raw)


"Bobby D. Bryant" <bdbryant@mail.utexas.edu> writes:

> I see that I can suppress re-indentation of the *current* line by adding
> (setq ada-indent-after-return nil) to my ~/.emacs, but that's not what I
> want to change -- I want to change indentation of the line where the
> cursor ends up after pressing return.  Nor do I want to disable
> indentation altogether; I just want to disable contextless indentation. 
> (While working on complicated problems I like to put "lose end" comments at
> the left margin so I can find them more easily by skimming, and it's
> really annoying to have to move every line back to the margin by hand.)

I suspect you are going to have to write a custom indentation
function. 

It's easy to disable all indentation on return; just rebind the return
key.

But what you are asking for is more complicated. I suspect the
ada-mode with emacs 21 got "smarter", and therefore now does more than
you want.

You can retrieve the ada-mode source from an old distribution of
Emacs, but it's pretty dense (I've tried to fix indentation issues
myself), so that probably won't help much.

Post a few actual examples of "before", "after" and "desired"; maybe
I'll have an idea.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-29 13:58     ` John McCabe
@ 2003-07-30  7:44       ` J�r�me Haguet
  2003-07-30 10:06         ` John McCabe
  0 siblings, 1 reply; 7+ messages in thread
From: J�r�me Haguet @ 2003-07-30  7:44 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

Hmmm....

As far as I know, the real last version of ada-*.el is at
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/

For example, ada-mode 3.6 from http://libre.act-europe.fr/adamode/main.html
does not seem to support (perfectly) the new .ali format appeared in gnat
3.15.
If I remember correctly ...

J�r�me


"John McCabe" <john@nospam.demon.co.uk> a �crit dans le message de
news:3f267d53.21610814@news.btclick.com...
> On Tue, 29 Jul 2003 07:44:01 -0600, "Bobby D. Bryant"
> <bdbryant@mail.utexas.edu> wrote:
>
> >On Tue, 29 Jul 2003 13:18:50 +0000, John McCabe wrote:
> >
> >> Are you now using a different version of ada-mode than before?
> >
> >Presumably so, since the upgrade provided a newer version of Emacs.  I
> >tried to look at ada-mode on my system that hasn't been upgraded, but for
> >some reason it only had the compiled version of the ada-mode.el, so I had
> >trouble comparing them for changes.
> >
> >
> >> Has there been any change to your .emacs?
> >
> >No, not before I started trying to fix it.
>
> The reason I asked about the version is that the version that comes
> with Emacs is different to the ACT version. You may want to try to
> install the ACT version from
> http://libre.act-europe.fr/adamode/main.html and make sure it is
> loaded before the default version to see if that helps.
>
>
> Best Regards
> John McCabe
>
> To reply by email replace 'nospam' with 'assen'





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Need help w/ ada-mode.el under Emacs 21.
  2003-07-30  7:44       ` J�r�me Haguet
@ 2003-07-30 10:06         ` John McCabe
  0 siblings, 0 replies; 7+ messages in thread
From: John McCabe @ 2003-07-30 10:06 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

On Wed, 30 Jul 2003 09:44:37 +0200, "J�r�me Haguet"
<jeje66@despammed.com> wrote:

>Hmmm....
>
>As far as I know, the real last version of ada-*.el is at
>http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/

Thanks for that.

>For example, ada-mode 3.6 from http://libre.act-europe.fr/adamode/main.html
>does not seem to support (perfectly) the new .ali format appeared in gnat
>3.15.
>If I remember correctly ...

I think you're right. It would be nice if the ACT free download and
GNU versions at least appeared to be consistent :-)


Best Regards
John McCabe

To reply by email replace 'nospam' with 'assen'



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-07-30 10:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 10:28 Need help w/ ada-mode.el under Emacs 21 Bobby D. Bryant
2003-07-29 13:18 ` John McCabe
2003-07-29 13:44   ` Bobby D. Bryant
2003-07-29 13:58     ` John McCabe
2003-07-30  7:44       ` J�r�me Haguet
2003-07-30 10:06         ` John McCabe
2003-07-29 14:20 ` Stephen Leake

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