branch: externals/dash commit 4e907430b1104bb17a11e5bd41c1dcbed096eba0 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Wilfred Hughes <m...@wilfred.me.uk>
Ensure ' in docstring code snippets is not replaced As of Emacs 25.1, `foo' is displayed as ‘foo’. This is controlled by text-quoting-style, but curved quotes are the default. This causes problems for docstrings that contain ' in code snippets. Help buffers show e.g. (funcall 'foo) as (funcall ’foo), which isn't legal elisp. Instead, escape the quotes with \=. See substitute-command-keys for the full docs on \= escaping. --- dash-functional.el | 8 ++++---- dash.el | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dash-functional.el b/dash-functional.el index b5d49bf..305b7cf 100644 --- a/dash-functional.el +++ b/dash-functional.el @@ -207,10 +207,10 @@ In types (for n=2): ((a -> b), (c -> d)) -> (a, c) -> (b, d) This function satisfies the following laws: - (-compose (-prodfn f g ...) (-prodfn f' g' ...)) = (-prodfn (-compose f f') (-compose g g') ...) - (-prodfn f g ...) = (-juxt (-compose f (-partial 'nth 0)) (-compose g (-partial 'nth 1)) ...) - (-compose (-prodfn f g ...) (-juxt f' g' ...)) = (-juxt (-compose f f') (-compose g g') ...) - (-compose (-partial 'nth n) (-prod f1 f2 ...)) = (-compose fn (-partial 'nth n))" + (-compose (-prodfn f g ...) (-prodfn f\\=' g\\=' ...)) = (-prodfn (-compose f f\\=') (-compose g g\\=') ...) + (-prodfn f g ...) = (-juxt (-compose f (-partial \\='nth 0)) (-compose g (-partial \\='nth 1)) ...) + (-compose (-prodfn f g ...) (-juxt f\\=' g\\=' ...)) = (-juxt (-compose f f\\=') (-compose g g\\=') ...) + (-compose (-partial \\='nth n) (-prod f1 f2 ...)) = (-compose fn (-partial \\='nth n))" (lambda (x) (-zip-with 'funcall fns x))) (provide 'dash-functional) diff --git a/dash.el b/dash.el index aa6e9f5..1fcd3e3 100644 --- a/dash.el +++ b/dash.el @@ -1324,7 +1324,7 @@ combinations created by taking one element from each list in order. The results are flattened, ignoring the tensor structure of the result. This is equivalent to calling: - (-flatten-n (1- (length lists)) (apply '-table fn lists)) + (-flatten-n (1- (length lists)) (apply \\='-table fn lists)) but the implementation here is much more efficient. @@ -2046,7 +2046,7 @@ execute body." "Tests for equality use this function or `equal' if this is nil. It should only be set using dynamic scope with a let, like: - (let ((-compare-fn #'=)) (-union numbers1 numbers2 numbers3)") + (let ((-compare-fn #\\='=)) (-union numbers1 numbers2 numbers3)") (defun -distinct (list) "Return a new list with all duplicates removed.