Skip to content

Commit

Permalink
org: Improve org-todo handling of negative prefix args
Browse files Browse the repository at this point in the history
* lisp/org.el (org-todo): Handle -1 prefix args consistently and error
on other negative args.
  • Loading branch information
darkfeline authored and yantar92 committed Jun 18, 2022
1 parent 9fb9a2b commit bfd63cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/org.el
Original file line number Diff line number Diff line change
Expand Up @@ -8901,7 +8901,8 @@ When called through ELisp, arg is also interpreted in the following way:
nil cl
(when (org-invisible-p) (org-end-of-subtree nil t))))
(when (equal arg '(16)) (setq arg 'nextset))
(when (equal arg -1) (org-cancel-repeater) (setq arg nil))
(when (equal (prefix-numeric-value arg) -1) (org-cancel-repeater) (setq arg nil))
(when (< (prefix-numeric-value arg) -1) (user-error "Prefix argument %d not supported" arg))
(let ((org-blocker-hook org-blocker-hook)
commentp
case-fold-search)
Expand Down

0 comments on commit bfd63cc

Please sign in to comment.