[Utils] Simplify ‘db/bookmark-add-with-handler’

This commit is contained in:
Daniel - 2019-01-27 09:25:03 +01:00
parent be7625830c
commit 1cc212f955
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 4 additions and 5 deletions

View File

@ -530,11 +530,10 @@ _h_ _l_ _o_k _y_ank
"Add NAME as bookmark to LOCATION and use HANDLER to open it.
HANDLER is a function receiving a single argument, namely
LOCATION. If a bookmark named NAME is already present, replace
it."
(when (assoc name bookmark-alist)
(setq bookmark-alist
(cl-delete-if #'(lambda (bmk) (equal (car bmk) name))
bookmark-alist)))
it. The bookmarks will finally be sorted by their name."
(setq bookmark-alist
(cl-delete-if #'(lambda (bmk) (equal (car bmk) name))
bookmark-alist))
(push `(,name
(filename . ,location)
(handler . ,#'(lambda (arg)