diff lisp/info.el @ 92690:ae00481eacc1

* bookmark.el (bookmark-make-record-function): Change expected return value to include a suggested bookmark name. (bookmark-make): Split into bookmark-make-record and bookmark-store. Fix reversed `overwrite' semantics. (bookmark-set): Call bookmark-make-record before prompting the user. Then pass the result to bookmark-store later on. (bookmark-make-name-function): Remove. (bookmark-buffer-file-name, bookmark-buffer-name): Don't use it. * info.el (bookmark-make-name-function): Remove. (Info-mode): Don't set it. (Info-bookmark-make-name): Remove. (Info-bookmark-make-record): Use Info-current-node as suggested default bookmark name.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 09 Mar 2008 21:35:01 +0000
parents ac3c6c3e119c
children 7498dcd3cee6
line wrap: on
line diff
--- a/lisp/info.el	Sun Mar 09 21:16:26 2008 +0000
+++ b/lisp/info.el	Sun Mar 09 21:35:01 2008 +0000
@@ -3375,7 +3375,6 @@
 
 (defvar tool-bar-map)
 (defvar bookmark-make-record-function)
-(defvar bookmark-make-name-function)
 
 ;; Autoload cookie needed by desktop.el
 ;;;###autoload
@@ -3490,8 +3489,6 @@
   (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
@@ -4329,15 +4326,9 @@
 ;; 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 ()
-  `((filename . ,(bookmark-buffer-file-name))
+  `(,Info-current-node
+    (filename . ,(bookmark-buffer-file-name))
     (front-context-string
      . ,(if (>= (- (point-max) (point)) bookmark-search-size)
             (buffer-substring-no-properties