From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Help setting nadvice for indent-region Date: Mon, 08 Feb 2016 19:05:49 +0200 Message-ID: <83fux3qgia.fsf@gnu.org> References: <87a8ne2k6v.fsf@web.de> <87si145aru.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1454951845 16971 80.91.229.3 (8 Feb 2016 17:17:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Feb 2016 17:17:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 08 18:17:20 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1aSpR3-0005bZ-H5 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 18:17:13 +0100 Original-Received: from localhost ([::1]:46969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpQx-0001L8-PT for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Feb 2016 12:17:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpGL-0007ZR-0m for help-gnu-emacs@gnu.org; Mon, 08 Feb 2016 12:06:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSpGH-0007Ou-OH for help-gnu-emacs@gnu.org; Mon, 08 Feb 2016 12:06:08 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSpGH-0007Oq-KD for help-gnu-emacs@gnu.org; Mon, 08 Feb 2016 12:06:05 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1479 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSpGG-0008Gm-TR for help-gnu-emacs@gnu.org; Mon, 08 Feb 2016 12:06:05 -0500 In-reply-to: (message from Kaushal Modi on Mon, 08 Feb 2016 04:22:55 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109049 Archived-At: > From: Kaushal Modi > Date: Mon, 08 Feb 2016 04:22:55 +0000 > > On Sun, Feb 7, 2016 at 7:03 PM Emanuel Berg wrote: > > > Anyway, another interesting difference, where I'm not > > sure what is the best way, is > > > > `mark-active', then (mark) and (point) > > > > vs. > > > > (use-region-p), then (region-beginning) and (region-help) > > > > What does "the book" say on this? > > > That's a good question. At times, I use mark-active and at times, > (use-region-p). Here's what "the book" says: -- Variable: mark-active The mark is active when this variable is non-‘nil’. This variable is always buffer-local in each buffer. Do _not_ use the value of this variable to decide whether a command that normally operates on text near point should operate on the region instead. Use the function ‘use-region-p’ for that (*note The Region::).