emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/nano-modeline e3a04505ff 05/26: Optional symbols


From: ELPA Syncer
Subject: [elpa] externals/nano-modeline e3a04505ff 05/26: Optional symbols
Date: Fri, 2 Jun 2023 03:59:06 -0400 (EDT)

branch: externals/nano-modeline
commit e3a04505ff9e636e669e9a9f0511e24cf32f5704
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>

    Optional symbols
---
 nano-modeline.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nano-modeline.el b/nano-modeline.el
index bcdb2281f4..a9e4188d09 100644
--- a/nano-modeline.el
+++ b/nano-modeline.el
@@ -262,20 +262,20 @@ made DEFAULT."
      (format-mode-line "(%l lines)")
      'face (nano-modeline--face))))
 
-(defun nano-modeline-window-dedicated ()
+(defun nano-modeline-window-dedicated (&optional symbol)
   "Pin symbol when window is dedicated"
   
-  (propertize (if (window-dedicated-p) " " "")
+  (propertize (if (window-dedicated-p) (or symbol " ") "")
               'face (nano-modeline--face)))
 
-(defun nano-modeline-git-info ()
+(defun nano-modeline-git-info (&optional symbol)
   "Git information as (branch, file status)"
   
   (if vc-mode
       (when-let* ((file (buffer-file-name))
                   (branch (substring-no-properties vc-mode 5))
                   (state (vc-state file)))
-        (propertize (format "(%s, %s)" branch state)
+        (propertize (format "(%s%s, %s)" (or symbol " ") branch state)
                     'face (nano-modeline--face)))
     (propertize "" 'face (nano-modeline--face))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]