summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-08-18 11:20:27 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-08-18 11:20:27 -0400
commit27bc6b14650f947d72d015d0a25e2e8986eb83ad (patch)
tree368d03a24db57273737adf778297f22f89390a12
parent93e8e44e6f5f4a7fa4a1643c7871c0bf9427d7d8 (diff)
downloademacs-27bc6b14650f947d72d015d0a25e2e8986eb83ad.tar.gz
* lisp/simple.el (self-insert-uses-region-functions): Defvar.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/simple.el7
2 files changed, 11 insertions, 0 deletions
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 <monnier@iro.umontreal.ca>
+
+ * simple.el (self-insert-uses-region-functions): Defvar.
+
2014-08-13 Leo Liu <sdl.web@gmail.com>
* 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.")