From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: how to activate region Date: Fri, 15 May 2009 13:43:39 -0700 Message-ID: <20524da70905151343v1e053ff0y8311b6028506e06b@mail.gmail.com> References: <20524da70905151316v45e2f576te95b74e32de1e900@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242420278 1605 80.91.229.12 (15 May 2009 20:44:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 May 2009 20:44:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 15 22:44:32 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M54Gd-0001Te-2W for geh-help-gnu-emacs@m.gmane.org; Fri, 15 May 2009 22:44:31 +0200 Original-Received: from localhost ([127.0.0.1]:40256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M54Gc-0005kf-Aa for geh-help-gnu-emacs@m.gmane.org; Fri, 15 May 2009 16:44:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M54GE-0005ka-1B for help-gnu-emacs@gnu.org; Fri, 15 May 2009 16:44:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M54G9-0005jj-BL for help-gnu-emacs@gnu.org; Fri, 15 May 2009 16:44:05 -0400 Original-Received: from [199.232.76.173] (port=38903 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M54G9-0005jd-1N for help-gnu-emacs@gnu.org; Fri, 15 May 2009 16:44:01 -0400 Original-Received: from mail-pz0-f107.google.com ([209.85.222.107]:36711) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M54G8-0007qa-Ir for help-gnu-emacs@gnu.org; Fri, 15 May 2009 16:44:00 -0400 Original-Received: by pzk5 with SMTP id 5so1391711pzk.14 for ; Fri, 15 May 2009 13:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=EY8EIA+MLIf94zrR4E4+P2wJrgB4U1aIgkQ1m0NAFng=; b=Gr9IN7PD2mjt8lp3JzzPD1ShgXiiFgM9oWTZFZVRSx51UfBn3u58lRmcX7k9Yn6R+h 25fh2dxD/iQg/3cp4+EODkI3NV+bpKbRhS1mWcNBET2UR72cYBZPk4CKK8upb2aMTAMQ eSsuPRaFKJ/12ef3svt/8BuyVXiWpJRyyf0oo= 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 :content-type:content-transfer-encoding; b=DQV6QmBRGV3a5p6dLY0JB77thdMawq2055N16JCIBXqoHABkjIffOrQ36obQycB/B2 XptqsS9M734cGpZdADc2SsK129gb9qvwigFek/mvBM+vnlNaYtA269lvedtnyEH2pxkO uEpoAl4Hw9gxNOEf1vQrh9GlHloQQBSxyqij8= Original-Received: by 10.114.170.1 with SMTP id s1mr5472910wae.57.1242420239401; Fri, 15 May 2009 13:43:59 -0700 (PDT) In-Reply-To: <20524da70905151316v45e2f576te95b74e32de1e900@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64478 Archived-At: Apologies for the noise. I noticed that the solution was pointed to in the thread. (Thank you.) Somehow I missed it. Here is the solution to overload c-x c-x to do what I want. (Although I would use defadvice if possible.) ;;i would use defadvice, which would be much better, but i don't ;;know how to call the original again with an argument (setf transient-mark-mode nil) (substitute-key-definition 'exchange-point-and-mark 'alpha-exchange-point-and-mark global-map) (defun alpha-exchange-point-and-mark () "same as original, but activate region" (interactive) ;;why this has to be done twice, i don't know; it fails to ;;exchange when t (exchange-point-and-mark) (exchange-point-and-mark t))