emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 7811fc5925 2/2: org-compat: Fix incorrect usage of


From: ELPA Syncer
Subject: [elpa] externals/org 7811fc5925 2/2: org-compat: Fix incorrect usage of `apply' in ea665792b
Date: Sun, 4 Sep 2022 00:57:55 -0400 (EDT)

branch: externals/org
commit 7811fc5925f9a8dbd6c14229ca571ffd15070cb5
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-compat: Fix incorrect usage of `apply' in ea665792b
    
    * lisp/org-compat.el:
    (outline-next-visible-heading):
    (outline-back-to-heading):
    (outline-on-heading-p):
    (outline-hide-sublevels):
    (outline-toggle-children): Use `funcall' instead of `apply'.  The
    former does not expect the last argument to be a list of arguments.
---
 lisp/org-compat.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 767731dbec..9aabad3074 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -1463,13 +1463,13 @@ key."
   "Run `org-fold-region' when in org-mode."
   (if (derived-mode-p 'org-mode)
       (org-fold-region (max from (point-min)) (min to (point-max)) flag 
'headline)
-    (apply oldfun from to flag)))
+    (funcall oldfun from to flag)))
 
 (define-advice outline-next-visible-heading (:around (oldfun arg) 
fix-for-org-fold)
   "Run `org-next-visible-heading' when in org-mode."
   (if (derived-mode-p 'org-mode)
       (org-next-visible-heading arg)
-    (apply oldfun arg)))
+    (funcall oldfun arg)))
 
 (define-advice outline-back-to-heading (:around (oldfun &optional 
invisible-ok) fix-for-org-fold)
   "Run `org-back-to-heading' when in org-mode."
@@ -1487,19 +1487,19 @@ key."
                                   (point)))))
              (goto-char found)
              found)))
-    (apply oldfun invisible-ok)))
+    (funcall oldfun invisible-ok)))
 
 (define-advice outline-on-heading-p (:around (oldfun &optional invisible-ok) 
fix-for-org-fold)
   "Run `org-at-heading-p' when in org-mode."
   (if (derived-mode-p 'org-mode)
       (org-at-heading-p (not invisible-ok))
-    (apply oldfun invisible-ok)))
+    (funcall oldfun invisible-ok)))
 
 (define-advice outline-hide-sublevels (:around (oldfun levels) 
fix-for-org-fold)
   "Run `org-fold-hide-sublevels' when in org-mode."
   (if (derived-mode-p 'org-mode)
       (org-fold-hide-sublevels levels)
-    (apply oldfun levels)))
+    (funcall oldfun levels)))
 
 (define-advice outline-toggle-children (:around (oldfun) fix-for-org-fold)
   "Run `org-fold-hide-sublevels' when in org-mode."
@@ -1510,7 +1510,7 @@ key."
             (org-fold-hide-subtree)
           (org-fold-show-children)
           (org-fold-show-entry 'hide-drawers)))
-    (apply oldfun)))
+    (funcall oldfun)))
 
 ;; TODO: outline-headers-as-kill
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]