emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/bookmark.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/bookmark.el [lexbind]
Date: Tue, 06 Jul 2004 07:05:50 -0400

Index: emacs/lisp/bookmark.el
diff -c emacs/lisp/bookmark.el:1.61.2.4 emacs/lisp/bookmark.el:1.61.2.5
*** emacs/lisp/bookmark.el:1.61.2.4     Tue Apr 27 14:08:29 2004
--- emacs/lisp/bookmark.el      Tue Jul  6 10:10:46 2004
***************
*** 376,382 ****
      (if cell
          (setcdr cell filename)
        (nconc (bookmark-get-bookmark-record bookmark)
!              (list (cons 'filename filename))))))
  
  
  (defun bookmark-get-position (bookmark)
--- 376,386 ----
      (if cell
          (setcdr cell filename)
        (nconc (bookmark-get-bookmark-record bookmark)
!              (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,1496 ****
--- 1495,1501 ----
    (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,1594 ****
--- 1594,1600 ----
    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,2046 ****
--- 2047,2061 ----
        (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".




reply via email to

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