diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-05-23 01:39:33 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-05-23 01:41:47 -0400 |
commit | 9a6f5e2878de5d1fdfe1b7c0c4aa652deb87a4ce (patch) | |
tree | 1e7f9fb4edb683ebd9af341eacbbef22216a90b3 /bog.el | |
parent | 00d7142a0828910dd56c8a778cf656b92a532c0a (diff) | |
download | bog-9a6f5e2878de5d1fdfe1b7c0c4aa652deb87a4ce.tar.gz |
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.
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |