| 1 | Emacs provides the binding conditionals `if-let', `if-let*', |
| 2 | `when-let', `when-let*', `and-let*' and `while-let'. |
| 3 | |
| 4 | This package implements the missing `and-let' and `while-let*'; |
| 5 | and the original `cond-let', `cond-let*', `when$', `and$' and |
| 6 | `thread$'. |
| 7 | |
| 8 | This package additionally provides more consistent and improved |
| 9 | implementations of the binding conditionals already provided by |
| 10 | Emacs. Merely loading this library does not shadow the built-in |
| 11 | implementations; this can optionally be done in the context of |
| 12 | an individual library, as described below. |
| 13 | |
| 14 | `cond-let' and `cond-let*' are provided exactly under these names. |
| 15 | The names of all other macros implemented by this package begin |
| 16 | with `cond-let--', the package's prefix for private symbol. |
| 17 | |
| 18 | Users of this package are not expected to use these unwieldy |
| 19 | names. Instead one should use Emacs' shorthand feature to use |
| 20 | all or some of these macros by their conceptual names. E.g., if |
| 21 | you want to use all of the available macros, add this at the end |
| 22 | of a library. |
| 23 | |
| 24 | Local Variables: |
| 25 | read-symbol-shorthands: ( |
| 26 | ("and$" . "cond-let--and$") |
| 27 | ("thread$" . "cond-let--thread$") |
| 28 | ("when$" . "cond-let--when$") |
| 29 | ("and-let*" . "cond-let--and-let*") |
| 30 | ("and-let" . "cond-let--and-let") |
| 31 | ("if-let*" . "cond-let--if-let*") |
| 32 | ("if-let" . "cond-let--if-let") |
| 33 | ("when-let*" . "cond-let--when-let*") |
| 34 | ("when-let" . "cond-let--when-let") |
| 35 | ("while-let*" . "cond-let--while-let*") |
| 36 | ("while-let" . "cond-let--while-let")) |
| 37 | End: |
| 38 | |
| 39 | You can think of these file-local settings as import statements of |
| 40 | sorts. If you do this, then this package's implementations shadow |
| 41 | the built-in implementations. Doing so does not affect any other |
| 42 | libraries, which continue to use the built-in implementations. |
| 43 | |
| 44 | Due to limitations of the shorthand implementation this has to be |
| 45 | done for each individual library. ".dir-locals.el" cannot be used. |
| 46 | |
| 47 | If you use `when$', `and$' and `thread$', you might want to add |
| 48 | this to your configuration: |
| 49 | |
| 50 | (with-eval-after-load 'cond-let |
| 51 | (font-lock-add-keywords 'emacs-lisp-mode |
| 52 | cond-let-font-lock-keywords t)) |
| 53 | |
| 54 | For information about the individual macros, please refer to their |
| 55 | docstrings. |
| 56 | |
| 57 | See also https://github.com/tarsius/cond-let/wiki. |