diff --git a/.config/next/init.lisp b/.config/next/init.lisp index 050e8d31..8a6ab7c9 100644 --- a/.config/next/init.lisp +++ b/.config/next/init.lisp @@ -107,16 +107,27 @@ Videos are downloaded with `+youtube-dl-command+'." "Blocker mode with custom hosts from `*my-blocked-hosts*'." ((next/blocker-mode::hostlists :initform (list *my-blocked-hosts* next/blocker-mode:*default-host-list*)))) -(defclass my-buffer (buffer) - ((default-modes :initform (append - '(my-mode vi-normal-mode - my-blocker-mode - proxy-mode) - (get-default 'buffer 'default-modes))) - (load-hook :initform (next-hooks:make-hook-string->string - :handlers (list #'old-reddit-handler - #'auto-proxy-handler) - :combination #'next-hooks:combine-composed-hook)))) +(if (find-class 'gtk-buffer nil) + (defclass my-buffer (gtk-buffer) + ((default-modes :initform (append + '(my-mode vi-normal-mode + my-blocker-mode + proxy-mode) + (get-default 'buffer 'default-modes))) + (load-hook :initform (next-hooks:make-hook-string->string + :handlers (list #'old-reddit-handler + #'auto-proxy-handler) + :combination #'next-hooks:combine-composed-hook)))) + (defclass my-buffer (buffer) + ((default-modes :initform (append + '(my-mode vi-normal-mode + my-blocker-mode + proxy-mode) + (get-default 'buffer 'default-modes))) + (load-hook :initform (next-hooks:make-hook-string->string + :handlers (list #'old-reddit-handler + #'auto-proxy-handler) + :combination #'next-hooks:combine-composed-hook))))) (setf *buffer-class* 'my-buffer) @@ -156,7 +167,7 @@ Videos are downloaded with `+youtube-dl-command+'." (append my-search-engines (get-default 'remote-interface 'search-engines))))) - (defclass my-remote-interface (interface) + (defclass my-interface (gtk-interface) ;; TODO: Fetch from Emacs' engine.el automatically? ((search-engines :initform (append @@ -165,7 +176,7 @@ Videos are downloaded with `+youtube-dl-command+'." (if (boundp '*remote-interface-class*) (setf *remote-interface-class* 'my-remote-interface) - (setf *interface-class* 'my-remote-interface)) + (setf *interface-class* 'my-interface)) (defmethod deserialize-bookmarks (stream) "This version of deserialize-bookmarks is compatibly with Ambrevar's EWW