From ace25b9d9c3d33bb559da86359c6e5da88fce5a3 Mon Sep 17 00:00:00 2001 From: bth Date: Wed, 3 Jun 2026 10:46:41 -0700 Subject: [PATCH] minmo : prefixes --- packages/minmo.el | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/minmo.el b/packages/minmo.el index 5a13627..8468bc4 100644 --- a/packages/minmo.el +++ b/packages/minmo.el @@ -49,7 +49,7 @@ ;; left ◱◰ : modified/staged : indexed ;; right ◳◲ : ignored/untracked : unindexed ;; top ◰◳ : staged/ignored : ready -;; bottom ◱◲ : modified/untracked : dirty +;; bottom ◱◲ : modified/untracked : unready (defconst minmo-status-alist '( @@ -247,6 +247,9 @@ Optional FORCE means ignore the minmo--git-directory-table." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; project +(defcustom minmo-project-prefix " " "prefix for the project string. usually a +single space.") + (defvar-local minmo--project-cache nil) (defun minmo--cache-project () @@ -258,7 +261,8 @@ Optional FORCE means ignore the minmo--git-directory-table." ;; actually uses the same old vc-mode logic I wanted to ;; avoid. (git (minmo--find-git buffer-file-name))) - (concat " " (file-name-nondirectory (directory-file-name git)))) + (concat minmo-project-prefix + (file-name-nondirectory (directory-file-name git)))) )) (defun minmo-project () minmo--project-cache) @@ -268,18 +272,21 @@ Optional FORCE means ignore the minmo--git-directory-table." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; major-mode +(defcustom minmo-major-mode-prefix " " "prefix for the status string. usually a +single space.") + +(defcustom minmo-major-modes-to-ignore '(emacs-lisp-mode markdown-mode um-mode) + "list of major-modes to ignore") + ;; current solution is to throw out a few redundant, obvious modes. ;; NOTE: using major-mode directly, rather than mode-name, because ;; the "pretty print" format is annoying. (defun minmo-major-mode () - (unless (member major-mode '( - um-mode - markdown-mode - emacs-lisp-mode - )) - ;; major-mode is first evaluated, then the symbol-name of - ;; the return value is fetched as string: - (concat " " (symbol-name major-mode)))) + (unless (member major-mode minmo-major-modes-to-ignore) + (concat minmo-major-mode-prefix + ;; major-mode is first evaluated, then the symbol-name of + ;; the return value is fetched as string: + (symbol-name major-mode)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; input-method