summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-09-28 06:26:30 +0300
committerThanos Apollo <[email protected]>2023-09-28 06:26:30 +0300
commit842eb0f7eee06b97fdbee40796c0b1ed25092f50 (patch)
treebf53269cbc5eaf3b25b99693417d51b4c58cac6d
parentdca8a26c90d6bbb4df6ca44a9205fad83af9bc76 (diff)
[fix] Add yeetube-mode as major mode
-rw-r--r--yeetube.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/yeetube.el b/yeetube.el
index 97220d8..3259331 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -117,6 +117,15 @@ Example Usage:
(defvar yeetube-last-played nil)
+(defun yeetube-mode ()
+ "Activate Yeetube Mode."
+ (interactive)
+ (kill-all-local-variables)
+ (setq major-mode 'yeetube-mode)
+ (setq mode-name "Yeetube Mode")
+ (display-line-numbers-mode 0)
+ (use-local-map yeetube-mode-map))
+
(defun yeetube-get-url ()
"Get url for subject in *yeetube* buffer at point."
(let ((video-url (cadr (nth (- (line-number-at-pos) 1) (reverse yeetube-content)))))