summaryrefslogtreecommitdiff
path: root/lisp/allout.el
diff options
context:
space:
mode:
authorKen Manheimer <ken.manheimer@gmail.com>2011-07-05 14:54:08 -0400
committerKen Manheimer <ken.manheimer@gmail.com>2011-07-05 14:54:08 -0400
commit919d884a6dc860fc4268a5c4ec44e2e80a42836f (patch)
tree8ac1d25a18a5c635d76627d2c6b6bee0245b5f3a /lisp/allout.el
parent450a0f09279df347a10d6c1e4b809a5082daf9c8 (diff)
downloademacs-919d884a6dc860fc4268a5c4ec44e2e80a42836f.tar.gz
* allout.el (allout-post-undo-hook): New allout outline-change event hook
to signal undo activity. (allout-post-command-business): Run allout-post-undo-hook if an undo just occurred. (allout-after-copy-or-kill-hook), (allout-mode): Minor docstring changes. * allout-widgets.el (allout-widgets-after-undo-function): Ensure the integrity of the current item's decoration after it has been in the vicinity of an undo. (allout-widgets-mode): Include allout-widgets-after-undo-function on the new allout-post-undo-hook.
Diffstat (limited to 'lisp/allout.el')
-rw-r--r--lisp/allout.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/allout.el b/lisp/allout.el
index 5b8a7a7de1a..592a64c647a 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1461,7 +1461,15 @@ This hook might be invoked multiple times by a single command.")
(defvar allout-after-copy-or-kill-hook nil
"*Hook that's run after copying outline text.
-Functions on the hook should not take any arguments.")
+Functions on the hook should not require any arguments.")
+;;;_ = allout-post-undo-hook
+(defvar allout-post-undo-hook nil
+ "*Hook that's run after undo activity.
+
+The item that's current when the hook is run *may* be the one
+that was affected by the undo.
+
+Functions on the hook should not require any arguments.")
;;;_ = allout-outside-normal-auto-fill-function
(defvar allout-outside-normal-auto-fill-function nil
"Value of normal-auto-fill-function outside of allout mode.
@@ -1874,6 +1882,7 @@ without changes to the allout core. Here are key ones:
`allout-structure-deleted-hook'
`allout-structure-shifted-hook'
`allout-after-copy-or-kill-hook'
+`allout-post-undo-hook'
Terminology
@@ -3313,6 +3322,7 @@ coordinating with allout activity.")
(when allout-just-did-undo
(setq allout-just-did-undo nil)
+ (run-hooks 'allout-post-undo-hook)
(cond ((and (= buffer-saved-size -1)
allout-auto-save-temporarily-disabled)
;; user possibly undid a decryption, deinhibit auto-save: