The Lambda Lab
/
projects
/
elpher.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated development goals.
[elpher.git]
/
elopher.el
diff --git
a/elopher.el
b/elopher.el
index
217ef98
..
4617d08
100644
(file)
--- a/
elopher.el
+++ b/
elopher.el
@@
-306,7
+306,7
@@
The result is stored as a string in the variable elopher-selector-string."
;; Text retrieval
;; Text retrieval
-(defvar elopher-url-regex "\\(https?\\|gopher\\)://\\([a-z.\-]+\\)\\(?3::[0-9]+\\)?\\(?4:/[^ \r\n\t(),]*\\)")
+(defvar elopher-url-regex "\\(https?\\|gopher\\)://\\([a-z
A-Z0-9
.\-]+\\)\\(?3::[0-9]+\\)?\\(?4:/[^ \r\n\t(),]*\\)")
(defun elopher-buttonify-urls (string)
"Turn substrings which look like urls in STRING into clickable buttons."
(defun elopher-buttonify-urls (string)
"Turn substrings which look like urls in STRING into clickable buttons."
@@
-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
(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."))))
(message "No link selected."))))
-
;;; Mode and keymap
;;
;;; Mode and keymap
;;