From 1a7c112a7162d92e2ffced8cbb390a8685fc75db Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 16 Jul 2022 10:57:22 +0300 Subject: [PATCH] Add :safe properties to defcustoms --- src/top/utop.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/top/utop.el b/src/top/utop.el index 85767f5..b3219fb 100644 --- a/src/top/utop.el +++ b/src/top/utop.el @@ -12,7 +12,7 @@ ;;; 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 ;; 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" "The command to execute for utop." - :type 'string) + :type 'string + :safe 'stringp) (defcustom utop-edit-command t "Whether to read the command from the minibuffer before running utop. 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." - :type 'function) + :type 'function + :safe 'functionp) (defcustom utop-mode-hook nil "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 "Load packages from file local variables without asking" - :type 'boolean) + :type 'boolean + :safe 'booleanp) (defface utop-prompt '((((background dark)) (:foreground "Cyan1"))