unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Filling paragraph with character leading each line
@ 2014-09-10 14:29 Haines Brown
  2014-09-10 23:19 ` Emanuel Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Haines Brown @ 2014-09-10 14:29 UTC (permalink / raw)
  To: help-gnu-emacs

I gather that in C mode, when a comment paragraph is filled, a leading \
is automatically inserted at the beginning of each line. I need to do
something similar in text mode.

For example in a TeX document I might want to comment a paragraph (other
than by puting it in a begin{comment} environment) by starting each line
with a % character. So how can I refill the paragraph that has its first
few lines starting with % so that the % will appear at the start of all
its lines? At the present a refill keeps a % at the start of each line
where it already exists, but fails to extend the rule to the remaining
lines in the paragraph that lack a leading %.

Haines Brown


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

* Re: Filling paragraph with character leading each line
  2014-09-10 14:29 Filling paragraph with character leading each line Haines Brown
@ 2014-09-10 23:19 ` Emanuel Berg
  2014-09-11 12:55   ` Haines Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Emanuel Berg @ 2014-09-10 23:19 UTC (permalink / raw)
  To: help-gnu-emacs

Haines Brown <haines@histomat.net> writes:

> For example in a TeX document I might want to comment
> a paragraph (other than by puting it in a
> begin{comment} environment) by starting each line
> with a % character. So how can I refill the paragraph
> that has its first few lines starting with % so that
> the % will appear at the start of all its lines? At
> the present a refill keeps a % at the start of each
> line where it already exists, but fails to extend the
> rule to the remaining lines in the paragraph that
> lack a leading %.

I don't understand - can you give a hands-on example
for me (us) to try? Like provide the piece of code or
documentation that you cannot comment/fill they way you
want it?

You probably know of comment-dwim which is M-; (because
";" is the comment delimiter for Lisp) - you can use
mark-paragraph (`M-h') or some other way to indicate
what should be commented. Then just hit `M-;' - and
filling with M-q preserves the comment.

What I can see it works great. (?)

-- 
underground experts united


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

* Re: Filling paragraph with character leading each line
  2014-09-10 23:19 ` Emanuel Berg
@ 2014-09-11 12:55   ` Haines Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Haines Brown @ 2014-09-11 12:55 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> I don't understand - can you give a hands-on example
> for me (us) to try? Like provide the piece of code or
> documentation that you cannot comment/fill they way you
> want it?
>
> You probably know of comment-dwim which is M-; 

Sorry to be unclear. In fact I was ignorant about the comment delimiter,
and it does just what I want. Thanks.

Haines



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

end of thread, other threads:[~2014-09-11 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 14:29 Filling paragraph with character leading each line Haines Brown
2014-09-10 23:19 ` Emanuel Berg
2014-09-11 12:55   ` Haines Brown

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