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#23918: 25.1.50; Menu bar breakage Date: Fri, 08 Jul 2016 16:20:23 +0200 Message-ID: <87oa68mct4.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467987730 12379 80.91.229.3 (8 Jul 2016 14:22:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 14:22:10 +0000 (UTC) To: 23918@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 16:21:58 2016 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 1bLWfF-0001zy-Do for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 16:21:57 +0200 Original-Received: from localhost ([::1]:45908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWfE-00026S-MC for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jul 2016 10:21:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWeS-0001ft-Pq for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:21:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLWeM-0001Qp-Ny for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:21:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWeM-0001Ql-KT for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLWeM-00032a-D2 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:21: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: Fri, 08 Jul 2016 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23918 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146798764211638 (code B ref -1); Fri, 08 Jul 2016 14:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jul 2016 14:20:42 +0000 Original-Received: from localhost ([127.0.0.1]:42805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWe2-00031e-7b for submit@debbugs.gnu.org; Fri, 08 Jul 2016 10:20:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWdz-00031R-Pj for submit@debbugs.gnu.org; Fri, 08 Jul 2016 10:20:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLWdt-0001HV-MU for submit@debbugs.gnu.org; Fri, 08 Jul 2016 10:20:34 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWdt-0001H5-66 for submit@debbugs.gnu.org; Fri, 08 Jul 2016 10:20:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWdr-0008RM-1Q for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:20:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLWdm-0001EQ-00 for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:20:30 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:54905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLWdl-0001E9-Mw for bug-gnu-emacs@gnu.org; Fri, 08 Jul 2016 10:20:25 -0400 Original-Received: from rosalinde ([89.245.89.198]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MTwYX-1aut6P1LGr-00QgrF for ; Fri, 08 Jul 2016 16:20:24 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:PxrTz2irsOVkE6rpoBDtotqFMOSeFSacqnsMXnjk89J67+Rt486 FW4M3XE42w+X9hZ60cuRsiG/SoLXS/8IYBsL23EICWZ6pdcGA+k1v75tfGup78TzOjSJOmj iGXwIKXuX2pxUjm/0WQIStWaOOIvwALYtm9ZcPsGxgvCTkBP2artHyx8MxO6hVf8MAO6PTg 4Nv9FZJV2lql9yOHlim/w== X-UI-Out-Filterresults: notjunk:1;V01:K0:76MYe1K6jAM=:JjwqsPs62WcRiY5pfTm17i akoj6M3NqCYDjoJWzSU6suocXsBik6Ffk9ksLliDXBka1BQZV5QmKrpxKaGvf/SdMbRfXH3WI 5CR7+Qdtl5soAlecjX0xyq6J7sa24msMYpSbt1zaNGTG+PDDr+WjfzEVXmeh8C8wRcmvCDeXL 0t6yZ79IsinrYtu1lwYjdbxVSfRfl5pbxLERXjqxrwMw1IAX1VrqumMr/t8we+OWGZIajXKU+ 0FcfwG56+ELUDOggBCM9mGZaAMBj1tLk2kqO6VKPhlt7wvM1GlfAOhGPMb+2sIaLcX0uwyyEw HHdYexiMvnl3bOuxYhrbAcgjJswlJEzIsfYOcTT1hna3+lr2YO1HnFWiNK8v/p1lndudfDtCM rsOa4aWmlL+Fi2xDgX5x6qDT70hu47huxe8nWnVIXBm+4He7tJlCwIos4VS8Q4eYlj/xPCSl4 dbdd1cKEtQFKRyZhb1/8LJHJzmqOpDxccdyORae5sx3ifkOdTJ3ZC9R8c55CQyv3K2GjD5DU0 oAOBJl3DA8yffQ5MW47wHNv4WZ4+18TbElwF51cVrOBhWOirVKTxB8N+hF3bVgOEAVAEPBbnK utwqh68V+MpjhIjzxfqMg1UmXSS9H5NPdPiZFTGcu2SM4JNn+qZKaIHbI6tva94knwIaJ2XT1 yuVZOXN3IhHovF+izRi11QgAclw5weXt/hO+b9+jr1XaaCJqzot7EZlWbDCX4AU/I5fco6459 VmrO8bnomx9N1yUMUvDFTj2nKtGLjxrlXuMr8jfXQ9+c7913X4i3cWprqQvcRYr8Q6/3sPpu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:120629 Archived-At: 0. emacs -Q 1. Click on the Options menu and check "Error Debugger on Error". 2. Click on any item in the menu bar. => Debugger entered--Lisp error: (void-function nilp) (nilp vsb) This is due to this change: commit a7e302dc1dc18770aaf9eeedfd638f73b574bc19 Author: Dmitry Antipov Date: Tue Jul 5 08:33:29 2016 +0300 Prefer 'frame-parameter' where it is expected to be a bit faster * lisp/international/mule-diag.el (mule-diag): * lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu): * lisp/mouse.el (mouse-drag-line, font-menu-add-default): * lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar): * lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'. However, after fixing the typo (nilp -> not) and rebuilding emacs, executing the above recipe nows displays this error: Debugger entered--Lisp error: (void-variable vsb) (not vsb) The patch below fixes this (and the typo). In GNU Emacs 25.1.50.10 (x86_64-suse-linux-gnu, GTK+ Version 3.14.15) of 2016-07-08 built on rosalinde Repository revision: 56c8551219ecace0157ce813733adf8eecb38c32 Windowing system distributor 'The X.Org Foundation', version 11.0.11601000 System Description: openSUSE 13.2 (Harlequin) (x86_64) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index c4f094a..9f3156d 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -993,39 +993,39 @@ menu-bar-showhide-scroll-bar-menu (vsb (frame-parameter nil 'vertical-scroll-bars)) (hsb (frame-parameter nil 'horizontal-scroll-bars))) (bindings--define-key menu [horizontal] - '(menu-item "Horizontal" + `(menu-item "Horizontal" menu-bar-horizontal-scroll-bar :help "Horizontal scroll bar" :visible (horizontal-scroll-bars-available-p) - :button (:radio . hsb))) + :button (:radio . ,hsb))) (bindings--define-key menu [none-horizontal] - '(menu-item "None-horizontal" + `(menu-item "None-horizontal" menu-bar-no-horizontal-scroll-bar :help "Turn off horizontal scroll bars" :visible (horizontal-scroll-bars-available-p) - :button (:radio . (not hsb)))) + :button (:radio . (not ,hsb)))) (bindings--define-key menu [right] - '(menu-item "On the Right" + `(menu-item "On the Right" menu-bar-right-scroll-bar :help "Scroll-bar on the right side" :visible (display-graphic-p) - :button (:radio . (eq vsb 'right)))) + :button (:radio . (eq ,vsb 'right)))) (bindings--define-key menu [left] - '(menu-item "On the Left" + `(menu-item "On the Left" menu-bar-left-scroll-bar :help "Scroll-bar on the left side" :visible (display-graphic-p) - :button (:radio . (eq vsb 'left)))) + :button (:radio . (eq ,vsb 'left)))) (bindings--define-key menu [none] - '(menu-item "None" + `(menu-item "None" menu-bar-no-scroll-bar :help "Turn off scroll-bar" :visible (display-graphic-p) - :button (:radio . (nilp vsb)))) + :button (:radio . (not ,vsb)))) menu)) (defun menu-bar-frame-for-menubar ()