summaryrefslogtreecommitdiff
diff options
context:
space:
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)))))