aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Manheimer2011-09-24 16:58:23 -0400
committerKen Manheimer2011-09-24 16:58:23 -0400
commit3f2b07f8b2a1d166e611cd9c774e351eba70d23d (patch)
tree42f192f5e16393dd73883b0499e823b1cc81784b
parent0538fab0dd00a11b5dbe47a67ea0bf710733dc73 (diff)
downloademacs-3f2b07f8b2a1d166e611cd9c774e351eba70d23d.tar.gz
emacs-3f2b07f8b2a1d166e611cd9c774e351eba70d23d.zip
* allout.el (allout-this-command-hid-stuff): Buffer-local variable that's
true if the current command involved collapsing of text. It's reset to false at the beginning of the next command. (allout-post-command-business): Move the cursor to the beginning of entry if the cursor is hidden and collapsing activity just happened.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/allout.el17
2 files changed, 22 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b7e5f1525b..662dd7a7f99 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12011-09-22 Ken Manheimer <ken.manheimer@gmail.com>
2
3 * allout.el (allout-this-command-hid-stuff): Buffer-local variable
4 that's true if the current command involved collapsing of text.
5 It's reset to false at the beginning of the next command.
6 (allout-post-command-business): Move the cursor to the beginning
7 of entry if the cursor is hidden and collapsing activity just
8 happened.
9
12011-09-24 Chong Yidong <cyd@stupidchicken.com> 102011-09-24 Chong Yidong <cyd@stupidchicken.com>
2 11
3 * mouse.el (mouse-drag-track): Set scroll-margin to 0 while 12 * mouse.el (mouse-drag-track): Set scroll-margin to 0 while
diff --git a/lisp/allout.el b/lisp/allout.el
index 592a64c647a..4002f12e264 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -3304,6 +3304,10 @@ are mapped to the command of the corresponding control-key on the
3304Set by `allout-pre-command-business', to support allout addons in 3304Set by `allout-pre-command-business', to support allout addons in
3305coordinating with allout activity.") 3305coordinating with allout activity.")
3306(make-variable-buffer-local 'allout-command-counter) 3306(make-variable-buffer-local 'allout-command-counter)
3307;;;_ = allout-this-command-hid-text
3308(defvar allout-this-command-hid-text nil
3309 "True if the most recent allout-mode command hid any text.")
3310(make-variable-buffer-local 'allout-this-command-hid-text)
3307;;;_ > allout-post-command-business () 3311;;;_ > allout-post-command-business ()
3308(defun allout-post-command-business () 3312(defun allout-post-command-business ()
3309 "Outline `post-command-hook' function. 3313 "Outline `post-command-hook' function.
@@ -3311,6 +3315,9 @@ coordinating with allout activity.")
3311- Implement (and clear) `allout-post-goto-bullet', for hot-spot 3315- Implement (and clear) `allout-post-goto-bullet', for hot-spot
3312 outline commands. 3316 outline commands.
3313 3317
3318- Move the cursor to the beginning of the entry if it is hidden
3319 and collapsing activity just happened.
3320
3314- If the command we're following was an undo, check for change in 3321- If the command we're following was an undo, check for change in
3315 the status of encrypted items and adjust auto-save inhibitions 3322 the status of encrypted items and adjust auto-save inhibitions
3316 accordingly. 3323 accordingly.
@@ -3343,8 +3350,9 @@ coordinating with allout activity.")
3343 (if (and allout-post-goto-bullet 3350 (if (and allout-post-goto-bullet
3344 (allout-current-bullet-pos)) 3351 (allout-current-bullet-pos))
3345 (progn (goto-char (allout-current-bullet-pos)) 3352 (progn (goto-char (allout-current-bullet-pos))
3346 (setq allout-post-goto-bullet nil))) 3353 (setq allout-post-goto-bullet nil))
3347 )) 3354 (when (and (allout-hidden-p) allout-this-command-hid-text)
3355 (allout-beginning-of-current-entry)))))
3348;;;_ > allout-pre-command-business () 3356;;;_ > allout-pre-command-business ()
3349(defun allout-pre-command-business () 3357(defun allout-pre-command-business ()
3350 "Outline `pre-command-hook' function for outline buffers. 3358 "Outline `pre-command-hook' function for outline buffers.
@@ -3367,8 +3375,8 @@ return to regular interpretation of self-insert characters."
3367 3375
3368 (if (not (allout-mode-p)) 3376 (if (not (allout-mode-p))
3369 nil 3377 nil
3370 ;; Increment allout-command-counter
3371 (setq allout-command-counter (1+ allout-command-counter)) 3378 (setq allout-command-counter (1+ allout-command-counter))
3379 (setq allout-this-command-hid-text nil)
3372 ;; Do hot-spot navigation. 3380 ;; Do hot-spot navigation.
3373 (if (and (eq this-command 'self-insert-command) 3381 (if (and (eq this-command 'self-insert-command)
3374 (eq (point)(allout-current-bullet-pos))) 3382 (eq (point)(allout-current-bullet-pos)))
@@ -4767,7 +4775,8 @@ arguments as this function, after the exposure changes are made."
4767 (condition-case nil 4775 (condition-case nil
4768 ;; as of 2008-02-27, xemacs lacks modification-hooks 4776 ;; as of 2008-02-27, xemacs lacks modification-hooks
4769 (overlay-put o (pop props) (pop props)) 4777 (overlay-put o (pop props) (pop props))
4770 (error nil))))))) 4778 (error nil))))))
4779 (setq allout-this-command-hid-text t))
4771 (run-hook-with-args 'allout-exposure-change-hook from to flag)) 4780 (run-hook-with-args 'allout-exposure-change-hook from to flag))
4772;;;_ > allout-flag-current-subtree (flag) 4781;;;_ > allout-flag-current-subtree (flag)
4773(defun allout-flag-current-subtree (flag) 4782(defun allout-flag-current-subtree (flag)