help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to deactivate mark?


From: Uday S Reddy
Subject: How to deactivate mark?
Date: Tue, 04 May 2010 15:44:09 -0000
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]