[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18100: 24.4.50; Restore simplicity of (put 'self-insert-command 'del
From: |
Drew Adams |
Subject: |
bug#18100: 24.4.50; Restore simplicity of (put 'self-insert-command 'delete-selection 'kill) |
Date: |
Thu, 12 May 2022 17:30:21 +0000 |
> > Users should be able to `put' a single,
> > understandable symbol as the `delete-selection'
> > property value. They should not need to fiddle
> > with obscure lambda forms (or symbols whose names
> > are not simple to understand). Symbol `kill' is
> > simple - it says that you want the region to be killed.
>
> What symbol name do you propose?
Dunno. See the other symbols used.
(I don't recall - what was wrong with `kill'?)
The "doc" should of course cover what such a symbol
means, especially if it's not obvious. The "doc"
covers each symbol explicitly. From the Commentary:
;; 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. It can be one of
;; the values:
;; `yank'
;; For commands which do a yank; ensures the region about to be
;; deleted isn't immediately yanked back, which would make the
;; command a no-op.
;; `supersede'
;; Delete the active region and ignore the current command,
;; i.e. the command will just delete the region. This is for
;; commands that normally delete small amounts of text, like
;; a single character -- they will instead delete the whole
;; active region.
;; `kill'
;; `kill-region' is used on the selection, rather than
;; `delete-region'. (Text selected with the mouse will typically
;; be yankable anyhow.)
;; t
;; The normal case: delete the active region prior to executing
;; the command which will insert replacement text.
;; FUNCTION
;; For commands which need to dynamically determine this behavior.
;; FUNCTION should take no argument and return one of the above
;; values, or nil. In the latter case, FUNCTION should itself
;; do with the active region whatever is appropriate."