[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99899: Add a new field `location' to
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99899: Add a new field `location' to bookmarks for non-file bookmarks. |
Date: |
Wed, 14 Apr 2010 11:07:53 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99899
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2010-04-14 11:07:53 -0400
message:
Add a new field `location' to bookmarks for non-file bookmarks.
* bookmark.el (bookmark-location): Use the new field, if present.
(bookmark-insert-location): Undo last change, not needed any more.
* man.el (Man-bookmark-make-record):
* woman.el (woman-bookmark-make-record):
* gnus-sum.el (gnus-summary-bookmark-make-record): Add `location' field.
modified:
lisp/ChangeLog
lisp/bookmark.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-sum.el
lisp/man.el
lisp/woman.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-04-14 00:43:54 +0000
+++ b/lisp/ChangeLog 2010-04-14 15:07:53 +0000
@@ -1,3 +1,11 @@
+2010-04-14 Stefan Monnier <address@hidden>
+
+ Add a new field `location' to bookmarks for non-file bookmarks.
+ * bookmark.el (bookmark-location): Use the new field, if present.
+ (bookmark-insert-location): Undo last change, not needed any more.
+ * man.el (Man-bookmark-make-record):
+ * woman.el (woman-bookmark-make-record): Add `location' field.
+
2010-04-14 Juri Linkov <address@hidden>
* simple.el (scroll-error-top-bottom): New defcustom.
=== modified file 'lisp/bookmark.el'
--- a/lisp/bookmark.el 2010-04-12 19:12:36 +0000
+++ b/lisp/bookmark.el 2010-04-14 15:07:53 +0000
@@ -1176,9 +1176,7 @@
(or no-history (bookmark-maybe-historicize-string bookmark))
(let ((start (point)))
(prog1
- ;; FIXME: Each bookmark should come with a `location' method
- ;; rather than just say "-- no file --".
- (insert (or (bookmark-location bookmark) " -- no file --"))
+ (insert (bookmark-location bookmark))
(if (display-mouse-p)
(add-text-properties
start
@@ -1193,10 +1191,16 @@
(defalias 'bookmark-locate 'bookmark-insert-location)
(defun bookmark-location (bookmark)
- "Return the name of the file associated with BOOKMARK, or nil if none.
+ "Return a description of the location of BOOKMARK.
BOOKMARK may be a bookmark name (a string) or a bookmark record."
(bookmark-maybe-load-default-file)
- (bookmark-get-filename bookmark))
+ ;; We could call the `handler' and ask for it to construct a description
+ ;; dynamically: it would open up several new possibilities, but it
+ ;; would have the major disadvantage of forcing to load each and
+ ;; every handler when the user calls bookmark-menu.
+ (or (bookmark-prop-get bookmark 'location)
+ (bookmark-get-filename bookmark)
+ "-- Unknown location --"))
;;;###autoload
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-04-12 16:09:47 +0000
+++ b/lisp/gnus/ChangeLog 2010-04-14 15:07:53 +0000
@@ -1,3 +1,7 @@
+2010-04-14 Stefan Monnier <address@hidden>
+
+ * gnus-sum.el (gnus-summary-bookmark-make-record): Add `location' field.
+
2010-04-12 Stefan Monnier <address@hidden>
* gnus-sum.el: Add bookmark declarations to silence the compiler.
=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el 2010-04-12 16:09:47 +0000
+++ b/lisp/gnus/gnus-sum.el 2010-04-14 15:07:53 +0000
@@ -12657,8 +12657,9 @@
(id (mail-header-id head)))
`(,subject
,@(bookmark-make-record-default 'point-only)
- (group . ,grp) (article . ,art)
- (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
+ (location . ,(format "Gnus %s:%d:%s" grp art id))
+ (group . ,grp) (article . ,art)
+ (message-id . ,id) (handler . gnus-summary-bookmark-jump))))
;;;###autoload
(defun gnus-summary-bookmark-jump (bookmark)
=== modified file 'lisp/man.el'
--- a/lisp/man.el 2010-04-12 16:09:47 +0000
+++ b/lisp/man.el 2010-04-14 15:07:53 +0000
@@ -1689,8 +1689,9 @@
"Make a bookmark entry for a Man buffer."
`(,(Man-default-bookmark-title)
,@(bookmark-make-record-default 'point-only)
- (man-args . ,Man-arguments)
- (handler . Man-bookmark-jump)))
+ (location . ,(concat "man " Man-arguments))
+ (man-args . ,Man-arguments)
+ (handler . Man-bookmark-jump)))
;;;###autoload
(defun Man-bookmark-jump (bookmark)
=== modified file 'lisp/woman.el'
--- a/lisp/woman.el 2010-04-12 16:09:47 +0000
+++ b/lisp/woman.el 2010-04-14 15:07:53 +0000
@@ -4533,6 +4533,7 @@
"Make a bookmark entry for a Woman buffer."
`(,(Man-default-bookmark-title)
,@(bookmark-make-record-default 'point-only)
+ (location . ,(concat "woman " woman-last-file-name))
;; Use the same form as man's bookmarks, as much as possible.
(man-args . ,woman-last-file-name)
(handler . woman-bookmark-jump)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99899: Add a new field `location' to bookmarks for non-file bookmarks.,
Stefan Monnier <=