+2013-07-23 Leo Liu <sdl.web@gmail.com>
+
+ * bookmark.el (bookmark-make-record): Restore NAME as a default
+ value. (Bug#14933)
+
2013-07-22 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/autoload.el (autoload--setup-output): New function,
(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.