From: Uday S Reddy <uDOTsDOTreddy@cs.bham.ac.uk>
To: help-gnu-emacs@gnu.org
Subject: How to deactivate mark?
Date: Tue, 06 Apr 2010 12:44:33 +0100 [thread overview]
Message-ID: <hpf6qk$15g$1@north.jnrs.ja.net> (raw)
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
next reply other threads:[~2010-04-06 11:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 11:44 Uday S Reddy [this message]
2010-04-06 19:46 ` How to deactivate mark? Harald Hanche-Olsen
2010-04-07 10:18 ` Uday S Reddy
2010-04-07 10:51 ` Andreas Politz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hpf6qk$15g$1@north.jnrs.ja.net' \
--to=udotsdotreddy@cs.bham.ac.uk \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.