[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode a2dda5fa88 1/3: Allow page navigation
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/yaml-mode a2dda5fa88 1/3: Allow page navigation |
|
Date: |
Mon, 20 Nov 2023 01:00:58 -0500 (EST) |
branch: elpa/yaml-mode
commit a2dda5fa88f7846a4d824fc7c7ca718b11897add
Author: Damien Merenne <dam@cosinux.org>
Commit: GitHub <noreply@github.com>
Allow page navigation
Emacs support navigating between page using `C-x [` and `C-x ]` which maps
to `backward-page` and `forward-page`. This commit sets `page-delimiter` to
the YAML document delimiter `---` to map Emacs notion of page to YAML documents.
See https://yaml.org/spec/1.0/#syntax-stream-doc.
---
yaml-mode.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/yaml-mode.el b/yaml-mode.el
index c18fcd9022..42c7466e47 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -225,6 +225,7 @@ that key is pressed to begin a block literal."
(set (make-local-variable 'indent-line-function) 'yaml-indent-line)
(set (make-local-variable 'indent-tabs-mode) nil)
(set (make-local-variable 'fill-paragraph-function) 'yaml-fill-paragraph)
+ (set (make-local-variable 'page-delimiter) "^---[[:space:]]*\n")
(set (make-local-variable 'syntax-propertize-function)
'yaml-mode-syntax-propertize-function)