all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to deactivate mark?
@ 2010-04-06 11:44 Uday S Reddy
  2010-04-06 19:46 ` Harald Hanche-Olsen
  0 siblings, 1 reply; 4+ messages in thread
From: Uday S Reddy @ 2010-04-06 11:44 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-07 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 11:44 How to deactivate mark? Uday S Reddy
2010-04-06 19:46 ` Harald Hanche-Olsen
2010-04-07 10:18   ` Uday S Reddy
2010-04-07 10:51     ` Andreas Politz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.