diff options
author | Ken Manheimer <ken.manheimer@gmail.com> | 2011-07-05 14:54:08 -0400 |
---|---|---|
committer | Ken Manheimer <ken.manheimer@gmail.com> | 2011-07-05 14:54:08 -0400 |
commit | 919d884a6dc860fc4268a5c4ec44e2e80a42836f (patch) | |
tree | 8ac1d25a18a5c635d76627d2c6b6bee0245b5f3a /lisp/allout-widgets.el | |
parent | 450a0f09279df347a10d6c1e4b809a5082daf9c8 (diff) | |
download | emacs-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-widgets.el')
-rw-r--r-- | lisp/allout-widgets.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 8dab7411750..ef75e7157e6 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -561,6 +561,8 @@ outline hot-spot navigation \(see `allout-mode')." 'allout-widgets-shifts-recorder nil 'local) (add-hook 'allout-after-copy-or-kill-hook 'allout-widgets-after-copy-or-kill-function nil 'local) + (add-hook 'allout-post-undo-hook + 'allout-widgets-after-undo-function nil 'local) (add-hook 'before-change-functions 'allout-widgets-before-change-handler nil 'local) @@ -1130,6 +1132,14 @@ Dispatched by `allout-widgets-post-command-business' in response to Intended for use on allout-after-copy-or-kill-hook." (if (car kill-ring) (setcar kill-ring (allout-widgets-undecorate-text (car kill-ring))))) +;;;_ > allout-widgets-after-undo-function () +(defun allout-widgets-after-undo-function () + "Do allout-widgets processing of text after an undo. + +Intended for use on allout-post-undo-hook." + (save-excursion + (if (allout-goto-prefix) + (allout-redecorate-item (allout-get-or-create-item-widget))))) ;;;_ > allout-widgets-exposure-undo-recorder (widget from-state) (defun allout-widgets-exposure-undo-recorder (widget) |