diff options
author | Ken Manheimer <ken.manheimer@gmail.com> | 2020-07-06 14:18:57 -0400 |
---|---|---|
committer | Ken Manheimer <ken.manheimer@gmail.com> | 2020-07-20 14:04:43 -0400 |
commit | 8684216542889fa57daa32072104afc69785907f (patch) | |
tree | 75072646b3c3016443349f141f788d8a3357c0e7 /lisp | |
parent | 8e13d332481551e4c8c1c66dd0c69dd09256dffc (diff) | |
download | emacs-8684216542889fa57daa32072104afc69785907f.tar.gz |
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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/allout-widgets.el | 13 |
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." (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: |