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

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

(insert ...) won't respect delete-selection-mode


From: Xah
Subject: (insert ...) won't respect delete-selection-mode
Date: Tue, 7 Oct 2008 12:11:27 -0700 (PDT)
User-agent: G2/1.0

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/

reply via email to

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