From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Keep region active after command Date: Sat, 19 Feb 2011 22:48:47 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1298152159 14191 80.91.229.12 (19 Feb 2011 21:49:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 19 Feb 2011 21:49:19 +0000 (UTC) Cc: Emacs-Devel devel , Fabian Ezequiel Gallina To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 19 22:49:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pqufy-0003vr-FW for ged-emacs-devel@m.gmane.org; Sat, 19 Feb 2011 22:49:14 +0100 Original-Received: from localhost ([127.0.0.1]:46057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pqufx-0005n8-Jm for ged-emacs-devel@m.gmane.org; Sat, 19 Feb 2011 16:49:13 -0500 Original-Received: from [140.186.70.92] (port=46861 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pquft-0005kI-Jp for emacs-devel@gnu.org; Sat, 19 Feb 2011 16:49:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pqufs-00050p-FP for emacs-devel@gnu.org; Sat, 19 Feb 2011 16:49:09 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:43562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pqufs-00050g-Am for emacs-devel@gnu.org; Sat, 19 Feb 2011 16:49:08 -0500 Original-Received: by eyh6 with SMTP id 6so587417eyh.0 for ; Sat, 19 Feb 2011 13:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=fLT6NWWbD/eCCRj34UkAhxTm7JKpyKdE/C5Aj+zN6Zw=; b=Rt21N5oHs9PXlHQY15LAWD3rVZKxSe6Kijj3cHCoADIvl9iiEGrG58No3QoaFW6plk d0cxxpsEMoUNOWJ3+O+DkvF3Vb5uCAGVOo/6KoTNDJEbbjr4yiOONR6YLtshgWUv6dUr w8FTkvuEZ0InYCJ/xVBy9Gg3QYE+s4guifGPE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=q0VmCcqfE3waaxVi4/8fyV2atq4Rs9XByuXJJmXTPvF1PacwDBSSTxFYL0EXqjszzU JJdqJaIL84b1Dfot7WBuenQOq9Ip7zqqtofELefdaR/Pcb0pmnUlltb17AArtz9TJsC3 YFEpBPxcSfPjkS7HybBKKlLl6qUEcrPu9N+Eg= Original-Received: by 10.213.23.5 with SMTP id p5mr2627110ebb.81.1298152147204; Sat, 19 Feb 2011 13:49:07 -0800 (PST) Original-Received: by 10.213.29.212 with HTTP; Sat, 19 Feb 2011 13:48:47 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 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 Xref: news.gmane.org gmane.emacs.devel:136244 Archived-At: On Sat, Feb 19, 2011 at 10:19 PM, Stefan Monnier wrote: >> What would be the best way to keep the region active after a command? >> What I'm willing to do is to keep the region active after >> python-indent-shift-left and python-indent-shift-right are called. > > The region is deactivated if `deactivate-mark' is non-nil at the end of > the command and this variable is set by buffer-modifying functions, so > let-binding deactivate-mark around those functions (or around the whole > command's body) is usually the way to do it. Wouldn't it be good to have a general command like dont-deactivate-mark-after-next-command?