]> code.delx.au - gnu-emacs-elpa/commitdiff
Add a missing 'delete-selection property
authorClément Pit--Claudel <clement.pitclaudel@live.com>
Tue, 8 Sep 2015 14:08:35 +0000 (10:08 -0400)
committerClément Pit--Claudel <clement.pitclaudel@live.com>
Tue, 8 Sep 2015 14:11:12 +0000 (10:11 -0400)
This is needed for delete-selection-mode to work properly:

> Commands which will delete the selection need a 'delete-selection
> property on their symbols; commands which insert text but don't have
> this property won't delete the selection.

nameless.el

index 26b1024148d0e970c282396752c86e6afde9d45b..c2837e2b3724bd01bd00d426bcf8c74705fc3d4a 100644 (file)
@@ -194,6 +194,8 @@ configured, or if `nameless-current-name' is nil."
     (or (nameless-insert-name 'noerror)
         (call-interactively #'self-insert-command))))
 
+(put 'nameless-insert-name-or-self-insert 'delete-selection t)
+
 (defun nameless--name-regexp (name)
   "Return a regexp of the current name."
   (concat "\\_<@?\\(" (regexp-quote name) "-\\)\\(\\s_\\|\\sw\\)"))