X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elpher.el;h=87729f59892decb7c831d0ce77bab637d3ef2685;hp=f94b33f22c3b42cf6d3540da8a20ce60a2752872;hb=b247a2fed578b0c7f819c65423e955126c3d17b3;hpb=e3fca3512d458c4a78ef9b3d87b66e952f2b5f94 diff --git a/elpher.el b/elpher.el index f94b33f..87729f5 100644 --- a/elpher.el +++ b/elpher.el @@ -399,6 +399,11 @@ requiring gopher-over-TLS." "Create an ADDRESS object corresponding to the given special address symbol TYPE." type) +(defun elpher-make-start-page () + "Create the start page." + (elpher-make-page "Elpher Start Page" + (elpher-make-special-address 'start))) + (defun elpher-address-to-url (address) "Get string representation of ADDRESS, or nil if ADDRESS is special." (if (elpher-address-special-p address) @@ -1990,9 +1995,7 @@ When run interactively HOST-OR-URL is read from the minibuffer." (interactive) (setq-local elpher-current-page nil) (setq-local elpher-history nil) - (let ((start-page (elpher-make-page "Elpher Start Page" - (elpher-make-special-address 'start)))) - (elpher-visit-page start-page))) + (elpher-visit-page (elpher-make-start-page))) (defun elpher-download () "Download the link at point." @@ -2288,10 +2291,7 @@ to create a new session. Returns the buffer selected (or created)." (pop-to-buffer-same-window buf) (unless (buffer-modified-p) (elpher-mode) - (let ((start-page (elpher-make-page - "Elpher Start Page" - (elpher-make-special-address 'start)))) - (elpher-visit-page start-page)) + (elpher-visit-page (elpher-make-start-page)) "Started Elpher."))); Otherwise (elpher) evaluates to start page string. ;;; elpher.el ends here