Skip to content

Commit f3c53ac

Browse files
committed
If it is not called as interactive, just return a string
1 parent 9fe25c0 commit f3c53ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: php-mode.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,9 @@ In that case set to `NIL'."
396396
(defun php-mode-version ()
397397
"Display string describing the version of PHP Mode."
398398
(interactive)
399-
(message "PHP Mode %s of %s"
400-
php-mode-version-number php-mode-modified))
399+
(funcall
400+
(if (called-interactively-p 'interactive) #'message #'format)
401+
"PHP Mode %s of %s" php-mode-version-number php-mode-modified))
401402

402403
;;;###autoload
403404
(define-obsolete-variable-alias 'php-available-project-root-files 'php-project-available-root-files "1.19.0")

0 commit comments

Comments
 (0)