From 9a6f5e2878de5d1fdfe1b7c0c4aa652deb87a4ce Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 23 May 2016 01:39:33 -0400 Subject: bog-citekey-syntax-table: Inherit text-mode-syntax-table Org mode makes its syntax table modifications in the body of the define-derived-mode call. As a result, if bog-citekey-syntax-table inherits org-mode-syntax-table, bog-citekey-syntax-table will be different depending on whether the function org-mode has been called (which in most cases corresponds to whether an Org buffer has been visited). To avoid this, use text-mode-syntax-table directly, mirroring Org's modifications. --- bog.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bog.el') diff --git a/bog.el b/bog.el index 93870c0..86c6fcc 100644 --- a/bog.el +++ b/bog.el @@ -234,9 +234,13 @@ kills the indirect buffer created by the previous call." :type 'boolean) (defvar bog-citekey-syntax-table - (let ((st (make-syntax-table org-mode-syntax-table))) + (let ((st (make-syntax-table text-mode-syntax-table))) (modify-syntax-entry ?- "w" st) (modify-syntax-entry ?_ "w" st) + (modify-syntax-entry ?@ "w" st) + (modify-syntax-entry ?\" "\"" st) + (modify-syntax-entry ?\\ "_" st) + (modify-syntax-entry ?~ "_" st) st) "Syntax table used when working with citekeys. Like `org-mode-syntax-table', but hyphens and underscores are -- cgit v1.2.3