- "Return current entries for `elpher-menu-refresh'.
-If we're only interested in the current entries, then this
-function can only return a list of a single item per buffer."
- (list buf
- (vector
- (cond ((eq major-mode 'elpher-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 '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 'eww-mode)
- (plist-get eww-data :title))))))
+ "Returns an item for `elpher-menu-refresh'
+based on the current buffer.
+
+An item is a list (BUFFER VECTOR) where BUFFER is the buffer this
+item refers to and VECTOR is what to display in the tabulated
+list established by `elpher-menu-refresh'. See
+`tabulated-list-format'."
+ (list (current-buffer)
+ (cond ((eq major-mode 'elpher-mode)
+ (vector "G"
+ (or (elpher-address-to-url
+ (elpher-page-address elpher-current-page))
+ "none")
+ (or (elpher-find-title)
+ (elpher-page-display-string elpher-current-page)
+ (buffer-name))))
+ ((eq major-mode 'gemini-mode)
+ (vector "E"
+ (or (elpher-address-to-url
+ (elpher-page-address elpher-current-page))
+ "none")
+ (or (elpher-page-display-string elpher-current-page)
+ (buffer-name))))
+ ((eq major-mode 'eww-mode)
+ (vector "W"
+ (or (eww-current-url)
+ "none")
+ (or (plist-get eww-data :title)
+ (buffer-name)))))))