-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlet-completion-external.el
More file actions
70 lines (57 loc) · 2.95 KB
/
Copy pathlet-completion-external.el
File metadata and controls
70 lines (57 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
;;; let-completion-external.el --- Extra binding form registrations -*- lexical-binding: t -*-
;; Author: Gino Cornejo <gggion123@gmail.com>
;; Maintainer: Gino Cornejo <gggion123@gmail.com>
;; URL: https://github.com/gggion/let-completion.el
;; Keywords: lisp, completion
;; This file is part of let-completion.
;; SPDX-License-Identifier: GPL-3.0-or-later
;; This file is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation, either version 3 of the License,
;; or (at your option) any later version.
;;
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this file. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Extra binding form registrations for `let-completion-mode'.
;; Registers forms from third-party packages that use standard
;; binding shapes. Registrations are inert when the registered
;; symbol never appears as a form head in user code.
;;
;; Usage:
;;
;; (require 'let-completion-external)
;;; Code:
(require 'let-completion)
;;;; cond-let
;; Strict (SYMBOL VALUEFORM) pairs, no bare symbols.
;; The standard `list' shape extractor handles these directly.
;; `cond-let--and$', `cond-let--when$', and `cond-let--and>' bind
;; the fixed name `$' without a user-written symbol and are not
;; registered. `cond-let*' and `cond-let' use vector clause syntax
;; requiring a custom extractor and are deferred.
;; body scope: bindings visible in all body forms.
(let-completion-register-binding-form 'cond-let--and-let*
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-and-let*"))
(let-completion-register-binding-form 'cond-let--and-let
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-and-let"))
(let-completion-register-binding-form 'cond-let--when-let*
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-when-let*"))
(let-completion-register-binding-form 'cond-let--when-let
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-when-let"))
(let-completion-register-binding-form 'cond-let--while-let*
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-while-let*"))
(let-completion-register-binding-form 'cond-let--while-let
'(:bindings-index 1 :binding-shape list :scope body :tag "cond-while-let"))
;; then scope: bindings visible only in the first form after bindings.
(let-completion-register-binding-form 'cond-let--if-let*
'(:bindings-index 1 :binding-shape list :scope then :tag "cond-if-let*"))
(let-completion-register-binding-form 'cond-let--if-let
'(:bindings-index 1 :binding-shape list :scope then :tag "cond-if-let"))
(provide 'let-completion-external)
;;; let-completion-external.el ends here