From e1e164f02e203afe764faa6fca4a98c473300100 Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Thu, 25 Mar 2021 21:13:46 +0100 Subject: * nroam.el (nroam--sections): Redefine as a private var. --- nroam.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'nroam.el') diff --git a/nroam.el b/nroam.el index 6900d08..f58e94f 100644 --- a/nroam.el +++ b/nroam.el @@ -44,12 +44,10 @@ (require 'nroam-backlinks) (require 'nroam-unlinked) -(defcustom nroam-sections nil - "List of functions to be called to insert sections in nroam buffers." - :group 'nroam - :type '(repeat function)) +(defvar nroam--sections nil + "List of functions to be called to insert sections in nroam buffers.") -(defvar nroam-sections-map +(defvar nroam--sections-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c C-c") #'nroam-update) (define-key map (kbd "RET") #'nroam-return) @@ -58,7 +56,7 @@ (defun nroam-register-section (function) "Add FUNCTION as a section in nroam." - (add-to-list 'nroam-sections function t)) + (add-to-list 'nroam--sections function t)) (defvar-local nroam-start-marker nil) (defvar-local nroam-end-marker nil) @@ -73,7 +71,7 @@ Make the region inserted by BODY read-only, and marked with ,@body (let* ((end (point)) (ov (make-overlay beg end))) - (overlay-put ov 'keymap nroam-sections-map) + (overlay-put ov 'keymap nroam--sections-map) (put-text-property beg (1+ beg) 'front-sticky '(read-only)) (put-text-property beg end 'read-only t) ;; Add a non-read-only newline so that text can be inserted at the end of @@ -160,7 +158,7 @@ Make the region inserted by BODY read-only, and marked with (nroam--ensure-empty-line)) (with-nroam-markers (nroam--insert-heading 1 "Backlinks" "noexport") - (nroam--do-separated-by-newlines #'funcall nroam-sections)) + (nroam--do-separated-by-newlines #'funcall nroam--sections)) (nroam--set-sections-visibility)))) (defun nroam--set-sections-visibility () -- cgit v1.2.3-54-g00ecf