From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: require-hard-newlines to use newline Date: Fri, 11 Mar 2005 23:29:24 +0100 Message-ID: References: <1483.220.255.172.231.1109730379.squirrel@www.stupidchicken.com> <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> <2518.220.255.169.59.1110532203.squirrel@www.stupidchicken.com> <3222.220.255.169.59.1110546234.squirrel@www.stupidchic NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110581048 19201 80.91.229.2 (11 Mar 2005 22:44:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2005 22:44:08 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 11 23:44:08 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D9srN-0006qI-P4 for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2005 23:43:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9t6X-0008Um-He for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2005 17:59:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D9t2Y-0005rO-DH for emacs-devel@gnu.org; Fri, 11 Mar 2005 17:55:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D9t02-00056V-Vi for emacs-devel@gnu.org; Fri, 11 Mar 2005 17:53:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9t01-00051Y-Re for emacs-devel@gnu.org; Fri, 11 Mar 2005 17:52:53 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D9sdE-0005PO-8D; Fri, 11 Mar 2005 17:29:20 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 14DA147FE94; Fri, 11 Mar 2005 23:29:11 +0100 (CET) Original-To: "Chong Yidong" In-Reply-To: <3985.220.255.169.59.1110557463.squirrel@220.255.169.59> (Chong Yidong's message of "Fri, 11 Mar 2005 11:11:03 -0500 (EST)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:34492 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34492 "Chong Yidong" writes: >>> I like the idea, but returning a value from a hook is rather >>> inconvenient -- if there are multiple functions on the hook, which >>> value should you use eventually? >> >>> Perhaps before-kill-functions should get START, END and STRING >>> as arguments where STRING is the result of buffer-substring. >> >>> Each hook could then modify that string as they please. > > Sorry, I'm probably missing something, but I don't understand how this > would work. Since each function would only be modifying their own local > STRING variable, not the one that will actually be killed... It doesn't have to modify the variable `string', but its string value, e.g. (defun x (s) (aset s 1 ?-)) (let ((s "abc")) (x s) s) => "a-c" -- Kim F. Storm http://www.cua.dk