Skip to content

Commit bfd63cc

Browse files
darkfelineyantar92
authored andcommitted
org: Improve org-todo handling of negative prefix args
* lisp/org.el (org-todo): Handle -1 prefix args consistently and error on other negative args.
1 parent 9fb9a2b commit bfd63cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lisp/org.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8901,7 +8901,8 @@ When called through ELisp, arg is also interpreted in the following way:
89018901
nil cl
89028902
(when (org-invisible-p) (org-end-of-subtree nil t))))
89038903
(when (equal arg '(16)) (setq arg 'nextset))
8904-
(when (equal arg -1) (org-cancel-repeater) (setq arg nil))
8904+
(when (equal (prefix-numeric-value arg) -1) (org-cancel-repeater) (setq arg nil))
8905+
(when (< (prefix-numeric-value arg) -1) (user-error "Prefix argument %d not supported" arg))
89058906
(let ((org-blocker-hook org-blocker-hook)
89068907
commentp
89078908
case-fold-search)

0 commit comments

Comments
 (0)