bug-gnu-emacs
[Top][All Lists]
Advanced

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

menus and --with-x-toolkit=none


From: Alex Schroeder
Subject: menus and --with-x-toolkit=none
Date: 22 Jun 2001 17:51:40 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

In GNU Emacs 20.7.2 (i686-pc-linux-gnu)
 of Fri Jun 22 2001 on snail
configured using `configure  --with-x-toolkit=no'

I noticed a lot of Emacs crashes when I switched to the Ion Window
Manager.  Ion doesn't really provide any "windows" with decorations.
All clients are maximised.  The applications are stacked behind each
other.  It is possible to split the screen and thus have several
stacks.

After talking to some other people that are playing around with Ion
and Emacs, I had the suspicion that the Toolkit might be at fault,
because Emacs wouldn't always fill all the space assigned to it by Ion
-- it used to be a few pixels at the top and at the bottom, for
example.  In my current setup (with the --with-x-toolkit=no option)
this no longer happens.  I assume that having no toolkit toolbar
allows Emacs to fill the space allotted to it more neatly in the
vertical direction.  (Emacs only likes frame sizes in multiples of the
font height + its menubar?)  In the vertical direction, Emacs still
doesn't fill the space optimally.  I can tell because the modeline
ends a few pixel before reaching the right border of the space alloted
to Emacs.

Therefore:

1. Is it possible that Emacs starts to react badly when the height and
   width of the Emacs frame are no longer multiples of its line
   height?

While I was playing around with Emacs without a toolkit, I wanted to
change the background color of the menus (currently, they are black on
white).

At first my .Xdefaults file only had this:

Emacs*Background:               #304020
Emacs*Foreground:               NavajoWhite

It worked fine with a toolkit but no longer affects the menus without
one.  Looking through some old mail archives, I decided to try the
following:

Emacs.pane.menubar.background:  red
Emacs.pane.menubar.foreground:  black

No effect.  Trying to check what resources are available for me (since
clearly the Background and Foreground options still work) using
editres didn't help.  Editres didn't recognize any resources in the
Emacs built without toolkit.

Therefore:

2. The resources used by Emacs need more documentation in the manual.
   Personally, I'm mostly interested in menu resources because that
   cannot be controlled from within Emacs.

3. Differences between Emacs with and without a toolkit need to be
   explained somewhere.  I searched the indexes of both the Emacs and
   the Elisp manual using `i' and looking for "toolkit" and didn't
   find anything.  (Coming from a Windows world originally, I would
   like a short explanation of the words toolkit, Xt, and resources as
   well.)

I am now using Emacs without a toolkit.  My menubar looks like the
modeline (similar face and font), and when I click on the menubar
items, a black and white menu pane pops up.  This is true for all
menus but one:

I installed the CGreek package which adds a new menu to the menu bar.
This is the only menu that doesn't work.  It gives me an error (as if
the key were undefined) which doesn't enter the debugger, even after
setting debug-ignored-errors to nil.

(setq old-ignored-errors debug-ignored-errors
      debug-ignored-errors nil
      debug-on-errors t)

The menu works fine with a toolkit:

(defvar cgreek-menu-map
  (let ((map (make-sparse-keymap)))
    (define-key map [print] (cons "Print" (make-sparse-keymap)))
    (define-key map [print region] '("Region" . ps-print-region-with-faces))
    (define-key map [print buffer] '("Buffer" . ps-print-buffer-with-faces))
    ...
    (define-key map [open tlg] '("TLG Format" . cgreek-tlg-parse-authtab))

    map))

There is also the following function which has no effect.  I had hoped
that the this is the place where the menu is inserted into the menubar
and thus calling it again would fix the problem.  Not so.

;;;###autoload
(defun setup-cgreek-environment ()
  "Setup multilingual environment for classical Greek."
  (interactive)

  ;; menu in cgreek environment
  (define-key-after (lookup-key global-map [menu-bar])
    [cgreek] (cons "CGreek" cgreek-menu-map) t)

  (add-hook 'find-file-hooks
            '(lambda ()
               (cgreek-highlight-greek-chars-in-buffer 0)
               (set-buffer-modified-p nil)))
  (add-hook 'post-command-hook 'cgreek-highlight-preceding-greek-char))

4. Therefore I assume that the definition of this menu is somehow
   depending on the toolkit used, but I have no idea how to go about
   examining this.

Alex.



reply via email to

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