X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;ds=sidebyside;f=elpher.el;h=e5a9d090a73f5a25c5a6164f8a518607ef5b8f4c;hb=58919c64516a1f51bc5828647c978960f5ab7612;hp=307647a88204b5701ca48083a02297bb6509ea4b;hpb=7e0919bd74952fb229862f1280e01817721b7fc2;p=elpher.git diff --git a/elpher.el b/elpher.el index 307647a..e5a9d09 100644 --- a/elpher.el +++ b/elpher.el @@ -4,7 +4,7 @@ ;; Author: Tim Vaughan ;; Created: 11 April 2019 -;; Version: 2.10.2 +;; Version: 2.10.3 ;; Keywords: comm gopher ;; Homepage: http://thelambdalab.xyz/elpher ;; Package-Requires: ((emacs "26.2")) @@ -71,7 +71,7 @@ ;;; Global constants ;; -(defconst elpher-version "2.10.2" +(defconst elpher-version "2.10.3" "Current version of elpher.") (defconst elpher-margin-width 6 @@ -269,8 +269,6 @@ some servers which do not support IPv6 can take a long time to time-out." (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) "gopher")) (when (or (equal "gopher" (url-type url)) @@ -368,7 +366,7 @@ address refers to, via the table `elpher-type-map'." For gopher addresses this is a combination of the selector type and selector." (if (symbolp address) nil - (url-filename address))) + (url-unhex (url-filename address)))) (defun elpher-address-host (address) "Retrieve host from ADDRESS object." @@ -516,6 +514,7 @@ unless NO-HISTORY is non-nil." (defmacro elpher-with-clean-buffer (&rest args) "Evaluate ARGS with a clean *elpher* buffer as current." + (declare (debug (body))) (list 'with-current-buffer "*elpher*" '(elpher-mode) (append (list 'let '((inhibit-read-only t)) @@ -1372,9 +1371,11 @@ by HEADER-LINE." (2 'elpher-gemini-heading2) (3 'elpher-gemini-heading3) (_ 'default))) - (fill-column (/ (* fill-column - (font-get (font-spec :name (face-font 'default)) :size)) - (font-get (font-spec :name (face-font face)) :size)))) + (fill-column (if (display-graphic-p) + (/ (* fill-column + (font-get (font-spec :name (face-font 'default)) :size)) + (font-get (font-spec :name (face-font face)) :size)) + fill-column))) (unless (display-graphic-p) (insert (make-string level ?#) " ")) (insert (propertize header 'face face))