From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: (insert ...) won't respect delete-selection-mode
Date: Tue, 7 Oct 2008 12:11:27 -0700 (PDT) [thread overview]
Message-ID: <cc880a3e-121e-412a-8073-41d2977c1927@b38g2000prf.googlegroups.com> (raw)
i have a some 20 personal commands that insert some text. However, i
have delete-selection-mode on, meaning that when a region is active,
any typing should delete/override it.
But when calling my insert text commands it will just insert at the
end of region. Here's a example:
(defun insert-date () "Insert current date." (interactive)
(insert (format-time-string "%Y-%m-%d"))
)
Do i need to modify each commands to check on mark-active and delete-
selection-mode then call delete region first? Or, is there some
variable i can just set?
Thanks.
Xah
∑ http://xahlee.org/
☄
next reply other threads:[~2008-10-07 19:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 19:11 Xah [this message]
2008-10-07 19:57 ` (insert ...) won't respect delete-selection-mode Drew Adams
[not found] ` <mailman.495.1223409434.25473.help-gnu-emacs@gnu.org>
2008-10-07 21:08 ` Chetan
2008-10-08 7:20 ` Xah
2008-10-08 10:04 ` Andreas Politz
2008-10-08 16:48 ` Xah
2008-10-08 21:09 ` Andreas Politz
2008-10-08 21:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.621.1223502455.25473.help-gnu-emacs@gnu.org>
2008-10-09 21:27 ` Xah
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc880a3e-121e-412a-8073-41d2977c1927@b38g2000prf.googlegroups.com \
--to=xahlee@gmail.com \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).