domtronn / spaceline-all-the-icons.el

A Spaceline Mode Line theme using All The Icons for Emacs
MIT License
234 stars 25 forks source link

Problem defining custom segments #91

Open sync0 opened 6 years ago

sync0 commented 6 years ago

Thank you for such awesome package!

I defined some minor modes to edit text in different laguanges, but I am having trouble defining a simple custom segment to display the value of my variable language-active that takes values such as English, French, etc. This is the segment's code:

 (defun language-segment (language-active)
     "Display the active (human) language."
     (when (boundp 'language-active)
              (format "%s" language-active))) 

Likewise, my configuration for spaceline-all-the-icons is this:

     (use-package spaceline-all-the-icons
       :after spaceline
       :config
       (progn
         (setq spaceline-all-the-icons-icon-set-bookmark 'heart
               spaceline-all-the-icons-icon-set-modified 'toggle
               spaceline-all-the-icons-icon-set-dedicated 'pin
               spaceline-all-the-icons-highlight-file-name t
               spaceline-all-the-icons-hide-long-buffer-path t)
         (spaceline-toggle-all-the-icons-bookmark-on)
         (spaceline-toggle-all-the-icons-dedicated-on)
         (spaceline-all-the-icons--setup-anzu)
         (spaceline-all-the-icons-theme 'language-segment)))

Somehow, nothing shows up----neither an error nor my desired segment with the word English or whatever is active. Have you any idea how to fix this?

Best,

sync0