Compare commits

..

1 Commits

Author SHA1 Message Date
Yuji Kanagawa
91407d58a9 Merge branch 'fix-readme' into 'master'
Fix use-package example in README

See merge request jessieh/mood-line!14
2023-11-23 19:40:16 +00:00
6 changed files with 44 additions and 69 deletions

View File

@ -82,7 +82,7 @@ If you'd like to see prettier Unicode glyphs, you can change the value of `mood-
```elisp
;; The default set of glyphs:
;; * myModifiedFile.js Replace*3 + main JavaScript ! Issues: 2
;; * myModifiedFile.js Replace*3 + main Javascript ! Issues: 2
(setq mood-line-glyph-alist mood-line-glyphs-ascii)
;; A set of Fira Code-compatible Unicode glyphs:
@ -112,7 +112,7 @@ To run the included tests:
## Feedback
If you experience any issues with this package, please
[open an issue](https://git.tty.dog/jessieh/mood-line/issues/new)
[open an issue](https://gitlab.com/jessieh/mood-line/issues/new)
on the issue tracker.
Suggestions for improvements and feature requests are always appreciated, as well!

View File

@ -35,7 +35,7 @@
;; -------------------------------------------------------------------------- ;;
;; ---------------------------------- ;;
;; Required features
;; Compile time requirements
;; ---------------------------------- ;;
(eval-when-compile
@ -45,19 +45,19 @@
;; External variable defs
;; ---------------------------------- ;;
(eval-when-compile
(defvar flycheck-current-errors))
(defvar flycheck-current-errors)
;; ---------------------------------- ;;
;; External function decls
;; ---------------------------------- ;;
(eval-when-compile
(declare-function mood-line--get-glyph "mood-line")
(declare-function flycheck-count-errors "flycheck")
(declare-function flymake-running-backends "flymake")
(declare-function flymake-reporting-backends "flymake")
(declare-function flymake--lookup-type-property "flymake"))
(declare-function flymake--lookup-type-property "flymake")
;; -------------------------------------------------------------------------- ;;
;;

View File

@ -39,8 +39,7 @@
;; External function decls
;; ---------------------------------- ;;
(eval-when-compile
(declare-function mood-line--get-glyph "mood-line"))
(declare-function mood-line--get-glyph "mood-line")
;; -------------------------------------------------------------------------- ;;
;;

View File

@ -38,8 +38,7 @@
;; External function decls
;; ---------------------------------- ;;
(eval-when-compile
(declare-function mood-line--get-glyph "mood-line"))
(declare-function mood-line--get-glyph "mood-line")
;; -------------------------------------------------------------------------- ;;
;;

View File

@ -10,7 +10,8 @@
;;; Commentary:
;;
;; mood-line is a lightweight, drop-in replacement for the default mode line.
;; mood-line is a minimal mode line configuration that aims to replicate
;; some of the features of the more advanced doom-modeline package.
;;
;; Features offered:
;; * Clean, informative design
@ -51,7 +52,7 @@
;; -------------------------------------------------------------------------- ;;
;; ---------------------------------- ;;
;; Required features
;; Compile time requirements
;; ---------------------------------- ;;
(eval-when-compile
@ -61,19 +62,18 @@
;; External variable defs
;; ---------------------------------- ;;
(eval-when-compile
(defvar anzu--cached-count)
(defvar anzu--current-position)
(defvar anzu--overflow-p)
(defvar anzu--total-matched))
(defvar anzu--total-matched)
;; ---------------------------------- ;;
;; External function decls
;; ---------------------------------- ;;
(eval-when-compile
(declare-function mc/num-cursors "multiple-cursors")
(declare-function string-blank-p "subr-x"))
(declare-function string-blank-p "subr-x")
;; -------------------------------------------------------------------------- ;;
;;

View File

@ -17,80 +17,57 @@
;; mood-line-defformat
;; ---------------------------------- ;;
(ert-deftest -defformat/padding ()
"The expanded sequence should include the provided (or default) padding."
(should (equal (mood-line-defformat)
(list
;; Left
'(" ")
;; Right
'(" "))))
(ert-deftest -defformat/right-nil ()
"The format sequence should expand if the right segment list is not provided."
(should (equal (mood-line-defformat
:padding
"---")
;; Left
("XYZ")
;; Right
)
(list
;; Left
'("---")
'("XYZ")
;; Right
'("---")))))
(ert-deftest -defformat/left-right-nil ()
"The format sequence should expand if the left or right segment list is nil."
(should (equal (mood-line-defformat
:left
("XYZ"))
(list
;; Left
'(" " "XYZ")
;; Right
'(" "))))
(should (equal (mood-line-defformat
:right
("XYZ"))
(list
;; Left
'(" ")
;; Right
'("XYZ" " ")))))
nil))))
(ert-deftest -defformat/left-right ()
"The expanded sequence should include left and right segments lists."
"The expanded sequence should should include left and right segments lists."
(should (equal (mood-line-defformat
:left
;; Left
("ABC")
:right
;; Right
("XYZ"))
(list
;; Left
'(" " "ABC")
'("ABC")
;; Right
'("XYZ" " ")))))
'("XYZ")))))
(ert-deftest -defformat/cons-cells ()
"Cons cell segments should expand into their `car' and `cdr' values."
(should (equal (mood-line-defformat
:left
;; Left
("ABC" ("ABC" . "XYZ") "XYZ")
:right
;; Right
("..." ((some-fn) . " ") "..."))
(list
;; Left
'(" " "ABC" "ABC" "XYZ" "XYZ")
'("ABC" "ABC" "XYZ" "XYZ")
;; Right
'("..." (some-fn) " " "..." " ")))))
'("..." (some-fn) " " "...")))))
(ert-deftest -defformat/exp-separators ()
"Non-string, non-cons expressions should expand followed by a blank string."
(should (equal (mood-line-defformat
:left
;; Left
("ABC" ("ABC" . "XYZ") some-exp "XYZ" (some-fn))
:right
;; Right
("..." ((some-fn) . " ") (another-fn) "..."))
(list
;; Left
'(" " "ABC" "ABC" "XYZ" some-exp "" "XYZ" (some-fn) "")
'("ABC" "ABC" "XYZ" some-exp "" "XYZ" (some-fn) "")
;; Right
'("..." (some-fn) " " (another-fn) "" "..." " ")))))
'("..." (some-fn) " " (another-fn) "" "...")))))
;; -------------------------------------------------------------------------- ;;
;;