summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-11-04 01:53:04 +0000
committerjao <jao@gnu.org>2021-11-04 01:53:04 +0000
commit9304ca12490e636149a563b28e25195df5213ff6 (patch)
treebdf1ff1fe97e43c560dd4382007a89c81fd13685 /init.org
parent1568c6ea16bae57cf7aa33b8d0d7c1b958de93f2 (diff)
downloadelibs-9304ca12490e636149a563b28e25195df5213ff6.tar.gz
elibs-9304ca12490e636149a563b28e25195df5213ff6.tar.bz2
nits
Diffstat (limited to 'init.org')
-rw-r--r--init.org21
1 files changed, 12 insertions, 9 deletions
diff --git a/init.org b/init.org
index c6e9ad5..acb9342 100644
--- a/init.org
+++ b/init.org
@@ -1498,10 +1498,18 @@
(defvar jao-browse-url-wget-exts
'("ps" "pdf" "dvi" "djvu" "zip" "gz" "tgz" "mp4" "mp3" "flv"))
+ (defvar jao-browse-external-domains
+ '("github.com" "gitlab.com" "slack.com" "meet.google.com"
+ "twitter.com" "t.com" "bigml.com"))
+
+ (defvar jao-browse--external-regexp
+ (format "https?://.*%s\\(/.*\\)?"
+ (regexp-opt jao-browse-external-domains)))
+
(defun jao-wget--regexp ()
(concat "^http[s]?://.+\\(\\."
- (mapconcat 'identity jao-browse-url-wget-exts "\\|\\.")
- "\\)\\'"))
+ (mapconcat 'identity jao-browse-url-wget-exts "\\|\\.")
+ "\\)\\'"))
(defun jao--see (url &rest _r)
(start-process-shell-command "see" nil (format "see %s" (jao--fln url))))
@@ -1519,12 +1527,8 @@
(,jao--see-exts . jao--see)
("^file://?.+\\.html?$" . ,jao-browse-url-function)
("^file://?" . jao--find-file-other-window)
- ("^https?://git\\(hub\\|lab\\)\\.com/.*" .
- ,jao-browse-url-external-function)
- ("^https?://.*\\.slack\\..*" . ,jao-browse-url-external-function)
+ (,jao-browse--external-regexp . ,jao-browse-url-external-function)
("^https?://.*\\.gotomeeting\\.com\\.*" . browse-url-chrome)
- ("^https?://meet\\.google\\.com\\.*" . ,jao-browse-url-external-function)
- ("^https?://t\\(witter\\)?\\.com?/.*" . ,jao-browse-url-external-function)
(,(jao-wget--regexp) . jao-download)
(jao-video--url-p . jao-maybe-view-video)
("." . ,jao-browse-url-function)))
@@ -2007,8 +2011,7 @@
(defun jao-shell-here-toggle ()
(interactive)
- (if (or (eq (current-buffer) (jao-shell-frame-buffer))
- (eq (current-buffer) (jao-shell-frame-buffer nil t)))
+ (if (eq (current-buffer) (jao-shell-frame-buffer))
(eshell/x)
(jao-shell-here t)))