From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Patch for delete-indentation in simple.el Date: Fri, 23 Aug 2013 11:50:29 -0400 Message-ID: References: <1377264671.59291.YahooMailBasic@web163405.mail.gq1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1377273048 29584 80.91.229.3 (23 Aug 2013 15:50:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2013 15:50:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Gian Fontanilla Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 23 17:50:50 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VCtdS-0002Vm-2f for ged-emacs-devel@m.gmane.org; Fri, 23 Aug 2013 17:50:50 +0200 Original-Received: from localhost ([::1]:37530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCtdR-0000K2-Og for ged-emacs-devel@m.gmane.org; Fri, 23 Aug 2013 11:50:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCtdH-0000Jg-8F for emacs-devel@gnu.org; Fri, 23 Aug 2013 11:50:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCtd9-0006CO-To for emacs-devel@gnu.org; Fri, 23 Aug 2013 11:50:39 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCtd9-0006C9-NW for emacs-devel@gnu.org; Fri, 23 Aug 2013 11:50:31 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r7NFoTb0019417; Fri, 23 Aug 2013 11:50:30 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4FA6A62E6E; Fri, 23 Aug 2013 11:50:29 -0400 (EDT) In-Reply-To: <1377264671.59291.YahooMailBasic@web163405.mail.gq1.yahoo.com> (Gian Fontanilla's message of "Fri, 23 Aug 2013 06:31:11 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4679=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4679> : streams <1024549> : uri <1515354> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162994 Archived-At: > 1) Should I create a separate function which does `delete-indentation' > on a region, and not change `delete-indentation' itself? No, you can keep it within the same function. Note that the function will need to receive new optional arguments for BEG...END. > 2) If the answer to 1 is yes, what name should I give it? The feature I'm > proposing is semantically closer to "join lines", rather than the inverse of > fill-region' or `fill-paragraph', so I don't think it is correct to call it > "unfill". I was just pointing out that it will provide another feature that's been requested. There are different ways to think about what this function does. > 3) > please use `use-region-p' and make the test from within the > interactive' spec rather than inside the function itself > I can't say I understand this completely. This is assuming I am to change > the body of `delete-indentation'? Rather than check mark-active, call use-region-p. And this call needs to take place within the spec of (interactive ), which means that the spec will be Elisp code rather than a simple string. E.g. the current "*P" is equivalent to (progn (barf-if-buffer-read-only) (list current-prefix-arg)) -- Stefan