Stop being compatible with Emacs < 28
This commit is contained in:
parent
c0a0df1e3c
commit
869f2192bd
7
init.el
7
init.el
|
@ -189,8 +189,7 @@
|
|||
(add-to-list '+browse-url-secondary-browser-regexps
|
||||
(replace-regexp-in-string "\\." "\\\\." domain)))
|
||||
;; Set up URL handlers.
|
||||
(require 'chd)
|
||||
(+browse-url-set-handlers
|
||||
(:option browse-url-handlers
|
||||
(list
|
||||
(cons (rx ; images
|
||||
"." (or "jpeg" "jpg" "png" "bmp") eos)
|
||||
|
@ -210,7 +209,6 @@
|
|||
#'+browse-url-with-mpv
|
||||
browse-url-secondary-browser-function)
|
||||
args)))
|
||||
(cons chd/url-regexps #'browse-url-chrome)
|
||||
(cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites
|
||||
(lambda (&rest args)
|
||||
(apply browse-url-secondary-browser-function args)))
|
||||
|
@ -224,6 +222,9 @@
|
|||
(cons "." ; everything else
|
||||
(lambda (&rest args)
|
||||
(apply +browse-url-browser-function args)))))
|
||||
(with-eval-after-load 'chd
|
||||
(add-to-list 'browse-url-handlers
|
||||
(cons chd/url-regexps #'browse-url-chrome)))
|
||||
;; Transform URLs before passing to `browse-url'
|
||||
(:option +browse-url-transformations `((,(rx (or "youtube.com"
|
||||
"youtu.be"))
|
||||
|
|
Loading…
Reference in New Issue