Removed last remaining url-port usage.
[elpher.git] / elpher.el
index b264dcc..b4048a7 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -5,7 +5,7 @@
 
 ;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
 ;; Created: 11 April 2019
 
 ;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
 ;; Created: 11 April 2019
-;; Version: 3.4.0
+;; Version: 3.4.1
 ;; Keywords: comm gopher
 ;; Homepage: https://thelambdalab.xyz/elpher
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: comm gopher
 ;; Homepage: https://thelambdalab.xyz/elpher
 ;; Package-Requires: ((emacs "27.1"))
@@ -70,7 +70,7 @@
 ;;; Global constants
 ;;
 
 ;;; Global constants
 ;;
 
-(defconst elpher-version "3.4.0"
+(defconst elpher-version "3.4.1"
   "Current version of elpher.")
 
 (defconst elpher-margin-width 6
   "Current version of elpher.")
 
 (defconst elpher-margin-width 6
@@ -310,10 +310,6 @@ meaningfully."
   '((t :inherit bold :height 1.2))
   "Face used for gemini heading level 3.")
 
   '((t :inherit bold :height 1.2))
   "Face used for gemini heading level 3.")
 
-(defface elpher-gemini-preformatted
-  '((t :inherit fixed-pitch))
-  "Face used for pre-formatted gemini text blocks.")
-
 (defface elpher-gemini-quoted
   '((t :inherit font-lock-doc-face))
   "Face used for gemini quoted texts.")
 (defface elpher-gemini-quoted
   '((t :inherit font-lock-doc-face))
   "Face used for gemini quoted texts.")
@@ -467,7 +463,8 @@ For gopher addresses this is a combination of the selector type and selector."
   "Retrieve port from ADDRESS object.
 If no address is defined, returns 0.  (This is for compatibility with
 the URL library.)"
   "Retrieve port from ADDRESS object.
 If no address is defined, returns 0.  (This is for compatibility with
 the URL library.)"
-  (url-port address))
+  (let ((port (url-portspec address))) ; (url-port) is too slow!
+    (if port port 0)))
 
 (defun elpher-gopher-address-selector (address)
   "Retrieve gopher selector from ADDRESS object."
 
 (defun elpher-gopher-address-selector (address)
   "Retrieve gopher selector from ADDRESS object."
@@ -1642,7 +1639,6 @@ If non-nil, ALT-TEXT is displayed alongside the button."
 PREF-ID is the value assigned to the \"invisible\" text attribute, which
 can be used to toggle the display of the preformatted text."
   (insert (propertize (concat (elpher-process-text-for-display line) "\n")
 PREF-ID is the value assigned to the \"invisible\" text attribute, which
 can be used to toggle the display of the preformatted text."
   (insert (propertize (concat (elpher-process-text-for-display line) "\n")
-                      'face 'elpher-gemini-preformatted
                       'invisible pref-id
                       'rear-nonsticky t)))
 
                       'invisible pref-id
                       'rear-nonsticky t)))
 
@@ -1879,8 +1875,9 @@ Assumes UTF-8 encoding for all text files."
                        'help-echo help-string))
    (insert "\n")
    (insert (propertize
                        'help-echo help-string))
    (insert "\n")
    (insert (propertize
-            (concat "(These documents should be available if you have installed Elpher \n"
-                    " using MELPA. Otherwise you may have to install the manual yourself.)\n")
+            (concat "(These documents should be available if you have installed Elpher\n"
+                    " from MELPA or non-GNU ELPA. Otherwise you may have to install the\n"
+                    " manual yourself.)\n")
             'face 'shadow))
    (elpher-restore-pos)))
 
             'face 'shadow))
    (elpher-restore-pos)))