From b627b6b13cf860df11efc8d1b0df75ed129f361a Mon Sep 17 00:00:00 2001 From: defanor Date: Mon, 25 Dec 2017 19:20:40 +0300 Subject: Provide absolute URIs for pancake.el --- pancake.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pancake.el') diff --git a/pancake.el b/pancake.el index c0fb9b6..e2f2855 100644 --- a/pancake.el +++ b/pancake.el @@ -200,8 +200,7 @@ while avoiding code duplication." (defun pancake-button-action (button) "An action to be invoked on button activation." - (funcall 'browse-url (or (button-get button 'pancake-link) - (button-get button 'pancake-image)))) + (funcall 'browse-url (button-get button 'pancake-absolute-uri))) (defun pancake-print-elem (element) "Translate ELEMENT into a string." @@ -225,23 +224,25 @@ while avoiding code duplication." (`(superscript . ,rest) (pancake-print-line rest) (add-text-properties start (point) '(display (raise 0.2)))) - (`(denotation (math . ,_formula) . ,rest) + (`(denotation (math ,_formula) . ,rest) (pancake-print-line rest)) - (`(denotation (link . ,uri) . ,rest) + (`(denotation (link ,uri ,absolute-uri) . ,rest) (pancake-print-line rest) (make-text-button start (point) 'pancake-link uri + 'pancake-absolute-uri absolute-uri 'help-echo uri 'follow-link t 'action #'pancake-button-action)) - (`(denotation (image . ,uri) . ,rest) + (`(denotation (image ,uri ,absolute-uri) . ,rest) (pancake-print-line rest) (make-text-button start (point) 'pancake-image uri + 'pancake-absolute-uri absolute-uri 'help-echo uri 'follow-link t 'action #'pancake-button-action)) - (`(denotation (heading . ,level) . ,rest) + (`(denotation (heading ,level) . ,rest) (pancake-print-line rest) (add-to-list 'pancake-headings (cons (line-number-at-pos) level)) (add-text-properties start (point) -- cgit v1.2.3