GNU bug report logs - #18100
24.4.50; Restore simplicity of (put 'self-insert-command 'delete-selection 'kill)

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 24 Jul 2014 17:24:01 UTC

Severity: wishlist

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, "18100 <at> debbugs.gnu.org" <18100 <at> debbugs.gnu.org>
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."




This bug report was last modified 3 years and 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.