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

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

bug#1120: issues on (put 'insert-date 'delete-selection t)


From: xah lee
Subject: bug#1120: issues on (put 'insert-date 'delete-selection t)
Date: Wed, 8 Oct 2008 09:55:27 -0700

according to delete-selection-mode's header file, elisp code that insert text that wants to respect delete-selection-mode should set the symbol's delete-selection property to true.

However, this works only when the command is called by a keyboard, not by M-x.

This appears to be a bug?

Example for reproduction:

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


then call M-x insert-date, and it'll not replace text selection.

(PS thanks to Drew Adams and Chetan on gnu.emacs.help)

  Xah
∑ http://xahlee.org/

reply via email to

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