Skip to content

Commit

Permalink
refactor: rearrange customization groups
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 17, 2024
1 parent cf4e106 commit d638bb9
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 57 deletions.
3 changes: 2 additions & 1 deletion core/me-builtin.el
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ Functions are differentiated into \"special forms\", \"built-in functions\" and
(defcustom +python-enable-pyenv nil
"Enable integration for pyenv.
This variable should be set early, either in \"early-config.el\" or \"init-tweaks.el\"."
:group 'minemacs :type 'boolean)
:group 'minemacs-utils
:type 'boolean)
(when (and +python-enable-pyenv (executable-find "pyenv") (file-directory-p "~/.pyenv/shims/"))
(setenv "WORKON_HOME" "~/.pyenv/versions")
(setenv "PIPENV_PYTHON" "~/.pyenv/shims/python")
Expand Down
4 changes: 0 additions & 4 deletions core/me-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

;;; Code:

(defgroup minemacs-completion nil
"Completion related stuff."
:group 'minemacs)

(use-package cape
:straight t
:after minemacs-loaded
Expand Down
20 changes: 4 additions & 16 deletions core/me-lib.el
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ When MAIL-MODE-P is non-nil, treat INFILE as a mail."
(defcustom +single-file-executable "single-file"
"The executable for \"single-file\" which is used archive HTML pages."
:type 'string
:group 'minemacs)
:group 'minemacs-utils)

(defun +single-file (url out-file)
"Save URL into OUT-FILE as a standalone HTML file."
Expand All @@ -1012,17 +1012,17 @@ When MAIL-MODE-P is non-nil, treat INFILE as a mail."
(autoload 'term-send-string "term")
(defcustom +serial-port "/dev/ttyUSB0"
"The default port (device) to use."
:group 'minemacs-serial
:group 'minemacs-utils
:type 'file)

(defcustom +serial-baudrate 115200
"The default baudrate to use."
:group 'minemacs-serial
:group 'minemacs-utils
:type 'natnum)

(defcustom +serial-first-commands nil
"A list of commands to run in the serial terminal after creation."
:group 'minemacs-serial
:group 'minemacs-utils
:type '(repeat string))

(defvar +serial-buffer nil)
Expand Down Expand Up @@ -1387,10 +1387,6 @@ the children of class at point."

;;; Binary files tweaks

(defgroup minemacs-binary nil
"MinEmacs binary files."
:group 'minemacs)

(defcustom +binary-objdump-executable "objdump"
"The \"objdump\" command."
:group 'minemacs-binary
Expand Down Expand Up @@ -1491,10 +1487,6 @@ This checks the first CHUNK of bytes, defaults to 1024."

;;; Buffer related tweaks

(defgroup minemacs-buffer nil
"MinEmacs buffer stuff."
:group 'minemacs)

;; From: emacswiki.org/emacs/download/misc-cmds.el
;; Candidate as a replacement for `kill-buffer', at least when used interactively.
;; For example: (define-key global-map [remap kill-buffer] 'kill-buffer-and-its-windows)
Expand Down Expand Up @@ -1683,10 +1675,6 @@ This command removes new line characters between lines."

;;; Project tweaks

(defgroup minemacs-project nil
"MinEmacs project stuff."
:group 'minemacs)

(defcustom +project-scan-dir-paths nil
"A list of paths to scan and add to known projects list.
It can be a list of strings (paths) or a list of (cons \"~/path\" recursive-p) to scan directories recursively."
Expand Down
43 changes: 16 additions & 27 deletions core/me-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,23 @@

;;; Code:

;;; MinEmacs directories

(defgroup minemacs nil
"MinEmacs specific functionalities.")

(defgroup minemacs-core nil
"MinEmacs core tweaks."
:group 'minemacs)

(defgroup minemacs-ui nil
"MinEmacs UI tweaks."
:group 'minemacs)
;;; MinEmacs groups

(defgroup minemacs nil "MinEmacs specific functionalities.")
(defgroup minemacs-apps nil "MinEmacs applications." :group 'minemacs)
(defgroup minemacs-binary nil "MinEmacs binary files." :group 'minemacs)
(defgroup minemacs-buffer nil "MinEmacs buffer stuff." :group 'minemacs)
(defgroup minemacs-completion nil "Completion related stuff." :group 'minemacs)
(defgroup minemacs-core nil "MinEmacs core tweaks." :group 'minemacs)
(defgroup minemacs-edit nil "MinEmacs editor tweaks." :group 'minemacs)
(defgroup minemacs-keybinding nil "MinEmacs keybinding." :group 'minemacs)
(defgroup minemacs-org nil "MinEmacs org-mode tweaks." :group 'minemacs)
(defgroup minemacs-prog nil "MinEmacs programming stuff." :group 'minemacs)
(defgroup minemacs-project nil "MinEmacs project stuff." :group 'minemacs)
(defgroup minemacs-ui nil "MinEmacs UI tweaks." :group 'minemacs)
(defgroup minemacs-utils nil "MinEmacs utility functions." :group 'minemacs)

(defgroup minemacs-edit nil
"MinEmacs editor tweaks."
:group 'minemacs)

(defgroup minemacs-prog nil
"MinEmacs programming stuff."
:group 'minemacs)

(defgroup minemacs-keybinding nil
"MinEmacs keybinding."
:group 'minemacs)

(defgroup minemacs-utils nil
"MinEmacs utility functions."
:group 'minemacs)
;;; MinEmacs directories

(defconst minemacs-ignore-user-config
(let* ((ignores (getenv "MINEMACS_IGNORE_USER_CONFIG"))
Expand Down
2 changes: 1 addition & 1 deletion elisp/ecryptfs.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

(defgroup minemacs-ecryptfs nil
"MinEmacs eCryptfs."
:group 'minemacs)
:group 'minemacs-utils)

(defcustom ecryptfs-private-dir-name "Private"
"The eCryptfs private directory name."
Expand Down
2 changes: 1 addition & 1 deletion modules/extras/me-eglot-ltex.el
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

(defgroup minemacs-eglot-ltex nil
"LTeX-LS related settings."
:group 'minemacs)
:group 'minemacs-utils)

(defvar-local eglot-ltex-language "auto")
;;;###autoload(put 'eglot-ltex-language 'safe-local-variable 'stringp)
Expand Down
2 changes: 1 addition & 1 deletion modules/me-email.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

(defgroup minemacs-mu4e nil
"MinEmacs mu4e tweaks."
:group 'minemacs)
:group 'minemacs-apps)

(defconst +mu4e-available-p
(and (executable-find "mu") (executable-find "msmtp") (executable-find "mbsync") (file-directory-p +mu4e-load-path)))
Expand Down
4 changes: 0 additions & 4 deletions modules/me-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

;;; Code:

(defgroup minemacs-org nil
"MinEmacs org-mode tweaks."
:group 'minemacs)

(use-package me-org-extras
:after org
:demand t
Expand Down
4 changes: 2 additions & 2 deletions modules/me-rss.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

(defgroup minemacs-elfeed nil
"MinEmacs elfeed tweaks."
:group 'minemacs)
:group 'minemacs-apps)

(use-package elfeed
:straight t
Expand All @@ -28,7 +28,7 @@
:group 'minemacs-elfeed)
(defcustom +yt-dlp-command "yt-dlp"
"The \"yt-dlp\" command."
:group 'minemacs-tools)
:group 'minemacs-utils)
:custom
(elfeed-db-directory (concat minemacs-local-dir "elfeed/db/"))
(elfeed-enclosure-default-dir (concat minemacs-local-dir "elfeed/enclosure/"))
Expand Down

0 comments on commit d638bb9

Please sign in to comment.