diff options
author | Karl Fogel <kfogel@red-bean.com> | 2004-06-13 01:59:21 +0000 |
---|---|---|
committer | Karl Fogel <kfogel@red-bean.com> | 2004-06-13 01:59:21 +0000 |
commit | 64dbf0e56366081a7946b6bb262a4a16dbcbac5d (patch) | |
tree | 432a86c5148598950a3ef39b92fa2d3ae82a22cc | |
parent | 36c99a08b8cc529e60952abefc5c5f5e2f92542f (diff) | |
download | emacs-64dbf0e56366081a7946b6bb262a4a16dbcbac5d.tar.gz |
* 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/ChangeLog | 8 | ||||
-rw-r--r-- | lisp/bookmark.el | 17 |
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 @@ +2004-06-12 Karl Fogel <kfogel@red-bean.com> + + * 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. + 2004-06-13 Kenichi Handa <handa@m17n.org> * 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." (if cell (setcdr cell filename) (nconc (bookmark-get-bookmark-record bookmark) - (list (cons 'filename filename)))))) + (list (cons 'filename filename)))) + (setq bookmark-alist-modification-count + (1+ bookmark-alist-modification-count)) + (if (bookmark-time-to-save-p) + (bookmark-save)))) (defun bookmark-get-position (bookmark) @@ -1491,6 +1495,7 @@ method buffers use to resolve name collisions." (define-key bookmark-bmenu-mode-map "m" 'bookmark-bmenu-mark) (define-key bookmark-bmenu-mode-map "l" 'bookmark-bmenu-load) (define-key bookmark-bmenu-mode-map "r" 'bookmark-bmenu-rename) + (define-key bookmark-bmenu-mode-map "R" 'bookmark-bmenu-relocate) (define-key bookmark-bmenu-mode-map "t" 'bookmark-bmenu-toggle-filenames) (define-key bookmark-bmenu-mode-map "a" 'bookmark-bmenu-show-annotation) (define-key bookmark-bmenu-mode-map "A" 'bookmark-bmenu-show-all-annotations) @@ -1589,6 +1594,7 @@ Bookmark names preceded by a \"*\" have annotations. so the bookmark menu bookmark remains visible in its window. \\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. \\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\). +\\[bookmark-bmenu-relocate] -- relocate this bookmark's file \(prompts for new file\). \\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. \\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. \\[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>\\ (let ((bmrk (bookmark-bmenu-bookmark))) (message (bookmark-location bmrk))))) +(defun bookmark-bmenu-relocate () + "Change the file path of the bookmark on the current line, + prompting with completion for the new path." + (interactive) + (if (bookmark-bmenu-check-position) + (let ((bmrk (bookmark-bmenu-bookmark)) + (thispoint (point))) + (bookmark-relocate bmrk) + (goto-char thispoint)))) ;;; Menu bar stuff. Prefix is "bookmark-menu". |