[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/rfc-mode 9ec648cdf7 14/52: cosmetic
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/rfc-mode 9ec648cdf7 14/52: cosmetic |
Date: |
Wed, 12 Oct 2022 16:29:19 -0400 (EDT) |
branch: scratch/rfc-mode
commit 9ec648cdf735edc0513d62bd1728576d34665488
Author: Nicolas Martyanoff <khaelin@gmail.com>
Commit: Nicolas Martyanoff <khaelin@gmail.com>
cosmetic
---
rfc-mode.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/rfc-mode.el b/rfc-mode.el
index ae0f729e25..84a8b9c762 100644
--- a/rfc-mode.el
+++ b/rfc-mode.el
@@ -28,7 +28,8 @@
(require 'helm)
(require 'seq)
-;;; Configuration
+;;; Configuration:
+
(defgroup rfc-mode-group nil
"Tools to browse and read RFC documents."
:prefix "rfc-mode-"
@@ -79,14 +80,16 @@ Assume RFC documents are named as e.g. rfc21.txt,
rfc-index.txt."
:type 'integer
:group 'rfc-mode)
-;;; Misc variables
+;;; Misc variables:
+
(defvar rfc-mode-index-path (concat rfc-mode-directory "rfc-index.txt")
"The path of the file containing the index of all RFC documents.")
(defvar rfc-mode-index-entries nil
"The list of entries in the RFC index.")
-;;; Keys
+;;; Keys:
+
(defvar rfc-mode-map
(let ((map (make-keymap)))
(define-key map (kbd "q") 'rfc-mode-quit)
@@ -95,7 +98,8 @@ Assume RFC documents are named as e.g. rfc21.txt,
rfc-index.txt."
map)
"The keymap for `rfc-mode'.")
-;;; Main
+;;; Main:
+
(defun rfc-mode-init ()
"Initialize the current buffer for `rfc-mode'."
(setq-local buffer-read-only t)
@@ -152,7 +156,8 @@ Assume RFC documents are named as e.g. rfc21.txt,
rfc-index.txt."
;;;###autoload
(add-to-list 'auto-mode-alist '("rfc[0-9]+\\.txt\\'" . rfc-mode))
-;;; Syntax utils
+;;; Syntax utils:
+
(defun rfc-mode-highlight ()
"Highlight the current buffer."
(with-silent-modifications
@@ -222,7 +227,8 @@ no next header is found."
(goto-char (match-beginning 0))
(rfc-mode-header-start)))
-;;; Browser utils
+;;; Browser utils:
+
(defun rfc-mode-browser-helm-sources (entries)
"Create a Helm source for ENTRIES.
@@ -260,7 +266,7 @@ ENTRY is a RFC index entry in the browser."
(let ((number (plist-get entry :number)))
(rfc-mode-read number)))
-;;; Index utils
+;;; Index utils:
(defun rfc-mode-read-index-file (path)
"Read an RFC index file at PATH and return a list of entries."
(with-temp-buffer
@@ -309,7 +315,8 @@ ENTRY is a RFC index entry in the browser."
(rfc-mode--parse-rfc-refs (match-string 1 string))))
entry)))
-;;; Document utils
+;;; Document utils:
+
(defun rfc-mode--document-buffer-name (number)
"Return the buffer name for the RFC document NUMBER."
(concat "*rfc" (number-to-string number) "*"))
@@ -330,7 +337,7 @@ The buffer is created if it does not exist."
(rfc-mode)
(current-buffer)))
-;;; Misc utils
+;;; Misc utils:
(defun rfc-mode--fetch-document (suffix document-path)
"Ensure an RFC document with SUFFIX exists at DOCUMENT-PATH.
- [nongnu] scratch/rfc-mode d4ca95b973 37/52: Add changelog entries for the next version, (continued)
- [nongnu] scratch/rfc-mode d4ca95b973 37/52: Add changelog entries for the next version, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode ec4269cc91 38/52: fix backtab key name, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 02546beecf 39/52: v1.3.0, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode bec092989b 30/52: Add imenu support for rfc-mode, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 918d38f901 24/52: compute the index path dynamically, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 4454af644e 13/52: update version tag, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 088d81002e 04/52: make checkdoc happy, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 88e6577a0e 27/52: update the readme regarding document download, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 234890d3a8 23/52: Use expand-file-name instead of concat, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 8aff885877 07/52: fix formatting escape sequence, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 9ec648cdf7 14/52: cosmetic,
Stefan Monnier <=
- [nongnu] scratch/rfc-mode 622ce988a8 06/52: add missing requires, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 5cdf7172e3 11/52: Merge pull request #1 from riscy/master, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode e1a255fb59 32/52: Explain the meaning of rfc-mode-use-original-buffer-names better, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 5a8a3a238e 29/52: Make the rfc-mode-map inherit from special-mode-map, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode f766c141ac 22/52: introduce a custom variable to use original buffer names, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 476bff817d 42/52: Don't turn the beginning of every page into a button, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode 6e41dcd82f 43/52: Autoload rfc-mode-browse, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode e21fb7e134 05/52: fix comment, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode c550aa0530 03/52: v1.0.0, Stefan Monnier, 2022/10/12
- [nongnu] scratch/rfc-mode ff7a36b810 44/52: Offer number at point as default in rfc-mode-read, Stefan Monnier, 2022/10/12