diff options
author | Bastien <bzg@gnu.org> | 2020-02-16 11:12:06 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-16 11:12:28 +0100 |
commit | 4eaddab3dd7651af8783ddbbd8647a31bd1ec949 (patch) | |
tree | 5f13a7121cc59295b4658e4df019ffb3b9ba2ce0 | |
parent | 833753abcfbdec86586889693c4ed9216aef8078 (diff) | |
download | org-mode-4eaddab3dd7651af8783ddbbd8647a31bd1ec949.tar.gz |
org-list.el: Fix `org-at-radio-list-p'
* lisp/org-list.el (org-at-radio-list-p): Don't choke the list
is at the beginning of the buffer.
-rw-r--r-- | lisp/org-list.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index d3e661c..726bc72 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2340,13 +2340,14 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is (defsubst org-at-radio-list-p () "Is point in a list with radio buttons?" (when (org-at-item-p) - (let (attr) - (save-excursion - (goto-char (caar (org-list-struct))) + (save-excursion + (goto-char (caar (org-list-struct))) + (ignore-errors (org-backward-element) - (setq attr (org-export-read-attribute - :attr_org (org-element-at-point)))) - (when (plist-get attr :radio) t)))) + (string= (plist-get (org-export-read-attribute + :attr_org (org-element-at-point)) + :radio) + "t"))))) (defun org-toggle-checkbox (&optional toggle-presence) "Toggle the checkbox in the current line. |