unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Non-ASCII in Lucid menus
Date: Sun, 13 Mar 2005 08:44:32 -0500	[thread overview]
Message-ID: <87r7ijbray.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <42341EC4.3060405@swipnet.se> (Jan D.'s message of "Sun, 13 Mar 2005 12:06:44 +0100")

>> The patch below makes the Lucid menu use fontsets to draw its text, so that
>> it's able to write non-ASCII (the set of chars supported is dependent on the
>> locale, and of course on the fonts).
>> 
>> I'm very much an idiot when it comes to X11 programming, xfaces.c, and
>> lwlib, so this might be riddled with bugs and misunderstandings, but after
>> some trial-and-error this not only works for me, but it even looks sensible
>> to me.
>> 
>> Any objection?

> It is incompatible in the sense that settings in .Xresources that previously
> used
> ...*menu*font: ...

> now must use
> ...*menu*fontSet:

> for the lucid menus.  This should be mentioned in NEWS.

Hmm... good point.  Do you happen to know how I could get the expected
behavior that "if `font' is set but `fontSet' isn't, use `font'"?

> Also, the default font used for lucid menus will most certainly be
> different now.

Why?  What can I do about it?

>> PS: The use of XrmPutLineResource in xfaces.c seems amazingly brittle and
>> hackish, but that's what the rest of the code uses.

> It basically sets a default value.  If the user overrides it (with an
> X resource or -xrm on the command line) the user setting takes precedence.
> Yes, it is a bit hackish.

It also seems wrong: user settings on the `menu' face should take
precedence, shouldn't they?


        Stefan


PS: A part of the patch I sent was missing:

--- src/xmenu.c	12 Mar 2005 23:29:04 -0000	1.281
+++ src/xmenu.c	13 Mar 2005 13:42:40 -0000
@@ -137,6 +137,8 @@
 #ifdef USE_GTK
 /* gtk just uses utf-8.  */
 # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str)
+#elif defined HAVE_X_I18N
+# define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str)
 #else
 # define ENCODE_MENU_STRING(str) string_make_unibyte (str)
 #endif

  reply	other threads:[~2005-03-13 13:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-12 23:47 Non-ASCII in Lucid menus Stefan Monnier
2005-03-13 11:06 ` Jan D.
2005-03-13 13:44   ` Stefan Monnier [this message]
2005-03-13 17:45     ` Jan D.
2005-03-14 20:23       ` Stefan Monnier
2005-03-14 20:56         ` Jan D.
2005-03-14 23:03           ` Miles Bader
2005-03-16 15:36       ` Stefan Monnier
2005-03-16 21:32         ` Jan D.
2005-03-16 23:13           ` Stefan Monnier
2005-03-16 23:38             ` Stefan Monnier
2005-03-17  7:12             ` Jan D.
2005-03-17 13:57               ` Stefan Monnier
2005-03-17 23:01         ` Richard Stallman
2005-03-18  4:32           ` Stefan Monnier
2005-03-18 18:20             ` Richard Stallman
2005-03-18 21:00               ` Stefan Monnier
2005-03-20  0:22                 ` Richard Stallman
2005-03-20  0:50                   ` Stefan Monnier
2005-03-20  3:21                     ` David Kastrup
2005-03-20 11:46                     ` Jan D.
2005-03-13 18:49 ` David Kastrup
2005-03-14  3:00 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2005-03-18 21:26 Jan D.
2005-03-18 22:06 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87r7ijbray.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).