Use called-interactively-p instead of interactive-p

`cask build 2>&1 | wc -l` down from 444 to 434
This commit is contained in:
contrapunctus 2021-03-16 23:41:55 +05:30
parent 9483d28284
commit 7f8e18f3eb
2 changed files with 6 additions and 6 deletions

View File

@ -2651,7 +2651,7 @@ With double prefix argument, specify more connection details."
(setq jabber-connections nil)
(jabber-disconnected)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Disconnected from Jabber server(s)")))))))
(defun jabber-disconnect-one (jc &optional dont-redisplay)
@ -2659,7 +2659,7 @@ With double prefix argument, specify more connection details."
If DONT-REDISPLAY is non-nil, don't update roster buffer."
(interactive (list (jabber-read-account)))
(fsm-send-sync jc :do-disconnect)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Disconnected from %s"
(jabber-connection-jid jc)))
(unless dont-redisplay
@ -3479,7 +3479,7 @@ H Toggle displaying this text
(goto-char (point-min))
(setq buffer-read-only t)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(dolist (hook '(jabber-info-message-hooks jabber-alert-info-message-hooks))
(run-hook-with-args hook 'roster (current-buffer) (funcall jabber-alert-info-message-function 'roster (current-buffer)))))
(when current-line

View File

@ -3416,7 +3416,7 @@ With double prefix argument, specify more connection details."
(setq jabber-connections nil)
(jabber-disconnected)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Disconnected from Jabber server(s)")))))))
#+END_SRC
@ -3427,7 +3427,7 @@ With double prefix argument, specify more connection details."
If DONT-REDISPLAY is non-nil, don't update roster buffer."
(interactive (list (jabber-read-account)))
(fsm-send-sync jc :do-disconnect)
(when (interactive-p)
(when (called-interactively-p 'interactive)
(message "Disconnected from %s"
(jabber-connection-jid jc)))
(unless dont-redisplay
@ -4439,7 +4439,7 @@ H Toggle displaying this text
(goto-char (point-min))
(setq buffer-read-only t)
(if (interactive-p)
(if (called-interactively-p 'interactive)
(dolist (hook '(jabber-info-message-hooks jabber-alert-info-message-hooks))
(run-hook-with-args hook 'roster (current-buffer) (funcall jabber-alert-info-message-function 'roster (current-buffer)))))
(when current-line