aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel2004-06-13 01:59:21 +0000
committerKarl Fogel2004-06-13 01:59:21 +0000
commit037b0a8797591abe66783fc0558567795ff49d8e (patch)
tree9ecc3c709ad035906930b77ce5b52b6bf58a5917
parent6fb41b5b7724558e77fb5e5eb92739aa955ca7cf (diff)
downloademacs-037b0a8797591abe66783fc0558567795ff49d8e.tar.gz
emacs-037b0a8797591abe66783fc0558567795ff49d8e.zip
* bookmark.el (bookmark-bmenu-relocate): New function, as
suggested by David J. Biesack <David.Biesack@sas.com>. (bookmark-bmenu-mode-map): Bind `bookmark-bmenu-relocate' to "R". (bookmark-bmenu-mode): Describe binding in doc string. (bookmark-set-filename): Save the bookmark list if it's time.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/bookmark.el17
2 files changed, 24 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6aaffb2c225..17384998099 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12004-06-12 Karl Fogel <kfogel@red-bean.com>
2
3 * bookmark.el (bookmark-bmenu-relocate): New function, as
4 suggested by David J. Biesack <David.Biesack@sas.com>.
5 (bookmark-bmenu-mode-map): Bind `bookmark-bmenu-relocate' to "R".
6 (bookmark-bmenu-mode): Describe binding in doc string.
7 (bookmark-set-filename): Save the bookmark list if it's time.
8
12004-06-13 Kenichi Handa <handa@m17n.org> 92004-06-13 Kenichi Handa <handa@m17n.org>
2 10
3 * international/utf-8.el (ccl-decode-mule-utf-8): Fix previous 11 * international/utf-8.el (ccl-decode-mule-utf-8): Fix previous
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 3ed66f229a8..b25c261c1e7 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -376,7 +376,11 @@ That is, all information but the name."
376 (if cell 376 (if cell
377 (setcdr cell filename) 377 (setcdr cell filename)
378 (nconc (bookmark-get-bookmark-record bookmark) 378 (nconc (bookmark-get-bookmark-record bookmark)
379 (list (cons 'filename filename)))))) 379 (list (cons 'filename filename))))
380 (setq bookmark-alist-modification-count
381 (1+ bookmark-alist-modification-count))
382 (if (bookmark-time-to-save-p)
383 (bookmark-save))))
380 384
381 385
382(defun bookmark-get-position (bookmark) 386(defun bookmark-get-position (bookmark)
@@ -1491,6 +1495,7 @@ method buffers use to resolve name collisions."
1491 (define-key bookmark-bmenu-mode-map "m" 'bookmark-bmenu-mark) 1495 (define-key bookmark-bmenu-mode-map "m" 'bookmark-bmenu-mark)
1492 (define-key bookmark-bmenu-mode-map "l" 'bookmark-bmenu-load) 1496 (define-key bookmark-bmenu-mode-map "l" 'bookmark-bmenu-load)
1493 (define-key bookmark-bmenu-mode-map "r" 'bookmark-bmenu-rename) 1497 (define-key bookmark-bmenu-mode-map "r" 'bookmark-bmenu-rename)
1498 (define-key bookmark-bmenu-mode-map "R" 'bookmark-bmenu-relocate)
1494 (define-key bookmark-bmenu-mode-map "t" 'bookmark-bmenu-toggle-filenames) 1499 (define-key bookmark-bmenu-mode-map "t" 'bookmark-bmenu-toggle-filenames)
1495 (define-key bookmark-bmenu-mode-map "a" 'bookmark-bmenu-show-annotation) 1500 (define-key bookmark-bmenu-mode-map "a" 'bookmark-bmenu-show-annotation)
1496 (define-key bookmark-bmenu-mode-map "A" 'bookmark-bmenu-show-all-annotations) 1501 (define-key bookmark-bmenu-mode-map "A" 'bookmark-bmenu-show-all-annotations)
@@ -1589,6 +1594,7 @@ Bookmark names preceded by a \"*\" have annotations.
1589 so the bookmark menu bookmark remains visible in its window. 1594 so the bookmark menu bookmark remains visible in its window.
1590\\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. 1595\\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark.
1591\\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\). 1596\\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\).
1597\\[bookmark-bmenu-relocate] -- relocate this bookmark's file \(prompts for new file\).
1592\\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. 1598\\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down.
1593\\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. 1599\\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up.
1594\\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'. 1600\\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'.
@@ -2041,6 +2047,15 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
2041 (let ((bmrk (bookmark-bmenu-bookmark))) 2047 (let ((bmrk (bookmark-bmenu-bookmark)))
2042 (message (bookmark-location bmrk))))) 2048 (message (bookmark-location bmrk)))))
2043 2049
2050(defun bookmark-bmenu-relocate ()
2051 "Change the file path of the bookmark on the current line,
2052 prompting with completion for the new path."
2053 (interactive)
2054 (if (bookmark-bmenu-check-position)
2055 (let ((bmrk (bookmark-bmenu-bookmark))
2056 (thispoint (point)))
2057 (bookmark-relocate bmrk)
2058 (goto-char thispoint))))
2044 2059
2045 2060
2046;;; Menu bar stuff. Prefix is "bookmark-menu". 2061;;; Menu bar stuff. Prefix is "bookmark-menu".