summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-browse.el
diff options
context:
space:
mode:
Diffstat (limited to 'custom/jao-custom-browse.el')
-rw-r--r--custom/jao-custom-browse.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/custom/jao-custom-browse.el b/custom/jao-custom-browse.el
index 1056b1c..ba47df7 100644
--- a/custom/jao-custom-browse.el
+++ b/custom/jao-custom-browse.el
@@ -3,20 +3,19 @@
;;; Deps
(require 'jao-url)
-;;; Browsing
-;;;; variables
+;;; variables
(defvar jao-browse-doc-use-emacs-p t)
(defvar jao-browse-url-function nil)
(defvar jao-browse-url-external-function nil)
-;;;; url around point
+;;; url around point
(defun jao--url-prompt (&optional prefix)
(let* ((def (jao-url-around-point t))
(prompt (concat prefix "URL" (if def (format " (%s): " def) ": "))))
(read-string prompt nil nil def)))
-;;;; downloads using wget
+;;; downloads using wget
(defun jao-wget--get-title (filename)
(or (and (derived-mode-p 'w3m-mode) (w3m-current-title))
(plist-get eww-data :title)
@@ -55,7 +54,7 @@
(with-eval-after-load "embark"
(define-key embark-url-map (kbd "d") #'jao-download))
-;;;; video
+;;; video
(defvar jao-video--url-rx
(format "^https?://\\(?:www\\.\\)?%s/.+"
(regexp-opt '("youtu.be"
@@ -93,14 +92,14 @@
((eq w ?w) (funcall jao-browse-url-function url))
(t (message "Aborted")))))
-;;;; web browsers
+;;; web browsers
(defun jao-www--buffer-p (b)
(with-current-buffer b
(or (derived-mode-p 'w3m-mode 'eww-mode)
(and (boundp 'exwm-class-name)
(member exwm-class-name '("vlc" "mpv"))))))
-;;;; browse-url
+;;; browse-url
(require 'browse-url)
(setq browse-url-generic-program (jao-d-l "open" "firefox"))
@@ -197,4 +196,5 @@
(provide 'jao-custom-browse)
+
;;; jao-custom-browse.el ends here