From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs 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 Message-ID: <87y58pvyls.fsf@rosalinde.fritz.box> References: <87bo5ly3ty.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375133777 29956 80.91.229.3 (29 Jul 2013 21:36:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 21:36:17 +0000 (UTC) Cc: Sebastian Wiesner , 14974@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 29 23:36:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V3v73-00025y-Rk for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 23:36:17 +0200 Original-Received: from localhost ([::1]:51202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3v73-0008Q6-Ea for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 17:36:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3v6u-0008Ji-8j for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 17:36:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3v6o-0003u8-CS for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 17:36:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3v6o-0003tw-A0 for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 17:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V3v6o-0001v7-0A for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 17:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jul 2013 21:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14974 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14974-submit@debbugs.gnu.org id=B14974.13751337247194 (code B ref 14974); Mon, 29 Jul 2013 21:36:01 +0000 Original-Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 21:35:24 +0000 Original-Received: from localhost ([127.0.0.1]:56735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3v6B-0001ry-NV for submit@debbugs.gnu.org; Mon, 29 Jul 2013 17:35:24 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:60088) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3v68-0001rT-7v for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 17:35:21 -0400 Original-Received: from rosalinde.fritz.box ([89.245.100.49]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MNYxW-1V1CKw2VqM-007BAy for <14974@debbugs.gnu.org>; Mon, 29 Jul 2013 23:35:14 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Jul 2013 12:40:31 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:brDFGQaFkvqH4zqdQyHbuyZ7WnRTvJVKrpFtqYLBsAFQKvtx3zQ g0qIDr+/XWdZhhd4Dd8FQQxVWSL0o2buFxyTJLzQGpHFQIhrPdOc41UmoawJe0RiimDkuFk FgcgOyDHwAFlA2/wLz90axFPuWRDfSzv22r6M4UloxSx1n8MWvgzcOzhXxeinBud69tL6WI acucgv2pJxIZFpZk1VdVg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76776 Archived-At: On Mon, 29 Jul 2013 12:40:31 -0400 Stefan Monnier 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