Bbdb-info doesn't work with FSF Emacs19.22, unless the info file is in
the default directory.  This is becuase Info-directory is nil, so
 (expand-file-name file Info-directory)
expands the filename relative to the current directory.

In this version of emacs, Info-directory has become
Info-directory-list, a list of directories that Info-goto-node
automatically searches.  It also automatically appends ".info" if
necessary.  Thus bbdb-info could become much simpler: 

(Info-goto-node (format "(%s)" (or bbdb-info-file "bbdb")))

But here is a version with all the searching behavior left in, so that
it should still work with other versions of emacs:

(defun bbdb-info ()
  (interactive)
  (require 'info)
  (if bbdb-inside-electric-display
      (bbdb-electric-throw-to-execute '(bbdb-info))
    (let ((file bbdb-info-file)
          (Info-directory (and (boundp 'Info-directory) Info-directory)))
      (if (null Info-directory)
          (setq file (or file "bbdb"))
        (if file
            (setq file (expand-file-name file Info-directory))
          (setq file (expand-file-name "bbdb" Info-directory)))
        (or (file-exists-p file)
            (setq file (concat file ".info")))
        (or (file-exists-p file) (error "Info file %s doesn't exist" file)))
      (let ((Info-directory (file-name-directory file)))
        (Info-goto-node (format "(%s)Top" file))))))

Bng

Reply via email to