From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Shift selection using interactive spec Date: Sat, 15 Mar 2008 13:11:09 -0400 Message-ID: <87abkzhpzm.fsf@stupidchicken.com> References: <87k5k69p92.fsf@stupidchicken.com> <200803140408.m2E47hPU014494@sallyv1.ics.uci.edu> <87prtxpekk.fsf@kfs-lx.rd.rdm> <87abl11ilo.fsf@stupidchicken.com> <874pb9koyw.fsf@stupidchicken.com> <87od9gzqv9.fsf@stupidchicken.com> <87bq5gytbi.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205601156 29085 80.91.229.12 (15 Mar 2008 17:12:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Mar 2008 17:12:36 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org, "Kim F. Storm" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 15 18:13:04 2008 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.50) id 1JaZwM-0007Yu-KP for ged-emacs-devel@m.gmane.org; Sat, 15 Mar 2008 18:13:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaZvn-0006bF-5k for ged-emacs-devel@m.gmane.org; Sat, 15 Mar 2008 13:12:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaZuf-0005nn-LH for emacs-devel@gnu.org; Sat, 15 Mar 2008 13:11:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaZud-0005l5-Hg for emacs-devel@gnu.org; Sat, 15 Mar 2008 13:11:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaZud-0005kk-6a for emacs-devel@gnu.org; Sat, 15 Mar 2008 13:11:15 -0400 Original-Received: from c-98-216-111-182.hsd1.ma.comcast.net ([98.216.111.182] helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaZud-0003Pw-BU for emacs-devel@gnu.org; Sat, 15 Mar 2008 13:11:15 -0400 Original-Received: by furry (Postfix, from userid 1000) id 1F031C03C; Sat, 15 Mar 2008 13:11:09 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sat\, 15 Mar 2008 11\:07\:33 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:92685 Archived-At: Stefan Monnier writes: >> I think it would be more elegant to split this up into two pieces: a >> variable this-single-command-shift-translated that says whether shift >> translation occurred, and a function shift-translation-handler that >> temporarily sets transient mark mode. Both would be available to >> elisp programs. > > Yes, that part is fine. > >> The new interactive spec code ^ would then call >> shift-translation-handler if this-single-command-shift-translated is >> non-nil, but elisp programs could accomplish this just as easily via >> (if this-single-command-shift-translated ...). > > No, the `if' test should be done inside the function. What is the rationale for this? It seems clear that "Extend the temporary region highlighting for the next command" is a neater and more self-contained task for a function than "Extend the temporary region highlighting for the next command, but only if this-single-command-shift-translated is non-nil; otherwise, do nothing" If it makes you happy, we could obviously provide both functions. Shrug.