diff options
| author | Leo Liu | 2013-07-23 08:58:28 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-07-23 08:58:28 +0800 |
| commit | c35120929bcfe55e9faddc028e3e3de7cd8cfc5a (patch) | |
| tree | d98476c01228025ce4602c43ae50b1e57fb21e8a | |
| parent | 7d22ce18d44b3639e5644ed72c2bfc54ca8b91d2 (diff) | |
| download | emacs-c35120929bcfe55e9faddc028e3e3de7cd8cfc5a.tar.gz emacs-c35120929bcfe55e9faddc028e3e3de7cd8cfc5a.zip | |
* bookmark.el (bookmark-make-record): Restore NAME as a default
value.
Fixes: debbugs:14933
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2013-07-23 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * bookmark.el (bookmark-make-record): Restore NAME as a default | ||
| 4 | value. (Bug#14933) | ||
| 5 | |||
| 1 | 2013-07-22 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2013-07-22 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * emacs-lisp/autoload.el (autoload--setup-output): New function, | 8 | * 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.") | |||
| 481 | (defun bookmark-make-record () | 481 | (defun bookmark-make-record () |
| 482 | "Return a new bookmark record (NAME . ALIST) for the current location." | 482 | "Return a new bookmark record (NAME . ALIST) for the current location." |
| 483 | (let ((record (funcall bookmark-make-record-function))) | 483 | (let ((record (funcall bookmark-make-record-function))) |
| 484 | ;; Set up default name if the function does not provide one. | ||
| 485 | (unless (stringp (car record)) | ||
| 486 | (if (car record) (push nil record)) | ||
| 487 | (setcar record (or bookmark-current-bookmark (bookmark-buffer-name)))) | ||
| 484 | ;; Set up defaults. | 488 | ;; Set up defaults. |
| 485 | (bookmark-prop-set | 489 | (bookmark-prop-set |
| 486 | record 'defaults | 490 | record 'defaults |
| 487 | (delq nil (delete-dups (append (bookmark-prop-get record 'defaults) | 491 | (delq nil (delete-dups (append (bookmark-prop-get record 'defaults) |
| 488 | (list bookmark-current-bookmark | 492 | (list bookmark-current-bookmark |
| 489 | (bookmark-buffer-name)))))) | 493 | (car record) |
| 490 | ;; Set up default name. | 494 | (bookmark-buffer-name)))))) |
| 491 | (if (stringp (car record)) | 495 | record)) |
| 492 | ;; The function already provided a default name. | ||
| 493 | record | ||
| 494 | (if (car record) (push nil record)) | ||
| 495 | (setcar record (or bookmark-current-bookmark (bookmark-buffer-name))) | ||
| 496 | record))) | ||
| 497 | 496 | ||
| 498 | (defun bookmark-store (name alist no-overwrite) | 497 | (defun bookmark-store (name alist no-overwrite) |
| 499 | "Store the bookmark NAME with data ALIST. | 498 | "Store the bookmark NAME with data ALIST. |