emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash 8bd82c7 051/426: Show empty lists as '() instead o


From: Phillip Lord
Subject: [elpa] externals/dash 8bd82c7 051/426: Show empty lists as '() instead of nil in docs.
Date: Tue, 04 Aug 2015 19:36:39 +0000

branch: externals/dash
commit 8bd82c7d1cb8edf1dc1ed901f193789766d6b744
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>

    Show empty lists as '() instead of nil in docs.
---
 README.md           |    8 ++++----
 examples-to-docs.el |    3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 88b4947..448c548 100644
--- a/README.md
+++ b/README.md
@@ -154,7 +154,7 @@ The test for equality is done with `equal`,
 or with `!compare-fn` if that's non-nil.
 
 ```cl
-(!difference 'nil 'nil) ;; => 'nil
+(!difference '() '()) ;; => '()
 (!difference '(1 2 3) '(4 5 6)) ;; => '(1 2 3)
 (!difference '(1 2 3 4) '(3 4 5 6)) ;; => '(1 2)
 ```
@@ -166,8 +166,8 @@ The test for equality is done with `equal`,
 or with `!compare-fn` if that's non-nil.
 
 ```cl
-(!intersection 'nil 'nil) ;; => 'nil
-(!intersection '(1 2 3) '(4 5 6)) ;; => 'nil
+(!intersection '() '()) ;; => '()
+(!intersection '(1 2 3) '(4 5 6)) ;; => '()
 (!intersection '(1 2 3 4) '(3 4 5 6)) ;; => '(3 4)
 ```
 
@@ -178,7 +178,7 @@ The test for equality is done with `equal`,
 or with `!compare-fn` if that's non-nil.
 
 ```cl
-(!distinct 'nil) ;; => 'nil
+(!distinct '()) ;; => '()
 (!distinct '(1 2 2 4)) ;; => '(1 2 4)
 ```
 
diff --git a/examples-to-docs.el b/examples-to-docs.el
index 72fc55a..40063a5 100644
--- a/examples-to-docs.el
+++ b/examples-to-docs.el
@@ -65,6 +65,9 @@
 
 (defun simplify-quotes ()
   (goto-char (point-min))
+  (while (search-forward "(quote nil)" nil t)
+    (replace-match "'()"))
+  (goto-char (point-min))
   (while (search-forward "(quote " nil t)
     (forward-char -7)
     (let ((p (point)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]