emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

menu-bar-open issues


From: Thierry Volpiatto
Subject: menu-bar-open issues
Date: Sat, 12 Nov 2011 18:34:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux)

Hi,
I had an error while hitting <f10> (menu-bar-open).
I do not use menu-bar.

I cannot reproduce this error now, i guess the error came from
`tmm-add-prompt', when it set completions with:

(mapcar 'car minibuffer-completion-table)

which works as long as `minibuffer-completion-table' is nil, but if it had
been set for some reasons, it becomes a closure and `car' return an error.
It seem that something like

(all-completions "" minibuffer-completion-table)

would be better.
 
Also,
it seem that when we disable menu-bar via:

--8<---------------cut here---------------start------------->8---
(setq default-frame-alist '((vertical-scroll-bars . nil)
                            (tool-bar-lines . 0)
                            (menu-bar-lines . 0)))
--8<---------------cut here---------------end--------------->8---

emacs leave menu-bar-mode to t, so when hitting f10, it do not find the
menu-bar and do nothing.
Once menu-bar-mode is set to nil it works.
So maybe menu-bar-open should check also the value of

(assoc-default 'menu-bar-lines default-frame-alist)

e.g

--8<---------------cut here---------------start------------->8---
(defun x-menu-bar-open (&optional frame)
  "Open the menu bar if `menu-bar-mode' is on, otherwise call `tmm-menubar'."
  (interactive "i")
  (if (and (or menu-bar-mode
               (not (zerop (assoc-default 'menu-bar-lines
                                          default-frame-alist))))
           (fboundp 'accelerate-menu))
      (accelerate-menu frame)
    (tmm-menubar)))
--8<---------------cut here---------------end--------------->8---



-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]