Add :safe properties to defcustoms

This commit is contained in:
Bozhidar Batsov 2022-07-16 10:57:22 +03:00 committed by Rudi Grinberg
parent a84d499301
commit 1a7c112a71
1 changed files with 10 additions and 6 deletions

View File

@ -12,7 +12,7 @@
;;; Commentary: ;;; Commentary:
;; This package provides interaction with an Ocaml utop toplevel (REPL). ;; This package provides interaction with an OCaml utop toplevel (REPL).
;; ;;
;; utop.el has two components - a nice OCaml REPL with auto-completion and a ;; utop.el has two components - a nice OCaml REPL with auto-completion and a
;; minor mode (`utop-minor-mode'), which extends OCaml major modes ;; minor mode (`utop-minor-mode'), which extends OCaml major modes
@ -71,17 +71,20 @@ with Emacs to provide an enhanced environment."
(defcustom utop-command "utop -emacs" (defcustom utop-command "utop -emacs"
"The command to execute for utop." "The command to execute for utop."
:type 'string) :type 'string
:safe 'stringp)
(defcustom utop-edit-command t (defcustom utop-edit-command t
"Whether to read the command from the minibuffer before running utop. "Whether to read the command from the minibuffer before running utop.
If nil, `utop-command' will be used without modification." If nil, `utop-command' will be used without modification."
:type 'boolean) :type 'boolean
:safe 'booleanp)
(defcustom utop-prompt 'utop-default-prompt (defcustom utop-prompt #'utop-default-prompt
"The function which create the prompt for utop." "The function which create the prompt for utop."
:type 'function) :type 'function
:safe 'functionp)
(defcustom utop-mode-hook nil (defcustom utop-mode-hook nil
"A hook that gets run when `utop-mode' is entered." "A hook that gets run when `utop-mode' is entered."
@ -94,7 +97,8 @@ This hook is only run if exiting actually kills the buffer."
(defcustom utop-load-packages-without-asking nil (defcustom utop-load-packages-without-asking nil
"Load packages from file local variables without asking" "Load packages from file local variables without asking"
:type 'boolean) :type 'boolean
:safe 'booleanp)
(defface utop-prompt (defface utop-prompt
'((((background dark)) (:foreground "Cyan1")) '((((background dark)) (:foreground "Cyan1"))