comp.lang.ada
 help / color / mirror / Atom feed
* Re: Aligning comments with Emacs ada-mode?
       [not found] <1155049329.544472.142050@m73g2000cwd.googlegroups.com>
@ 2006-08-08 15:21 ` Benjamin Place
       [not found]   ` <1155065702.914125.58160@75g2000cwc.googlegroups.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Place @ 2006-08-08 15:21 UTC (permalink / raw)
  To: randomm, comp.lang.ada

----- randomm@mindless.com wrote:
> I'd like to be able to align comments to the right of 
 > the end of source statements.
 

M-; (for me, alt+; [semi-colon])

Don't remember how to set the column it comments to, though. I'm sure *somebody* here knows that, though.

Best,
Ben








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

* Re: Aligning comments with Emacs ada-mode?
       [not found]   ` <1155065702.914125.58160@75g2000cwc.googlegroups.com>
@ 2006-08-08 20:53     ` Georg Bauhaus
       [not found]       ` <1155070703.109913.164510@b28g2000cwb.googlegroups.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Georg Bauhaus @ 2006-08-08 20:53 UTC (permalink / raw)


On Tue, 2006-08-08 at 12:35 -0700, randomm@mindless.com wrote:
> X-No-Archive: Yes
> 
> The variable name is comment-column but I can't seem to set it. 

Try the function set-comment-column.

-- Georg 





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

* Re: Aligning comments with Emacs ada-mode?
       [not found]       ` <1155070703.109913.164510@b28g2000cwb.googlegroups.com>
@ 2006-08-08 22:02         ` Simon Wright
       [not found]           ` <1155124708.846173.71420@i3g2000cwc.googlegroups.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2006-08-08 22:02 UTC (permalink / raw)


randomm@mindless.com writes:

> Sorry, I'm not following you.  I tried (setq comment-column 60) and
> (setq-default comment-column 60) in my .emacs file but I didn't get
> them to work.  Are you suggesting meta-x set-comment-column?  What I'm
> looking for here is a programatic way to set the value so I don't have
> to issue commands.

For help on set-comment-column type 

  C-h f s e t - c o m m e n t - c o l u m n

(without the spaces)

To change the default ada-mode comment column, you'll have to change
the source of ada-mode.el, as I think you did. Something on the lines
of changing

  (set (make-local-variable 'comment-column) 40)

to

  (set (make-local-variable 'comment-column) 'ada-comment-column)

where you set ada-comment-column in your .emacs.



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

* Re: Aligning comments with Emacs ada-mode?
       [not found]           ` <1155124708.846173.71420@i3g2000cwc.googlegroups.com>
@ 2006-08-09 12:16             ` Georg Bauhaus
  2006-08-09 12:21             ` Emmanuel Briot
  1 sibling, 0 replies; 6+ messages in thread
From: Georg Bauhaus @ 2006-08-09 12:16 UTC (permalink / raw)


On Wed, 2006-08-09 at 04:58 -0700, randomm@mindless.com wrote:
> X-No-Archive: Yes
> 
> Hi Simon,
> 
> The documentation for set-comment-column is not on my system.

In this case you have a pretty unusual Emacs installation,
I'd say.

> What I'm looking for here is a way to override this value in my .emacs
> file.  I have the value set in Emacs now since I've changed the
> byte-compiled ada-mode (not the source).  But I want to be able to set
> it programatically.  Is this not possible?

I believe Simon's message explains it. I suggest you get ada-mode.el,
it's Free Software. If this won't be possible, you could start your
Ada source files with a line like
--    -*-mode: ada; comment-column: 42-*-

> 
> Thanks,
> Rand
> 
> Simon Wright wrote:
> > randomm@mindless.com writes:
> >
> > > Sorry, I'm not following you.  I tried (setq comment-column 60) and
> > > (setq-default comment-column 60) in my .emacs file but I didn't get
> > > them to work.  Are you suggesting meta-x set-comment-column?  What I'm
> > > looking for here is a programatic way to set the value so I don't have
> > > to issue commands.
> >
> > For help on set-comment-column type
> >
> >   C-h f s e t - c o m m e n t - c o l u m n
> >
> > (without the spaces)
> >
> > To change the default ada-mode comment column, you'll have to change
> > the source of ada-mode.el, as I think you did. Something on the lines
> > of changing
> >
> >   (set (make-local-variable 'comment-column) 40)
> >
> > to
> >
> >   (set (make-local-variable 'comment-column) 'ada-comment-column)
> > 
> > where you set ada-comment-column in your .emacs.
> 




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

* Re: Aligning comments with Emacs ada-mode?
       [not found]           ` <1155124708.846173.71420@i3g2000cwc.googlegroups.com>
  2006-08-09 12:16             ` Georg Bauhaus
@ 2006-08-09 12:21             ` Emmanuel Briot
       [not found]               ` <1155129589.408465.191730@b28g2000cwb.googlegroups.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Emmanuel Briot @ 2006-08-09 12:21 UTC (permalink / raw)
  To: randomm


[Not sure whether I am allowed to post on comp.lang.ada, would you
forward it ?]

randomm@mindless.com wrote:
> What I'm looking for here is a way to override this value in my .emacs
> file.  I have the value set in Emacs now since I've changed the
> byte-compiled ada-mode (not the source).  But I want to be able to set
> it programatically.  Is this not possible?

I believe that should put the following in your .emacs:

(add-hook 'ada-mode-hook
          (lambda()
            (setq comment-column 60)))

regards
Emmanuel



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

* Re: Aligning comments with Emacs ada-mode?
       [not found]               ` <1155129589.408465.191730@b28g2000cwb.googlegroups.com>
@ 2006-08-09 20:03                 ` Steve Whalen
  0 siblings, 0 replies; 6+ messages in thread
From: Steve Whalen @ 2006-08-09 20:03 UTC (permalink / raw)


randomm@mindless.com wrote:
> X-No-Archive: Yes
>
> Brilliant, Emmanuel, it works perfectly.  Thanks very much!
>
> Cheers,
> Rand
>
> P.S.  The best answer is the one that addresses the question that was
> asked! ;)

After reading your P.S., now I'm sorry you got the answer you were
seeking.

Why do you have your posts set to prevent archiving?

After a week or two, someone seeking the same information will find a
broken thread with your posts missing.

This means for weeks, months, and years, anyone needing the answer to
the question you asked (or a similar one about another Ada/emacs
configuration setting), will just find fragments of the thread, and
will have to guess at what the original question was.

The information others have taken their time to provide to you, will be
much less valuable to anyone else seeking that information in the
future.

The principal value of the newsgroups, is as a searchable archive of
answers to questions like yours.  For every question I've asked on the
newsgroups over the years, I've probably had dozens if not hundreds of
questions answered without my having to ask the question, because
someone else already asked it and the answer is recorded in the
newsgroups.

By breaking up the threads the way you are, you significantly lessen
the value of the newsgroups over time. 

Why do you do that?

Steve




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

end of thread, other threads:[~2006-08-09 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1155049329.544472.142050@m73g2000cwd.googlegroups.com>
2006-08-08 15:21 ` Aligning comments with Emacs ada-mode? Benjamin Place
     [not found]   ` <1155065702.914125.58160@75g2000cwc.googlegroups.com>
2006-08-08 20:53     ` Georg Bauhaus
     [not found]       ` <1155070703.109913.164510@b28g2000cwb.googlegroups.com>
2006-08-08 22:02         ` Simon Wright
     [not found]           ` <1155124708.846173.71420@i3g2000cwc.googlegroups.com>
2006-08-09 12:16             ` Georg Bauhaus
2006-08-09 12:21             ` Emmanuel Briot
     [not found]               ` <1155129589.408465.191730@b28g2000cwb.googlegroups.com>
2006-08-09 20:03                 ` Steve Whalen

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