all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* (insert ...) won't respect delete-selection-mode
@ 2008-10-07 19:11 Xah
  2008-10-07 19:57 ` Drew Adams
       [not found] ` <mailman.495.1223409434.25473.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Xah @ 2008-10-07 19:11 UTC (permalink / raw)
  To: help-gnu-emacs

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/^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-10-09 21:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 19:11 (insert ...) won't respect delete-selection-mode Xah
2008-10-07 19:57 ` 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

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.