;; Copyright (C) 2020 Koushk Roy <kroy@twilio.com>
;; Copyright (C) 2020 Vee <vee@vnsf.xyz>
;; Copyright (C) 2020 Simon South <simon@simonsouth.net>
-;; Copyright (C) 2019-2020 Tim Vaughan <plugd@thelambdalab.xyz>
+;; Copyright (C) 2019-2021 Tim Vaughan <plugd@thelambdalab.xyz>
;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
;; Created: 11 April 2019
(let ((url (url-generic-parse-url url-string)))
(unless (and (not (url-fullness url)) (url-type url))
(setf (url-fullness url) t)
- (setf (url-filename url)
- (url-unhex-string (url-filename url)))
(unless (url-type url)
(setf (url-type url) elpher-default-url-type))
(unless (url-host url)
For gopher addresses this is a combination of the selector type and selector."
(if (symbolp address)
nil
- (url-filename address)))
+ (url-unhex-string (url-filename address))))
(defun elpher-address-host (address)
"Retrieve host from ADDRESS object."
(defun elpher-address-gopher-p (address)
"Return non-nill if ADDRESS object is a gopher address."
(and (not (elpher-address-special-p address))
- (member (elpher-address-protocol address) '("gopher gophers"))))
+ (member (elpher-address-protocol address) '("gopher" "gophers"))))
(defun elpher-gopher-address-selector (address)
"Retrieve gopher selector from ADDRESS object."
;; History page retrieval
(defun elpher-history ()
- "Show the history of pages leading to the current page
-in this buffer. Use \\[elpher-history-all] to see the entire history.
+ "Show the history of pages leading to the current page in this buffer.
+Use \\[elpher-history-all] to see the entire history.
This is rendered using `elpher-get-history-page' via `elpher-type-map'."
(interactive)
(elpher-visit-page
Use \\[elpher-history] to see just the history for the current buffer.
This is rendered using `elpher-get-history-all-page' via `elpher-type-map'."
(interactive)
- (elpher-visit-page
+ (elpher-visit-page
(elpher-make-page "Elpher History Of All Seen Pages"
(elpher-make-special-address 'history-all))))
(defun elpher-bookmark-make-record ()
"Return a bookmark record.
If `elpher-bookmark-link' is non-nil and point is on a link button,
-return a bookmark record for that link. Otherwise, return a bookmark
+return a bookmark record for that link. Otherwise, return a bookmark
record for the current elpher page."
(let* ((button (and elpher-bookmark-link (button-at (point))))
(page (if button
(bookmark-set-no-overwrite)))
(defun elpher-bookmark-import (file)
- "Import Elpher bookmarks into Emacs bookmarks."
+ "Import Elpher bookmarks file FILE into Emacs bookmarks."
(interactive (list (if (and (boundp 'elpher-bookmarks-file)
(file-readable-p elpher-bookmarks-file))
elpher-bookmarks-file