unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* hanging paragraph within lisp comments
@ 2004-02-11 19:41 Kin Cho
  2004-02-11 20:17 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Kin Cho @ 2004-02-11 19:41 UTC (permalink / raw)


Hi,

Anybody has code to reformat this:

;; (1) Defines most of Emacs's file- and directory-handling
;; functions, including basic file visiting, backup generation,
;; link handling, ITS-id version control, load- and write-hook
;; handling, and the like.

into this:

;; (1) Defines most of Emacs's file- and directory-handling
;;     functions, including basic file visiting, backup generation,
;;     link handling, ITS-id version control, load- and write-hook
;;     handling, and the like.

filladapt.el can't seem to handle hanging paragraphs within
comments.

Thanks.

-kin

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

* Re: hanging paragraph within lisp comments
  2004-02-11 19:41 hanging paragraph within lisp comments Kin Cho
@ 2004-02-11 20:17 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2004-02-11 20:17 UTC (permalink / raw)


> Anybody has code to reformat this:

> ;; (1) Defines most of Emacs's file- and directory-handling
> ;; functions, including basic file visiting, backup generation,
> ;; link handling, ITS-id version control, load- and write-hook
> ;; handling, and the like.

> into this:

> ;; (1) Defines most of Emacs's file- and directory-handling
> ;;     functions, including basic file visiting, backup generation,
> ;;     link handling, ITS-id version control, load- and write-hook
> ;;     handling, and the like.

No, I don't.  But I have something close (as a patch to fill.el).
It can wrap

 ;; (1) foo bar baz

to

 ;; (1) foo bar
 ;;     baz

during auto-fill and will preserve the indentation-in-comment during
fill-paragraph.  But it will preserve the original indentation of the second
line (just as the current fill.el always does) so it will not do exactly
what you asked for.

All of the above is "modulo bugs and misfeatures" as always: filling is
tricky business where an important part is to make sure you recognize
paragraph boundaries correctly.


        Stefan

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

end of thread, other threads:[~2004-02-11 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 19:41 hanging paragraph within lisp comments Kin Cho
2004-02-11 20:17 ` Stefan Monnier

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).