unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Indentation of LISP code
@ 2007-04-05 16:01 A Soare
  2007-04-05 17:42 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: A Soare @ 2007-04-05 16:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs   Dev  [emacs-devel]


> I don't understand the problem.  The only difference I can see is that
> a space gets added before ";;;".  Lisp's indent-region does both re-indent
> the code and the comments, so it's completely expected behavior.


Put instead ;;; just 2 comments then just 1.

You will see that using ;;; is the same case as with ;;.

When we put ;;; the indent of the comment must not change, so

(nil);;; this is a comm

must not change.

A Soare.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Indentation of LISP code
@ 2007-04-06  9:24 A Soare
  0 siblings, 0 replies; 14+ messages in thread
From: A Soare @ 2007-04-06  9:24 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Emacs   Dev  [emacs-devel]

>    > AFAIK, the only rule about ";;;" is that they should be "indented"
>    > to column 0, which in the present case is impossible.
> 
>    Will somebody explain me how do you want these comments to show in
>    future? (example and explanations with all line commented and also
>    ;;; comment at the end of the line).
> 
> perhaps this will suffice: (info "(elisp)Comment Tips")


Thanks. I will use the defs. from that section of elisp manual to indent.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Indentation of LISP code
@ 2007-04-06  8:20 A Soare
  2007-04-06  9:02 ` Thien-Thi Nguyen
  2007-04-06 15:12 ` Stefan Monnier
  0 siblings, 2 replies; 14+ messages in thread
From: A Soare @ 2007-04-06  8:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs   Dev  [emacs-devel]

> > When we put ;;; the indent of the comment must not change.
> 
> And who said so?
> AFAIK, the only rule about ";;;" is that they should be "indented" to
> column 0, which in the present case is impossible.


Hoops ! I do not know. Will somebody explain me how do you want these comments to show in future? (example and explanations with all line commented and also ;;; comment at the end of the line).

Thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Indentation of LISP code
@ 2007-04-05 15:10 A Soare
  2007-04-05 15:45 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: A Soare @ 2007-04-05 15:10 UTC (permalink / raw)
  To: Emacs   Dev  [emacs-devel]

In this moment one ignores the indentation of commented lines with ;;; like this one:

;;; this is a commented line.

However:

(defun lisp-indent-region (start end)
  "Indent every line whose first char is between START and END inclusive."
  (save-excursion
    (asa;;;a     <=<= THIS LINE IS NOT IGNORED, IT IS TREATED AS DOUBLE COMMENTED
     ))

  )

(USE INDENT REGION TO INDENT)

In future (after the release) this indentation should be ignored too or treated as double commented ;;?

alin soare.

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Indentation of LISP code
@ 2007-02-27 23:16 A Soare
  2007-02-27 23:31 ` Miles Bader
  0 siblings, 1 reply; 14+ messages in thread
From: A Soare @ 2007-02-27 23:16 UTC (permalink / raw)
  To: Emacs   Dev  [emacs-devel]


> Removing whitespace around parentheses doesn't sound like indentation to
> me...


In this moment some spaces are added sometimes

();test

Indent it using TAB then select and indent it with C-M-\

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Indentation of LISP code
@ 2007-02-27 21:16 A Soare
  2007-02-27 22:25 ` Miles Bader
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: A Soare @ 2007-02-27 21:16 UTC (permalink / raw)
  To: Emacs   Dev  [emacs-devel]

Because it was proved that the indentation in lisp mode must be rewritten ( project for after the release ) I would like to ask your opinion about this situation:

Do you prefer that the line 

( defun  ( x &optional a b  c d)

after applying an indent-function

stay in the same form, or to be rendered so:

(defun (x &optional a b c d)


I would like to know your opinions about.

Thank you.

Alin Soare

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

end of thread, other threads:[~2007-04-06 15:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 16:01 Indentation of LISP code A Soare
2007-04-05 17:42 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2007-04-06  9:24 A Soare
2007-04-06  8:20 A Soare
2007-04-06  9:02 ` Thien-Thi Nguyen
2007-04-06 15:12 ` Stefan Monnier
2007-04-05 15:10 A Soare
2007-04-05 15:45 ` Stefan Monnier
2007-02-27 23:16 A Soare
2007-02-27 23:31 ` Miles Bader
2007-02-27 21:16 A Soare
2007-02-27 22:25 ` Miles Bader
2007-02-27 22:31 ` Stuart D. Herring
2007-02-28  7:27 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).