nyxt: Set fallback-url in Emacs-imported engines.

master
Pierre Neidhardt 2021-05-01 15:37:29 +02:00
parent 724e96111d
commit c4bbb417c5
1 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,10 @@ Recognized formats:
when (eq (car object) 'defengine)
collect (make-instance 'search-engine
:shortcut (getf (nthcdr 3 object) :keybinding)
:search-url (format-c->lisp (nth 2 object)))))
:search-url (format-c->lisp (nth 2 object))
:fallback-url (let* ((url (nth 2 object))
(pos (position #\/ url :from-end t)))
(str:substring 0 (1+ pos) url)) )))
(defun personal-file (path)
(str:concat (uiop:getenv "PERSONAL") "/" path))