From: Tom Breton (Tehom) Date: Sun, 27 Jun 2010 04:21:51 +0000 (-0400) Subject: Changed config defvars to defcustoms with appropriate types etc X-Git-Url: https://repo.or.cz/w/eproject.git/commitdiff_plain/7238e3db6986c6334782e1c89ca8c9c81cad9daf Changed config defvars to defcustoms with appropriate types etc --- diff --git a/eproject.el b/eproject.el index 25b3360..a7f56e6 100644 --- a/eproject.el +++ b/eproject.el @@ -22,49 +22,88 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; User-configurable items: +(defgroup prj-group '() + "Group for eproject customization") -(defvar prj-keybindings '( + +(defcustom prj-keybindings '( ([f5] eproject-setup-toggle always) ([M-right] eproject-nextfile) ([M-left] eproject-prevfile) ([C-f5] eproject-dired) ) "Key bindings in eproject" - ) - -(defvar prj-default-config '( - ("Make" "make" "f9") - ("Clean" "make clean" "C-f9") - ("Run" "echo run what" "f8") - ("Stop" "-e eproject-killtool" "C-f8") - ("---") - ("Configure" "./configure") - ("---") - ("Explore Project" "nautilus --browser `pwd` &") - ("XTerm In Project" "xterm &") - ) + :type + '(repeat + (list + (restricted-sexp + :tag "Key sequence" + :match-alternatives (vectorp stringp)) + function + (choice + (const :tag "always" always) + (const :tag "not always" nil)))) + :group 'prj-group) + + +(defcustom prj-default-config + '( + ("Make" "make" "f9") + ("Clean" "make clean" "C-f9") + ("Run" "echo run what" "f8") + ("Stop" "-e eproject-killtool" "C-f8") + ("---") + ("Configure" "./configure") + ("---") + ("Explore Project" "nautilus --browser `pwd` &") + ("XTerm In Project" "xterm &")) "*The default tools menu for new projects in eproject." - ) - -(defvar prj-autotracking t - "*Should eproject automatically add/remove files to/from the project (nil/t)") + :type + '(repeat + (choice :format "%v" + (const :tag "--- Item separator ---" ("---")) + (list :format "\n%v" + (string :tag "name") + (string :tag "shell command") + (choice :tag "Key sequence" + (restricted-sexp + :tag "yes" + :match-alternatives (vectorp stringp)) + (const :inline t :tag "None" nil))))) + :group 'prj-group) + + +(defcustom prj-autotracking t + "*Should eproject automatically add/remove files to/from the project (nil/t)" + :type 'boolean + :group 'prj-group) ; To apply, close and reopen the project. -(defvar prj-rename-buffers t - "*Should eproject rename buffers to project-relative filenames (nil/t)") +(defcustom prj-rename-buffers t + "*Should eproject rename buffers to project-relative filenames (nil/t)" + :type 'boolean + :group 'prj-group) -(defvar prj-set-default-directory nil +(defcustom prj-set-default-directory nil "*Should eproject set the project directory as default-directory -for all project files (nil/t).") - -(defvar prj-set-framepos nil - "*Should eproject restore the last frame position/size (nil/t).") - -(defvar prj-set-compilation-frame nil - "*Should eproject show compilation output in the other frame (nil/t).") +for all project files (nil/t)." + :type 'boolean + :group 'prj-group) + +(defcustom prj-set-framepos nil + "*Should eproject restore the last frame position/size (nil/t)." + :type 'boolean + :group 'prj-group) + +(defcustom prj-set-compilation-frame nil + "*Should eproject show compilation output in the other frame (nil/t)." + :type 'boolean + :group 'prj-group) -(defvar prj-set-multi-isearch nil - "*Should eproject setup multi-isearch in the project files (nil/t).") +(defcustom prj-set-multi-isearch nil + "*Should eproject setup multi-isearch in the project files (nil/t)." + :type 'boolean + :group 'prj-group) ;; End of user-configurable items ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;