aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Rankin <william@bydasein.com>2020-10-12 15:59:12 +1000
committerWilliam Rankin <william@bydasein.com>2020-10-12 15:59:12 +1000
commitd0acceffbdd3edea4eb2ad86938f6e6c4f706ece (patch)
tree7058823366156babcf86164671f87b4679dbb319
parent3cfa5e1294654ad6781edb5757d6c93c26b47f69 (diff)
downloadbinder-d0acceffbdd3edea4eb2ad86938f6e6c4f706ece.zip
Use cl-case for elegance
-rw-r--r--binder.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/binder.el b/binder.el
index d316344..74eb018 100644
--- a/binder.el
+++ b/binder.el
@@ -586,13 +586,10 @@ Optionally pass FILTER to `binder-read'."
(defun binder-get-buffer-fileid ()
"Return buffer binder fileid."
- (cond ((eq major-mode 'binder-sidebar-mode)
- binder--current-fileid)
- ((eq major-mode 'binder-notes-mode)
- binder--notes-fileid)
- (t
- (binder-file-relative-to-root
- (or (buffer-file-name) default-directory)))))
+ (cl-case major-mode
+ ((quote binder-sidebar-mode) binder--current-fileid)
+ ((quote binder-notes-mode) binder--notes-fileid)
+ (t (binder-file-relative-to-root (buffer-file-name)))))
;;; Global Minor Mode