minmo : prefixes
This commit is contained in:
parent
4b839ee6a1
commit
ace25b9d9c
1 changed files with 17 additions and 10 deletions
|
|
@ -49,7 +49,7 @@
|
||||||
;; left ◱◰ : modified/staged : indexed
|
;; left ◱◰ : modified/staged : indexed
|
||||||
;; right ◳◲ : ignored/untracked : unindexed
|
;; right ◳◲ : ignored/untracked : unindexed
|
||||||
;; top ◰◳ : staged/ignored : ready
|
;; top ◰◳ : staged/ignored : ready
|
||||||
;; bottom ◱◲ : modified/untracked : dirty
|
;; bottom ◱◲ : modified/untracked : unready
|
||||||
|
|
||||||
(defconst minmo-status-alist
|
(defconst minmo-status-alist
|
||||||
'(
|
'(
|
||||||
|
|
@ -247,6 +247,9 @@ Optional FORCE means ignore the minmo--git-directory-table."
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; project
|
;;; project
|
||||||
|
|
||||||
|
(defcustom minmo-project-prefix " " "prefix for the project string. usually a
|
||||||
|
single space.")
|
||||||
|
|
||||||
(defvar-local minmo--project-cache nil)
|
(defvar-local minmo--project-cache nil)
|
||||||
|
|
||||||
(defun minmo--cache-project ()
|
(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
|
;; actually uses the same old vc-mode logic I wanted to
|
||||||
;; avoid.
|
;; avoid.
|
||||||
(git (minmo--find-git buffer-file-name)))
|
(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)
|
(defun minmo-project () minmo--project-cache)
|
||||||
|
|
@ -268,18 +272,21 @@ Optional FORCE means ignore the minmo--git-directory-table."
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; major-mode
|
;;; 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.
|
;; current solution is to throw out a few redundant, obvious modes.
|
||||||
;; NOTE: using major-mode directly, rather than mode-name, because
|
;; NOTE: using major-mode directly, rather than mode-name, because
|
||||||
;; the "pretty print" format is annoying.
|
;; the "pretty print" format is annoying.
|
||||||
(defun minmo-major-mode ()
|
(defun minmo-major-mode ()
|
||||||
(unless (member major-mode '(
|
(unless (member major-mode minmo-major-modes-to-ignore)
|
||||||
um-mode
|
(concat minmo-major-mode-prefix
|
||||||
markdown-mode
|
|
||||||
emacs-lisp-mode
|
|
||||||
))
|
|
||||||
;; major-mode is first evaluated, then the symbol-name of
|
;; major-mode is first evaluated, then the symbol-name of
|
||||||
;; the return value is fetched as string:
|
;; the return value is fetched as string:
|
||||||
(concat " " (symbol-name major-mode))))
|
(symbol-name major-mode))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; input-method
|
;;; input-method
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue