summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2008-03-07 19:31:59 +0000
committerBastien Guerry <bzg@altern.org>2008-03-07 19:31:59 +0000
commitf9bf695080bde66ba8d6180a23bfa8c0408dfb72 (patch)
treed1700f1b2523e22a42e855c78db4977c7f4db2e5 /lisp/info.el
parent9dfcb52e0be6b6bb8b7a3b9cd3f827ceb2d087f6 (diff)
downloademacs-f9bf695080bde66ba8d6180a23bfa8c0408dfb72.tar.gz
* 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.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/info.el b/lisp/info.el
index ae295cc06ef..5f074b686d6 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3489,6 +3489,8 @@ Advanced commands:
(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 @@ BUFFER is the buffer speedbar is requesting buttons for."
;; 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 @@ BUFFER is the buffer speedbar is requesting buttons for."
;; 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