From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Joseph Brenner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6037@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.127228023823886 (code B ref -1); Mon, 26 Apr 2010 11:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2010 11:10:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6MCx-0006DC-AC for submit@debbugs.gnu.org; Mon, 26 Apr 2010 07:10:36 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6JR0-0004lu-9J for submit@debbugs.gnu.org; Mon, 26 Apr 2010 04:12:55 -0400 Received: from lists.gnu.org ([199.232.76.165]:40602) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O6JQx-00013E-5I for submit@debbugs.gnu.org; Mon, 26 Apr 2010 04:12:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6JQw-0000ca-5N for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 04:12:50 -0400 Received: from [140.186.70.92] (port=49860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6JQt-0000cI-3v for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 04:12:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.9 required=5.0 tests=BAYES_00, FSL_HELO_NON_FQDN_1, HELO_LOCALHOST, RDNS_DYNAMIC, TO_NO_BRKTS_DYNIP autolearn=no version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6JQr-0007UK-A3 for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 04:12:46 -0400 Received: from m208-84.dsl.rawbw.com ([198.144.208.84]:42275 helo=localhost) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6JQq-0007U7-GR for bug-gnu-emacs@gnu.org; Mon, 26 Apr 2010 04:12:45 -0400 Received: by localhost (Postfix, from userid 1000) id 8AB9D28047; Mon, 26 Apr 2010 00:38:39 -0700 (PDT) From: Joseph Brenner Date: Mon, 26 Apr 2010 00:38:39 -0700 Message-ID: <87r5m2vf28.fsf@kzsu.stanford.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.2 (----) X-Mailman-Approved-At: Mon, 26 Apr 2010 07:10:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) The menu-bar-mode function is not working as a toggle. Running this will turn on the menu bar, but running it again will not turn it off: (menu-bar-mode) This does work to turn it off: (menu-bar-mode -1) This turns it on, as documented: (menu-bar-mode 1) Note that running scroll-bar-mode repeatedly does work as a toggle, as expected for menu-bar-mode: (scroll-bar-mode) I used to use this code, and it *did* work as a toggle (possibly in error): (menu-bar-mode nil) I've verified this bug with when invoked with -Q. In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1) of 2010-04-25 on fineline Windowing system distributor `The X.Org Foundation', version 11.0.10600000 configured using `configure '--prefix' '/usr/local/emacs/bzr-042510'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: global-semanticdb-minor-mode: t semantic-mode: t global-ede-mode: t shell-dirtrack-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-p M-f M-f M-f M-f M-b M-d - 1 C-x C-e C-e C-x C-e C-x C-e C-n M-b M-d - 1 C-e C-x C-e C-x C-e C-p C-n C-n C-n C-n M-f M-b M-d - n i l C-x C-s C-a C-n C-l C-p C-p C-p C-l C-n C-n C-p C-p M-f M-f M-f M-f M-b M-d - 1 C-f C-x C-e C-a C-n C-x C-s C-p C-p C-l C-x 1 C-n C-k C-x C-o C-x C-s C-p C-p C-p C-p C-p C-p C-n M-f M-f M-f C-f C-k C-a C-n C-x C-s C-p C-p C-SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n M-w C-p C-e C-x C-e C-p C-p C-p C-p C-e C-b C-n C-e C-b C-n C-n C-n C-x C-e C-p C-p C-p C-p M-b C-e C-b SPC - 1 C-e C-x C-e C-n C-n C-n C-n C-n C-p C-x C-e C-p C-p C-p C-p C-e SPC ; ; SPC T O D O S-SPC b u g : SPC w o n ' t SPC t o g g l e C-x C-s C-a C-k C-y C-x C-s C-n M-x e m a v c s SPC v e r SPC M-x b u g SPC e m SPC e m a SPC b u SPC b u g SPC SPC SPC C-g C-x C-g M-h i C-a C-n C-x b M-x a p r SPC b u g C-x o C-n C-s r e p o r t C-s C-s C-s C-s C-s C-a C-SPC C-e M-w C-x C-p M-x C-y Recent messages: Saving file /home/doom/lib/emacs/Dots/emacs-setup.el... Wrote /home/doom/lib/emacs/Dots/emacs-setup.el Mark set Saving file /home/doom/lib/emacs/Dots/emacs-setup.el... Wrote /home/doom/lib/emacs/Dots/emacs-setup.el GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1) of 2010-04-25 on fineline Making completion list... Quit Mark saved where search started Mark set Load-path shadows: /home/doom/End/Cave/DesktopAutosave/lib/emacs/desktop-recover-setup hides /home/doom/lib/emacs/Dots/desktop-recover-setup /home/doom/End/Cave/DiredExternalApps/lib/emacs/image-dired hides /home/doom/lib/emacs/image-dired /home/doom/End/Cave/DiredExternalApps/lib/emacs/dired-external-apps hides /home/doom/lib/emacs/dired-external-apps /home/doom/lib/emacs/Dots/setup-colors-dark hides /home/doom/lib/emacs/setup-colors-dark /home/doom/End/Cave/DiredExternalApps/lib/emacs/image-dired hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/image-dired /home/doom/lib/emacs/Dots/strokes hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/strokes /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-thread hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-thread /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-funcs hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-funcs /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-alias hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-alias /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-letter hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-letter /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-buffers hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-buffers /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-print hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-print /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-mime hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-mime /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-xface hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-xface /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-junk hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-junk /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-identity hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-identity /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-tool-bar hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-tool-bar /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-gnus hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-gnus /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-limit hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-limit /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-scan hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-scan /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-loaddefs hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-loaddefs /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-show hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-show /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-folder hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-folder /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-search hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-search /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-seq hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-seq /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-e hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-e /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-comp hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-comp /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-compat hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-compat /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-utils hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-utils /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-inc hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-inc /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-speed hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-speed /usr/local/emacs/cvs-040510/share/emacs/23.1.90/lisp/mh-e/mh-acros hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/mh-e/mh-acros /home/doom/lib/emacs/Dots/gnus-setup hides /usr/local/emacs/bzr-042510/share/emacs/24.0.50/lisp/gnus/gnus-setup Features: (shadow sort mail-extr message rfc822 mail-utils gmm-utils mailheader warnings emacsbug apropos pp help-mode view grep mule-util sql inversion semantic/db-file cedet-files semantic/bovine/c semantic/decorate/include semantic/db-find semantic/db-ref semantic/decorate/mode semantic/decorate pulse semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn nroff-mode ede/dired vc-git vc-bzr sha1 hex-util html-mode jsp-html-helper-mode asp-html-helper-mode php-html-helper-mode html-helper-mode tempo cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode sh-script executable info flymake compile vc-rcs multi-isearch thingatpt desktop desktop-recover desktop-recover-setup doom-fineline ansi-color registers-defined image-mode junk-dired junk-setup datestamps live-dangerously strokes macroman doom-filters find_and_replace doom-mh mh-comp sendmail mh-scan mh-gnus mml mml-sec mm-view smime password-cache dig mailcap mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr gnus-util mh-e mh-compat mailabbrev mh-acros mh-buffers mh-loaddefs mhe-setup fugly-keystroke-macros dired-imagery-doomery-keystroke-macros image-dired thinknow picture doomfile doomfiles-hacking-setup caving-setup w3m-load html-setup perlnow-x perlnow template perlnow-setup sepia sepia-cpan sepia-ido ido sepia-tree tree-widget sepia-w3m w3m-perldoc w3m browse-url timezone w3m-hist w3m-e22 w3m-ccl ccl w3m-fsf w3m-favicon w3m-image w3m-proc w3m-util gud easy-mmode cperl-mode sepia-setup semantic/db-mode semantic/db semantic/idle semantic/format semantic/tag-ls semantic/ctxt semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local ede/linux ede/emacs ede/cpp-root ede/speedbar ede/files ede ede/source eieio-base eieio-speedbar speedbar sb-image ezimage dframe easymenu assoc eieio-custom wid-edit eieio cedet apache-dev perl-setup elisp-hacking-setup doom-print printer-setup shell-setup perlups derived byte-opt bytecomp byte-compile jka-compr find-func timeclock-x timeclock timeclock-setup shell comint ring dired-external-apps dired-setup save-to-registers basic-keymap-changes paracide redroot simple-color-change setup-colors-dark man-apropos edmacro kmacro zoom-frm frame-cmds frame-fns avoid zoom-frm-setup text-setup dired-x dired-aux dired regexp-opt paren uniquify advice help-fns advice-preload server time emacs-setup cl cl-19 load-path-setup tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Joseph Brenner Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127228932830795 (code B ref 6037); Mon, 26 Apr 2010 13:43:02 +0000 Received: (at 6037) by debbugs.gnu.org; 26 Apr 2010 13:42:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6OZb-00080e-Ph for submit@debbugs.gnu.org; Mon, 26 Apr 2010 09:42:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6OZa-00080G-8y for 6037@debbugs.gnu.org; Mon, 26 Apr 2010 09:42:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAH811UvO+KoL/2dsb2JhbACcOnLAL4UMBIwNgws X-IronPort-AV: E=Sophos;i="4.52,273,1270440000"; d="scan'208";a="62500942" Received: from 206-248-170-11.dsl.teksavvy.com (HELO ceviche.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 26 Apr 2010 09:42:00 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8E09D660DC; Mon, 26 Apr 2010 09:42:00 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> Date: Mon, 26 Apr 2010 09:42:00 -0400 In-Reply-To: <87r5m2vf28.fsf@kzsu.stanford.edu> (Joseph Brenner's message of "Mon, 26 Apr 2010 00:38:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > The menu-bar-mode function is not working as a toggle. See etc/NEWS. If you really want to toggle (I've never seen such a case from Elisp), just do (menu-bar-mode 'toggle). > Note that running scroll-bar-mode repeatedly does work as a toggle, as > expected for menu-bar-mode: > (scroll-bar-mode) Yes, that's a bug that I hope to fix before Emacs-24. I.e. better not rely on it. Stefan From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 6037@debbugs.gnu.org, Joseph Brenner Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127229122431713 (code B ref 6037); Mon, 26 Apr 2010 14:14:02 +0000 Received: (at 6037) by debbugs.gnu.org; 26 Apr 2010 14:13:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6P4C-0008FS-1D for submit@debbugs.gnu.org; Mon, 26 Apr 2010 10:13:44 -0400 Received: from mail-bw0-f214.google.com ([209.85.218.214]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6P49-0008FL-Q8 for 6037@debbugs.gnu.org; Mon, 26 Apr 2010 10:13:42 -0400 Received: by bwz6 with SMTP id 6so1295987bwz.39 for <6037@debbugs.gnu.org>; Mon, 26 Apr 2010 07:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=KDihxm6ru5xCUv1Fzc4XjWlRndlyNGEsCXGy7zQlMF4=; b=AMgt4a5gTla3VjCA61stzqhj7onvVZ3SqCbE1gcJHfyUTmv0LSqbOv8ds+N5PLeSM2 55mlpXTCzZHhzG8WRcGYO+WtgnZ8gylFbj8KMblovUhPYzD4vQR19OIKRsnpM2wDmFDt dsHVTeRFU9VN1qyvl+ldCIFFxzOndHanbfFhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=UANzt18+5g7ys4ShPc2mbRWB5bzq7CQjPS5UYyusutJ23rNGmblq2sOolfo55V1J20 cLTFH97Gsulus/zft1A3whjYkhqtbcDvsA6dsKmY146vXNU4jRzqJ2ttSkwOogd391hr jQ3t2ZVuGY9WkyD3oKlboFCeVSpCXrt8XkwmI= Received: by 10.239.190.145 with SMTP id x17mr383835hbh.201.1272291216109; Mon, 26 Apr 2010 07:13:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.164.81 with HTTP; Mon, 26 Apr 2010 07:13:16 -0700 (PDT) In-Reply-To: References: <87r5m2vf28.fsf@kzsu.stanford.edu> From: Lennart Borgman Date: Mon, 26 Apr 2010 16:13:16 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Mon, Apr 26, 2010 at 3:42 PM, Stefan Monnier wrote: >> The menu-bar-mode function is not working as a toggle. > > See etc/NEWS. > If you really want to toggle (I've never seen such a case from Elisp), > just do (menu-bar-mode 'toggle). Aren't they common in menus? From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lennart Borgman Cc: 6037@debbugs.gnu.org, Joseph Brenner Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.12723035487340 (code B ref 6037); Mon, 26 Apr 2010 17:40:02 +0000 Received: (at 6037) by debbugs.gnu.org; 26 Apr 2010 17:39:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6SGx-0001uL-U6 for submit@debbugs.gnu.org; Mon, 26 Apr 2010 13:39:08 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6SGv-0001tz-4B for 6037@debbugs.gnu.org; Mon, 26 Apr 2010 13:39:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJJs1UvO+KoL/2dsb2JhbACcPnLDZIULBIwN X-IronPort-AV: E=Sophos;i="4.52,274,1270440000"; d="scan'208";a="62525527" Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 26 Apr 2010 13:39:00 -0400 Received: by pastel.home (Postfix, from userid 20848) id D0F7B7F22; Mon, 26 Apr 2010 13:38:59 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> Date: Mon, 26 Apr 2010 13:38:59 -0400 In-Reply-To: (Lennart Borgman's message of "Mon, 26 Apr 2010 16:13:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) >>> The menu-bar-mode function is not working as a toggle. >> See etc/NEWS. >> If you really want to toggle (I've never seen such a case from Elisp), >> just do (menu-bar-mode 'toggle). > Aren't they common in menus? In that case, they're not called from Elisp, AFAIK. I.e. it will go through the `interactive' spec which will provide the `toggle' arg. Stefan From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Joe Brenner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Apr 2010 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.12723045757938 (code B ref 6037); Mon, 26 Apr 2010 17:57:02 +0000 Received: (at 6037) by debbugs.gnu.org; 26 Apr 2010 17:56:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6SXW-00023z-RD for submit@debbugs.gnu.org; Mon, 26 Apr 2010 13:56:15 -0400 Received: from smtp2.stanford.edu ([171.67.219.82] helo=smtp.stanford.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6SJG-0001vo-GW for 6037@debbugs.gnu.org; Mon, 26 Apr 2010 13:41:31 -0400 Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 8FC96170BD9; Mon, 26 Apr 2010 10:41:25 -0700 (PDT) Received: from kzsu.stanford.edu (KZSU.Stanford.EDU [171.66.118.90]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id DD4921707DF; Mon, 26 Apr 2010 10:41:24 -0700 (PDT) Received: from kzsu.stanford.edu (localhost.stanford.edu [127.0.0.1]) by kzsu.stanford.edu (8.13.4/8.13.7) with ESMTP id o3QHfJq8040081; Mon, 26 Apr 2010 10:41:24 -0700 (PDT) (envelope-from doom@kzsu.stanford.edu) Message-Id: <201004261741.o3QHfJq8040081@kzsu.stanford.edu> In-reply-to: References: <87r5m2vf28.fsf@kzsu.stanford.edu> Comments: In-reply-to Stefan Monnier message dated "Mon, 26 Apr 2010 09:42:00 -0400." X-Mailer: MH-E 8.1; nmh 1.2; GNU Emacs 23.1.50 Date: Mon, 26 Apr 2010 10:41:19 -0700 From: Joe Brenner X-Scanned-By: MIMEDefang 2.56 on 171.66.118.47 X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (kzsu.stanford.edu [127.0.0.1]); Mon, 26 Apr 2010 10:41:24 -0700 (PDT) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Mon, 26 Apr 2010 13:56:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Stefan Monnier wrote: > > The menu-bar-mode function is not working as a toggle. > > See etc/NEWS. So I gather you're referring to this: * Incompatible Lisp Changes in Emacs 24.1 ** Test for special mode-class was moved from view-file to view-buffer. ** Passing a nil argument to a minor mode function now turns the mode ON unconditionally. You're of the opinion that using "nil" to turn on a minor-mode is actually correct behavior? And the important justification for breaking long-standing behavior was... ? > If you really want to toggle (I've never seen such a case from Elisp), > just do (menu-bar-mode 'toggle). Okay, thanks for the hint. Is that documented anywhere? If you'd like a use-case in elisp, I've been doing this in some form of or another for quite some time: ;------------ ; luddite mode (tool-bar-mode -1) (global-set-key [f12] '(lambda () (interactive) (menu-bar-mode -1) (scroll-bar-mode) (setq use-dialog-box nil) )) > > Note that running scroll-bar-mode repeatedly does work as a toggle, as > > expected for menu-bar-mode: > > (scroll-bar-mode) > > Yes, that's a bug that I hope to fix before Emacs-24. > I.e. better not rely on it. Allow me to quote the documentation for menu-bar-mode: "Toggle display of a menu bar on each frame." And again for scroll-bar-mode: "Toggle display of vertical scroll bars on all frames." From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2010 03:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Joe Brenner Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127233752524604 (code B ref 6037); Tue, 27 Apr 2010 03:06:01 +0000 Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 03:05:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6b6y-0006On-AO for submit@debbugs.gnu.org; Mon, 26 Apr 2010 23:05:24 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6b6w-0006Oi-QI for 6037@debbugs.gnu.org; Mon, 26 Apr 2010 23:05:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAP7w1UvO+KoL/2dsb2JhbACcRXK/CoULBINWiDeDCw X-IronPort-AV: E=Sophos;i="4.52,277,1270440000"; d="scan'208";a="62654801" Received: from 206-248-170-11.dsl.teksavvy.com (HELO ceviche.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 26 Apr 2010 23:05:18 -0400 Received: by ceviche.home (Postfix, from userid 20848) id BBC18660DC; Mon, 26 Apr 2010 23:05:18 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> Date: Mon, 26 Apr 2010 23:05:18 -0400 In-Reply-To: <201004261741.o3QHfJq8040081@kzsu.stanford.edu> (Joe Brenner's message of "Mon, 26 Apr 2010 10:41:19 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > You're of the opinion that using "nil" to turn on a minor-mode is actually > correct behavior? Yes. > And the important justification for breaking long-standing behavior > was... ? It fixes a lot of (add-hook 'foo-mode 'toto-minor-mode) where the coder assumed unconsciously that toto-minor-mode was not yet enabled. >> If you really want to toggle (I've never seen such a case from Elisp), >> just do (menu-bar-mode 'toggle). > Okay, thanks for the hint. Is that documented anywhere? Not yet. > If you'd like a use-case in elisp, I've been doing this in some form > of or another for quite some time: > ;------------ > ; luddite mode > (tool-bar-mode -1) > (global-set-key [f12] '(lambda () > (interactive) > (menu-bar-mode -1) > (scroll-bar-mode) > (setq use-dialog-box nil) > )) I don't know what this is meant to do, so I don't see where you need the toggle behavior. Note that in Emacs-23, when calling a minor-mode with nil (or no) argument to turn it off, it usually outputted a warning (because practice showed that such calls are usually erroneous). > Allow me to quote the documentation for menu-bar-mode: > "Toggle display of a menu bar on each frame." > And again for scroll-bar-mode: > "Toggle display of vertical scroll bars on all frames." And indeed M-x menu-bar-mode toggles, just like M-x scroll-bar-mode. Only the non-interactive calls are affected. Stefan From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Joe Brenner Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2010 06:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127235035230375 (code B ref 6037); Tue, 27 Apr 2010 06:40:02 +0000 Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 06:39:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6eRr-0007ts-PF for submit@debbugs.gnu.org; Tue, 27 Apr 2010 02:39:11 -0400 Received: from smtp4.stanford.edu ([171.67.219.84] helo=smtp.stanford.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6eRp-0007tm-7E for 6037@debbugs.gnu.org; Tue, 27 Apr 2010 02:39:09 -0400 Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id BD9E7CD55; Mon, 26 Apr 2010 23:39:05 -0700 (PDT) Received: from kzsu.stanford.edu (KZSU.Stanford.EDU [171.66.118.90]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id 404D8CD05; Mon, 26 Apr 2010 23:39:05 -0700 (PDT) Received: from kzsu.stanford.edu (localhost.stanford.edu [127.0.0.1]) by kzsu.stanford.edu (8.13.4/8.13.7) with ESMTP id o3R6cx2S051311; Mon, 26 Apr 2010 23:39:04 -0700 (PDT) (envelope-from doom@kzsu.stanford.edu) Message-Id: <201004270639.o3R6cx2S051311@kzsu.stanford.edu> In-reply-to: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> Comments: In-reply-to Stefan Monnier message dated "Mon, 26 Apr 2010 23:05:18 -0400." X-Mailer: MH-E 8.2; nmh 1.2; GNU Emacs 24.0.50 Date: Mon, 26 Apr 2010 23:38:59 -0700 From: Joe Brenner X-Scanned-By: MIMEDefang 2.56 on 171.66.118.47 X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (kzsu.stanford.edu [127.0.0.1]); Mon, 26 Apr 2010 23:39:05 -0700 (PDT) X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Stefan Monnier wrote: > > If you'd like a use-case in elisp, I've been doing this in some form > > of or another for quite some time: > > > ;------------ > > ; luddite mode > > (tool-bar-mode -1) > > (global-set-key [f12] '(lambda () > > (interactive) > > (menu-bar-mode -1) > > (scroll-bar-mode) > > (setq use-dialog-box nil) > > )) > > I don't know what this is meant to do, so I don't see where you need the > toggle behavior. Well the ideal is that hitting f12 should enable or disable the various gui features that I typically don't care about such as the menu-bar and so on. Admittedly, the above code is a hack in an inbetween state. Currently I have it revised like so: ;------------ ; luddite mode (tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1) (setq use-dialog-box nil) ; toggles luddite mode (global-set-key [f12] '(lambda () (interactive) (menu-bar-mode 'toggle) (scroll-bar-mode 'toggle) (doom-toggle-use-dialog-box) )) (defun doom-toggle-use-dialog-box () "Toggle the use-dialog-box setting" (interactive) (setq use-dialog-box (cond (use-dialog-box nil) (t nil) ))) > Note that in Emacs-23, when calling a minor-mode with nil (or no) > argument to turn it off, it usually outputted a warning (because > practice showed that such calls are usually erroneous). I've never noticed this with (menu-bar-mode) or (scroll-bar-mode). > > Allow me to quote the documentation for menu-bar-mode: > > "Toggle display of a menu bar on each frame." > > And again for scroll-bar-mode: > > "Toggle display of vertical scroll bars on all frames." > > And indeed M-x menu-bar-mode toggles, just like M-x scroll-bar-mode. > Only the non-interactive calls are affected. And indeed, that difference is (a) not documented and (b) not the way it used to behave. But hey, what do I know, I'm only a mere user, I should know better than to argue with our glorious masters. It's no doubt very silly of me to think that the code inferace for emacs might've settled down around version 23. From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2010 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Joe Brenner Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127237576827564 (code B ref 6037); Tue, 27 Apr 2010 13:43:02 +0000 Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 13:42:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6l3o-0007AX-5A for submit@debbugs.gnu.org; Tue, 27 Apr 2010 09:42:48 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6l3l-0007AR-7E for 6037@debbugs.gnu.org; Tue, 27 Apr 2010 09:42:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAP6G1kvO+KoL/2dsb2JhbACcTHLAXoUOBIwPgww X-IronPort-AV: E=Sophos;i="4.52,280,1270440000"; d="scan'208";a="62676260" Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 27 Apr 2010 09:42:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9C4C37F22; Tue, 27 Apr 2010 09:42:39 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> <201004270639.o3R6cx2S051311@kzsu.stanford.edu> Date: Tue, 27 Apr 2010 09:42:39 -0400 In-Reply-To: <201004270639.o3R6cx2S051311@kzsu.stanford.edu> (Joe Brenner's message of "Mon, 26 Apr 2010 23:38:59 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Well the ideal is that hitting f12 should enable or disable the various > gui features that I typically don't care about such as the menu-bar and > so on. Admittedly, the above code is a hack in an inbetween state. > Currently I have it revised like so: > (global-set-key [f12] '(lambda () > (interactive) > (menu-bar-mode 'toggle) > (scroll-bar-mode 'toggle) > (doom-toggle-use-dialog-box) > )) That makes sense. But then I'd recommend the code below instead: > (global-set-key [f12] (lambda () > (interactive) > (call-interactively 'menu-bar-mode) > (call-interactively 'scroll-bar-mode) > (doom-toggle-use-dialog-box))) which will have the following impact: - it will tell customize about those changes (so "M-x customize-variable RET menu-bar-mode" will not complain about a variable set from outside, and it will let you save the current state. - You should be able to do C-u -1 f12 to forcibly turn off and C-u 1 f12 to forcibly turn on those GUI elements. - You'll get a minibuffer messages about the menu-bar-mode being enabled/disabled. - It will work across "all" Emacs versions (the above code will already work with emacs-2[234] and I'm not sure which other versions have menu-bar-mode and scroll-bar-mode, so maybe it's not that big a difference). Stefan From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2010 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Stefan Monnier'" , "'Joe Brenner'" Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.127238204830883 (code B ref 6037); Tue, 27 Apr 2010 15:28:01 +0000 Received: (at 6037) by debbugs.gnu.org; 27 Apr 2010 15:27:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6mh6-000824-2a for submit@debbugs.gnu.org; Tue, 27 Apr 2010 11:27:28 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6mh4-00081x-1O for 6037@debbugs.gnu.org; Tue, 27 Apr 2010 11:27:26 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3RFRJBo013207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Apr 2010 15:27:20 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3RAaviB026592; Tue, 27 Apr 2010 15:27:18 GMT Received: from abhmt006.oracle.com by acsmt354.oracle.com with ESMTP id 213368141272382029; Tue, 27 Apr 2010 08:27:09 -0700 Received: from dradamslap1 (/141.144.72.34) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 27 Apr 2010 08:27:08 -0700 From: "Drew Adams" References: <87r5m2vf28.fsf@kzsu.stanford.edu><201004261741.o3QHfJq8040081@kzsu.stanford.edu><201004270639.o3R6cx2S051311@kzsu.stanford.edu> Date: Tue, 27 Apr 2010 08:27:06 -0700 Message-ID: <578D02D39BE3447B8BBDD6C2B01E8D67@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrmFg3hKWdvADdeSA6Ss1ZKRRIxbQAB6wiQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090205.4BD70258.01B4:SCFMA4539811,ss=1,fgs=0 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) > > (global-set-key [f12] '(lambda () > > (interactive) > > (menu-bar-mode 'toggle) > > (scroll-bar-mode 'toggle) > > (doom-toggle-use-dialog-box) > > )) > > That makes sense. But then I'd recommend the code below instead: > > > (global-set-key [f12] (lambda () > > (interactive) > > (call-interactively 'menu-bar-mode) > > (call-interactively 'scroll-bar-mode) > > (doom-toggle-use-dialog-box))) > > which will have the following impact: > - it will tell customize about those changes (so "M-x > customize-variable > RET menu-bar-mode" will not complain about a variable set from > outside, and it will let you save the current state. > - You should be able to do C-u -1 f12 to forcibly turn off > and C-u 1 f12 to forcibly turn on those GUI elements. > - You'll get a minibuffer messages about the menu-bar-mode being > enabled/disabled. > - It will work across "all" Emacs versions (the above code > will already > work with emacs-2[234] and I'm not sure which other versions have > menu-bar-mode and scroll-bar-mode, so maybe it's not that big > a difference). This is the kind of thing that should be added to the doc. Many users will make use of something like this in their init files. They need to be aware of pretty much all of the things you point out. From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Apr 2010 05:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.127243337130193 (code B ref -1); Wed, 28 Apr 2010 05:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Apr 2010 05:42:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O702s-0007qw-Eu for submit@debbugs.gnu.org; Wed, 28 Apr 2010 01:42:50 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O702l-0007qq-9a for submit@debbugs.gnu.org; Wed, 28 Apr 2010 01:42:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:37795) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O702c-0000or-KN for submit@debbugs.gnu.org; Wed, 28 Apr 2010 01:42:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O702b-0004GM-FI for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 01:42:33 -0400 Received: from [140.186.70.92] (port=45034 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O702Y-0004En-BG for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 01:42:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O702U-000468-RH for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 01:42:28 -0400 Received: from lo.gmane.org ([80.91.229.12]:48860) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O702U-00045j-Dm for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 01:42:26 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O702O-0002Lk-Us for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 07:42:20 +0200 Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Apr 2010 07:42:20 +0200 Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Apr 2010 07:42:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory From: Kevin Rodgers Date: Tue, 27 Apr 2010 23:42:23 -0600 Lines: 51 Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> <201004270639.o3R6cx2S051311@kzsu.stanford.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.8 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Stefan Monnier wrote: >> Well the ideal is that hitting f12 should enable or disable the various >> gui features that I typically don't care about such as the menu-bar and >> so on. Admittedly, the above code is a hack in an inbetween state. >> Currently I have it revised like so: > >> (global-set-key [f12] '(lambda () >> (interactive) >> (menu-bar-mode 'toggle) >> (scroll-bar-mode 'toggle) >> (doom-toggle-use-dialog-box) >> )) > > That makes sense. But then I'd recommend the code below instead: > >> (global-set-key [f12] (lambda () >> (interactive) >> (call-interactively 'menu-bar-mode) >> (call-interactively 'scroll-bar-mode) >> (doom-toggle-use-dialog-box))) > > which will have the following impact: > - it will tell customize about those changes (so "M-x customize-variable > RET menu-bar-mode" will not complain about a variable set from > outside, and it will let you save the current state. Really? What is the connection between call-interactively and customize? > - You should be able to do C-u -1 f12 to forcibly turn off > and C-u 1 f12 to forcibly turn on those GUI elements. Really? In the past I've had to bind prefix-arg to the value of current-prefix-arg around call-interactively, to get the "interior" command to inherit the prefix arg of the exterior command. > - You'll get a minibuffer messages about the menu-bar-mode being > enabled/disabled. Why doesn't scroll-bar-mode display the same messages? > - It will work across "all" Emacs versions (the above code will already > work with emacs-2[234] and I'm not sure which other versions have > menu-bar-mode and scroll-bar-mode, so maybe it's not that big > a difference). (FOO-bar-mode nil) should also toggle across those versions (and older versions) -- but does it? -- Kevin Rodgers Denver, Colorado, USA From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Apr 2010 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kevin Rodgers Cc: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.127246581216637 (code B ref -1); Wed, 28 Apr 2010 14:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Apr 2010 14:43:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O78U7-0004KI-Vf for submit@debbugs.gnu.org; Wed, 28 Apr 2010 10:43:32 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O78U5-0004KC-9z for submit@debbugs.gnu.org; Wed, 28 Apr 2010 10:43:30 -0400 Received: from lists.gnu.org ([199.232.76.165]:46952) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O78U2-0006sT-UG for submit@debbugs.gnu.org; Wed, 28 Apr 2010 10:43:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O78U2-0005vN-F3 for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 10:43:26 -0400 Received: from [140.186.70.92] (port=45876 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O78Ty-0005ua-UV for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 10:43:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O78Tx-0002rV-DS for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 10:43:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12096 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O78Tx-0002rN-9U for bug-gnu-emacs@gnu.org; Wed, 28 Apr 2010 10:43:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAI/m10vO+KoL/2dsb2JhbACcbnK9O4UOBIwT X-IronPort-AV: E=Sophos;i="4.52,288,1270440000"; d="scan'208";a="62759202" Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 28 Apr 2010 10:43:20 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9E3917F51; Wed, 28 Apr 2010 10:43:20 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> <201004261741.o3QHfJq8040081@kzsu.stanford.edu> <201004270639.o3R6cx2S051311@kzsu.stanford.edu> Date: Wed, 28 Apr 2010 10:43:20 -0400 In-Reply-To: (Kevin Rodgers's message of "Tue, 27 Apr 2010 23:42:23 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) >> - it will tell customize about those changes (so "M-x customize-variable >> RET menu-bar-mode" will not complain about a variable set from >> outside, and it will let you save the current state. > Really? What is the connection between call-interactively and customize? No direct connect, but minor modes defined with define-minor-mode will check if they're called via call-interactively to decide whether to tell customize about the change (if not called interactively, there's no way for Customize to know whether the change could interfere with Customize or not). >> - You should be able to do C-u -1 f12 to forcibly turn off >> and C-u 1 f12 to forcibly turn on those GUI elements. > Really? In the past I've had to bind prefix-arg to the value of > current-prefix-arg around call-interactively, to get the "interior" > command to inherit the prefix arg of the exterior command. Hmm... you might be right. >> - You'll get a minibuffer messages about the menu-bar-mode being >> enabled/disabled. > Why doesn't scroll-bar-mode display the same messages? Because there's only one minibuffer, so you only see one of the messages. In this case it happens to be the first rather than the second. >> - It will work across "all" Emacs versions (the above code will already >> work with emacs-2[234] and I'm not sure which other versions have >> menu-bar-mode and scroll-bar-mode, so maybe it's not that big >> a difference). > (FOO-bar-mode nil) should also toggle across those versions (and older > versions) No, for Emacs-24 it will not toggle. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 15:41:48 2011 Received: (at control) by debbugs.gnu.org; 21 Sep 2011 19:41:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Sfz-0002Ki-P0 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 15:41:48 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Sfw-0002KZ-5u for control@debbugs.gnu.org; Wed, 21 Sep 2011 15:41:45 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R6SfY-0004Xz-OI for control@debbugs.gnu.org; Wed, 21 Sep 2011 21:41:20 +0200 Date: Wed, 21 Sep 2011 21:37:54 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #6037 X-MailScanner-ID: 1R6SfY-0004Xz-OI X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1317238881.04054@MEhs3PJFi3d8EZGb42qh5A X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 6037 notabug close 6037 From unknown Fri Aug 15 19:26:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6037: 24.0.50; menu-bar-mode function doesn't toggle Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Sep 2011 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Joseph Brenner Cc: 6037@debbugs.gnu.org Received: via spool by 6037-submit@debbugs.gnu.org id=B6037.13166342919306 (code B ref 6037); Wed, 21 Sep 2011 19:45:02 +0000 Received: (at 6037) by debbugs.gnu.org; 21 Sep 2011 19:44:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Siv-0002Pv-9A for submit@debbugs.gnu.org; Wed, 21 Sep 2011 15:44:51 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Sir-0002Pm-9L for 6037@debbugs.gnu.org; Wed, 21 Sep 2011 15:44:47 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R6SiU-0004cM-DK; Wed, 21 Sep 2011 21:44:22 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <87r5m2vf28.fsf@kzsu.stanford.edu> (Joseph Brenner's message of "Mon, 26 Apr 2010 00:38:39 -0700") Date: Wed, 21 Sep 2011 21:37:51 +0200 Message-ID: References: <87r5m2vf28.fsf@kzsu.stanford.edu> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Colder's _Heat_: "Losing Myself" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R6SiU-0004cM-DK X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1317239062.47704@4kBybxQYaaZKSYEfHETWAw X-Spam-Status: No X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Joseph Brenner writes: > The menu-bar-mode function is not working as a toggle. > Running this will turn on the menu bar, but running it again > will not turn it off: > > (menu-bar-mode) > > This does work to turn it off: > (menu-bar-mode -1) > > This turns it on, as documented: > (menu-bar-mode 1) > > Note that running scroll-bar-mode repeatedly does work as a toggle, as > expected for menu-bar-mode: > > (scroll-bar-mode) > > I used to use this code, and it *did* work as a toggle (possibly in error): > > (menu-bar-mode nil) > > I've verified this bug with when invoked with -Q. This seems to be intended behaviour and isn't a bug, so I'm closing this report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/