summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-04-18 11:40:00 +0800
committerJSDurand <mmemmew@gmail.com>2022-04-18 11:40:00 +0800
commitb4cdcaf42ab97dce092949b4d6110f858b5ffd36 (patch)
tree451ab3d3775953b5ea6d50a5b89b9ef25f6f8629
parent2e7a42d50fcfb9271137f7235333cdc6e92fb18f (diff)
bookmark-conf: refine bookmark handler handling
* bookmark-conf.el: Remove bookmark(-handler)? from the name of the group heading.
-rw-r--r--bookmark-conf.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/bookmark-conf.el b/bookmark-conf.el
index 4e3aa5a..f2a36b2 100644
--- a/bookmark-conf.el
+++ b/bookmark-conf.el
@@ -110,8 +110,12 @@
handler-name
(replace-regexp-in-string
"^durand-" ""
- (replace-regexp-in-string
- "-bookmark$" "" (match-string 1 handler-name))))))
+ (match-string 1 handler-name)))))
+ (setq handler-name
+ (and (stringp handler-name)
+ (replace-regexp-in-string
+ (rx "-bookmark" (zero-or-one "-handler") eos)
+ "" handler-name)))
;; Tramp bookmarks
(cond
((and (stringp location)