commit: Provide a DEFAULT argument in #'intern-soft.
17 years
Aidan Kehoe
changeset: 4355:a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443
parent: 4353:4143b78d0df09521124aed8cd0ed848b978130ba
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Dec 24 14:00:14 2007 +0100
files: src/ChangeLog src/keymap.c src/lisp.h src/symbols.c
description:
Provide a DEFAULT argument in #'intern-soft.
2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* symbols.c (Fintern_soft):
Provide a new optional third argument, DEFAULT, for those who want
to check if "nil" is a symbol or not. (More realistically, general
code that may get handed "nil" should probably use this argument.)
* keymap.c (define_key_check_and_coerce_keysym):
Call Fintern_soft with its new argument.
* lisp.h:
Update the declaration of Fintern_soft.
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/ChangeLog
--- a/src/ChangeLog Sun Dec 23 15:29:17 2007 +0100
+++ b/src/ChangeLog Mon Dec 24 14:00:14 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-23 Aidan Kehoe <kehoea@parhasa
+2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * symbols.c (Fintern_soft):
+ Provide a new optional third argument, DEFAULT, for those who want
+ to check if "nil" is a symbol or not. (More realistically, general
+ code that may get handed "nil" should probably use this argument.)
+
2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
* objects-tty.c (tty_find_charset_font):
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/keymap.c
--- a/src/keymap.c Sun Dec 23 15:29:17 2007 +0100
+++ b/src/keymap.c Mon Dec 24 14:00:14 2007 +0100
@@ -1388,7 +1388,7 @@ define_key_check_and_coerce_keysym (Lisp
DECLARE_EISTRING (temp);
eicpy_raw (temp, name, qxestrlen (name));
eisetch_char (temp, 2, '-');
- *keysym = Fintern_soft (eimake_string (temp), Qnil);
+ *keysym = Fintern_soft (eimake_string (temp), Qnil, Qnil);
}
else if (EQ (*keysym, QLFD))
*keysym = QKlinefeed;
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/lisp.h
--- a/src/lisp.h Sun Dec 23 15:29:17 2007 +0100
+++ b/src/lisp.h Mon Dec 24 14:00:14 2007 +0100
@@ -5067,7 +5067,7 @@ EXFUN (Ffboundp, 1);
EXFUN (Ffboundp, 1);
EXFUN (Ffset, 2);
EXFUN (Fintern, 2);
-EXFUN (Fintern_soft, 2);
+EXFUN (Fintern_soft, 3);
EXFUN (Fkill_local_variable, 1);
EXFUN (Fset, 2);
EXFUN (Fset_default, 2);
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/symbols.c
--- a/src/symbols.c Sun Dec 23 15:29:17 2007 +0100
+++ b/src/symbols.c Mon Dec 24 14:00:14 2007 +0100
@@ -256,17 +256,17 @@ it defaults to the value of the variable
return object;
}
-DEFUN ("intern-soft", Fintern_soft, 1, 2, 0, /*
+DEFUN ("intern-soft", Fintern_soft, 1, 3, 0, /*
Return the canonical symbol named NAME, or nil if none exists.
NAME may be a string or a symbol. If it is a symbol, that exact
symbol is searched for.
Optional second argument OBARRAY specifies the obarray to use;
it defaults to the value of the variable `obarray'.
-*/
- (name, obarray))
-{
- /* #### Bug! (intern-soft "nil") returns nil. Perhaps we should
- add a DEFAULT-IF-NOT-FOUND arg, like in get. */
+Optional third argument DEFAULT says what Lisp object to return if there is
+no canonical symbol named NAME, and defaults to nil.
+*/
+ (name, obarray, default_))
+{
Lisp_Object tem;
Lisp_Object string;
@@ -283,7 +283,7 @@ it defaults to the value of the variable
tem = oblookup (obarray, XSTRING_DATA (string), XSTRING_LENGTH (string));
if (INTP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
- return Qnil;
+ return default_;
else
return tem;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs
17 years
Aidan Kehoe
changeset: 4356:cc293ef846d240af187a523bb32eb5e26a083531
tag: tip
parent: 4355:a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443
parent: 4354:232d873b9705ad6655ef42e6f59cecadc3100853
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Dec 24 14:00:51 2007 +0100
files:
description:
Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 .hgignore
--- a/.hgignore Mon Dec 24 14:00:14 2007 +0100
+++ b/.hgignore Mon Dec 24 14:00:51 2007 +0100
@@ -44,4 +44,4 @@ info/.*\.info(-[0-9]+)?$
^src/xemacs\.def(\.in)?$
^src/xemacs\.dmp$
^src/Emacs\.ad\.h$
-
+^etc/bundled-packages/.*\.tar\.gz$
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 ChangeLog
--- a/ChangeLog Mon Dec 24 14:00:14 2007 +0100
+++ b/ChangeLog Mon Dec 24 14:00:51 2007 +0100
@@ -1,3 +1,14 @@ 2007-12-08 Jerry James <james(a)xemacs.o
+2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * Makefile.in.in (mkpkgdir):
+ (check-available-packages):
+ (install-bootstrap-packages):
+ (install-nonmule-packages):
+ (install-all-packages):
+ New targets supporting bundled packages.
+
+ * .hgignore: Ignore tarballs in etc/bundled-packages/.
+
2007-12-08 Jerry James <james(a)xemacs.org>
* config.guess:
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 Makefile.in.in
--- a/Makefile.in.in Mon Dec 24 14:00:14 2007 +0100
+++ b/Makefile.in.in Mon Dec 24 14:00:51 2007 +0100
@@ -491,6 +491,48 @@ mkdir: FRC.mkdir
#endif
${sitelispdir}
+## Install bundled packages, if present.
+
+package_path = @LATE_PACKAGE_DIRECTORIES@
+pkgsrcdir = ${srcdir}/etc/bundled-packages
+
+## #### Probably we should add a rule for lib-src/make-path here.
+
+check-available-packages:
+ @if test -r ${pkgsrcdir}/bootstrap.tar.gz; \
+ then echo "To install a set of bootstrap packages, type:"; \
+ echo " make install-bootstrap-packages"; \
+ fi; \
+ if test -r ${pkgsrcdir}/xemacs-sumo.tar.gz; \
+ then echo "To install the full set of non-mule packages, type:"; \
+ echo " make install-nonmule-packages"; \
+ fi; \
+ if test -r ${pkgsrcdir}/xemacs-mule-sumo.tar.gz; \
+ then echo "To install the full set of packages with mule, type:"; \
+ echo " make install-all-packages"; \
+ fi;
+
+mkpkgdir: FRC.mkdir ${MAKEPATH}
+ @if test -z ${package_path}; \
+ then echo "not configured --with-late-packages; no place to install."; \
+ exit -1; \
+ elif test -e ${package_path}/xemacs-packages \
+ -o -e ${package_path}/mule-packages; \
+ then echo "${package_path} is installed; won't overwrite packages."; \
+ exit -1; \
+ fi
+ ${MAKEPATH} ${package_path};
+
+install-bootstrap-packages: mkpkgdir
+ cd ${package_path}; tar xvzf ${pkgsrcdir}/bootstrap.tar.gz
+
+install-nonmule-packages: mkpkgdir
+ cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz
+
+install-all-packages: mkpkgdir
+ cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz; \
+ cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-mule-sumo.tar.gz
+
## Delete all the installed files that the `install' target would
## create (but not the noninstalled files such as `make all' would
## create).
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 etc/ChangeLog
--- a/etc/ChangeLog Mon Dec 24 14:00:14 2007 +0100
+++ b/etc/ChangeLog Mon Dec 24 14:00:51 2007 +0100
@@ -1,3 +1,8 @@ 2007-11-22 Vin Shelton <acs(a)xemacs.org
+2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * bundled-packages/README: Documentation for bundled packages.
+ * bundled-packages/test.sh: Test suite for bundled packages.
+
2007-11-22 Vin Shelton <acs(a)xemacs.org>
* photos/vin.png:
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 etc/bundled-packages/README
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/bundled-packages/README Mon Dec 24 14:00:51 2007 +0100
@@ -0,0 +1,68 @@
+Package distributions may be placed in this directory.
+If present and a package-path is configured, packages can be installed
+using the top-level makefile.
+
+To configure the package path, use the --with-late-packages option to
+configure, which specifies the path to the directory containing the
+xemacs-packages and mule-packages hierarchies to install.
+
+To find out if a distribution includes bundled packages, type
+
+ make check-available-packages
+
+There are three Make targets that may be available depending on the package
+sets supplied.
+
+ make install-bootstrap-packages
+ Install a selected set of packages sufficient to support
+ downloading and installing packages via the M-x list-packages
+ interface. Chose this if you want to be able to install the
+ latest version of each package immediately.
+
+ make install-nomule-packages
+ Install the full distribution of packages that do not require a
+ Mule-enabled XEmacs. Choose this package if you don't have a
+ Mule-enabled XEmacs and want the convenience of a single-command
+ installation. You can add or update packages via M-x list-packages
+ at any time.
+
+ make install-all-packages
+ Install the full distribution of packages, including those requiring
+ a Mule-enabled XEmacs. Choose this package if you have a Mule-
+ enabled XEmacs and want the convenience of a single-command
+ installation. You can add or update packages via M-x list-packages
+ at any time.
+
+DISTRIBUTOR'S NOTE: you may choose what packages you wish to include in
+bootstrap.tar.gz, but to make list-packages work you need to include at
+least xemacs-base, dired, and efs. The tarball should unpack directly as
+an xemacs-packages tree (and optionaly, a mule-packages tree. Also, if
+either of xemacs-sumo.tar.gz or xemacs-mule-sumo.tar.gz is provided, the
+other should be as well.
+
+If packages are not available with the distribution, you can get them at
+
+ ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
+ ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
+ http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/bootstrap.tar.gz
+
+and place them in the same directory as this file. You can also make your
+own bootstrap.tar.gz by creating a directory xemacs-packages, then
+untarring the packages of your choice into that directory, and tarring the
+whole thing up with "tar czf bootstrap.tar.gz xemacs-packages". (If you
+wish to include mule-packages, you should place them in mule-packages as
+a sibling of xemacs-packages.)
+
+This facility currently does not support installations which configure
+the --with-early-packages, --with-late-packages, or --with-last-packages
+options.
+
+This facility currently will not overwrite an existing package
+installation, not even if a whole hierarchy (usually the mule-packages)
+is missing. In particular, you cannot use this feature to add the
+mule-packages to a package installation which lacks them, even if the
+hierarchy is missing, or the xemacs-packages hierarchy was installed
+this way. Nor can you "upgrade" a bootstrap installation to a full
+installation. If you wish to do any of these things you will need to
+remove the existing hierarchies.
+
diff -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 -r cc293ef846d240af187a523bb32eb5e26a083531 etc/bundled-packages/test.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/bundled-packages/test.sh Mon Dec 24 14:00:51 2007 +0100
@@ -0,0 +1,105 @@
+# tests for the bundled packages feature
+
+# usage: sh etc/bundled-packages/tests.sh [TMP_TEST_DIR]
+
+# Always run this script from the top directory of the source tree.
+# You need a mv that supports the -v for verbose flag, and a mkdir that
+# supports the -p flag to make parents.
+# Output from this script is preceded by 4 stars (****).
+
+# This test script is probably more fragile than the build process, but if
+# it runs to completion things are probably OK.
+
+# configure the installation target
+
+if test -z "$1"; then
+ TMP_TEST_DIR=/tmp/test/bundled-packages
+else
+ TMP_TEST_DIR=$1
+fi
+
+srcdir=`pwd`
+blddir=${TMP_TEST_DIR}/build
+pkgdir=${TMP_TEST_DIR}/lib/xemacs
+
+echo "**** srcdir = ${srcdir}"
+echo "**** blddir = ${blddir}"
+echo "**** pkgdir = ${pkgdir}"
+
+if test -e "${pkgdir}"; then
+ echo "**** pkgdir (${pkgdir}) exists; bailing out."
+ exit -1
+fi
+
+# mv existing tarballs out of harm's way and make a fake one
+
+echo "**** Moving existing tarballs to etc/bundled-packages/saved."
+mkdir -p etc/bundled-packages/saved
+cd etc/bundled-packages
+echo "**** 'mv' may error because there are no files to move. It's harmless."
+mv -v *.tar.gz saved/
+cd ../..
+
+# configure in a temporary directory
+
+if test -e ${blddir}; then
+ echo "**** blddir (${blddir}) exists; bailing out."
+ exit -1
+fi
+mkdir -p ${blddir}
+cd ${blddir}
+echo "**** Running 'configure'. This takes *several minutes*."
+echo "**** Redirecting configure output to ${blddir}/beta.err."
+${srcdir}/configure >beta.err 2>&1
+
+# test check-available-packages
+
+echo "**** This test should produce no error and no output."
+make check-available-packages
+cd ${srcdir}/etc/bundled-packages
+echo "**** This test should explain how to install bootstrap packages."
+echo "This file pretends to be a bootstrap hierarchy." > xemacs-packages
+tar czf bootstrap.tar.gz xemacs-packages
+rm xemacs-packages
+cd ${blddir}
+make check-available-packages
+echo "**** This test should explain how to install all three."
+cd ${srcdir}/etc/bundled-packages
+echo "This file pretends to be a xemacs-packages hierarchy." > xemacs-packages
+echo "This file pretends to be a mule-packages hierarchy." > mule-packages
+tar czf xemacs-sumo.tar.gz xemacs-packages
+tar czf xemacs-mule-sumo.tar.gz mule-packages
+rm xemacs-packages mule-packages
+cd ${blddir}
+make check-available-packages
+
+# test installation without package path given
+
+echo "**** Make the 'make-path' utility needed by the installation routine."
+make -C lib-src make-path
+echo "**** This test should error because --with-late-packages wasn't given."
+make install-bootstrap-packages
+
+# test installation with package path given
+
+echo "**** Running 'configure'. This takes *several minutes*."
+echo "**** Redirecting configure output to ${blddir}/beta.err."
+${srcdir}/configure --with-late-packages=${pkgdir} >beta.err 2>&1
+echo "**** Make the 'make-path' utility needed by the installation routine."
+make -C lib-src make-path
+echo "**** Test install-bootstrap-packages."
+make install-bootstrap-packages
+echo "**** The following should list xemacs-packages in the right place."
+ls ${pkgdir}/*
+
+#### no tests below this line ####
+
+# put tarballs back and clean up
+
+cd ${srcdir}/etc/bundled-packages
+rm *.tar.gz
+echo "**** 'mv' may error because there are no files to move. It's harmless."
+mv -v saved/*.tar.gz ../
+rmdir saved
+rm -rf ${blddir} ${pkgdir}
+exit 0
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[ACCESS DENIED] Give the current carbon locale in #'report-xemacs-bug if available
17 years
Aidan Kehoe
xemacs-packages/net-utils/ChangeLog addition:
2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* xemacsbug.el (report-xemacs-bug):
Give the current carbon locale in #'report-xemacs-bug if available.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/net-utils/xemacsbug.el
===================================================================
RCS
Index: xemacs-packages/net-utils/xemacsbug.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/net-utils/xemacsbug.el,v
retrieving revision 1.14
diff -u -u -r1.14 xemacsbug.el
--- xemacs-packages/net-utils/xemacsbug.el 2007/11/29 08:45:15 1.14
+++ xemacs-packages/net-utils/xemacsbug.el 2007/12/24 11:09:14
@@ -225,6 +225,7 @@
default-buffer-file-coding-system
default-process-coding-system
(current-locale)
+ (carbon-current-locale)
keyboard-coding-system
terminal-coding-system))
(insert (format " %-34s=> %S\n" sym
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Use the carbon infrastructure to determine the language environment.
17 years
Aidan Kehoe
changeset: 4361:20b8c35ce0fd67c1ef15011f58d55003778f5f4d
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 23 18:05:26 2007 +0100
files: lisp/ChangeLog.carbon2 lisp/mule/mule-cmds.el src/ChangeLog.carbon2 src/intl-carbon.c
description:
Use the carbon infrastructure to determine the language environment.
2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
* intl-carbon.c:
Add #'carbon-current-locale, with the implementation taken from
Mozilla.
2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/mule-cmds.el (init-locale-at-early-startup):
If #'carbon-current-locale is available, use it when determining
the language environment at startup.
diff -r b72bac98b78a7793c95dc2318e6e033c9f81769a -r 20b8c35ce0fd67c1ef15011f58d55003778f5f4d lisp/mule/mule-cmds.el
--- a/lisp/mule/mule-cmds.el Sun Dec 23 17:35:49 2007 +0100
+++ b/lisp/mule/mule-cmds.el Sun Dec 23 18:05:26 2007 +0100
@@ -1469,17 +1469,25 @@ of buffer-file-coding-system set by this
(declare-fboundp (mswindows-set-current-locale userdef)))
;; Unix:
(let (locstring)
- ;; Init the POSIX locale from the environment--this calls the C
- ;; library's setlocale(3).
- (set-current-locale "")
- ;; Can't let locstring be the result of (set-current-locale "")
- ;; because that can return a more detailed string than we know how
- ;; to handle.
- (setq locstring (current-locale)
- ;; assume C lib locale and LANG env var are set correctly.
- ;; use them to find the langenv.
- langenv
- (and locstring (get-language-environment-from-locale
+ (unless (and-fboundp
+ #'carbon-current-locale
+ ;; If Carbon provides us with the locale string, we want
+ ;; to use that, instead of the code that checks the
+ ;; C environment below.
+ (setq locstring
+ (carbon-current-locale)))
+ ;; Init the POSIX locale from the environment--this calls the C
+ ;; library's setlocale(3).
+ (set-current-locale "")
+ ;; Can't let locstring be the result of (set-current-locale "")
+ ;; because that can return a more detailed string than we know how
+ ;; to handle.
+ (setq locstring (current-locale)))
+
+ ;; assume C lib locale and LANG env var are set correctly.
+ ;; use them to find the langenv.
+ (setq langenv
+ (and locstring (get-language-environment-from-locale
locstring)))))
;; All systems:
(unless langenv (setq langenv "English"))
diff -r b72bac98b78a7793c95dc2318e6e033c9f81769a -r 20b8c35ce0fd67c1ef15011f58d55003778f5f4d src/ChangeLog.carbon2
--- a/src/ChangeLog.carbon2 Sun Dec 23 17:35:49 2007 +0100
+++ b/src/ChangeLog.carbon2 Sun Dec 23 18:05:26 2007 +0100
@@ -1,3 +1,9 @@ 2007-12-22 Aidan Kehoe <kehoea@parhasa
+2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * intl-carbon.c:
+ Add #'carbon-current-locale, with the implementation taken from
+ Mozilla.
+
2007-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* console-carbon-impl.h:
diff -r b72bac98b78a7793c95dc2318e6e033c9f81769a -r 20b8c35ce0fd67c1ef15011f58d55003778f5f4d src/intl-carbon.c
--- a/src/intl-carbon.c Sun Dec 23 17:35:49 2007 +0100
+++ b/src/intl-carbon.c Sun Dec 23 18:05:26 2007 +0100
@@ -20,12 +20,314 @@
#include <config.h>
#include "lisp.h"
+#include "text.h"
+
+#include <Carbon/Carbon.h>
+#include <ApplicationServices/ApplicationServices.h>
+
+Lisp_Object Vcarbon_current_language_unicode_set;
+
+#if !defined(__COREFOUNDATION_CFLOCALE__)
+typedef void* CFLocaleRef;
+#endif
+
+struct iso_lang_map
+{
+ Ascbyte* iso_code;
+ short mac_lang_code;
+ short mac_script_code;
+};
+
+typedef struct iso_lang_map iso_lang_map;
+
+iso_lang_map lang_list[] = {
+ { "sq", langAlbanian, smRoman },
+ { "am", langAmharic, smEthiopic },
+ { "ar", langArabic, smArabic },
+ { "hy", langArmenian, smArmenian},
+ { "as", langAssamese, smBengali },
+ { "ay", langAymara, smRoman},
+ { "eu", langBasque, smRoman},
+ { "bn", langBengali, smBengali },
+ { "dz", langDzongkha, smTibetan },
+ { "br", langBreton, smRoman },
+ { "bg", langBulgarian, smCyrillic },
+ { "my", langBurmese, smBurmese },
+ { "km", langKhmer, smKhmer },
+ { "ca", langCatalan, smRoman },
+ { "zh", langTradChinese, smTradChinese },
+ { "hr", langCroatian, smRoman },
+ { "cs", langCzech, smCentralEuroRoman },
+ { "da", langDanish, smRoman },
+ { "nl", langDutch, smRoman },
+ { "en", langEnglish, smRoman },
+ { "eo", langEsperanto, smRoman },
+ { "et", langEstonian, smCentralEuroRoman},
+ { "fo", langFaeroese, smRoman },
+ { "fa", langFarsi, smArabic },
+ { "fi", langFinnish, smRoman },
+ { "fr", langFrench, smRoman },
+ { "ka", langGeorgian, smGeorgian },
+ { "de", langGerman, smRoman },
+ { "el", langGreek, smGreek },
+ { "gn", langGuarani, smRoman },
+ { "gu", langGujarati, smGujarati },
+ { "he", langHebrew, smHebrew },
+ { "iw", langHebrew, smHebrew },
+ { "hu", langHungarian, smCentralEuroRoman },
+ { "is", langIcelandic, smRoman },
+ { "in", langIndonesian, smRoman },
+ { "id", langIndonesian, smRoman },
+ { "iu", langInuktitut, smEthiopic },
+ { "ga", langIrish, smRoman },
+ { "it", langItalian, smRoman },
+ { "ja", langJapanese, smJapanese },
+ { "jw", langJavaneseRom, smRoman },
+ { "kn", langKannada, smKannada },
+ { "ks", langKashmiri, smArabic },
+ { "kk", langKazakh, smCyrillic },
+ { "ky", langKirghiz, smCyrillic },
+ { "ko", langKorean, smKorean },
+ { "ku", langKurdish, smArabic },
+ { "lo", langLao, smLao },
+ { "la", langLatin, smRoman },
+ { "lv", langLatvian, smCentralEuroRoman },
+ { "lt", langLithuanian, smCentralEuroRoman },
+ { "mk", langMacedonian, smCyrillic },
+ { "mg", langMalagasy, smRoman },
+ { "ml", langMalayalam, smMalayalam },
+ { "mt", langMaltese, smRoman },
+ { "mr", langMarathi, smDevanagari },
+ { "mo", langMoldavian, smCyrillic },
+ { "ne", langNepali, smDevanagari },
+ { "no", langNorwegian, smRoman },
+ { "or", langOriya, smOriya },
+ { "om", langOromo, smEthiopic },
+ { "ps", langPashto, smArabic },
+ { "pl", langPolish, smCentralEuroRoman },
+ { "pt", langPortuguese, smRoman },
+ { "pa", langPunjabi, smGurmukhi },
+ { "ro", langRomanian, smRoman },
+ { "ru", langRussian, smCyrillic },
+ { "sa", langSanskrit, smDevanagari },
+ { "sr", langSerbian, smCyrillic },
+ { "sd", langSindhi, smArabic },
+ { "si", langSinhalese, smSinhalese },
+ { "sk", langSlovak, smCentralEuroRoman },
+ { "sl", langSlovenian, smRoman },
+ { "so", langSomali, smRoman },
+ { "es", langSpanish, smRoman },
+ { "su", langSundaneseRom, smRoman },
+ { "sw", langSwahili, smRoman },
+ { "sv", langSwedish, smRoman },
+ { "tl", langTagalog, smRoman },
+ { "tg", langTajiki, smCyrillic },
+ { "ta", langTamil, smTamil },
+ { "tt", langTatar, smCyrillic },
+ { "te", langTelugu, smTelugu },
+ { "th", langThai, smThai },
+ { "bo", langTibetan, smTibetan },
+ { "ti", langTigrinya, smEthiopic },
+ { "tr", langTurkish, smRoman },
+ { "tk", langTurkmen, smCyrillic },
+ { "ug", langUighur, smCyrillic },
+ { "uk", langUkrainian, smCyrillic },
+ { "ur", langUrdu, smArabic },
+ { "uz", langUzbek, smCyrillic },
+ { "vi", langVietnamese, smVietnamese },
+ { "cy", langWelsh, smRoman },
+ { "ji", langYiddish, smHebrew },
+ { "yi", langYiddish, smHebrew },
+ { NULL, 0, 0}
+};
+
+struct iso_country_map
+{
+ Ascbyte* iso_code;
+ short mac_region_code;
+};
+
+typedef struct iso_country_map iso_country_map;
+
+iso_country_map country_list[] = {
+ { "US", verUS},
+ { "EG", verArabic},
+ { "DZ", verArabic},
+ { "AU", verAustralia},
+ { "BE", verFrBelgium },
+ { "CA", verEngCanada },
+ { "CN", verChina },
+ { "HR", verYugoCroatian },
+ { "CY", verCyprus },
+ { "DK", verDenmark },
+ { "EE", verEstonia },
+ { "FI", verFinland },
+ { "FR", verFrance },
+ { "DE", verGermany },
+ { "EL", verGreece },
+ { "HU", verHungary },
+ { "IS", verIceland },
+ { "IN", verIndiaHindi},
+ { "IR", verIran },
+ { "IQ", verArabic },
+ { "IE", verIreland },
+ { "IL", verIsrael },
+ { "IT", verItaly },
+ { "JP", verJapan },
+ { "KP", verKorea },
+ { "LV", verLatvia },
+ { "LY", verArabic },
+ { "LT", verLithuania },
+ { "LU", verFrBelgiumLux },
+ { "MT", verMalta },
+ { "MA", verArabic },
+ { "NL", verNetherlands },
+ { "NO", verNorway },
+ { "PK", verPakistan },
+ { "PL", verPoland },
+ { "PT", verPortugal },
+ { "RU", verRussia },
+ { "SA", verArabic },
+ { "ES", verSpain },
+ { "SE", verSweden },
+ { "CH", verFrSwiss },
+ { "TW", verTaiwan},
+ { "TH", verThailand },
+ { "TN", verArabic},
+ { "TR", verTurkey },
+ { "GB", verBritain },
+ { NULL, 0 }
+};
+
+typedef CFLocaleRef (*fpCFLocaleCopyCurrent_type) (void);
+typedef CFStringRef (*fpCFLocaleGetIdentifier_type) (CFLocaleRef);
+
+static Ibyte *
+carbon_get_pseudo_posix_locale (short scriptCode, short langCode, short regionCode)
+{
+ int i;
+ Bytecount len;
+ int validResultFound = 0;
+ DECLARE_EISTRING (res);
+
+ /* parse language */
+ for (i=0; NULL != lang_list[i].iso_code; i++)
+ {
+ if (langCode == lang_list[i].mac_lang_code &&
+ scriptCode == lang_list[i].mac_script_code)
+ {
+ eicpy_ascii (res, lang_list[i].iso_code);
+ validResultFound = true;
+ break;
+ }
+ }
+
+ /* parse region */
+ for (i=0; NULL != country_list[i].iso_code; i++)
+ {
+ if (regionCode==country_list[i].mac_region_code)
+ {
+ eicat_ch (res, '-');
+ eicat_ascii (res, country_list[i].iso_code);
+ validResultFound = true;
+ break;
+ }
+ }
+
+ if (validResultFound)
+ {
+ len = eilen (res);
+ return eicpyout_malloc (res, &len);
+ }
+
+ return NULL;
+}
Lisp_Object Qcarbon_unicode;
+
+DEFUN ("carbon-current-locale", Fcarbon_current_locale, 0, 0, 0, /*
+Return the current OS X locale.
+
+This reflects the locale used by the Carbon programs on your system, and
+follows the POSIX format, that is, ab_BC, where ab is a language code and BC
+is a country code.
+*/
+ ())
+{
+ /* On MacOSX, the recommended way to get the user's current locale is to use
+ the CFLocale APIs. However, these are only available on 10.3 and later.
+ So for the older systems, we have to keep using the Script Manager APIs. */
+ static int checked = 0;
+ static fpCFLocaleCopyCurrent_type fpCFLocaleCopyCurrent = NULL;
+ static fpCFLocaleGetIdentifier_type fpCFLocaleGetIdentifier = NULL;
+ Lisp_Object res = Qnil;
+
+ if (!checked)
+ {
+ CFBundleRef bundle =
+ CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Carbon"));
+ if (bundle)
+ {
+ // We dynamically load these two functions and only use them if
+ // they are available (OS 10.3+).
+ fpCFLocaleCopyCurrent = (fpCFLocaleCopyCurrent_type)
+ CFBundleGetFunctionPointerForName(bundle,
+ CFSTR("CFLocaleCopyCurrent"));
+ fpCFLocaleGetIdentifier = (fpCFLocaleGetIdentifier_type)
+ CFBundleGetFunctionPointerForName(bundle,
+ CFSTR("CFLocaleGetIdentifier"));
+ }
+ checked = 1;
+ }
+
+ if (fpCFLocaleCopyCurrent)
+ {
+ // Get string representation of user's current locale
+ CFLocaleRef userLocaleRef = fpCFLocaleCopyCurrent();
+ CFStringRef userLocaleStr = fpCFLocaleGetIdentifier(userLocaleRef);
+ int size;
+ Extbyte *buf;
+
+ CFRetain(userLocaleStr);
+
+ size = CFStringGetLength(userLocaleStr);
+ size = (size + 1) * 2;
+ buf = alloca_extbytes (size);
+
+ if (!CFStringGetCString (userLocaleStr, (char *) buf, size,
+ kCFStringEncodingUnicode))
+ {
+ signal_error (Qtext_conversion_error,
+ "Error converting from Carbon text format for locale",
+ Qunbound);
+ }
+
+ res = make_ext_string (buf, size - 2, Qcarbon_unicode);
+
+ CFRelease(userLocaleStr);
+ CFRelease(userLocaleRef);
+ }
+ else
+ {
+ /* Legacy MacOSX locale code */
+ long script = GetScriptManagerVariable(smSysScript);
+ long lang = GetScriptVariable(smSystemScript,smScriptLang);
+ long region = GetScriptManagerVariable(smRegionCode);
+
+ Ibyte *text = carbon_get_pseudo_posix_locale((short)script, (short)lang,
+ (short)region);
+ if (text)
+ {
+ res = make_string (text, qxestrlen(text));
+ }
+ }
+ return res;
+}
void
syms_of_intl_carbon (void)
{
+ DEFSUBR (Fcarbon_current_locale);
DEFSYMBOL (Qcarbon_unicode);
}
diff -r b72bac98b78a7793c95dc2318e6e033c9f81769a -r 20b8c35ce0fd67c1ef15011f58d55003778f5f4d lisp/ChangeLog.carbon2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/ChangeLog.carbon2 Sun Dec 23 18:05:26 2007 +0100
@@ -0,0 +1,6 @@
+2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule/mule-cmds.el (init-locale-at-early-startup):
+ If #'carbon-current-locale is available, use it when determining
+ the language environment at startup.
+
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
jde-java-font-lock.el oddities
17 years
Jerry James
Mike,
In jde-java-font-lock.el, line 523, I think the "(if (featurep
'cc-fonts) ..." should be "(when (featurep 'cc-fonts) ...)". In that
same file, there are multiple definitions of
jde-java-font-lock-at-comment, jde-java-font-lock-search-in-comment,
and jde-java-font-lock-quote-matcher. The two definitions of all 3
are identical. All 3 are used prior to the second definition. I
think the second definitions should be removed. Do you want a patch,
or would it be better to get upstream to fix this?
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH (pkgs)] Miscompiled macro in pgg-parse.el
17 years
Jerry James
PATCH packages
When MULE is available, we need to require 'ccl to make
define-ccl-program is available for use. I think we will still be
okay with a non-MULE XEmacs loading the compiled file, since the
critical parts are wrapped in (when (fboundp 'define-ccl-program) ...)
at the top level.
Index: xemacs-packages/pgg/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/ChangeLog,v
retrieving revision 1.26
diff -d -u -r1.26 ChangeLog
--- xemacs-packages/pgg/ChangeLog 2005/09/26 06:13:54 1.26
+++ xemacs-packages/pgg/ChangeLog 2007/12/09 04:11:34
@@ -1,3 +1,8 @@
+2007-12-08 Jerry James <james(a)xemacs.org>
+
+ * pgg-parse.el: Require ccl when compiling with MULE so that
+ pgg-parse-crc24-string becomes available.
+
2005-09-26 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.06 released.
Index: xemacs-packages/pgg/pgg-parse.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/pgg/pgg-parse.el,v
retrieving revision 1.5
diff -d -u -r1.5 pgg-parse.el
--- xemacs-packages/pgg/pgg-parse.el 2005/09/23 12:53:14 1.5
+++ xemacs-packages/pgg/pgg-parse.el 2007/12/09 04:11:34
@@ -35,7 +35,10 @@
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+ (require 'cl)
+ (when (featurep 'mule)
+ (require 'ccl)))
(defgroup pgg-parse ()
"OpenPGP packet parsing."
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Fix Xft problem
17 years
Michael Sperber
For the longest time, this has bombed for me on an Xft XEmacs:
(font-default-size-for-device)
The attached patch fixes this, and is enough to make W3 come up. (Which
hasn't worked for me since I switched to Xft.) I'll apply on Wednesday
or so if nobody objects.
2007-12-23 Mike Sperber <mike(a)xemacs.org>
* font.el (xft-font-create-object): Use
`fc-pattern-get-or-compute-size' instead of
`fc-pattern-get-size'.
* fontconfig.el (fc-pattern-get-or-compute-size): Add.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/lisp/font.el b/lisp/font.el
--- a/lisp/font.el
+++ b/lisp/font.el
@@ -813,7 +813,7 @@ Optional DEVICE defaults to `default-x-d
(pattern (fc-font-match device (fc-name-parse name)))
(font-obj (make-font))
(family (fc-pattern-get-family pattern 0))
- (size (fc-pattern-get-size pattern 0))
+ (size (fc-pattern-get-or-compute-size pattern 0))
(weight (fc-pattern-get-weight pattern 0)))
(set-font-family font-obj
(and (not (equal family 'fc-result-no-match))
diff --git a/lisp/fontconfig.el b/lisp/fontconfig.el
--- a/lisp/fontconfig.el
+++ b/lisp/fontconfig.el
@@ -349,6 +349,20 @@ corresponding Xft font slant constant."
(defun fc-font-weight-translate-from-string (str)
(let ((pair (assoc str fc-font-name-weight-mapping-string-reverse)))
(if pair (cdr pair))))
+
+(defun fc-pattern-get-or-compute-size (pattern id)
+ "Get the size from `pattern' associated with `id' or try to compute it.
+Returns NIL if unsucessful."
+ ;; Many font patterns don't have a "size" property, but do have a
+ ;; "dpi" and a "pixelsize" property".
+ (let ((maybe (fc-pattern-get-size pattern id)))
+ (if (not (eq maybe 'fc-result-no-match))
+ maybe
+ (let ((dpi (fc-pattern-get-dpi pattern id))
+ (pixelsize (fc-pattern-get-pixelsize pattern id)))
+ (if (and dpi pixelsize)
+ (* pixelsize (/ 72 dpi))
+ nil)))))
(defun fc-copy-pattern-partial (pattern attribute-list)
"Return a copy of PATTERN restricted to ATTRIBUTE-LIST.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Update carbon/README; test the push hooks in the xemacs-carbon2 Mercurial repo.
17 years
Aidan Kehoe
changeset: 4360:b72bac98b78a7793c95dc2318e6e033c9f81769a
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 23 17:35:49 2007 +0100
files: ChangeLog.carbon2 carbon/README
description:
Update carbon/README; test the push hooks in the xemacs-carbon2 Mercurial repo.
2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
* carbon/README: Update to reflect that this Carbon XEmacs is
available via Mercurial, and as such, there's no need to download
the beta tarballs.
diff -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 -r b72bac98b78a7793c95dc2318e6e033c9f81769a carbon/README
--- a/carbon/README Sun Dec 23 17:29:43 2007 +0100
+++ b/carbon/README Sun Dec 23 17:35:49 2007 +0100
@@ -4,30 +4,7 @@ Building Carbon XEmacs
Building Carbon XEmacs
----------------------
-The procedure described below has only been tested on Mac OS X 10.3
-with Xcode Tools v1.5 installed.
-
-The port uses Carbon features introduced in OS X 10.3 (e.g., the
-Pasteboard Manager) so it won't work without modification on earlier
-versions of OS X.
-
-Download and untar the file xemacs-21.5.<mm>.tar.bz (or .gz) from of the
-XEmacs mirrors:
-
- http://xemacs.org/Download/index.html
-
-Download and bunzip2 the file xemacs-21.5.<mm>-carbon-<nn>.diff.bz2 from:
-
- http://members.shaw.ca/akochoi-xemacs/index.html
-
-where <mm> is the release number of XEmacs 21.5 to which the patch
-will apply and <nn> is b1, b2, etc.
-
-Apply the patch. In the xemacs-21.5.<mm> directory, type:
-
- patch -p1 < <dir_of_patch_file>/xemacs-21.5.<mm>-carbon-<nn>.diff
-
-Then in the directory /carbon/, type:
+In this directory type:
sh < build-app.sh
@@ -35,43 +12,17 @@ install additional packages.
install additional packages.
-Downloading the Binary Distribution
------------------------------------
-
-Download and untar the file xemacs-21.5.<mm>-<nn>.tar.bz2 from:
-
- <<available soon!!>>
-
-An application (bundle) should result. This application will only run
-on Mac OS X 10.3 and not on earlier versions of OS X. The following
-are the only libraries it uses (otool -L), which should be supported
-on any standard Mac OS X 10.3.7 or later installation.
-
- /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
- (compatibility version 2.0.0, current version 128.0.0)
- /System/Library/Frameworks/ApplicationServices.framework/
- Versions/A/ApplicationServices
- (compatibility version 1.0.0, current version 19.0.0)
- /usr/lib/libncurses.5.dylib
- (compatibility version 5.0.0, current version 5.0.0)
- /usr/lib/libSystem.B.dylib
- (compatibility version 1.0.0, current version 71.1.1)
-
-Follow the instructions in the section "Installing Packages" below to
-install additional packages.
-
-
Installing Packages
-------------------
-Read the file README.packages in the xemacs-21.5.20 directory. In
-addition to the locations listed there, Carbon XEmacs will also find
-packages in the directory XEmacs.app/Contents/Resources/lib/. An
-XEmacs application bundle with packages installed in this directory is
-therefore self-contained and can be moved to a different location on
-the disk.
+See the documentation at http://www.xemacs.org/Documentation/packageGuide.html .
-Another covenient directory to install your packages is ~/.xemacs.
+In addition to the normal package locations, Carbon XEmacs will also find
+packages in the directory XEmacs.app/Contents/Resources/lib/. An XEmacs
+application bundle with packages installed in this directory is therefore
+self-contained and can be moved to a different location on the disk.
+
+Another convenient directory to install your packages is ~/.xemacs.
If you just want all the packages installed, download the files:
diff -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 -r b72bac98b78a7793c95dc2318e6e033c9f81769a ChangeLog.carbon2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ChangeLog.carbon2 Sun Dec 23 17:35:49 2007 +0100
@@ -0,0 +1,6 @@
+2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * carbon/README: Update to reflect that this Carbon XEmacs is
+ available via Mercurial, and as such, there's no need to download
+ the beta tarballs.
+
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs-carbon2
17 years
Aidan Kehoe
changeset: 4359:a4966f23ecea1e7838c55e9efcd8aaa774db7243
parent: 4358:488cac3d5b1b3d18a109832df1781ea793efdef6
parent: 4353:4143b78d0df09521124aed8cd0ed848b978130ba
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 23 17:29:43 2007 +0100
files:
description:
Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs-carbon2
diff -r 488cac3d5b1b3d18a109832df1781ea793efdef6 -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 src/ChangeLog
--- a/src/ChangeLog Sun Dec 23 13:09:45 2007 +0000
+++ b/src/ChangeLog Sun Dec 23 17:29:43 2007 +0100
@@ -1,3 +1,17 @@ 2007-12-22 Aidan Kehoe <kehoea@parhasa
+2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * objects-tty.c (tty_find_charset_font):
+ * objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
+ * objects-msw.c (mswindows_font_spec_matches_charset_stage_1):
+ * objects-xlike-inc.c (x_font_spec_matches_charset):
+ * objects-xlike-inc.c (gtk_font_spec_matches_charset):
+ If the charset is not specified when calling the
+ font_spec_matches_charset device method, its value is Qnil, not
+ Qunbound. See
+ http://mid.gmane.org/E1EfbmW-00029r-5G@iwi191.iwi.uni-sb.de and
+ Ben Wing's patch of
+ http://mid.gmane.org/439FA06B.3090007@xemacs.org.
+
2007-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* database.c (Fopen_database):
diff -r 488cac3d5b1b3d18a109832df1781ea793efdef6 -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 src/objects-msw.c
--- a/src/objects-msw.c Sun Dec 23 13:09:45 2007 +0000
+++ b/src/objects-msw.c Sun Dec 23 17:29:43 2007 +0100
@@ -1976,7 +1976,7 @@ mswindows_font_spec_matches_charset_stag
const Ibyte *c;
Bytecount the_length = length;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
if (!the_nonreloc)
@@ -2038,7 +2038,7 @@ mswindows_font_spec_matches_charset_stag
Bytecount the_length = length;
int i;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
if (!the_nonreloc)
diff -r 488cac3d5b1b3d18a109832df1781ea793efdef6 -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 src/objects-tty.c
--- a/src/objects-tty.c Sun Dec 23 13:09:45 2007 +0000
+++ b/src/objects-tty.c Sun Dec 23 17:29:43 2007 +0100
@@ -347,7 +347,7 @@ tty_font_spec_matches_charset (struct de
fixup_internal_substring (nonreloc, reloc, offset, &length);
the_nonreloc += offset;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return !memchr (the_nonreloc, '/', length);
the_nonreloc = (const Ibyte *) memchr (the_nonreloc, '/', length);
if (!the_nonreloc)
@@ -379,7 +379,7 @@ tty_find_charset_font (Lisp_Object devic
return Qnil;
}
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return font;
return concat3 (font, build_string ("/"),
diff -r 488cac3d5b1b3d18a109832df1781ea793efdef6 -r a4966f23ecea1e7838c55e9efcd8aaa774db7243 src/objects-xlike-inc.c
--- a/src/objects-xlike-inc.c Sun Dec 23 13:09:45 2007 +0000
+++ b/src/objects-xlike-inc.c Sun Dec 23 17:29:43 2007 +0100
@@ -125,7 +125,7 @@ x_font_spec_matches_charset (struct devi
#endif
/* Hmm, this smells bad. */
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
/* Hack! Short font names don't have the registry in them,
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Merge an old patch of Ben's, involving font instantiation and charsets.
17 years
Aidan Kehoe
changeset: 4353:4143b78d0df09521124aed8cd0ed848b978130ba
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 23 15:29:17 2007 +0100
files: src/ChangeLog src/objects-msw.c src/objects-tty.c src/objects-xlike-inc.c
description:
Merge an old patch of Ben's, involving font instantiation and charsets.
2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
* objects-tty.c (tty_find_charset_font):
* objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
* objects-msw.c (mswindows_font_spec_matches_charset_stage_1):
* objects-xlike-inc.c (x_font_spec_matches_charset):
* objects-xlike-inc.c (gtk_font_spec_matches_charset):
If the charset is not specified when calling the
font_spec_matches_charset device method, its value is Qnil, not
Qunbound. See
http://mid.gmane.org/E1EfbmW-00029r-5G@iwi191.iwi.uni-sb.de and
Ben Wing's patch of
http://mid.gmane.org/439FA06B.3090007@xemacs.org.
diff -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 -r 4143b78d0df09521124aed8cd0ed848b978130ba src/ChangeLog
--- a/src/ChangeLog Sat Dec 22 15:57:21 2007 -0800
+++ b/src/ChangeLog Sun Dec 23 15:29:17 2007 +0100
@@ -1,3 +1,17 @@ 2007-12-22 Aidan Kehoe <kehoea@parhasa
+2007-12-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * objects-tty.c (tty_find_charset_font):
+ * objects-msw.c (mswindows_font_spec_matches_charset_stage_2):
+ * objects-msw.c (mswindows_font_spec_matches_charset_stage_1):
+ * objects-xlike-inc.c (x_font_spec_matches_charset):
+ * objects-xlike-inc.c (gtk_font_spec_matches_charset):
+ If the charset is not specified when calling the
+ font_spec_matches_charset device method, its value is Qnil, not
+ Qunbound. See
+ http://mid.gmane.org/E1EfbmW-00029r-5G@iwi191.iwi.uni-sb.de and
+ Ben Wing's patch of
+ http://mid.gmane.org/439FA06B.3090007@xemacs.org.
+
2007-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* database.c (Fopen_database):
diff -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 -r 4143b78d0df09521124aed8cd0ed848b978130ba src/objects-msw.c
--- a/src/objects-msw.c Sat Dec 22 15:57:21 2007 -0800
+++ b/src/objects-msw.c Sun Dec 23 15:29:17 2007 +0100
@@ -1976,7 +1976,7 @@ mswindows_font_spec_matches_charset_stag
const Ibyte *c;
Bytecount the_length = length;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
if (!the_nonreloc)
@@ -2038,7 +2038,7 @@ mswindows_font_spec_matches_charset_stag
Bytecount the_length = length;
int i;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
if (!the_nonreloc)
diff -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 -r 4143b78d0df09521124aed8cd0ed848b978130ba src/objects-tty.c
--- a/src/objects-tty.c Sat Dec 22 15:57:21 2007 -0800
+++ b/src/objects-tty.c Sun Dec 23 15:29:17 2007 +0100
@@ -347,7 +347,7 @@ tty_font_spec_matches_charset (struct de
fixup_internal_substring (nonreloc, reloc, offset, &length);
the_nonreloc += offset;
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return !memchr (the_nonreloc, '/', length);
the_nonreloc = (const Ibyte *) memchr (the_nonreloc, '/', length);
if (!the_nonreloc)
@@ -379,7 +379,7 @@ tty_find_charset_font (Lisp_Object devic
return Qnil;
}
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return font;
return concat3 (font, build_string ("/"),
diff -r d2f4dd8611d9b88d0c16de371bc663a99bc6a305 -r 4143b78d0df09521124aed8cd0ed848b978130ba src/objects-xlike-inc.c
--- a/src/objects-xlike-inc.c Sat Dec 22 15:57:21 2007 -0800
+++ b/src/objects-xlike-inc.c Sun Dec 23 15:29:17 2007 +0100
@@ -125,7 +125,7 @@ x_font_spec_matches_charset (struct devi
#endif
/* Hmm, this smells bad. */
- if (UNBOUNDP (charset))
+ if (NILP (charset))
return 1;
/* Hack! Short font names don't have the registry in them,
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches