Browse code
chore: move unused commands for AWS CF docs
Edward Langley authored on 28/02/2024 08:12:14
Showing 2 changed files
Showing 2 changed files
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+;; Some snippets not currently used but possibly useful |
|
2 |
+ |
|
3 |
+(defun fwoar:doc-for-resource-type (resource-type) |
|
4 |
+ (cl-format nil |
|
5 |
+ "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/~{~a~^-~}" |
|
6 |
+ (list* "aws" "resource" |
|
7 |
+ (cdr (s-split "::" (s-downcase resource-type)))))) |
|
8 |
+ |
|
9 |
+(defun fwoar:document-cf (min max) |
|
10 |
+ "Jump to AWS Cloudformation docs for a resource type. |
|
11 |
+ |
|
12 |
+MIN: the point in the buffer where the resource type starts |
|
13 |
+MAX: the point in the buffer where the resource type ends |
|
14 |
+ |
|
15 |
+This uses (interactive \"r\") to automagically populate the arguments |
|
16 |
+from the selected region." |
|
17 |
+ (interactive "r") |
|
18 |
+ (browse-url |
|
19 |
+ (fwoar/doc-for-resource-type |
|
20 |
+ (buffer-substring min max)))) |
... | ... |
@@ -5,23 +5,6 @@ |
5 | 5 |
|
6 | 6 |
;;; Code: |
7 | 7 |
|
8 |
-(defun fwoar/doc-for-resource-type (resource-type) |
|
9 |
- (cl-format nil |
|
10 |
- "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/~{~a~^-~}" |
|
11 |
- (list* "aws" "resource" |
|
12 |
- (cdr (s-split "::" (s-downcase resource-type)))))) |
|
13 |
-(defun fwoar/document-cf (min max) |
|
14 |
- "Jump to AWS Cloudformation docs for a resource type. |
|
15 |
- |
|
16 |
-MIN: the point in the buffer where the resource type starts |
|
17 |
-MAX: the point in the buffer where the resource type ends |
|
18 |
- |
|
19 |
-This uses (interactive \"r\") to automagically populate the arguments |
|
20 |
-from the selected region." |
|
21 |
- (interactive "r") |
|
22 |
- (browse-url |
|
23 |
- (fwoar/doc-for-resource-type |
|
24 |
- (buffer-substring min max)))) |
|
25 | 8 |
|
26 | 9 |
(defun read-sexps-in-buffer (buffer) |
27 | 10 |
(with-temp-buffer |