[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8684216 2/5: Don't let item decoration be disrupted by too-shallo
From: |
ken manheimer |
Subject: |
master 8684216 2/5: Don't let item decoration be disrupted by too-shallow items. |
Date: |
Mon, 20 Jul 2020 14:09:58 -0400 (EDT) |
branch: master
commit 8684216542889fa57daa32072104afc69785907f
Author: Ken Manheimer <ken.manheimer@gmail.com>
Commit: Ken Manheimer <ken.manheimer@gmail.com>
Don't let item decoration be disrupted by too-shallow items.
* lisp/allout-widgets.el (allout-decorate-item-and-context): Check for
parent-position having value before using it.
Also, shift local emacs vars topic deeper so it doesn't constitute
an instance of that particular aberrant case.
---
lisp/allout-widgets.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 3c6a05c..e7750b3 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -1594,7 +1594,10 @@ We return the item-widget corresponding to the item at
point."
(if is-container
(progn (widget-put item-widget :is-container t)
(setq reverse-siblings-chart (list 1)))
- (goto-char (widget-apply parent :actual-position :from))
+ (let ((parent-position (widget-apply parent
+ :actual-position :from)))
+ (when parent-position
+ (goto-char parent-position)))
(if (widget-get parent :is-container)
;; `allout-goto-prefix' will go to first non-container item:
(allout-goto-prefix)
@@ -2388,7 +2391,7 @@ The elements of LIST are not copied, just the list
structure itself."
;;;_ : provide
(provide 'allout-widgets)
-;;;_. Local emacs vars.
-;;;_ , Local variables:
-;;;_ , allout-layout: (-1 : 0)
-;;;_ , End:
+;;;_ . Local emacs vars.
+;;;_ , Local variables:
+;;;_ , allout-layout: (-1 : 0)
+;;;_ , End:
- master updated (fe2d0ed -> 33d85cb), ken manheimer, 2020/07/20
- master 8e13d33 1/5: Fix allout-widgets-mode handling of edits to item cue, fixing (bug#11312), ken manheimer, 2020/07/20
- master 8684216 2/5: Don't let item decoration be disrupted by too-shallow items.,
ken manheimer <=
- master 3c410b6 3/5: Provide missing let definition to prevent background void-variable error., ken manheimer, 2020/07/20
- master dd7c191 4/5: Resolve missing button-region keymap bindings., ken manheimer, 2020/07/20
- master 33d85cb 5/5: Rectify allout-widgets region undecoration so item at start is not missed., ken manheimer, 2020/07/20