emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113496: * bookmark.el (bookmark-make-record): Resto


From: Leo Liu
Subject: [Emacs-diffs] trunk r113496: * bookmark.el (bookmark-make-record): Restore NAME as a default
Date: Tue, 23 Jul 2013 00:59:24 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113496
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14933
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-23 08:58:28 +0800
message:
  * bookmark.el (bookmark-make-record): Restore NAME as a default
  value.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/bookmark.el               bookmark.el-20091113204419-o5vbwnq5f7feedwu-621
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-22 23:21:14 +0000
+++ b/lisp/ChangeLog    2013-07-23 00:58:28 +0000
@@ -1,3 +1,8 @@
+2013-07-23  Leo Liu  <address@hidden>
+
+       * bookmark.el (bookmark-make-record): Restore NAME as a default
+       value.  (Bug#14933)
+
 2013-07-22  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/autoload.el (autoload--setup-output): New function,

=== modified file 'lisp/bookmark.el'
--- a/lisp/bookmark.el  2013-05-09 01:40:20 +0000
+++ b/lisp/bookmark.el  2013-07-23 00:58:28 +0000
@@ -481,19 +481,18 @@
 (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]