From: Alex Schroeder Date: Sat, 4 Jul 2020 13:06:28 +0000 (+0200) Subject: Add Gemini Mode to the menu X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=d91e136d798eaf994fe741fbb500030f5eac8cc1;p=elpher.git Add Gemini Mode to the menu When I'm using Elpher, and I'm editing Gemini files, chances are that I want both of them in the same list. --- diff --git a/elpher.el b/elpher.el index 0965abb..0ca7cdb 100644 --- a/elpher.el +++ b/elpher.el @@ -2163,7 +2163,7 @@ With an optional argument, add all the history items, too." (let (entries) (dolist (buf (buffer-list)) (with-current-buffer buf - (when (memq major-mode '(elpher-mode eww-mode)) + (when (memq major-mode '(elpher-mode eww-mode gemini-mode)) (if arg (setq entries (nconc (elpher-menu-refresh-history) entries)) (push (elpher-menu-refresh-current) entries))))) @@ -2176,17 +2176,25 @@ If we're only interested in the current entries, then this function can only return a list of a single item per buffer." (list (current-buffer) (vector - (cond ((eq major-mode 'elpher-mode) "E") + (cond ((eq major-mode 'elpher-mode) "G") + ((eq major-mode 'gemini-mode) "E") ((eq major-mode 'eww-mode) "W")) (cond ((eq major-mode 'elpher-mode) (or (elpher-address-to-url (elpher-page-address elpher-current-page)) "none")) + ((eq major-mode 'gemini-mode) + (or (elpher-address-to-url + (elpher-page-address elpher-current-page)) + "none")) ((eq major-mode 'eww-mode) (eww-current-url))) (cond ((eq major-mode 'elpher-mode) (or (elpher-find-title) (elpher-page-display-string elpher-current-page))) + ((eq major-mode 'gemini-mode) + (or (elpher-page-display-string elpher-current-page) + (buffer-name))) ((eq major-mode 'eww-mode) (plist-get eww-data :title))))))