help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: "Invalid function: bmkp-menu-bar-make-toggle" in Bookmark+


From: Drew Adams
Subject: RE: "Invalid function: bmkp-menu-bar-make-toggle" in Bookmark+
Date: Mon, 20 Jun 2011 11:01:37 -0700

> When I try to init Bookmark+ by evaluate (require 'bookmark+),
> the following error occurs    
> "Invalid function: bmkp-menu-bar-make-toggle"
> By investigate the bookmark+.el, the problem was located
> in bookmark+-key.el.  Then I made a little modification and
> it works well.
> original bookmark+.el
> (require 'bookmark+-bmu)(require 'bookmark+-1)
> (require 'bookmark+-key)
> modified bookmark+.el
> (require 'bookmark+-bmu)(require 'bookmark+-1)
> (load "bookmark+-key.el")(require 'bookmark+-key)     
> My Bookmark+ was downloaded from
> "https://github.com/emacsmirror/bookmark-plus.git";.

Sorry for your trouble, Dove.  You can follow up with me off list if what I
write here doesn't help you or you have questions.

I'm not familiar with that GIT URL.  The latest Bookmark+ files are always on
Emacs Wiki, here:

http://www.emacswiki.org/cgi-bin/wiki?action=index;match=%5C.(el%7Ctar)(%5C.gz)%
3F%24

Perhaps try with the files from the wiki and see if you still have a problem.

However, if your `load' of the *.el file works and the `require' of the library
does not work, probably the problem is in the *.elc (byte-compiled) file picked
up by `require'.

`bmkp-menu-bar-make-toggle' is a macro, not an ordinary function.  Whenever you
get a new version of the Bookmark+ macros (library `bookmark+-mac.el'), you must
always load it (source file *-mac.el, not *-mac.elc) first, and then
byte-compile the files (if you choose to byte-compile).

This is so that the latest macros are defined when you byte-compile.  If you
don't do that then either you use an outdated version of the macros or some
newer macros might not be present yet at all.

That sounds like what happened: You byte-compiled a new version of
`bookmark+-key.el' without first loading `bookmark+-mac.el' (*.el, not *.elc).
Since `bookmark+-key.el' needs that macro, if it is compiled using only an older
version of *-mac.el[c] then the macro will be missing at compile time.

I recommend that whenever the file `bookmark+-mac.el' changes you first delete
all of the Bookmark+ byte-compiled files, then load the source files, then
byte-compile (if you choose to byte-compile, which I recommend).  If you are
unsure whether `bookmark+-mac.el' changed since you last byte-compiled, then
assume it did, just to be safe.

In your Emacs init file, all you should ever need is the single sexp `(require
'bookmark+)'.  That will load all of the Bookmark+ libraries.




reply via email to

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