next: Make code compatible with Next 2.

master
Pierre Neidhardt 2020-02-22 15:39:48 +01:00
parent 36c06523d6
commit b0aff11ce6
1 changed files with 52 additions and 35 deletions

View File

@ -1,8 +1,9 @@
(in-package :next-user)
;; Use development platform port.
(setf +platform-port-command+
"~/common-lisp/next/ports/gtk-webkit/next-gtk-webkit")
(when (boundp '+platform-port-command+)
(setf +platform-port-command+
"~/common-lisp/next/ports/gtk-webkit/next-gtk-webkit"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun eval-in-emacs (&rest s-exps)
@ -119,40 +120,52 @@ Videos are downloaded with `+youtube-dl-command+'."
(setf *buffer-class* 'my-buffer)
(defclass my-remote-interface (remote-interface)
;; TODO: Fetch from Emacs' engine.el automatically?
((search-engines :initform
(append
'(("aa" . "https://aur.archlinux.org/packages.php?O=0&K=~a&do_Search=Go")
("ap" . "https://www.archlinux.org/packages/?sort=&q=~a&maintainer=&flagged=")
("aw" . "https://wiki.archlinux.org/index.php?search=~a")
("ctan" . "http://www.ctan.org/search?phrase=~a")
("dd" . "http://devdocs.io/#q=~a")
("dg" . "https://duckduckgo.com/?q=~a")
("eb" . "https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;include=subject%3A~a;repeatmerged=on;archive=both")
("ed" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-devel&submit=Search&query=~a")
("ee" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emms-help&submit=Search!&query=~a")
("ge" . "https://wiki.gentoo.org/index.php?title=Special%3ASearch&search=~a&go=Go")
("gh" . "https://github.com/search?ref=simplesearch&q=~a")
("gr" . "https://www.goodreads.com/search?q=~a")
("gm" . "https://maps.google.com/maps?q=~a")
("gud" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=guix-devel&submit=Search&query=~a")
("guh" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=help-guix&submit=Search!&query=~a")
("gup" . "https://guix-hpc.bordeaux.inria.fr/package/~a")
("i" . "http://www.imdb.com/find?q=~a&s=all")
("mba" . "http://musicbrainz.org/search?query=~a&type=artist&method=indexed")
("mbr" . "http://musicbrainz.org/search?query=~a&type=release&method=indexed")
("osm" . "https://www.openstreetmap.org/search?query=~a")
("q" . "http://quickdocs.org/search?q=~a")
("s" . "http://stackoverflow.com/search?q=~a")
("wp" . "http://www.wikipedia.org/search-redirect.php?language=en&go=Go&search=~a")
("wb" . "http://en.wikibooks.org/wiki/Special:Search?search=~a")
("wk" . "http://en.wiktionary.org/wiki/Special:Search?search=~a")
("wa" . "http://www.winehq.org/search/?q=~a")
("yt" . "https://www.youtube.com/results?search_query=~a"))
(get-default 'remote-interface 'search-engines)))))
(defvar my-search-engines
'(("aa" . "https://aur.archlinux.org/packages.php?O=0&K=~a&do_Search=Go")
("ap" . "https://www.archlinux.org/packages/?sort=&q=~a&maintainer=&flagged=")
("aw" . "https://wiki.archlinux.org/index.php?search=~a")
("ctan" . "http://www.ctan.org/search?phrase=~a")
("dd" . "http://devdocs.io/#q=~a")
("dg" . "https://duckduckgo.com/?q=~a")
("eb" . "https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;include=subject%3A~a;repeatmerged=on;archive=both")
("ed" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-devel&submit=Search&query=~a")
("ee" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emms-help&submit=Search!&query=~a")
("ge" . "https://wiki.gentoo.org/index.php?title=Special%3ASearch&search=~a&go=Go")
("gh" . "https://github.com/search?ref=simplesearch&q=~a")
("gr" . "https://www.goodreads.com/search?q=~a")
("gm" . "https://maps.google.com/maps?q=~a")
("gud" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=guix-devel&submit=Search&query=~a")
("guh" . "https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=help-guix&submit=Search!&query=~a")
("gup" . "https://guix-hpc.bordeaux.inria.fr/package/~a")
("i" . "http://www.imdb.com/find?q=~a&s=all")
("mba" . "http://musicbrainz.org/search?query=~a&type=artist&method=indexed")
("mbr" . "http://musicbrainz.org/search?query=~a&type=release&method=indexed")
("osm" . "https://www.openstreetmap.org/search?query=~a")
("q" . "http://quickdocs.org/search?q=~a")
("s" . "http://stackoverflow.com/search?q=~a")
("wp" . "http://www.wikipedia.org/search-redirect.php?language=en&go=Go&search=~a")
("wb" . "http://en.wikibooks.org/wiki/Special:Search?search=~a")
("wk" . "http://en.wiktionary.org/wiki/Special:Search?search=~a")
("wa" . "http://www.winehq.org/search/?q=~a")
("yt" . "https://www.youtube.com/results?search_query=~a")))
(setf *remote-interface-class* 'my-remote-interface)
(if (find-class 'remote-interface nil)
(defclass my-remote-interface (remote-interface)
;; TODO: Fetch from Emacs' engine.el automatically?
((search-engines :initform
(append
my-search-engines
(get-default 'remote-interface 'search-engines)))))
(defclass my-remote-interface (interface)
;; TODO: Fetch from Emacs' engine.el automatically?
((search-engines :initform
(append
my-search-engines
(get-default 'interface 'search-engines))))))
(if (boundp '*remote-interface-class*)
(setf *remote-interface-class* 'my-remote-interface)
(setf *interface-class* 'my-remote-interface))
(defmethod deserialize-bookmarks (stream)
"This version of deserialize-bookmarks is compatibly with Ambrevar's EWW
@ -181,3 +194,7 @@ format."
(error (c)
(log:error "Error during bookmark deserialization: ~a" c)
nil)))
(setf next/vcs:*vcs-projects-roots* '("~/projects"
"~/common-lisp"
"~/.local/share/emacs/site-lisp"))