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

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

can a command specify overwrite selection behavior?


From: Xah Lee
Subject: can a command specify overwrite selection behavior?
Date: Wed, 08 Dec 2010 15:26:50 -0000
User-agent: G2/1.0

i have this code that inserts date.

(defun insert-date ()
  "Insert current date."
  (interactive)
  (insert (format-time-string "%Y-%m-%d"))
  )
(put 'insert-date 'delete-selection t)

the last line is to make sure that if i have a text selection, just
overwrite it.

but it doesn't work.

i wrote to FSF about it i think last year as a bug report, i think
Richard Stallman himself turned it down.

but in my daily use, this is quite annoying.

with i think recent interest in behavior of text selection, can this
be made to work?

thanks.

 Xah


reply via email to

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