Rename utop-is-running to utop-running-p

That's the Emacs convention for predicates.
This commit is contained in:
Bozhidar Batsov 2022-07-19 11:46:48 +03:00 committed by Rudi Grinberg
parent 9c0a55f2c0
commit bfbe143ce1
1 changed files with 13 additions and 11 deletions

View File

@ -1150,13 +1150,13 @@ See https://github.com/ocaml-community/utop for configuration information."))
'("utop"
["Start utop" utop t]
["Switch to utop" utop-switch-to-repl t]
["Interrupt utop" utop-interrupt :active (utop-is-running)]
["Kill utop" utop-kill :active (utop-is-running)]
["Exit utop gracefully" utop-exit :active (utop-is-running)]
["Interrupt utop" utop-interrupt :active (utop-running-p)]
["Kill utop" utop-kill :active (utop-running-p)]
["Exit utop gracefully" utop-exit :active (utop-running-p)]
"---"
["Evaluate phrase" utop-eval-phrase :active (and (utop-is-running) (eq (utop--state) 'edit))]
["Evaluate region" utop-eval-region :active (and (utop-is-running) (eq (utop--state) 'edit))]
["Evaluate buffer" utop-eval-buffer :active (and (utop-is-running) (eq (utop--state) 'edit))]
["Evaluate phrase" utop-eval-phrase :active (and (utop-running-p) (eq (utop--state) 'edit))]
["Evaluate region" utop-eval-region :active (and (utop-running-p) (eq (utop--state) 'edit))]
["Evaluate buffer" utop-eval-buffer :active (and (utop-running-p) (eq (utop--state) 'edit))]
"---"
["Customize utop" (customize-group 'utop) t]
"---"
@ -1172,12 +1172,14 @@ See https://github.com/ocaml-community/utop for configuration information."))
;; | The major mode |
;; +-----------------------------------------------------------------+
(defun utop-is-running ()
(defun utop-running-p ()
(let ((buf (utop-buffer)))
(when buf
(with-current-buffer buf
(and utop-process (eq (process-status utop-process) 'run))))))
(define-obsolete-function-alias 'utop-is-running 'utop-running-p "2.0")
(defun utop-about ()
(interactive)
(describe-variable 'utop-license))
@ -1208,11 +1210,11 @@ See https://github.com/ocaml-community/utop for configuration information."))
"utop menu."
'("utop"
["Start utop" utop t]
["Interrupt utop" utop-interrupt :active (utop-is-running)]
["Kill utop" utop-kill :active (utop-is-running)]
["Exit utop gracefully" utop-exit :active (utop-is-running)]
["Interrupt utop" utop-interrupt :active (utop-running-p)]
["Kill utop" utop-kill :active (utop-running-p)]
["Exit utop gracefully" utop-exit :active (utop-running-p)]
"---"
["Evaluate Phrase" utop-eval-input-auto-end :active (and (utop-is-running) (eq utop-state 'edit))]
["Evaluate Phrase" utop-eval-input-auto-end :active (and (utop-running-p) (eq utop-state 'edit))]
["Switch to OCaml source buffer" utop-switch-to-recent-buffer t]
"---"
["Customize utop" (customize-group 'utop) t]