all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 23918@debbugs.gnu.org
Subject: bug#23918: 25.1.50; Menu bar breakage
Date: Fri, 08 Jul 2016 16:20:23 +0200	[thread overview]
Message-ID: <87oa68mct4.fsf@gmx.net> (raw)

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@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 ()





             reply	other threads:[~2016-07-08 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 14:20 Stephen Berman [this message]
2016-07-08 14:59 ` bug#23918: 25.1.50; Menu bar breakage martin rudalics
2016-07-08 15:23   ` Stephen Berman
2016-07-08 15:44     ` martin rudalics
2016-07-08 17:58       ` Dmitry Antipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oa68mct4.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=23918@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.