unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `self-insert-uses-region-functions'?
@ 2014-07-23 17:26 Drew Adams
  2014-07-23 17:29 ` `self-insert-uses-region-functions'? Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2014-07-23 17:26 UTC (permalink / raw)
  To: emacs-devel

What can anyone tell me about this symbol, whose value is presumably
a function or a list of functions.  The only use I see of it in the
Emacs code is as a `delete-selection' TYPE value.  For example:

(put 'self-insert-command 'delete-selection
     (lambda ()
       (not (run-hook-with-args-until-success
             'self-insert-uses-region-functions))))

(Similarly, for some other functions besides `self-insert-command'.)

That's fine (hook variables need not be defined or documented), but it
seems like this hook, with such an evocative name ;-), might have some
intended meaning beyond use by `delete-selection-mode'.  (Else why
"use-region" instead of something about delete-selection?)

This seems to have been introduced without any real use of it, so far.
So I'm curious what the intention is.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: `self-insert-uses-region-functions'?
  2014-07-23 17:26 `self-insert-uses-region-functions'? Drew Adams
@ 2014-07-23 17:29 ` Drew Adams
  2014-07-24 17:30   ` `self-insert-uses-region-functions'? Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2014-07-23 17:29 UTC (permalink / raw)
  To: emacs-devel

Oh, nevermind.  I guess this was introduced as part of that silly kludge
to get `electric-pair-mode' to play well with `delete-selection-mode'.
But please do let me know if there is something else involved.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: `self-insert-uses-region-functions'?
  2014-07-23 17:29 ` `self-insert-uses-region-functions'? Drew Adams
@ 2014-07-24 17:30   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2014-07-24 17:30 UTC (permalink / raw)
  To: emacs-devel

> Oh, nevermind.  I guess this was introduced as part of that silly kludge
> to get `electric-pair-mode' to play well with `delete-selection-mode'.
> But please do let me know if there is something else involved.

But see bug #11520.  Two years ago, Stefan said this:

> > Finally, I noticed that you created self-insert-uses-region-functions,
> > but there is no defvar or docstring for that.  For future reference, is
> > it normal that packages have hidden hooks like that?
> 
> No, it's not normal.  Thanks for catching this missing commit.

The commit is presumably still missing. The situation is still "not normal".



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-24 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 17:26 `self-insert-uses-region-functions'? Drew Adams
2014-07-23 17:29 ` `self-insert-uses-region-functions'? Drew Adams
2014-07-24 17:30   ` `self-insert-uses-region-functions'? Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).