[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21275: 24.5; Selection deleted with electric pair mode in cc mode
From: |
Stefan Monnier |
Subject: |
bug#21275: 24.5; Selection deleted with electric pair mode in cc mode |
Date: |
Wed, 19 Aug 2015 17:52:18 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> +(defun delete-selection-uses-region-p ()
The way I read it, this name says "a function which tells us if
delete-selection uses the region".
> + "Return non-nil when the current command uses the region.
It's not about "the current command" but about self-insert-command
(which may be the current command or may be called by the current command).
> +(put 'c-electric-brace 'delete-selection 'delete-selection-uses-region-p)
> +(put 'c-electric-brace 'pending-delete 't)
> +(put 'c-electric-paren 'delete-selection 'delete-selection-uses-region-p)
> +(put 'c-electric-paren 'pending-delete 't)
An alternative would be to copy the `delete-selection' (and
`pending-delete') property of `self-insert-command'. Probably in an
after-load, tho.
Stefan
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, N. Jackson, 2015/08/16
- Message not available
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Alan Mackenzie, 2015/08/18
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, N. Jackson, 2015/08/18
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode,
Stefan Monnier <=
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Drew Adams, 2015/08/20
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Alan Mackenzie, 2015/08/20
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Drew Adams, 2015/08/21
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Stefan Monnier, 2015/08/21
- bug#21275: 24.5; Selection deleted with electric pair mode in cc mode, Drew Adams, 2015/08/21
Message not available