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

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

[nongnu] elpa/php-mode a51ff293d8 1/3: Fix defsubst position


From: ELPA Syncer
Subject: [nongnu] elpa/php-mode a51ff293d8 1/3: Fix defsubst position
Date: Sun, 5 Mar 2023 16:59:40 -0500 (EST)

branch: elpa/php-mode
commit a51ff293d86162506d27553af7117119491497b3
Author: USAMI Kenta <tadsan@zonu.me>
Commit: USAMI Kenta <tadsan@zonu.me>

    Fix defsubst position
---
 lisp/php-format.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/php-format.el b/lisp/php-format.el
index b213744ad7..3aafc27885 100644
--- a/lisp/php-format.el
+++ b/lisp/php-format.el
@@ -130,6 +130,13 @@
   :group 'php-format)
 
 ;; Internal functions
+(defsubst php-format--register-timer (sec command-args)
+  "Register idle-timer with SEC and COMMAND-ARGS."
+  (unless php-format--idle-timer
+    (setq php-format--idle-timer
+          (run-with-idle-timer sec nil #'php-format--execute-delayed-format
+                               default-directory command-args))))
+
 (defun php-format--execute-format (files)
   "Execute PHP formatter with FILES."
   (let* ((default-directory (php-project-get-root-dir))
@@ -143,19 +150,12 @@
       (`(idle ,sec) (php-format--register-timer sec command-args))
       ('idle (php-format--register-timer php-format-default-idle-time 
command-args))
       ('async (apply #'call-process-shell-command (car command-args) nil nil 
nil
-                    (append (cdr command-args) (list "&"))))
+                     (append (cdr command-args) (list "&"))))
       ('compile (compile command-line))
       ('silent (shell-command-to-string command-line))
       ('nil (shell-command command-line))
       (_ (user-error "`%s' is unexpected php-format--exec-method" 
php-format--exec-method)))))
 
-(defsubst php-format--register-timer (sec command-args)
-  "Register idle-timer with SEC and COMMAND-ARGS."
-  (unless php-format--idle-timer
-    (setq php-format--idle-timer
-          (run-with-idle-timer sec nil #'php-format--execute-delayed-format
-                               default-directory command-args))))
-
 (defun php-format--get-command-args ()
   "Return a list of command and arguments."
   (if (listp php-format-command)



reply via email to

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