Mercurial > emacs
diff lisp/info.el @ 92568:f91d9f543b0a
* bookmark.el (bookmark-set): Don't check for
`bookmark-make-name-function' since `bookmark-buffer-file-name'
already takes care of this.
(bookmark-buffer-name): Removed Info-mode specific code.
(bookmark-buffer-file-name): Removed Info-mode specific code.
* info.el (bookmark-get-info-node): Define this function in
info.el, not in bookmark.el.
(Info-mode): Set `bookmark-make-name-function' to
`Info-bookmark-make-name' locally.
(Info-bookmark-make-name): New function.
* bookmark.el (bookmark-make-name-function): New variable.
author | Bastien Guerry <bzg@altern.org> |
---|---|
date | Fri, 07 Mar 2008 19:31:59 +0000 |
parents | 2da52b160bb2 |
children | 7b131fee0890 |
line wrap: on
line diff
--- a/lisp/info.el Fri Mar 07 17:03:37 2008 +0000 +++ b/lisp/info.el Fri Mar 07 19:31:59 2008 +0000 @@ -3489,6 +3489,8 @@ (Info-set-mode-line) (set (make-local-variable 'bookmark-make-record-function) 'Info-bookmark-make-record) + (set (make-local-variable 'bookmark-make-name-function) + 'Info-bookmark-make-name) (run-mode-hooks 'Info-mode-hook)) ;; When an Info buffer is killed, make sure the associated tags buffer @@ -4326,6 +4328,13 @@ ;; This is only called from bookmark.el. (declare-function bookmark-buffer-file-name "bookmark" ()) + +(defun Info-bookmark-make-name (&optional file) + "Return the default name for the bookmark. +When FILE is non-nil, return the Info file instead." + (if file Info-current-file Info-current-node)) + + (defun Info-bookmark-make-record (annotation) (let ((the-record `((filename . ,(bookmark-buffer-file-name)) @@ -4356,15 +4365,19 @@ ;; Finally, return the completed record. the-record)) + (defvar bookmark-current-bookmark) (declare-function bookmark-get-filename "bookmark" (bookmark)) (declare-function bookmark-get-front-context-string "bookmark" (bookmark)) (declare-function bookmark-get-rear-context-string "bookmark" (bookmark)) (declare-function bookmark-get-position "bookmark" (bookmark)) -(declare-function bookmark-get-info-node "bookmark" (bookmark)) (declare-function bookmark-file-or-variation-thereof "bookmark" (file)) (declare-function bookmark-jump-noselect "bookmark" (str)) +(defun bookmark-get-info-node (bookmark) + "Get the info node associated with BOOKMARK." + (cdr (assq 'info-node (bookmark-get-bookmark-record bookmark)))) + ;;;###autoload (defun Info-bookmark-jump (bmk) ;; This implements the `handler' function interface for record type returned