From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.help Subject: How to deactivate mark? Date: Tue, 06 Apr 2010 12:44:33 +0100 Organization: Janet Usenet Reading Service. Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1273058838 4820 80.91.229.12 (5 May 2010 11:27:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 11:27:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 13:27:16 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O9cl0-0001IF-LF for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 13:27:14 +0200 Original-Received: from localhost ([127.0.0.1]:47130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9ckz-0003wN-WD for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 07:27:14 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!feed2.jnfs.ja.net!jnfs.ja.net!times.reader.netnews.ja.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-NNTP-Posting-Host: gromit.cs.bham.ac.uk Original-X-Trace: north.jnrs.ja.net 1270554260 1200 147.188.193.16 (6 Apr 2010 11:44:20 GMT) Original-X-Complaints-To: usenet@north.jnrs.ja.net Original-NNTP-Posting-Date: Tue, 6 Apr 2010 11:44:20 +0000 (UTC) User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) Original-Xref: usenet.stanford.edu gnu.emacs.help:177652 X-Mailman-Approved-At: Tue, 04 May 2010 16:52:17 -0400 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:73386 Archived-At: I tried to define a command called narrow-to-defun as follows: (defun narrow-to-defun () "Narrow to the current defun around point" (interactive) (mark-defun) (narrow-to-region (point) (mark)) ) Unfortunately, running the command makes the mark "active," thereby highlighting the defun at the end of the execution. I have tried various tricks to get the mark to turn off - like calling deactivate-mark, binding deactivate-mark to t locally, binding transient-mark-mode to nil etc. But none of them is able to turn off the active mark at the end. What am I missing? Cheers, Uday Reddy