branch: externals/cm-mode
commit 7366c47102b52494010eaa800facf3d05afa00cb
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>

    Show buffer's author in the modeline.
---
 README.md  | 1 +
 cm-mode.el | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 87c448e7d6..51b92ac607 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ The variable `cm-author` can be set globally through 
Customize (or with `setq-de
 
 If `cm-author` is set, a new addition or deletion that is adjacent to an 
existing one is not combined with it if it has a different author tag. This way 
you can add changes to a text that already has changes from another author and 
still keep track of who did what. Note that this *only* works for changes that 
have a comment with an author tag. If the existing addition/deletion does not 
have an author tag, any addition/deletion made adjacent to it is simply 
combined with it.
 
+Note that the modeline shows the buffer's author tag: if `cm-author` is set, 
the lighter for `cm-mode` takes the form `cm@<tag>`.
 
 ## Navigating changes ##
 
diff --git a/cm-mode.el b/cm-mode.el
index b8116db809..ef475008fb 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -209,7 +209,7 @@ it is added automatically."
 ;;;###autoload
 (define-minor-mode cm-mode
   "Minor mode for CriticMarkup."
-  :init-value nil :lighter (:eval (concat " cm" (if cm-follow-changes "*"))) 
:global nil
+  :init-value nil :lighter (:eval (concat " cm" (if cm-author (concat "@" 
cm-author)) (if cm-follow-changes "*"))) :global nil
   (cond
    (cm-mode                             ; cm-mode is turned on
     (font-lock-add-keywords nil `((,cm-addition-regexp . cm-addition-face)

Reply via email to