GNU bug report logs - #23918
25.1.50; Menu bar breakage

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Fri, 8 Jul 2016 14:21:02 UTC

Severity: normal

Found in version 25.1.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; Menu bar breakage
Date: Fri, 08 Jul 2016 16:20:23 +0200
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 <dmantipov <at> yandex.ru>
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 ()




This bug report was last modified 8 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.