From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Date: Tue, 30 Jul 2013 10:14:05 -0400 Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> <87txjdvt8w.fsf@rosalinde.fritz.box> <87r4egh1hq.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375193771 27245 80.91.229.3 (30 Jul 2013 14:16:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2013 14:16:11 +0000 (UTC) Cc: Sebastian Wiesner , 14974@debbugs.gnu.org To: Stephen Berman , eliz@gnu.org, cyd@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 30 16:16:11 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 1V4Aia-0006kN-97 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 16:16:04 +0200 Original-Received: from localhost ([::1]:43911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4AiZ-0002uP-96 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 10:16:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Ahj-0001sn-0T for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 10:15:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4Ahb-0004WB-EH for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 10:15:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Ahb-0004Vl-9M for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 10:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V4Aha-0002Nq-0J for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2013 10:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jul 2013 14:15: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.13751936639042 (code B ref 14974); Tue, 30 Jul 2013 14:15:01 +0000 Original-Received: (at 14974) by debbugs.gnu.org; 30 Jul 2013 14:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:58410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Ago-0002LX-4s for submit@debbugs.gnu.org; Tue, 30 Jul 2013 10:14:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:65016) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Agl-0002LF-EC for 14974@debbugs.gnu.org; Tue, 30 Jul 2013 10:14:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQBiB0GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQBiB0GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20159659" Original-Received: from 108-161-124-182.dsl.teksavvy.com (HELO pastel.home) ([108.161.124.182]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jul 2013 10:13:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 1074662E1A; Tue, 30 Jul 2013 10:14:05 -0400 (EDT) In-Reply-To: <87r4egh1hq.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 30 Jul 2013 10:54:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:76800 Archived-At: > I honestly don't see having the feature check as a waste of code, but no > matter. KISS. > I assume, then, that adaptive-wrap-unload-function is also dispensable; Yes. > so is the following patch ok to check in? Fine, with one comment: > ! (define-key-after (lookup-key menu-bar-options-menu [line-wrapping]) > ! [adaptive-wrap] > ! '(menu-item "Adaptive Wrap" adaptive-wrap-prefix-mode > ! :enable t > ! :visible (menu-bar-menu-frame-live-and-visible-p) > ! :help "Show wrapped long lines with an adjustable prefix" > ! :button (:toggle . (bound-and-true-p adaptive-wrap-prefix-mode))) > ! word-wrap) The ":enable t" is redundant, remove it. As for the ":visible" entry, I'm wondering what it's there for: I see it's also used for the line-wrap entry, but I don't know what it's used for there either. I see that menu-bar-menu-frame-live-and-visible-p was added in 2005 by Eli (used for :enable rather than :visible, by the way) and it was moved to :visible later on when Yidong added the word-wrap entry. Could someone add a comment explaining what it's for? Usually the menu's frame can't be invisible if the menu is visible, so I guess it has to do with either the `ns' build or with the Gtk feature that lets on `pin' a menu? But why is it used on these entries and not on others? Why use it for `:visible' rather than `:enable' or for something yet entirely different? Stefan