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

    Change `cm-auto-comment' to `cm-author'.
---
 README.md  |  6 +++---
 cm-mode.el | 34 +++++++++++++++++-----------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/README.md b/README.md
index 7ef02b131f..ea15e7ca67 100644
--- a/README.md
+++ b/README.md
@@ -25,11 +25,11 @@ The commands to delete or substitute text operate on the 
region. The command to
 `cm-mode` also provides a simple 'follow changes' mode. When activated, 
changes you make to the buffer are automatically marked as insertions or 
deletions. Substitutions cannot be made automatically (that is, if you mark a 
word, delete it and then type a replacement, it will still be marked as a 
sequence of deletion+insertion, not as a substitution), but they can still be 
made manually with `C-c * s`. You can activate and deactivate follow changes 
mode with `C-c * F`. When it's active, t [...]
 
 
-## Automaticaly adding comments ##
+## Keeping track of the author ##
 
-If you want to automatically add a comment to every change you make, for 
example to keep track of who made the change, you can set the variable 
`cm-auto-comment` to the desired text. (Don't include the comment markup 
itself.) Once set, every change is automatically commented. If you explicitly 
make a comment with `C-c * c`, the value of `cm-auto-comment` is inserted at 
the beginning of the comment, followed by `:: ` (double colon space).
+Comments can be used to keep track of who made a particular change. If you 
want to do this automatically, you can set the variable `cm-author` to an 
identifier. When this variable is set, its value is automatically added as a 
comment to every change you make. If you explicitly make a comment with `C-c * 
c`, the value of `cm-author` is inserted at the beginning of the comment, 
followed by `:: ` (double colon space).
 
-The variable `cm-auto-comment` can be set globally through Customize (or with 
`setq-default` in your init file). This sets the global value. You can override 
this global value in a particular buffer by setting a buffer-local value. There 
are two ways to do this: you can use `C-c * C`, which will only set the value 
for the current session, or you can use a file-local (or directory-local) 
variable, which makes sure the value is set every time the file is loaded. 
(Note: if you use [Pandoc]( [...]
+The variable `cm-author` can be set globally through Customize (or with 
`setq-default` in your init file). This sets the global value. You can override 
this global value in a particular buffer by setting a buffer-local value. There 
are two ways to do this: you can use `C-c * C`, which will only set the value 
for the current session, or you can use a file-local (or directory-local) 
variable, which makes sure the value is set every time the file is loaded. 
(Note: if you use [Pandoc](http:/ [...]
 
 
 ## Navigating changes ##
diff --git a/cm-mode.el b/cm-mode.el
index 5dc7922bba..9cc16631a5 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -69,7 +69,7 @@
 ;; `C-c * *' : move forward out of a change
 ;; `C-c * f' : move forward to the next change
 ;; `C-c * b' : move backward to the previous change
-;; `C-c * C' : set auto-comment
+;; `C-c * C' : set author
 ;; `C-c * F' : activate follow changes mode
 ;;
 ;;
@@ -83,7 +83,7 @@
 ;; ----
 ;;
 ;; - Commands to accept or reject all changes in one go.
-;; - Do not combine two adjacent additions/deletions if the auto-comment is
+;; - Do not combine two adjacent additions/deletions if the author is
 ;;   different.
 ;; - Mouse support?
 
@@ -143,13 +143,13 @@ flag to indicate this. (Though they should actually use 
the macro
   :prefix "cm-"
   :group 'criticmarkup)
 
-(defcustom cm-auto-comment nil
+(defcustom cm-author nil
   "*Comment that is automatically inserted when marking a change."
   :group 'criticmarkup
   :safe 'stringp
   :type '(choice (const :tag "None" nil)
-                 (string :tag "Comment")))
-(make-variable-buffer-local 'cm-auto-comment)
+                 (string :tag "Author")))
+(make-variable-buffer-local 'cm-author)
 
 (defface cm-addition-face '((t (:foreground "forest green")))
   "*Face for CriticMarkup additions."
@@ -197,7 +197,7 @@ flag to indicate this. (Though they should actually use the 
macro
     (define-key map "\C-c**" 'cm-forward-out-of-change)
     (define-key map "\C-c*f" 'cm-forward-change)
     (define-key map "\C-c*b" 'cm-backward-change)
-    (define-key map "\C-c*C" 'cm-set-auto-comment)
+    (define-key map "\C-c*C" 'cm-set-author)
     (define-key map "\C-c*F" 'cm-follow-changes)
     map)
   "Keymap for cm-mode.")
@@ -278,24 +278,24 @@ Also insert TEXT if non-NIL. For deletions, TEXT is the 
deleted
 text; for substitutions, the text to be substituted; for
 comments, the text to be highlighted.
 
-If `cm-auto-comment' is set, a comment is added with its value.
+If `cm-author' is set, a comment is added with its value.
 
 If TYPE is 'cm-highlight, a comment is added, which optionally
-starts with `cm-auto-comment' followed by \":: \"."
+starts with `cm-author' followed by \":: \"."
   (multiple-value-bind (bdelim edelim) (cdr (assq type cm-delimiters))
     (insert (or bdelim "")
             (or text (if (and (eq type 'cm-comment)
-                              cm-auto-comment)
-                         (concat cm-auto-comment ":: ")
+                              cm-author)
+                         (concat cm-author ":: ")
                        ""))
             (if (eq type 'cm-substitution) "~>" "")
             (or edelim "")))
   (if (and (not (eq type 'cm-comment))
-           (or cm-auto-comment (eq type 'cm-highlight)))
+           (or cm-author (eq type 'cm-highlight)))
       (insert (format "{>>%s%s<<}"
-                      (or cm-auto-comment "")
+                      (or cm-author "")
                       (if (and (eq type 'cm-highlight)
-                               cm-auto-comment)
+                               cm-author)
                           ":: "
                         "")))))
 
@@ -739,10 +739,10 @@ substitutions, `d' for comments and highlights."
   (interactive "p")
   (cm-forward-change (- n)))
 
-(defun cm-set-auto-comment (str)
-  "Set the auto-comment string."
-  (interactive "sSet auto-comment to: ")
-  (setq cm-auto-comment (if (string= str "") nil str)))
+(defun cm-set-author (str)
+  "Set the author string."
+  (interactive "sSet author to: ")
+  (setq cm-author (if (string= str "") nil str)))
 
 (provide 'cm-mode)
 

Reply via email to