diff options
author | defanor <defanor@uberspace.net> | 2017-12-26 06:17:21 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-26 06:17:21 +0300 |
commit | 5d53b9a572de78968d09b29da77d1bcf5c8f7236 (patch) | |
tree | d18b13670ac5dd08eb040a742bc54f884b38dfe6 | |
parent | f2b4e89f6a78ee0ee933612955b8d36c985c9e70 (diff) |
Use relative #fragment links in Emacs
Don't reload a document on those.
-rw-r--r-- | pancake.el | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -212,7 +212,10 @@ interactively." (defun pancake-button-action (button) "An action to be invoked on button activation." - (funcall 'browse-url (button-get button 'pancake-absolute-uri))) + (let ((pancake-uri (button-get button 'pancake-link))) + (if (and pancake-uri (string-prefix-p "#" pancake-uri)) + (pancake pancake-uri) + (funcall 'browse-url (button-get button 'pancake-absolute-uri))))) (defun pancake-print-elem (element) "Translate ELEMENT into a string." |