summaryrefslogtreecommitdiff
path: root/paredit.el
diff options
context:
space:
mode:
Diffstat (limited to 'paredit.el')
-rw-r--r--paredit.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/paredit.el b/paredit.el
index 477d616..fd9f038 100644
--- a/paredit.el
+++ b/paredit.el
@@ -1107,6 +1107,15 @@ If a list begins on the line after the point but ends on a different
(defalias 'paredit-initialize-comment-dwim 'comment-normalize-vars)
(comment-normalize-vars))
+(defvar paredit-comment-prefix-toplevel ";;; "
+ "String of prefix for top-level comments aligned at the left margin.")
+
+(defvar paredit-comment-prefix-code ";; "
+ "String of prefix for comments indented at the same depth as code.")
+
+(defvar paredit-comment-prefix-margin ";"
+ "String of prefix for comments on the same line as code in the margin.")
+
(defun paredit-comment-dwim (&optional argument)
"Call the Lisp comment command you want (Do What I Mean).
This is like `comment-dwim', but it is specialized for Lisp editing.
@@ -1168,13 +1177,13 @@ This is expected to be called only in `paredit-comment-dwim'; do not
(and indent (zerop indent))))
;; Top-level comment
(if code-after-p (save-excursion (newline)))
- (insert ";;; "))
+ (insert paredit-comment-prefix-toplevel))
((or code-after-p (not code-before-p))
;; Code comment
(if code-before-p
(newline-and-indent)
(lisp-indent-line))
- (insert ";; ")
+ (insert paredit-comment-prefix-code)
(if code-after-p
(save-excursion
(newline)
@@ -1183,7 +1192,7 @@ This is expected to be called only in `paredit-comment-dwim'; do not
(t
;; Margin comment
(indent-to comment-column 1) ; 1 -> force one leading space
- (insert ?\; )))))
+ (insert paredit-comment-prefix-margin)))))
;;;; Character Deletion