Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] message-elide-region.
@ 2002-04-23 11:28 Matthieu Moy
  2002-04-23 13:45 ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Matthieu Moy @ 2002-04-23 11:28 UTC (permalink / raw)


Hi ! 

You  all should  know the  C-c  C-e shortcut  to elide  a region  when
replying. 

it works when the region is a set of full lines, but if I call it with
regions beginning in the middle of a line, everything goes wrong:

Example :

> it works when  the region is a set  of full lines, but if  I call it
> with  regions beginning  in the  middle of  a line,  everything goes
> wrong:

Now, I want to elide `beginning'. I get this.


> it works when  the region is a set  of full lines, but if  I call it
> with  regions 
[...]

 in the  middle of  a line,  everything goes
> wrong:


What I want is this :


> it works when  the region is a set  of full lines, but if  I call it
> with  regions 

[...]

> in the middle of a line, everything goes wrong:


The function to accomplish this is this one:

;;;###autoload
(defun message-elide-region (b e)
  "Elide the text in the region.
An ellipsis (from `message-elide-ellipsis') will be inserted where the
text was killed."
  (interactive "r")
  (kill-region b e)
  (message-newline-and-reformat)
  (delete-region
   (progn (previous-line 1) (point))
   (progn (next-line 3) (point)))
  (insert message-elide-ellipsis))

Anyone to commit this ?

-- 
Matthieu

By  the  way,  I've  just  discovered   M-RET  to  cut  a  line  in  a
citation. It's very usefull.



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

end of thread, other threads:[~2002-04-24 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 11:28 [PATCH] message-elide-region Matthieu Moy
2002-04-23 13:45 ` Kai Großjohann
2002-04-23 13:58   ` Matthieu Moy
2002-04-23 18:53   ` Karl Pflästerer
2002-04-24 11:17     ` Kai Großjohann

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 NNTP newsgroup(s).