From c35120929bcfe55e9faddc028e3e3de7cd8cfc5a Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 23 Jul 2013 08:58:28 +0800 Subject: [PATCH] * bookmark.el (bookmark-make-record): Restore NAME as a default value. Fixes: debbugs:14933 --- lisp/ChangeLog | 5 +++++ lisp/bookmark.el | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 660ea562910..597c50899c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-23 Leo Liu + + * bookmark.el (bookmark-make-record): Restore NAME as a default + value. (Bug#14933) + 2013-07-22 Stefan Monnier * emacs-lisp/autoload.el (autoload--setup-output): New function, diff --git a/lisp/bookmark.el b/lisp/bookmark.el index cab81c3b135..b1cdedb83c5 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -481,19 +481,18 @@ equivalently just return ALIST without NAME.") (defun bookmark-make-record () "Return a new bookmark record (NAME . ALIST) for the current location." (let ((record (funcall bookmark-make-record-function))) + ;; Set up default name if the function does not provide one. + (unless (stringp (car record)) + (if (car record) (push nil record)) + (setcar record (or bookmark-current-bookmark (bookmark-buffer-name)))) ;; Set up defaults. (bookmark-prop-set record 'defaults (delq nil (delete-dups (append (bookmark-prop-get record 'defaults) (list bookmark-current-bookmark - (bookmark-buffer-name)))))) - ;; Set up default name. - (if (stringp (car record)) - ;; The function already provided a default name. - record - (if (car record) (push nil record)) - (setcar record (or bookmark-current-bookmark (bookmark-buffer-name))) - record))) + (car record) + (bookmark-buffer-name)))))) + record)) (defun bookmark-store (name alist no-overwrite) "Store the bookmark NAME with data ALIST. -- 2.11.4.GIT