aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Manheimer2020-07-06 14:18:57 -0400
committerKen Manheimer2020-07-20 14:29:00 -0400
commit3071cecda070b0a4808eeca8009a5dc088606ec6 (patch)
tree5266802062e92b638ed9496a075fcb16202ea5a9
parent044960ead25e5e7a9da9ebcd2103e39d4142e1e4 (diff)
downloademacs-3071cecda070b0a4808eeca8009a5dc088606ec6.tar.gz
emacs-3071cecda070b0a4808eeca8009a5dc088606ec6.zip
Backport: 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. (cherry picked from commit 8684216542889fa57daa32072104afc69785907f)
-rw-r--r--lisp/allout-widgets.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 3c6a05cbbce..e7750b3606e 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."
1594 (if is-container 1594 (if is-container
1595 (progn (widget-put item-widget :is-container t) 1595 (progn (widget-put item-widget :is-container t)
1596 (setq reverse-siblings-chart (list 1))) 1596 (setq reverse-siblings-chart (list 1)))
1597 (goto-char (widget-apply parent :actual-position :from)) 1597 (let ((parent-position (widget-apply parent
1598 :actual-position :from)))
1599 (when parent-position
1600 (goto-char parent-position)))
1598 (if (widget-get parent :is-container) 1601 (if (widget-get parent :is-container)
1599 ;; `allout-goto-prefix' will go to first non-container item: 1602 ;; `allout-goto-prefix' will go to first non-container item:
1600 (allout-goto-prefix) 1603 (allout-goto-prefix)
@@ -2388,7 +2391,7 @@ The elements of LIST are not copied, just the list structure itself."
2388;;;_ : provide 2391;;;_ : provide
2389(provide 'allout-widgets) 2392(provide 'allout-widgets)
2390 2393
2391;;;_. Local emacs vars. 2394;;;_ . Local emacs vars.
2392;;;_ , Local variables: 2395;;;_ , Local variables:
2393;;;_ , allout-layout: (-1 : 0) 2396;;;_ , allout-layout: (-1 : 0)
2394;;;_ , End: 2397;;;_ , End: