From: Stefan Monnier Date: Mon, 18 Aug 2014 15:20:27 +0000 (-0400) Subject: * lisp/simple.el (self-insert-uses-region-functions): Defvar. X-Git-Tag: emacs-24.3.94~87 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27bc6b14650f947d72d015d0a25e2e8986eb83ad;p=emacs.git * lisp/simple.el (self-insert-uses-region-functions): Defvar. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0e4a59b8374..d2ad52e3b07 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-08-18 Stefan Monnier + + * simple.el (self-insert-uses-region-functions): Defvar. + 2014-08-13 Leo Liu * speedbar.el (speedbar-generic-list-tag-p): Allow special diff --git a/lisp/simple.el b/lisp/simple.el index 1a42db81669..7b505d11645 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -374,6 +374,13 @@ Other major modes are defined by comparison with this one." ;; Making and deleting lines. +(defvar self-insert-uses-region-functions nil + "Special hook to tell if `self-insert-command' will use the region. +It must be called via `run-hook-with-args-until-success' with no arguments. +Any `post-self-insert-command' which consumes the region should +register a function on this hook so that things like `delete-selection-mode' +can refrain from consuming the region.") + (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) "Propertized string representing a hard newline character.")