From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: require-hard-newlines to use newline Date: Thu, 10 Mar 2005 20:46:38 -0500 Message-ID: References: <1483.220.255.172.231.1109730379.squirrel@www.stupidchicken.com> <200503020302.j2232fR21722@raven.dms.auburn.edu> <2750.220.255.172.231.1109734015.squirrel@www.stupidchicken.com> <1415.220.255.169.59.1109818150.squirrel@www.stupidchicken.com> <1404.220.255.169.59.1109889146.squirrel@www.stupidchicken.com> <200503040033.j240XD022473@raven.dms.auburn.edu> <50554.203.116.59.23.1109897782.squirrel@www.stupidchicken.com> <200503080005.j2805Kg28696@raven.dms.auburn.edu> <2451.220.255.169.59.1110299961.squirrel@www.stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1110507049 21522 80.91.229.2 (11 Mar 2005 02:10:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2005 02:10:49 +0000 (UTC) Cc: miles@gnu.org, snogglethorpe@gmail.com, teirllm@dms.auburn.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 11 03:10:48 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D9Zbc-0003y9-Vk for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2005 03:10:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9Zqc-0006Sp-7n for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2005 21:25:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D9Zlc-0004Nk-2p for emacs-devel@gnu.org; Thu, 10 Mar 2005 21:20:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D9ZlQ-0004I4-10 for emacs-devel@gnu.org; Thu, 10 Mar 2005 21:20:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9ZlP-0004Au-LW for emacs-devel@gnu.org; Thu, 10 Mar 2005 21:20:31 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D9ZEd-0000PM-2r for emacs-devel@gnu.org; Thu, 10 Mar 2005 20:46:39 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1D9ZEc-0003wR-JW; Thu, 10 Mar 2005 20:46:38 -0500 Original-To: "Chong Yidong" In-reply-to: <2451.220.255.169.59.1110299961.squirrel@www.stupidchicken.com> (cyd@stupidchicken.com) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34455 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34455 2. Defining two new abnormal hooks, maybe named yank-encode-functions and kill-encode-functions, to be called by kill-region etc (or possibly the lower-level functions like kill-new and kill-append.) This would be better than using advice. On further consideration, there seems to be some overlap between the above suggestion and the yank-handler text property (new to Emacs 22). The idea of the yank-handler text property is that certain kill strings are encoded specially, and need to be decoded when they are yanked. Maybe longlines could use this instead of a new hook for yanking. However, it would still need a hook for killing. However, not just for killing. This hook should be used in various places, including Fdelete_and_extract_region. Or maybe you could just use after-change-functions. Would that work?