unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Preferences support for Carbon Emacs
@ 2005-03-16  8:39 YAMAMOTO Mitsuharu
  2005-03-16  8:59 ` YAMAMOTO Mitsuharu
  2005-04-14  9:55 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-03-16  8:39 UTC (permalink / raw)


Mac OS X has a customization mechanism called "preferences".

  http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/UserPreferences.html

I've just installed some changes that enable Carbon Emacs to get
preferences through X Resources functions (like registry on W32).
Now users can use preferences in place of X Resources.

For example, adding a line

   Emacs.cursorType: bar

to ~/.Xresources in X11 corresponds to the execution of

   % defaults write org.gnu.Emacs Emacs.cursorType bar

in Carbon.  One can use boolean or numeric values as well as string
values.

   % defaults write org.gnu.Emacs Emacs.toolBar -bool off
   % defaults write org.gnu.Emacs Emacs.lineSpacing -int 3

Of course, you can directly edit your own
~/Library/Preferences/org.gnu.Emacs.plist with Property List Editor or
your favorite text editor :-)

I also added a function that reads arbitrary application preference
value and converts it a Lisp object.  For example, evaluation of
(mac-get-preference "AppleLanguages") results in an array ["ja" "en"
"fr" "de" ...] of strings in my environment.  Maybe this can be used
for setting up the default language environment at startup time.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Preferences support for Carbon Emacs
  2005-03-16  8:39 Preferences support for Carbon Emacs YAMAMOTO Mitsuharu
@ 2005-03-16  8:59 ` YAMAMOTO Mitsuharu
  2005-04-14  9:55 ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-03-16  8:59 UTC (permalink / raw)


>>>>> On Wed, 16 Mar 2005 17:39:37 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> One can use boolean or numeric values as well as string values.

>    % defaults write org.gnu.Emacs Emacs.toolBar -bool off

Sorry, I meant "-bool false" or "-bool no".

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Preferences support for Carbon Emacs
  2005-03-16  8:39 Preferences support for Carbon Emacs YAMAMOTO Mitsuharu
  2005-03-16  8:59 ` YAMAMOTO Mitsuharu
@ 2005-04-14  9:55 ` YAMAMOTO Mitsuharu
  1 sibling, 0 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-04-14  9:55 UTC (permalink / raw)


>>>>> On Wed, 16 Mar 2005 17:39:37 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> I also added a function that reads arbitrary application preference
> value and converts it a Lisp object.  For example, evaluation of
> (mac-get-preference "AppleLanguages") results in an array ["ja" "en"
> "fr" "de" ...] of strings in my environment.  Maybe this can be used
> for setting up the default language environment at startup time.

I've made some changes to set-locale-environment so that some system
language settings can be reflected on Mac OS.  They are consulted in
the following order at startup time:

  1. Environment variables LC_ALL, LC_CTYPE and LANG as in other
     systems.

  2. Preference AppleLocale that is set by default on Mac OS X 10.3.

  3. Preference AppleLanguages that is set by default on Mac OS X
  10.x.

  4. Variable mac-system-locale that is derived from the system
     language and region codes.  This variable is available on all
     supported Mac OS versions including Mac OS Classic.

Also, the coding system derived from the system script code is used as
default coding systems on Mac OS Classic.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-14  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-16  8:39 Preferences support for Carbon Emacs YAMAMOTO Mitsuharu
2005-03-16  8:59 ` YAMAMOTO Mitsuharu
2005-04-14  9:55 ` YAMAMOTO Mitsuharu

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).