summaryrefslogtreecommitdiff
path: root/bookmark-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'bookmark-conf.el')
-rw-r--r--bookmark-conf.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/bookmark-conf.el b/bookmark-conf.el
index 32a102d..4e3aa5a 100644
--- a/bookmark-conf.el
+++ b/bookmark-conf.el
@@ -116,19 +116,20 @@
(cond
((and (stringp location)
(not (string= location ""))
- (string-match (rx bos "/ssh:"
- (group (1+ (not ":")))
- (zero-or-more
- (and "|"
- (1+ (not ":"))
- ":"
- (1+ (not ":"))))
- ":"
- (1+ (not ":"))
- eos)
- location))
+ (file-remote-p location))
(setq handler-name
- (concat "Tramp - " (match-string 1 location)))
+ (concat "Tramp - "
+ (format
+ "%s%s"
+ (cond
+ ((file-remote-p location 'user)
+ (concat
+ (file-remote-p location 'user)
+ "@"))
+ (""))
+ (cond
+ ((file-remote-p location 'host))
+ ("")))))
(setq capitalize-p nil)))
;; take case of file extensions
(cond