From: Stephen Berman <stephen.berman@gmx.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Sebastian Wiesner <lunaryorn@gmail.com>, 14974@debbugs.gnu.org
Subject: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item
Date: Mon, 29 Jul 2013 23:35:11 +0200 [thread overview]
Message-ID: <87y58pvyls.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <jwv7gg9e2xr.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 29 Jul 2013 12:40:31 -0400")
On Mon, 29 Jul 2013 12:40:31 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>>> Thanks for the report; fixed.
>>> I don't think that's enough: the error is signaled before
>>> adaptive-wrap.el is loaded, i.e. before seeing the code you modified.
>>> You'd need to add a ;;;###autoload in front of the new (require 'easymenu).
Hmm, I guess I don't understand what is going wrong -- what error is
being signaled and what is causing it? From the shell I invoked
emacs -Q --batch --eval "(package-install 'adaptive-wrap)"
and that returns "package.el is not yet initialized!" -- but the same
thing happens with any other package, so that can't be the problem.
What is a recipe to getting the error, so I can understand what the
issue is?
>> Shouldn't adaptive-wrap rather use one of the autoloadable functions
>> from "easymenu"?
>
> It could, but that would load easymenu just as well.
>
> An alternative would be to do the same with define-key rather than
> using easymenu.
The following seems to DTRT (and also allows dispensing with
adaptive-wrap-unload-function):
(define-key-after (lookup-key menu-bar-options-menu [line-wrapping])
[adaptive-wrap]
'(menu-item "Adaptive Wrap" (lambda ()
(interactive)
(if adaptive-wrap-prefix-mode
(adaptive-wrap-prefix-mode -1)
(adaptive-wrap-prefix-mode 1)))
:enable t
:visible (and (menu-bar-menu-frame-live-and-visible-p)
(featurep 'adaptive-wrap))
:help "Show wrapped long lines with an adjustable prefix"
:button (:toggle . adaptive-wrap-prefix-mode))
word-wrap)
Should I install it in place of the easy-menu definition? (Though in
any case I'd still like to understand just what the problem with the
latter is.)
Steve Berman
next prev parent reply other threads:[~2013-07-29 21:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-28 13:32 bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Sebastian Wiesner
2013-07-29 11:59 ` Stephen Berman
2013-07-29 15:24 ` Stefan Monnier
2013-07-29 15:32 ` Sebastian Wiesner
2013-07-29 16:40 ` Stefan Monnier
2013-07-29 21:35 ` Stephen Berman [this message]
2013-07-29 22:15 ` Stefan Monnier
2013-07-29 23:30 ` Stephen Berman
2013-07-30 1:08 ` Stefan Monnier
2013-07-30 8:54 ` Stephen Berman
2013-07-30 14:14 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y58pvyls.fsf@rosalinde.fritz.box \
--to=stephen.berman@gmx.net \
--cc=14974@debbugs.gnu.org \
--cc=lunaryorn@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).