diff options
author | Taylor R Campbell <campbell+paredit@mumble.net> | 2019-11-21 23:28:41 +0000 |
---|---|---|
committer | Taylor R Campbell <campbell+paredit@mumble.net> | 2019-11-21 23:28:41 +0000 |
commit | 814999bb320e6d5aaa9c8ff663b1933157129571 (patch) | |
tree | 8180c5299aaf83305fad88df872b708a6922db39 /test.el | |
parent | b1c332a24a258028fd388d4a0b71052807691a1c (diff) |
New variables for comment prefixes.
You can customize these according to mode if your Lisp has different
style conventions from the Common Lisp and Scheme in my experience.
Diffstat (limited to 'test.el')
-rw-r--r-- | test.el | 81 |
1 files changed, 81 insertions, 0 deletions
@@ -1417,3 +1417,84 @@ Four arguments: the paredit command, the text of the buffer "(let ((x 5))\n |(foo bar\n baz)\n (wrong indent))") ("(define (f x #!optional\n (|wrong indent))\n (+ 1 2))" "(define (f x #!optional\n |wrong)\n (+ 1 2))"))) + +(let ((paredit-comment-prefix-toplevel ";;;T ") + (paredit-comment-prefix-code ";;C ") + (paredit-comment-prefix-margin ";M ")) + (paredit-test 'paredit-comment-dwim + '(("|\n(f xy\n z\n w)\n" + ";;;T |\n(f xy\n z\n w)\n" + ";;;|T \n(f xy\n z\n w)\n" + ";;;|T \n(f xy\n z\n w)\n") + ("\n|(f xy\n z\n w)\n" + "\n;;;T |\n(f xy\n z\n w)\n" + "\n;;;|T \n(f xy\n z\n w)\n" + "\n;;;|T \n(f xy\n z\n w)\n") + ("\n(|f xy\n z\n w)\n" + "\n(\n ;;C |\n f xy\n z\n w)\n" + "\n(\n ;;|C \n f xy\n z\n w)\n" + "\n(\n ;;|C \n f xy\n z\n w)\n") + ("\n(f| xy\n z\n w)\n" + "\n(f\n ;;C |\n xy\n z\n w)\n" + "\n(f\n ;;|C \n xy\n z\n w)\n" + "\n(f\n ;;|C \n xy\n z\n w)\n") + ("\n(f |xy\n z\n w)\n" + "\n(f\n ;;C |\n xy\n z\n w)\n" + "\n(f\n ;;|C \n xy\n z\n w)\n" + "\n(f\n ;;|C \n xy\n z\n w)\n") + ("\n(f x|y\n z\n w)\n" + "\n(f x\n ;;C |\n y\n z\n w)\n" + "\n(f x\n ;;|C \n y\n z\n w)\n" + "\n(f x\n ;;|C \n y\n z\n w)\n") + ("\n(f xy|\n z\n w)\n" + "\n(f xy ;M |\n z\n w)\n" + "\n(f xy ;|M \n z\n w)\n" + "\n(f xy ;|M \n z\n w)\n") + ("\n(f xy\n| z\n w)\n" + "\n(f xy\n ;;C |\n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n") + ("\n(f xy\n | z\n w)\n" + "\n(f xy\n ;;C |\n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n") + ("\n(f xy\n | z\n w)\n" + "\n(f xy\n ;;C |\n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n") + ("\n(f xy\n |z\n w)\n" + "\n(f xy\n ;;C |\n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n" + "\n(f xy\n ;;|C \n z\n w)\n") + ("\n(f xy\n z|\n w)\n" + "\n(f xy\n z ;M |\n w)\n" + "\n(f xy\n z ;|M \n w)\n" + "\n(f xy\n z ;|M \n w)\n") + ("\n(f xy\n z\n| w)\n" + "\n(f xy\n z\n ;;C |\n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n") + ("\n(f xy\n z\n | w)\n" + "\n(f xy\n z\n ;;C |\n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n") + ("\n(f xy\n z\n | w)\n" + "\n(f xy\n z\n ;;C |\n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n") + ("\n(f xy\n z\n |w)\n" + "\n(f xy\n z\n ;;C |\n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n" + "\n(f xy\n z\n ;;|C \n w)\n") + ("\n(f xy\n z\n w|)\n" + "\n(f xy\n z\n w\n ;;C |\n )\n" + "\n(f xy\n z\n w\n ;;|C \n )\n" + "\n(f xy\n z\n w\n ;;|C \n )\n") + ("\n(f xy\n z\n w)|\n" + "\n(f xy\n z\n w) ;M |\n" + "\n(f xy\n z\n w) ;|M \n" + "\n(f xy\n z\n w) ;|M \n") + ("\n(f xy\n z\n w)\n|" + "\n(f xy\n z\n w)\n;;;T |" + "\n(f xy\n z\n w)\n;;;|T " + "\n(f xy\n z\n w)\n;;;|T "))))
\ No newline at end of file |