From 86238e856c6e5c6edde4ae87f731091aef573d50 Mon Sep 17 00:00:00 2001 From: jvdydev Date: Sun, 17 Sep 2023 12:55:51 +0200 Subject: [PATCH] Replace / in function names with - See #347 --- modules/crafted-completion-config.el | 6 +++--- modules/crafted-evil-config.el | 18 +++++++++--------- modules/crafted-ide-config.el | 4 ++-- modules/crafted-lisp-config.el | 4 ++-- modules/crafted-org-config.el | 6 +++--- modules/crafted-writing-config.el | 14 +++++++------- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/crafted-completion-config.el b/modules/crafted-completion-config.el index 3f99bf5f..32eea6ad 100644 --- a/modules/crafted-completion-config.el +++ b/modules/crafted-completion-config.el @@ -14,7 +14,7 @@ ;;; Code: -(defun crafted-completion/minibuffer-backward-kill (arg) +(defun crafted-completion-minibuffer-backward-kill (arg) "Delete word or delete up to parent folder when completion is a file. ARG is the thing being completed in the minibuffer." @@ -131,13 +131,13 @@ ARG is the thing being completed in the minibuffer." (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify) ;; No auto-completion or completion-on-quit in eshell - (defun crafted-completion/corfu-eshell () + (defun crafted-completion-corfu-eshell () "Special settings for when using corfu with eshell." (setq-local corfu-quit-at-boundary t corfu-quit-no-match t corfu-auto nil) (corfu-mode)) - (add-hook 'eshell-mode-hook #'crafted-completion/corfu-eshell)) + (add-hook 'eshell-mode-hook #'crafted-completion-corfu-eshell)) (provide 'crafted-completion-config) ;;; crafted-completion.el ends here diff --git a/modules/crafted-evil-config.el b/modules/crafted-evil-config.el index 19c945ab..3e8d6363 100644 --- a/modules/crafted-evil-config.el +++ b/modules/crafted-evil-config.el @@ -61,18 +61,18 @@ Take some of the default keybindings for evil mode." Rebinds the arrow keys to display a message instead." - (defun crafted-evil/discourage-arrow-keys () + (defun crafted-evil-discourage-arrow-keys () (message "Use HJKL keys instead!")) ;; Disable arrow keys in normal and visual modes - (keymap-set evil-normal-state-map "" 'crafted-evil/discourage-arrow-keys) - (keymap-set evil-normal-state-map "" 'crafted-evil/discourage-arrow-keys) - (keymap-set evil-normal-state-map "" 'crafted-evil/discourage-arrow-keys) - (keymap-set evil-normal-state-map "" 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys) - (evil-global-set-key 'motion (kbd "") 'crafted-evil/discourage-arrow-keys)) + (keymap-set evil-normal-state-map "" 'crafted-evil-discourage-arrow-keys) + (keymap-set evil-normal-state-map "" 'crafted-evil-discourage-arrow-keys) + (keymap-set evil-normal-state-map "" 'crafted-evil-discourage-arrow-keys) + (keymap-set evil-normal-state-map "" 'crafted-evil-discourage-arrow-keys) + (evil-global-set-key 'motion (kbd "") 'crafted-evil-discourage-arrow-keys) + (evil-global-set-key 'motion (kbd "") 'crafted-evil-discourage-arrow-keys) + (evil-global-set-key 'motion (kbd "") 'crafted-evil-discourage-arrow-keys) + (evil-global-set-key 'motion (kbd "") 'crafted-evil-discourage-arrow-keys)) ;; Make sure some modes start in Emacs state ;; TODO: Split this out to other configuration modules? diff --git a/modules/crafted-ide-config.el b/modules/crafted-ide-config.el index 05fec025..64fc9067 100644 --- a/modules/crafted-ide-config.el +++ b/modules/crafted-ide-config.el @@ -93,12 +93,12 @@ Example: `(crafted-tree-sitter-load 'python)'" ;; enhance ibuffer with ibuffer-project if it is available. (when (require 'ibuffer-project nil :noerror) - (defun crafted-ide/enhance-ibuffer-with-ibuffer-project () + (defun crafted-ide-enhance-ibuffer-with-ibuffer-project () "Set up integration for `ibuffer' with `ibuffer-project'." (setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups)) (unless (eq ibuffer-sorting-mode 'project-file-relative) (ibuffer-do-sort-by-project-file-relative))) - (add-hook 'ibuffer-hook #'crafted-ide/enhance-ibuffer-with-ibuffer-project)) + (add-hook 'ibuffer-hook #'crafted-ide-enhance-ibuffer-with-ibuffer-project)) (provide 'crafted-ide-config) ;;; crafted-ide-config.el ends here diff --git a/modules/crafted-lisp-config.el b/modules/crafted-lisp-config.el index 82f759e7..c52fd141 100644 --- a/modules/crafted-lisp-config.el +++ b/modules/crafted-lisp-config.el @@ -66,7 +66,7 @@ (require 'cider "cider" :no-error) (require 'clj-refactor "clj-refactor" :no-error) - (defun crafted-lisp/load-clojure-refactor () + (defun crafted-lisp-load-clojure-refactor () "Load `clj-refactor' toooling and fix keybinding conflicts with cider." (when (locate-library "clj-refactor") (clj-refactor-mode 1) @@ -74,7 +74,7 @@ ;; conflict with cider, use this by default as it does ;; not conflict and is a better mnemonic (cljr-add-keybindings-with-prefix "C-c r"))) - (add-hook 'clojure-mode-hook #'crafted-lisp/load-clojure-refactor) + (add-hook 'clojure-mode-hook #'crafted-lisp-load-clojure-refactor) (with-eval-after-load "flycheck" (flycheck-clojure-setup))) diff --git a/modules/crafted-org-config.el b/modules/crafted-org-config.el index 6e957803..63ef4936 100644 --- a/modules/crafted-org-config.el +++ b/modules/crafted-org-config.el @@ -27,7 +27,7 @@ (add-hook 'org-mode-hook 'org-appear-mode)) ;; Disable auto-pairing of "<" in org-mode with electric-pair-mode -(defun crafted-org/enhance-electric-pair-inhibit-predicate () +(defun crafted-org-enhance-electric-pair-inhibit-predicate () "Disable auto-pairing of \"<\" in `org-mode' when using `electric-pair-mode'." (when (and electric-pair-mode (eql major-mode #'org-mode)) (setq-local electric-pair-inhibit-predicate @@ -39,8 +39,8 @@ ;; Add hook to both electric-pair-mode-hook and org-mode-hook ;; This ensures org-mode buffers don't behave weirdly, ;; no matter when electric-pair-mode is activated. -(add-hook 'electric-pair-mode-hook #'crafted-org/enhance-electric-pair-inhibit-predicate) -(add-hook 'org-mode-hook #'crafted-org/enhance-electric-pair-inhibit-predicate) +(add-hook 'electric-pair-mode-hook #'crafted-org-enhance-electric-pair-inhibit-predicate) +(add-hook 'org-mode-hook #'crafted-org-enhance-electric-pair-inhibit-predicate) (provide 'crafted-org-config) ;;; crafted-org-config.el ends here diff --git a/modules/crafted-writing-config.el b/modules/crafted-writing-config.el index 92fc6ca3..1cb52460 100644 --- a/modules/crafted-writing-config.el +++ b/modules/crafted-writing-config.el @@ -139,11 +139,11 @@ Depends on having `pdf-tools'." (customize-set-variable 'TeX-source-correlate-start-server t))) ;; message the user if the latex executable is not found -(defun crafted-writing/tex-warning-if-no-latex-executable () +(defun crafted-writing-tex-warning-if-no-latex-executable () "Print a message to the minibuffer if the \"latex\" executable cannot be found." (unless (executable-find "latex") (message "latex executable not found"))) -(add-hook 'tex-mode-hook #'crafted-writing/tex-warning-if-no-latex-executable) +(add-hook 'tex-mode-hook #'crafted-writing-tex-warning-if-no-latex-executable) (when (and (executable-find "latex") (executable-find "latexmk")) @@ -153,10 +153,10 @@ Depends on having `pdf-tools'." (auctex-latexmk-setup) (customize-set-variable 'auctex-latexmk-inherit-TeX-PDF-mode t)) - (defun crafted-writing/tex-make-latexmk-default-command () + (defun crafted-writing-tex-make-latexmk-default-command () "Set `TeX-command-default' to \"LatexMk\"." (setq TeX-command-default "LatexMk")) - (add-hook 'TeX-mode-hook #'crafted-writing/tex-make-latexmk-default-command)))) + (add-hook 'TeX-mode-hook #'crafted-writing-tex-make-latexmk-default-command)))) ;;; Markdown @@ -180,11 +180,11 @@ Depends on having `pdf-tools'." ;;; PDF Support when using pdf-tools (when (locate-library "pdf-tools") - ;; load pdf-tools when going into doc-view-mode - (defun crafted-writing/load-pdf-tools () + ;; load pdf-tools when going into doc-view-mode + (defun crafted-writing-load-pdf-tools () "Attempts to require pdf-tools, but for attaching to hooks." (require 'pdf-tools nil :noerror)) - (add-hook 'doc-view-mode-hook #'crafted-writing/load-pdf-tools) + (add-hook 'doc-view-mode-hook #'crafted-writing-load-pdf-tools) ;; when pdf-tools is loaded, apply settings. (with-eval-after-load 'pdf-tools