summaryrefslogtreecommitdiff
path: root/bog.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-06-25 12:51:03 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2020-06-25 15:14:44 +0100
commit51dc396d816b29762837d252315225327adef435 (patch)
tree4f754ae89329f3abbdd1e4e04ef7d88ef002f231 /bog.el
parent03dbdd2644e680cc6a1aeb6fc6f48f155a6d38fe (diff)
downloadbog-51dc396d816b29762837d252315225327adef435.tar.gz
bog.el: Use defalias for compatibility shims
Using defalias avoids byte-compiler warnings and is less intrusive.
Diffstat (limited to 'bog.el')
-rw-r--r--bog.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/bog.el b/bog.el
index 7a58f19..ee56d3a 100644
--- a/bog.el
+++ b/bog.el
@@ -499,8 +499,10 @@ If NO-CONTEXT is non-nil, immediately fall back."
;;;; Other
;; `show-all' is obsolete as of Emacs 25.1.
-(unless (fboundp 'outline-show-all)
- (defalias 'outline-show-all 'show-all))
+(defalias 'bog--outline-show-all
+ (if (fboundp 'outline-show-all)
+ #'outline-show-all
+ 'show-all))
(defun bog--set-difference (list1 list2)
(let ((sdiff (cl-set-difference list1 list2 :test #'string=)))
@@ -532,7 +534,7 @@ file."
(mapconcat #'identity nohead-cks "\n"))))))
(org-mode)
(bog-mode 1)
- (outline-show-all)
+ (bog--outline-show-all)
(goto-char (point-min)))
(pop-to-buffer bufname)))
@@ -1381,7 +1383,7 @@ Topic headings are determined by `bog-topic-heading-level'."
(defvar bog-citekey-font-lock-keywords
'((bog-fontify-non-heading-citekeys . bog-citekey-face)))
-(defvar bog-font-lock-function
+(defalias 'bog--font-lock-function
(if (fboundp 'font-lock-flush)
#'font-lock-flush
#'font-lock-fontify-buffer))
@@ -1445,7 +1447,7 @@ if ARG is omitted or nil.
(when (bound-and-true-p bog-view-mode)
(bog-view-mode -1))))
(when font-lock-mode
- (funcall bog-font-lock-function)))
+ (bog--font-lock-function)))
;;; View minor mode