summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@posteo.net>2024-01-12 12:19:20 +0100
committerIhor Radchenko <yantar92@posteo.net>2024-01-12 12:19:20 +0100
commit2a77f1de0cc1dbf8345ac26eed32798e779910ab (patch)
treedc3d9e4031550ddd60488a0c3c80e40433890cee
parent16e680a4ff66bbe342772a33bc18b05f6d5981ef (diff)
lisp/org-expiry.el: Fix compiler warnings
* lisp/org-expiry.el (org-schedule): (org-deadline): (org-time-stamp): Use `define-advice' instead of `defadvice'. (org-expiry-process-entry): Use `called-interactively-p' instead of obsolete `interactive-p'. Fix `called-interactively-p' args.
-rw-r--r--lisp/org-expiry.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org-expiry.el b/lisp/org-expiry.el
index 1ed2b75..4caf870 100644
--- a/lisp/org-expiry.el
+++ b/lisp/org-expiry.el
@@ -157,15 +157,15 @@ functions. `org-expiry-deinsinuate' will deactivate them."
;;; Advices and insinuation:
-(defadvice org-schedule (after org-schedule-update-created)
+(define-advice org-schedule (:after (&rest _) org-schedule-update-created)
"Update the creation-date property when calling `org-schedule'."
(org-expiry-insert-created))
-(defadvice org-deadline (after org-deadline-update-created)
+(define-advice org-deadline (:after (&rest _) org-deadline-update-created)
"Update the creation-date property when calling `org-deadline'."
(org-expiry-insert-created))
-(defadvice org-time-stamp (after org-time-stamp-update-created)
+(define-advice org-time-stamp (:after (&rest _) org-time-stamp-update-created)
"Update the creation-date property when calling `org-time-stamp'."
(org-expiry-insert-created))
@@ -240,7 +240,7 @@ If FORCE is non-nil, don't require confirmation from the user.
Otherwise rely on `org-expiry-confirm-flag' to decide."
(interactive "P")
(save-excursion
- (when (called-interactively-p) (org-reveal))
+ (when (called-interactively-p 'interactive) (org-reveal))
(when (org-expiry-expired-p)
(org-back-to-heading)
(looking-at org-complex-heading-regexp)
@@ -251,10 +251,10 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
(if (or force
(null org-expiry-confirm-flag)
(and (eq org-expiry-confirm-flag 'interactive)
- (not (interactive-p)))
+ (not (called-interactively-p 'interactive)))
(and org-expiry-confirm-flag
(y-or-n-p (format "Entry expired by %d days. Process? " d))))
- (funcall org-expiry-handler-function))
+ (funcall org-expiry-handler-function))
(delete-overlay ov)))))
(defun org-expiry-process-entries (beg end)