[Utils] Simplify ‘db/bookmark-add-with-handler’
This commit is contained in:
parent
be7625830c
commit
1cc212f955
@ -530,11 +530,10 @@ _h_ _l_ _o_k _y_ank
|
|||||||
"Add NAME as bookmark to LOCATION and use HANDLER to open it.
|
"Add NAME as bookmark to LOCATION and use HANDLER to open it.
|
||||||
HANDLER is a function receiving a single argument, namely
|
HANDLER is a function receiving a single argument, namely
|
||||||
LOCATION. If a bookmark named NAME is already present, replace
|
LOCATION. If a bookmark named NAME is already present, replace
|
||||||
it."
|
it. The bookmarks will finally be sorted by their name."
|
||||||
(when (assoc name bookmark-alist)
|
(setq bookmark-alist
|
||||||
(setq bookmark-alist
|
(cl-delete-if #'(lambda (bmk) (equal (car bmk) name))
|
||||||
(cl-delete-if #'(lambda (bmk) (equal (car bmk) name))
|
bookmark-alist))
|
||||||
bookmark-alist)))
|
|
||||||
(push `(,name
|
(push `(,name
|
||||||
(filename . ,location)
|
(filename . ,location)
|
||||||
(handler . ,#'(lambda (arg)
|
(handler . ,#'(lambda (arg)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user