summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-06-25 14:45:26 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2020-06-25 15:13:17 +0100
commit30fc844a24954601ff3294a43c89f2407760e024 (patch)
treec2b6b65d5cb9c971aec006453f41b53d6fb4c0ef /bog.el
parent6184e74ca8256d322276b50b0a4ea2ab072bb83a (diff)
downloadbog-30fc844a24954601ff3294a43c89f2407760e024.tar.gz
Reindent code
Fix indentation and flatten the progn in bog-mode.
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el29
1 files changed, 14 insertions, 15 deletions
diff --git a/bog.el b/bog.el
index 2739caf..f36e41b 100644
--- a/bog.el
+++ b/bog.el
@@ -1142,7 +1142,7 @@ If the citekey prompt is slow to appear, consider enabling the
(citekey (bog-citekey-from-point-or-all-headings no-context))
(marker (with-current-buffer (or (buffer-base-buffer)
(current-buffer))
- (bog--find-citekey-heading-in-notes citekey))))
+ (bog--find-citekey-heading-in-notes citekey))))
(if marker
(with-current-buffer (marker-buffer marker)
(org-with-wide-buffer
@@ -1433,20 +1433,19 @@ if ARG is omitted or nil.
\\{bog-mode-map}"
:lighter " Bog"
- (progn
- (cond
- (bog-mode
- (if (derived-mode-p 'org-mode)
- (add-hook 'org-font-lock-hook #'bog-fontify-non-heading-citekeys)
- (font-lock-add-keywords nil bog-citekey-font-lock-keywords)))
- (t
- (if (derived-mode-p 'org-mode)
- (remove-hook 'org-font-lock-hook #'bog-fontify-non-heading-citekeys)
- (font-lock-remove-keywords nil bog-citekey-font-lock-keywords))
- (when (bound-and-true-p bog-view-mode)
- (bog-view-mode -1))))
- (when font-lock-mode
- (funcall bog-font-lock-function))))
+ (cond
+ (bog-mode
+ (if (derived-mode-p 'org-mode)
+ (add-hook 'org-font-lock-hook #'bog-fontify-non-heading-citekeys)
+ (font-lock-add-keywords nil bog-citekey-font-lock-keywords)))
+ (t
+ (if (derived-mode-p 'org-mode)
+ (remove-hook 'org-font-lock-hook #'bog-fontify-non-heading-citekeys)
+ (font-lock-remove-keywords nil bog-citekey-font-lock-keywords))
+ (when (bound-and-true-p bog-view-mode)
+ (bog-view-mode -1))))
+ (when font-lock-mode
+ (funcall bog-font-lock-function)))
;;; View minor mode