branch: externals/cm-mode
commit b59c48fbb6e71b7845c169e1c2b67c441b024c7e
Author: Joost Kremers <[email protected]>
Commit: Joost Kremers <[email protected]>
Add title to README
---
README.md | 2 ++
cm-mode.el | 23 +++++++++++++----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 9dbc87f6f9..94bc1bac1a 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+# CriticMarkup for Emacs #
+
`cm-mode` is a minor mode that provides (rudimentary) support for
[CriticMarkup](http://criticmarkup.com/) in Emacs.
diff --git a/cm-mode.el b/cm-mode.el
index 9e8b58ba03..d0f0800e2c 100644
--- a/cm-mode.el
+++ b/cm-mode.el
@@ -33,47 +33,50 @@
;;; Commentary:
+;; CriticMarkup for Emacs
+;; ======================
+
;; cm-mode is a minor mode that provides (rudimentary) support for
;; CriticMarkup in Emacs.
-;;
+
;; CriticMarkup defines the following patterns for marking changes to a
;; text:
-;;
+
;; - Addition {++ ++}
;; - Deletion {-- --}
;; - Substitution {~~ ~> ~~}
;; - Comment {>> <<}
;; - Highlight {{ }}{>> <<}
-;;
+
;; Note: additions are called insertions here, because it allows us to use
;; mnemonic key bindings.
-;;
+
;; Activating cm-mode provides key bindings to insert the patterns above
;; and thus mark one's changes to the text. The provided key bindings are:
-;;
+
;; - C-c * i: insert text
;; - C-c * d: delete text
;; - C-c * s: substitute text
;; - C-c * c: insert a comment
;; - C-c * h: highlight text and insert a comment
-;;
+
;; The commands to delete, substitute and highlight text all operate on the
;; region. The commands for inserting and substituting text and for
;; inserting a comment (which includes the command to highlight text) all
;; put the cursor at the correct position, so you can start typing right
;; away.
-;;
+
;; cm-mode also adds the markup patterns defined by CriticMarkup to
;; font-lock-keywords and provides customisable faces to highlight them.
;; The customisation group is called criticmarkup.
-;;
+
;; TODO:
-;;
+
;; - Commands to accept or reject the change at point (C-c * a and
;; C-c * r)
;; - Command to accept or reject all changes interactively (C-c * A)
;; - Mouse support
-;;
+
;;; Code:
(defvar cm-insertion-regexp "\\(?:{\\+\\+.*?\\+\\+}\\)"