Disable downloading for web links.
authorTim Vaughan <tgvaughan@gmail.com>
Fri, 26 Apr 2019 16:01:07 +0000 (18:01 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Fri, 26 Apr 2019 16:01:07 +0000 (18:01 +0200)
elopher.el

index 217ef98..81b1250 100644 (file)
@@ -532,11 +532,13 @@ The result is stored as a string in the variable elopher-selector-string."
   (interactive)
   (let ((button (button-at (point))))
     (if button
-        (elopher-visit-node (button-get button 'elopher-node)
-                            #'elopher-get-node-download)
+        (let ((node (button-get button 'elopher-node)))
+          (if node
+              (elopher-visit-node (button-get button 'elopher-node)
+                                  #'elopher-get-node-download)
+            (message "Can only download gopher links, not general URLs.")))
       (message "No link selected."))))
 
-
 ;;; Mode and keymap
 ;;