[C] xemacsweb: Add Czech Republic website mirror
16 years, 11 months
Adrian Aichner
COMMIT
Thank you, Centurion Hosting!
The master websites will be updated within minutes.
Adrian
xemacsweb ChangeLog patch:
Diff command: cvs -q diff -U 0
Files affected: Download/ChangeLog ChangeLog
Index: Download/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/Download/ChangeLog,v
retrieving revision 1.191
diff -u -U0 -r1.191 ChangeLog
--- Download/ChangeLog 13 Oct 2007 11:39:27 -0000 1.191
+++ Download/ChangeLog 22 Oct 2007 23:00:39 -0000
@@ -0,0 +1,4 @@
+2007-10-23 Adrian Aichner <adrian(a)xemacs.org>
+
+ * web-mirrors.content: Add Czech Republic website mirror.
+
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/ChangeLog,v
retrieving revision 1.275
diff -u -U0 -r1.275 ChangeLog
--- ChangeLog 2 Oct 2007 19:41:56 -0000 1.275
+++ ChangeLog 22 Oct 2007 23:00:39 -0000
@@ -0,0 +1,4 @@
+2007-10-23 Adrian Aichner <adrian(a)xemacs.org>
+
+ * index.content: Add Czech Republic website mirror.
+
xemacsweb source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: Download/web-mirrors.content
===================================================================
RCS index.content
===================================================================
RCS
Index: index.content
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/index.content,v
retrieving revision 1.182
diff -u -w -r1.182 index.content
--- index.content 26 Sep 2007 20:43:39 -0000 1.182
+++ index.content 22 Oct 2007 22:59:29 -0000
@@ -111,6 +111,18 @@
<dl>
<!-- one of (dd dt) -->
+ <dt><strong>2007-10-23</strong></dt>
+ <dd>
+ <p>
+ Thank you, <a
+ href="http://centurionhosting.net/">http://centurionhosting.net/</a>,
+ for joining the happy flock of XEmacs website mirrors with
+ theirs, serving the <a
+ href="http://xemacs.mirrors.centurionhosting.net/">Czech
+ Republic</a>!
+ </p>
+ </dd>
+ <!-- one of (dd dt) -->
<dt><strong>2007-09-24</strong></dt>
<dd>
<p>
Index: Download/web-mirrors.content
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/Download/web-mirrors.content,v
retrieving revision 1.29
diff -u -w -r1.29 web-mirrors.content
--- Download/web-mirrors.content 15 Aug 2007 22:17:35 -0000 1.29
+++ Download/web-mirrors.content 22 Oct 2007 22:59:29 -0000
@@ -122,6 +122,12 @@
</ul>
<p></p>
</li>
+ <li><h4>Czech Republic</h4>
+ <ul>
+ <li><a href="http://xemacs.mirrors.centurionhosting.net/">http://xemacs.mirrors....>
+ </ul>
+ <p></p>
+ </li>
<li><h4>Denmark</h4>
<ul>
<li><a href="http://www.dk.xemacs.org/">http://www.dk.xemacs.org/</a></li>
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Add Carbon-specific locale-determination code; respect the locale with mac-command-key-is-meta behaviour
16 years, 11 months
Aidan Kehoe
I don’t propose to commit this right now, but I suppose it’s worth posting
as a putative solution on the lines of
http://mid.gmane.org/18187.60360.900893.282407@parhasard.net .
lisp/ChangeLog addition:
2007-10-18 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/mule-cmds.el (init-locale-at-early-startup):
Use the Carbon locale if it is available.
* mule/mule-cmds.el (init-mule-at-startup):
Init carbon-current-language-unicode-set from the current language
environment's input method if necessary
src/ChangeLog addition:
2007-10-18 Aidan Kehoe <kehoea(a)parhasard.net>
* event-carbon.c:
Add much more debugging infrastructure.
* event-carbon.c (carbon_modifiers_to_emacs_modifiers):
Support the Option key as meta.
* event-carbon.c (retranslate_option):
Add; retranslate the option key if that is appropriate, that is,
if the character generated with option both:
1. Differs from the character generated without option and
2. Is either ASCII (because our users are programmers) or is necessary to
write the currently active language
then option + char-without-option should generate char-with-option;
otherwise option + char-without-option should generate
M-char-without-option.
* event-carbon.c (text_input_event_handler):
* event-carbon.c (handle_apple_event):
* event-carbon.c (generic_send_event_to_target):
* event-carbon.c (vars_of_event_carbon):
Provide mac-command-key-is-meta.
* intl-carbon.c:
* intl-carbon.c (carbon_get_pseudo_posix_locale):
New function, to pull a simulacrum of the current Carbon locale in
POSIX form based on the script, language and region codes.
* intl-carbon.c (Fcarbon_current_locale):
New function, on the model of mswindows-current-locale; algorithm
and code based on that of Mozilla.
* intl-carbon.c (syms_of_intl_carbon):
Make carbon-current-locale available.
* scrollbar-carbon.c (carbon_update_scrollbar_instance_status):
First argument is unused, mark it as so for the sake of the
compiler.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: src/scrollbar-carbon.c
===================================================================
RCS src/intl-carbon.c
===================================================================
RCS src/event-carbon.c
===================================================================
RCS lisp/mule/mule-cmds.el
===================================================================
RCS
Index: lisp/mule/mule-cmds.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/mule-cmds.el,v
retrieving revision 1.23.2.1
diff -u -u -r1.23.2.1 mule-cmds.el
--- lisp/mule/mule-cmds.el 2007/09/30 18:33:20 1.23.2.1
+++ lisp/mule/mule-cmds.el 2007/10/18 21:44:11
@@ -1464,17 +1464,25 @@
(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"))
@@ -1515,8 +1523,36 @@
(setq Manual-use-rosetta-man nil))
;; Register available input methods by loading LEIM list file.
- (load "leim-list.el" 'noerror 'nomessage 'nosuffix)
- )
+ (load leim-list-file-name 'noerror 'nomessage 'nosuffix)
+
+ (when-boundp 'carbon-current-language-unicode-set
+ (unless carbon-current-language-unicode-set
+ (setq carbon-current-language-unicode-set
+ (make-hash-table :size 256)))
+ (loop
+ for i from #x20 to #x7e
+ do (puthash i t carbon-current-language-unicode-set))
+ (let ((input-method (get-language-info current-language-environment 'input-method)))
+ (when (assoc input-method input-method-alist)
+ (flet ((map-tree
+ (tree)
+ (loop for branch in tree
+ do
+ (cond ((consp branch)
+ (map-tree branch))
+ ((or (stringp branch) (vectorp branch))
+ (map-tree (append branch nil)))
+ ((characterp branch)
+ (unless (< branch #x80)
+ (puthash (encode-char branch 'ucs) t
+ carbon-current-language-unicode-set))))))
+ (append-message (&rest args) ())
+ (clear-message (&rest args) ()))
+ (set-input-method input-method)
+ (loop for mapped in (mapcar #'cdr (cdr (quail-map)))
+ do
+ (map-tree mapped)))
+ (inactivate-input-method)))))
;; Code deleted: init-mule-tm (Enable the tm package by default)
Index: src/event-carbon.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/event-carbon.c,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 event-carbon.c
--- src/event-carbon.c 2007/09/30 19:48:26 1.1.2.3
+++ src/event-carbon.c 2007/10/18 21:44:11
@@ -30,13 +30,31 @@
#include "console-carbon-impl.h"
+#ifdef DEBUG_XEMACS
+static Fixnum debug_carbon_events;
+# define DEBUG_CARBON_EVENTS(FORMAT, ...) \
+ do { if (debug_carbon_events) stderr_out(FORMAT, __VA_ARGS__); } while (0)
+#else /* DEBUG_XEMACS */
+# define DEBUG_CARBON_EVENTS(format, ...)
+#endif /* DEBUG_XEMACS */
+
+
+#ifdef DEBUG_XEMACS
+extern Fixnum debug_emacs_events;
+#endif
+
EXFUN (Funicode_to_char, 2); /* In unicode.c. */
+extern Lisp_Object Vcarbon_current_language_unicode_set;
+
extern Lisp_Object Qcarbon_unicode; /* From intl-carbon.c. */
extern SELECT_TYPE process_only_mask; /* From event-unixoid.c. */
extern int track_mouse_down_on_scrollbar (void); /* from scrollbar-carbon.c. */
+/* true if using command key as meta key */
+Lisp_Object Vmac_command_key_is_meta;
+
static struct event_stream *carbon_event_stream;
static Lisp_Object carbon_user_event_queue;
@@ -50,8 +68,6 @@
static EventLoopTimerUPP timer_proc_UPP;
-static int debug_carbon_events = 0;
-
/* Used in frame-carbon.c. */
void carbon_enqueue_user_event (Lisp_Object);
@@ -250,7 +266,7 @@
{
int emacs_modifiers = 0;
- if (modifiers & cmdKey)
+ if (modifiers & (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey))
emacs_modifiers |= XEMACS_MOD_META;
if (modifiers & controlKey)
emacs_modifiers |= XEMACS_MOD_CONTROL;
@@ -343,6 +359,108 @@
}
}
+static void
+retranslate_option (EventRef keyboard_event, UInt32 modifiers,
+ UniChar *text, UInt32 text_size)
+{
+ UInt32 new_modifiers = modifiers & ~optionKey;
+ UInt32 keycode;
+ KeyboardLayoutRef layoutRef;
+ KeyboardLayoutKind layout_kind;
+
+ GetEventParameter (keyboard_event, kEventParamKeyCode, typeUInt32, NULL,
+ sizeof (keycode), NULL, &keycode);
+
+ if (KLGetCurrentKeyboardLayout (&layoutRef) != noErr)
+ invalid_operation ("Can't get keyboard layout ref", Qunbound);
+
+ if (KLGetKeyboardLayoutProperty (layoutRef, kKLKind,
+ (const void **)&layout_kind) != noErr)
+ invalid_operation ("Can't get keyboard layout kind", Qunbound);
+
+ /* Depending on whether KCHR or uchr keyboard layout data is
+ available, call KeyTranslate or UCKeyTranslate to determine the
+ actual character code that should be enqueued. */
+ if (layout_kind == kKLKCHRKind)
+ {
+ void *kchr_ptr;
+ UInt16 new_keycode;
+ static UInt32 deadKeyState = 0;
+ UniChar char_code;
+
+ DEBUG_CARBON_EVENTS ("%s", "layout kind is KCHR\n");
+
+ if (KLGetKeyboardLayoutProperty (layoutRef, kKLKCHRData,
+ (const void **)&kchr_ptr) != noErr)
+ invalid_operation ("Can't get KCHR keyboard layout", Qunbound);
+
+ new_keycode = new_modifiers & 0xff00;
+
+ if (GetEventKind (keyboard_event) == kEventRawKeyUp)
+ new_keycode |= (1 << 7);
+
+ new_keycode |= (keycode & 0x7f);
+
+ deadKeyState = 0;
+ char_code = KeyTranslate (kchr_ptr, new_keycode, &deadKeyState);
+
+ DEBUG_CARBON_EVENTS ("char_code is %x, text[0] is %x, check is %x\n",
+ char_code, text[0],
+ (!NILP (Vcarbon_current_language_unicode_set) &&
+ !NILP (Fgethash (make_int (text[0]),
+ Vcarbon_current_language_unicode_set, Qnil))));
+
+ if (2 == text_size && char_code != text[0] &&
+ (!NILP (Vcarbon_current_language_unicode_set) &&
+ !NILP (Fgethash (make_int (text[0]),
+ Vcarbon_current_language_unicode_set, Qnil))))
+ {
+ DEBUG_CARBON_EVENTS ("%s", "with a normal keylayout, are modifying event\n");
+ enqueue_input (text, text_size / 2, new_modifiers);
+ }
+ else
+ {
+ DEBUG_CARBON_EVENTS ("%s", "with a normal keylayout, not modifying event\n");
+ enqueue_input (&char_code, 1, modifiers);
+ }
+ }
+ else /* layout_kind == kKLuchrKind || layout_kind == kKLKCHRuchrKind */
+ {
+ UCKeyboardLayout *layout;
+ static UInt32 deadKeyState = 0;
+ UniChar output[16];
+ UniCharCount output_length;
+
+ DEBUG_CARBON_EVENTS ("%s", "layout kind is Unicode\n");
+
+ if (KLGetKeyboardLayoutProperty (layoutRef, kKLuchrData,
+ (const void**)&layout) != noErr)
+ invalid_operation ("Can't get uchr keyboard layout", Qunbound);
+
+ if (UCKeyTranslate (layout, keycode, kUCKeyActionDown, new_modifiers >> 8,
+ LMGetKbdType (), 0, &deadKeyState, 16,
+ &output_length, output) != noErr)
+ invalid_operation ("Can't translate key using uchr", Qunbound);
+
+ DEBUG_CARBON_EVENTS ("output[0] is %x, text[0] is %x\n", output[0], text[0]);
+
+
+ if (2 == text_size && char_code != text[0] &&
+ (!NILP (Vcarbon_current_language_unicode_set) &&
+ !NILP (Fgethash (make_int (text[0]),
+ Vcarbon_current_language_unicode_set, Qnil))))
+ {
+ DEBUG_CARBON_EVENTS ("%s", "with a normal keylayout, are modifying event\n");
+ enqueue_input (text, text_size / 2, new_modifiers);
+ }
+ else
+ {
+ DEBUG_CARBON_EVENTS ("%s", "with a normal keylayout, not modifying event\n");
+ enqueue_input (&char_code, 1, modifiers);
+ }
+ }
+}
+
static char *ascii_to_keysymstr_table[] = {
/*0x00*/ 0, "home", 0, "kp-enter", "end", "help", 0, 0,
/*0x08*/ "backspace", "tab", 0, "prior", "next", "return", 0, 0,
@@ -419,34 +537,49 @@
UniChar *text = (UniChar *)alloca_extbytes (text_size);
if (GetEventParameter (event, kEventParamTextInputSendText, typeUnicodeText, NULL, text_size, NULL, text) != noErr)
invalid_operation ("Can't get input text", Qunbound);
+
+ DEBUG_CARBON_EVENTS ("modifiers are %x, keycode is %x, text_size is %x\n",
+ modifiers, keycode, text_size);
+ DEBUG_CARBON_EVENTS ("optionKey is %x\n",
+ optionKey);
+
+ if (text_size == 2 && text[0] <= 127 &&
+ (modifiers & (controlKey | cmdKey)) && keycode_needs_retranslate[keycode])
+ {
+ retranslate_keycode (keyboard_event, modifiers);
+ return noErr;
+ }
+ if (NILP(Vmac_command_key_is_meta) && (modifiers & optionKey))
+ {
+ DEBUG_CARBON_EVENTS ("%s",
+ "command key is not meta, and the modifiers include option\n");
+ retranslate_option (keyboard_event, modifiers, text, text_size);
+ return noErr;
+ }
+
if (text_size == 2 && text[0] <= 127)
{
- if ((modifiers & (controlKey | cmdKey)) && keycode_needs_retranslate[keycode])
- retranslate_keycode (keyboard_event, modifiers);
+ char *keysymstr = ascii_to_keysymstr_table[text[0]];
+ if (keysymstr)
+ enqueue_one_input_event (KEYSYM (keysymstr), carbon_modifiers_to_emacs_modifiers (modifiers));
else
- {
- char *keysymstr = ascii_to_keysymstr_table[text[0]];
- if (keysymstr)
- enqueue_one_input_event (KEYSYM (keysymstr), carbon_modifiers_to_emacs_modifiers (modifiers));
- else
- {
- if (ascii_needs_keycode_lookup[text[0]])
- {
- char *keysymstr = keycode_to_keysymstr_table[keycode];
- if (keysymstr)
- enqueue_one_input_event (KEYSYM (keysymstr), carbon_modifiers_to_emacs_modifiers (modifiers));
- else
- enqueue_input (text, text_size / 2, modifiers);
- }
- else
- enqueue_input (text, text_size / 2, modifiers);
- }
- }
+ {
+ if (ascii_needs_keycode_lookup[text[0]])
+ {
+ char *keysymstr = keycode_to_keysymstr_table[keycode];
+ if (keysymstr)
+ enqueue_one_input_event (KEYSYM (keysymstr), carbon_modifiers_to_emacs_modifiers (modifiers));
+ else
+ enqueue_input (text, text_size / 2, modifiers);
+ }
+ else
+ enqueue_input (text, text_size / 2, modifiers);
+ }
+ return noErr;
}
- else
- enqueue_input (text, text_size / 2, modifiers);
-
+
+ enqueue_input (text, text_size / 2, modifiers);
return noErr;
}
@@ -503,8 +636,12 @@
stderr_out ("Can't convert to event record.\n");
OSErr s = AEProcessAppleEvent (&event_record);
- if (s != noErr && debug_carbon_events)
- stderr_out ("Apple event not processed (error = %d).\n", s);
+
+
+ if (s != noErr)
+ {
+ DEBUG_CARBON_EVENTS ("Apple event not processed (error = %d).\n", s);
+ }
}
static void
@@ -517,9 +654,9 @@
EventClass event_class = GetEventClass (event);
UInt32 event_kind = GetEventKind (event);
- stderr_out ("Event not sent to or ignored by target: ");
+ DEBUG_CARBON_EVENTS ("%s", "Event not sent to or ignored by target: ");
debug_print_event (event_class, event_kind);
- stderr_out ("\n");
+ DEBUG_CARBON_EVENTS ("%s", "\n");
}
}
@@ -922,6 +1059,10 @@
vars_of_event_carbon (void)
{
/* reinit_vars_of_event_carbon (); */
+ DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta /*
+Non-nil means that the command key is used as the XEmacs meta key.
+Otherwise the option key is used. */ );
+ Vmac_command_key_is_meta = Qt;
}
void
Index: src/intl-carbon.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/intl-carbon.c,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 intl-carbon.c
--- src/intl-carbon.c 2007/09/30 21:40:13 1.1.2.3
+++ src/intl-carbon.c 2007/10/18 21:44:12
@@ -20,13 +20,322 @@
#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);
+ DEFVAR_LISP ("carbon-current-language-unicode-set",
+ &Vcarbon_current_language_unicode_set /*
+Hash table mapping those Unicode code points needed for the current langenv to t.
+
+Can also be nil; if it is non-nil will normally include all of ASCII.
+*/);
+ Vcarbon_current_language_unicode_set = Qnil;
}
void
Index: src/scrollbar-carbon.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Attic/scrollbar-carbon.c,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 scrollbar-carbon.c
--- src/scrollbar-carbon.c 2007/09/30 19:48:31 1.1.2.3
+++ src/scrollbar-carbon.c 2007/10/18 21:44:12
@@ -307,7 +307,7 @@
}
static void
-carbon_update_scrollbar_instance_status (struct window *w, int active, int size, struct scrollbar_instance *sb)
+carbon_update_scrollbar_instance_status (struct window * UNUSED (w), int active, int size, struct scrollbar_instance *sb)
{
SetControlVisibility ((ControlRef) sb->scrollbar_data, active && size, TRUE);
}
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [COMMIT] Fix a bug with VM and the console-tty-output-coding-system
16 years, 12 months
Aidan Kehoe
Ar an triú lá déag de mí Deireadh Fómhair, scríobh Stephen J. Turnbull:
> VETO
>
> Aidan, Reviewers do *not* have self-approval privileges in packages
> unless they are listed as maintained by "XEmacs Dev Team". You need
> (a) the maintainer's approval, (b) Norbert's approval, or (c) "clear
> and present danger" (a serious security hole or the like). This is an
> important aspect of our contract with the maintainers, who are just as
> unhappy about dealing with conflicts between their working version and
> XEmacs CVS as you are.
>
> VM is maintained by an external maintainer, listed as Kyle Jones in
> the aliases but I believe it's currently Robert Fenk. Please
> coordinate your VM patches with him and other package patches with the
> appropriate maintainers.
VM in the packages tree was never maintained by Kyle, the details in the
makefile to the contrary. All the commits have been from Steve Baur, Steve
Young, or myself. And we haven’t yet heard anything back from Robert
Widhopf-Fenk on whether he wants to maintain it in the XEmacs package tree,
so it’s not realistic to say that he’s the maintainer right now.
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Use raw-text, not no-conversion for iso-8859-1 on non-Mule.
16 years, 12 months
Aidan Kehoe
lisp/ChangeLog addition:
2007-10-14 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el:
Use raw-text, not no-conversion for iso-8859-1 on non-Mule;
preserves the line ending autodetection, but doesn't do coding
system autodetection. Thank you Stephen.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/coding.el
===================================================================
RCS
Index: lisp/coding.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/coding.el,v
retrieving revision 1.12
diff -u -r1.12 coding.el
--- lisp/coding.el 2007/10/13 14:08:28 1.12
+++ lisp/coding.el 2007/10/15 10:53:01
@@ -266,11 +266,11 @@
(when (not (featurep 'mule))
(define-coding-system-alias 'escape-quoted 'binary)
;; these are so that gnus and friends work when not mule
- (define-coding-system-alias 'iso-8859-1 'no-conversion)
+ (define-coding-system-alias 'iso-8859-1 'raw-text)
;; We're misrepresenting ourselves to the gnus code by saying we support
;; both.
- ; (define-coding-system-alias 'iso-8859-2 'no-conversion)
- (define-coding-system-alias 'ctext 'binary))
+ ; (define-coding-system-alias 'iso-8859-2 'raw-text)
+ (define-coding-system-alias 'ctext 'raw-text))
(make-compatible-variable 'enable-multibyte-characters "Unimplemented")
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Add a correct version of the (featurep 'xemacs) optimisation
16 years, 12 months
Aidan Kehoe
Despite that this optimisation can’t really be added to distinguish between
SXEmacs and XEmacs, I still think it’s worthwhile. Here is X for the top
fifteen most frequent calls to (featurep 'X) in the packages tree:
250 xemacs
58 mule
42 xpm
32 menubar
27 toolbar
19 custom
15 infodock
12 sparcworks
10 ediff-init
10 itimer
10 skk-cursor
10 x
8 ange-ftp
8 font-lock
There are in total 860 such calls (that is, simple (featreup 'X) calls), so
eliminating (featurep 'xemacs) is disproportionately helpful. The other
features in my patch, not so much, but they do provide a framework should we
ever take the time to work out which features have always been available
ever since the last time our bytecode became incompatible.
2007-10-01 Aidan Kehoe <kehoea(a)parhasard.net>
* byte-optimize.el:
* byte-optimize.el (byte-optimize-ever-present-features): New.
* byte-optimize.el (byte-optimize-featurep): New.
Optimise calls to (featurep 'xemacs) to t, since our byte code
refuses to run on GNU Emacs. Also optimises away checks for cl,
cl-extra, cl-19 and backquote, a conservative list of those
features that have been available in every XEmacs build since the
last time our opcodes changed.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/byte-optimize.el
===================================================================
RCS
Index: lisp/byte-optimize.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/byte-optimize.el,v
retrieving revision 1.12
diff -u -r1.12 byte-optimize.el
--- lisp/byte-optimize.el 2007/09/15 19:11:55 1.12
+++ lisp/byte-optimize.el 2007/10/01 15:21:25
@@ -1169,6 +1169,21 @@
(eval form)
form)))
+(defvar byte-optimize-ever-present-features
+ '(xemacs cl cl-extra cl-19 backquote))
+
+(put 'featurep 'byte-optimizer 'byte-optimize-featurep)
+(defun byte-optimize-featurep (form)
+ (let ((to-check (cdr-safe form)))
+ (if (memq (car-safe
+ (cdr-safe
+ (car-safe
+ (cdr-safe
+ form))))
+ byte-optimize-ever-present-features)
+ t
+ form)))
+
;;; enumerating those functions which need not be called if the returned
;;; value is not used. That is, something like
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Re: Fix the nomule package build; eliminate some non-X compile time warnings
16 years, 12 months
Aidan Kehoe
Ar an triú lá déag de mí Deireadh Fómhair, scríobh Stephen J. Turnbull:
> QUERY
>
> > * coding.el:
> > * coding.el ('automatic-conversion): Removed.
> > On non-Mule builds, alias 'iso-8859-1 to 'no-conversion, not
> > 'undecided, since the latter does coding system autorecognition
> > that is useless and leads to stack overflows without Mule.
>
> I believe this is incorrect, and the problem is deeper. The fix
> should be done in the detection code, because 'undecided *is* useful
> on no-Mule, to detect EOL conventions. The detection code should not
> try to detect coding systems, but hardcode to raw-text.
>
> Also problematic, AFAIK 'no-conversion is 'binary and thus forces Unix
> eols. The right coding system would be raw-text, IIRC (although this
> nomenclature may be screwed up for GNU compatibility).
(decode-coding-string "hi there\r\n everyone" 'no-conversion)
=> "hi there^M
everyone"
(decode-coding-string "hi there\r\n everyone" 'raw-text)
=> "hi there
everyone"
Good point. I was misled by the existence of no-conversion-{unix, dos, mac};
I thought that implied autodetection for the coding system without line
ending information, but that is not so.
Okay, I’ve made the below change and Tramp builds. It still seems to me that
undecided is not useful on no-Mule, given the existence of raw-text to do
line ending convention detection.
lisp/ChangeLog addition:
2007-10-14 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el:
Use raw-text, not no-conversion for iso-8859-1 on non-Mule;
preserves the line ending autodetection, but doesn't do coding
system autodetection. Thank you Stephen.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/coding.el
===================================================================
RCS
Index: lisp/coding.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/coding.el,v
retrieving revision 1.12
diff -u -u -r1.12 coding.el
--- lisp/coding.el 2007/10/13 14:08:28 1.12
+++ lisp/coding.el 2007/10/14 11:54:21
@@ -266,11 +266,11 @@
(when (not (featurep 'mule))
(define-coding-system-alias 'escape-quoted 'binary)
;; these are so that gnus and friends work when not mule
- (define-coding-system-alias 'iso-8859-1 'no-conversion)
+ (define-coding-system-alias 'iso-8859-1 'raw-text)
;; We're misrepresenting ourselves to the gnus code by saying we support
;; both.
- ; (define-coding-system-alias 'iso-8859-2 'no-conversion)
- (define-coding-system-alias 'ctext 'binary))
+ ; (define-coding-system-alias 'iso-8859-2 'raw-text)
+ (define-coding-system-alias 'ctext 'raw-text))
(make-compatible-variable 'enable-multibyte-characters "Unimplemented")
--
On the quay of the little Black Sea port, where the rescued pair came once
more into contact with civilization, Dobrinton was bitten by a dog which was
assumed to be mad, though it may only have been indiscriminating. (Saki)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[A] GOTCHA !!! (Fix image-related years-old bugs)
16 years, 12 months
Didier Verna
Dear reviewers,
the following patch finally fixes the systematic bugs that I've
been experiencing with 21.5 in the past 3 years or so. The reason it's
been so hard on me was not that the bugs, in themselves, were difficult
to figure out. The reason was that they occur only with
log/display-warnings-minimum-level set to 'debug, and it's the code
signaling / displaying the errors that crashes (there are still a lot of
bugs in this area, especially when errors occur during redisplay). So my
investigations were completely mislead at first, and I had to
random-guess break points little by little in redisplay in order to
avoid crashing in a lisp backtrace unrelated to the original problem :-/
But now, I think we're finally ready for a 21.5 release ;-)
I'll apply it in a few days if nobody objects.
lisp/ChangeLog addition:
2007-10-10 Didier Verna <didier(a)xemacs.org>
* glyphs.el (init-glyphs): Use more sensible image conversion
rules for tty consoles (don't inline images, explicitely recognize
more image types). Avoid images on stream consoles altogether.
src/ChangeLog addition:
2007-10-10 Didier Verna <didier(a)xemacs.org>
* glyphs.c (potential_pixmap_file_instantiator): Make a difference
between not being able to locate a pixmap file, and not having a
console method to do so.
* glyphs.c (simple_image_type_normalize): Notice that difference,
and don't err when the method is unavailable.
* glyphs.c (xbm_normalize): Ditto.
* glyphs.c (xface_normalize): Ditto.
* glyphs.c (xpm_normalize): Ditto.
* glyphs-shared.c (shared_resource_normalize): Ditto.
* glyphs-x.c (x_locate_pixmap_file): Recognize ~ pathnames as
fully qualified.
XEmacs source patch:
Diff command: cvs -q diff -u -t -b -B -w
Files affected: src/glyphs.c src/glyphs-x.c src/glyphs-shared.c lisp/glyphs.el
Index: lisp/glyphs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/glyphs.el,v
retrieving revision 1.9
diff -u -u -t -b -B -w -r1.9 glyphs.el
--- lisp/glyphs.el 13 Nov 2005 07:39:28 -0000 1.9
+++ lisp/glyphs.el 10 Oct 2007 08:27:56 -0000
@@ -2,6 +2,7 @@
;; Copyright (C) 1994, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 2000, 2005 Ben Wing.
+;; Copyright (C) 2007 Didier Verna
;; Author: Chuck Thompson <cthomp(a)cs.uiuc.edu>, Ben Wing <ben(a)xemacs.org>
;; Maintainer: XEmacs Development Team
@@ -1184,24 +1185,33 @@
[jpeg :data nil] 2)))
,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2)))
,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2)))
- ("" [string :data nil] 2)
+ ;; No, I don't think we want to inline images... -- dvl
+ ;; ("" [string :data nil] 2)
("" [nothing]))))
;; #### this should really be formatted-string, not string but we
;; don't have it implemented yet
- ;;
- ;; #define could also mean a bitmap as well as a version 1 XPM. Who
- ;; cares. We don't want the file contents getting converted to a
- ;; string in either case which is why the entry is there.
(if (featurep 'tty)
(progn
(set-console-type-image-conversion-list
'tty
- '(("^#define" [string :data "[xpm]"])
- ("\\`X-Face:" [string :data "[xface]"])
+ '(("\\.xpm\\'" [string :data nil] 2)
+ ("\\.xbm\\'" [string :data nil] 2)
+ ;; #define could also mean a bitmap as well as a version 1 XPM. Who
+ ;; cares.
+ ("^#define" [string :data "[xpm]"])
("\\`/\\* XPM \\*/" [string :data "[xpm]"])
- ("\\`GIF87" [string :data "[gif]"])
+ ("\\`X-Face:" [string :data "[xface]"])
+ ("\\.gif\\'" [string :data nil] 2)
+ ("\\`GIF8[79]" [string :data "[gif]"])
+ ("\\.jpe?g\\'" [string :data nil] 2)
("\\`\377\330\340\000\020JFIF" [string :data "[jpeg]"])
- ("" [string :data nil] 2)
+ ;; all of the JFIF-format JPEG's that I've seen begin with
+ ;; the following. I have no idea if this is standard.
+ ("\\`\377\330\377\340\000\020JFIF" [string :data "[jpeg]"])
+ ("\\.png\\'" [string :data nil] 2)
+ ("\\`\211PNG" [string :data "[png]"])
+ ;; No, I don't think we want to inline images... -- dvl
+ ;;("" [string :data nil] 2)
;; this last one is here for pointers and icons and such --
;; strings are not allowed so they will be ignored.
("" [nothing])))
@@ -1217,6 +1227,10 @@
;; finish initializing hscroll glyph -- created internally
;; because it has a built-in bitmap
(set-glyph-image hscroll-glyph "$" 'global 'tty)))
+
+ ;; For streams, we don't want images at all -- dvl
+ (set-console-type-image-conversion-list 'stream '(("" [nothing])))
+
(set-glyph-image octal-escape-glyph "\\")
(set-glyph-image control-arrow-glyph "^")
Index: src/glyphs-shared.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-shared.c,v
retrieving revision 1.8
diff -u -u -t -b -B -w -r1.8 glyphs-shared.c
--- src/glyphs-shared.c 4 Nov 2004 23:06:33 -0000 1.8
+++ src/glyphs-shared.c 10 Oct 2007 08:27:56 -0000
@@ -1,10 +1,10 @@
/* Routines shared between window-system backends for glyph objects.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 1995 Board of Trustees, University of Illinois.
+ Copyright (C) 1995 Board of Trustees, University of Illinois
Copyright (C) 1995 Tinker Systems
Copyright (C) 1995, 1996, 2001 Ben Wing
Copyright (C) 1995 Sun Microsystems
- Copyright (C) 1998, 1999, 2000 Andy Piper.
+ Copyright (C) 1998, 1999, 2000 Andy Piper
This file is part of XEmacs.
@@ -75,12 +75,15 @@
file = potential_pixmap_file_instantiator (inst, Q_file, Q_data,
console_type);
+ if (NILP (file)) /* normalization impossible for the console type */
+ RETURN_UNGCPRO (Qnil);
+
if (CONSP (file)) /* failure locating filename */
signal_double_image_error ("Opening pixmap file",
"no such file or directory",
Fcar (file));
- if (NILP (file)) /* no conversion necessary */
+ if (EQ (file, Qt)) /* no conversion necessary */
RETURN_UNGCPRO (inst);
alist = tagged_vector_to_alist (inst);
Index: src/glyphs-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.84
diff -u -u -t -b -B -w -r1.84 glyphs-x.c
--- src/glyphs-x.c 26 Nov 2005 11:46:08 -0000 1.84
+++ src/glyphs-x.c 10 Oct 2007 08:27:56 -0000
@@ -550,16 +550,19 @@
where the file might be located. Return a full pathname if found;
otherwise, return Qnil. */
+/* #### FIXME: when Qnil is returned, the caller can't make a difference
+ #### between a non existing X device, an unreadable file, or an actual
+ #### failure to locate the file, so the issued message is really not
+ #### informative. -- dvl */
static Lisp_Object
x_locate_pixmap_file (Lisp_Object name)
{
/* This function can GC if IN_REDISPLAY is false */
Display *display;
- /* Check non-absolute pathnames with a directory component relative to
- the search path; that's the way Xt does it. */
/* #### Unix-specific */
- if (string_byte (name, 0) == '/' ||
+ if (string_byte (name, 0) == '~' ||
+ string_byte (name, 0) == '/' ||
(string_byte (name, 0) == '.' &&
(string_byte (name, 1) == '/' ||
(string_byte (name, 1) == '.' &&
@@ -571,6 +574,8 @@
return Qnil;
}
+ /* Check non-absolute pathnames with a directory component relative to
+ the search path; that's the way Xt does it. */
{
Lisp_Object defx = get_default_device (Qx);
if (NILP (defx))
Index: src/glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.56
diff -u -u -t -b -B -w -r1.56 glyphs.c
--- src/glyphs.c 15 Aug 2007 11:06:09 -0000 1.56
+++ src/glyphs.c 10 Oct 2007 08:27:56 -0000
@@ -1,9 +1,10 @@
/* Generic glyph/image implementation + display tables
- Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
+ Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
Copyright (C) 1995 Tinker Systems
Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004, 2005 Ben Wing
Copyright (C) 1995 Sun Microsystems
Copyright (C) 1998, 1999, 2000 Andy Piper
+ Copyright (C) 2007 Didier Verna
This file is part of XEmacs.
@@ -2554,19 +2555,26 @@
if (!NILP (file) && NILP (data))
{
- Lisp_Object retval = MAYBE_LISP_CONTYPE_METH
- (decode_console_type(console_type, ERROR_ME),
- locate_pixmap_file, (file));
+ struct console_methods *meths
+ = decode_console_type(console_type, ERROR_ME);
+
+ if (HAS_CONTYPE_METH_P (meths, locate_pixmap_file))
+ {
+ Lisp_Object retval
+ = CONTYPE_METH (meths, locate_pixmap_file, (file));
if (!NILP (retval))
return retval;
else
return Fcons (file, Qnil); /* should have been file */
}
-
+ else /* method unavailable */
return Qnil;
}
+ return Qt;
+}
+
Lisp_Object
simple_image_type_normalize (Lisp_Object inst, Lisp_Object console_type,
Lisp_Object image_type_tag)
@@ -2589,12 +2597,15 @@
file = potential_pixmap_file_instantiator (inst, Q_file, Q_data,
console_type);
+ if (NILP (file)) /* normalization impossible for the console type */
+ RETURN_UNGCPRO (Qnil);
+
if (CONSP (file)) /* failure locating filename */
signal_double_image_error ("Opening pixmap file",
"no such file or directory",
Fcar (file));
- if (NILP (file)) /* no conversion necessary */
+ if (EQ (file, Qt)) /* no conversion necessary */
RETURN_UNGCPRO (inst);
alist = tagged_vector_to_alist (inst);
@@ -2793,17 +2804,20 @@
mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file,
Q_mask_data, console_type);
+ if (NILP (file)) /* normalization impossible for the console type */
+ RETURN_UNGCPRO (Qnil);
+
if (CONSP (file)) /* failure locating filename */
signal_double_image_error ("Opening bitmap file",
"no such file or directory",
Fcar (file));
- if (NILP (file) && NILP (mask_file)) /* no conversion necessary */
+ if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */
RETURN_UNGCPRO (inst);
alist = tagged_vector_to_alist (inst);
- if (!NILP (file))
+ if (!EQ (file, Qt))
{
int xhot, yhot;
Lisp_Object data = bitmap_to_lisp_data (file, &xhot, &yhot, 0);
@@ -2820,6 +2834,7 @@
alist);
}
+ /* #### FIXME: Hmmm... what about mask being Qt ?? -- dvl */
alist = xbm_mask_file_munging (alist, file, mask_file, console_type);
{
@@ -2878,14 +2893,19 @@
mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file,
Q_mask_data, console_type);
+ if (NILP (file)) /* normalization impossible for the console type */
+ RETURN_UNGCPRO (Qnil);
+
if (CONSP (file)) /* failure locating filename */
signal_double_image_error ("Opening bitmap file",
"no such file or directory",
Fcar (file));
- if (NILP (file) && NILP (mask_file)) /* no conversion necessary */
+ if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */
RETURN_UNGCPRO (inst);
+
+ /* #### FIXME: and what about file / mask being Qt ? -- dvl */
alist = tagged_vector_to_alist (inst);
{
@@ -3094,6 +3114,9 @@
file = potential_pixmap_file_instantiator (inst, Q_file, Q_data,
console_type);
+ if (NILP (file)) /* normalization impossible for the console type */
+ RETURN_UNGCPRO (Qnil);
+
if (CONSP (file)) /* failure locating filename */
signal_double_image_error ("Opening pixmap file",
"no such file or directory",
@@ -3102,13 +3125,13 @@
color_symbols = find_keyword_in_vector_or_given (inst, Q_color_symbols,
Qunbound);
- if (NILP (file) && !UNBOUNDP (color_symbols))
+ if (EQ (file, Qt) && !UNBOUNDP (color_symbols))
/* no conversion necessary */
RETURN_UNGCPRO (inst);
alist = tagged_vector_to_alist (inst);
- if (!NILP (file))
+ if (!NILP (file) && !EQ (file, Qt))
{
Lisp_Object data = pixmap_to_lisp_data (file, 0);
alist = remassq_no_quit (Q_file, alist);
--
New @-quartet featured CD Review !!
http://www.indie-music.com/modules.php?name=News&file=article&sid=6457
Didier Verna, didier(a)lrde.epita.fr, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[C] xemacs-21.5-clean: sync nt/xemacs.mak and man/Makefile
16 years, 12 months
Adrian Aichner
COMMIT
xemacs-21.5-clean ChangeLog patch:
Diff command: cvs -q diff -U 0
Files affected: man/ChangeLog nt/ChangeLog
Index: man/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/ChangeLog,v
retrieving revision 1.361
diff -u -U0 -r1.361 ChangeLog
--- man/ChangeLog 1 Oct 2007 08:07:47 -0000 1.361
+++ man/ChangeLog 15 Oct 2007 06:53:37 -0000
@@ -0,0 +1,5 @@
+2007-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * Makefile (info_files): Sync nt/xemacs.mak and man/Makefile.
+ Sort enries to easy future syncs.
+
Index: nt/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/ChangeLog,v
retrieving revision 1.206
diff -u -U0 -r1.206 ChangeLog
--- nt/ChangeLog 21 May 2007 05:02:09 -0000 1.206
+++ nt/ChangeLog 15 Oct 2007 06:53:37 -0000
@@ -0,0 +1,6 @@
+2007-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * xemacs.mak (INFO_FILES): Sync nt/xemacs.mak and man/Makefile
+ (adding beta.info).
+ * xemacs.mak (LISPREF_SRCS): Ditto. Adding packages.texi.
+
xemacs-21.5-clean source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: man/Makefile
===================================================================
RCS nt/xemacs.mak
===================================================================
RCS
Index: nt/xemacs.mak
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.122
diff -u -w -r1.122 xemacs.mak
--- nt/xemacs.mak 12 Dec 2006 14:54:49 -0000 1.122
+++ nt/xemacs.mak 15 Oct 2007 06:52:42 -0000
@@ -1447,21 +1447,22 @@
MANDIR = $(SRCROOT)\man
INFODIR = $(SRCROOT)\info
INFO_FILES= \
+ $(INFODIR)\beta.info \
$(INFODIR)\cl.info \
$(INFODIR)\custom.info \
$(INFODIR)\emodules.info \
$(INFODIR)\external-widget.info \
$(INFODIR)\info.info \
+ $(INFODIR)\internals.info \
+ $(INFODIR)\lispref.info \
+ $(INFODIR)\new-users-guide.info \
$(INFODIR)\standards.info \
$(INFODIR)\term.info \
$(INFODIR)\termcap.info \
$(INFODIR)\texinfo.info \
$(INFODIR)\widget.info \
$(INFODIR)\xemacs-faq.info \
- $(INFODIR)\xemacs.info \
- $(INFODIR)\lispref.info \
- $(INFODIR)\new-users-guide.info \
- $(INFODIR)\internals.info
+ $(INFODIR)\xemacs.info
{$(MANDIR)}.texi{$(INFODIR)}.info:
cd $(MANDIR)
@@ -1559,6 +1560,7 @@
$(MANDIR)\lispref\numbers.texi \
$(MANDIR)\lispref\objects.texi \
$(MANDIR)\lispref\os.texi \
+ $(MANDIR)\lispref\packaging.texi \
$(MANDIR)\lispref\positions.texi \
$(MANDIR)\lispref\processes.texi \
$(MANDIR)\lispref\range-tables.texi \
Index: man/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/Makefile,v
retrieving revision 1.37
diff -u -w -r1.37 Makefile
--- man/Makefile 30 Sep 2007 15:26:05 -0000 1.37
+++ man/Makefile 15 Oct 2007 06:52:42 -0000
@@ -50,16 +50,16 @@
$(INFODIR)/emodules.info \
$(INFODIR)/external-widget.info \
$(INFODIR)/info.info \
- $(INFODIR)/lispref.info \
$(INFODIR)/internals.info \
+ $(INFODIR)/lispref.info \
$(INFODIR)/new-users-guide.info \
$(INFODIR)/standards.info \
$(INFODIR)/term.info \
$(INFODIR)/termcap.info \
$(INFODIR)/texinfo.info \
$(INFODIR)/widget.info \
- $(INFODIR)/xemacs.info \
- $(INFODIR)/xemacs-faq.info
+ $(INFODIR)/xemacs-faq.info \
+ $(INFODIR)/xemacs.info
html_files = \
$(HTMLDIR)/beta.html \
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] xemacs-21.5-clean: sync nt/xemacs.mak and man/Makefile
16 years, 12 months
Adrian Aichner
xemacs-21.5-clean ChangeLog patch:
Diff command: cvs -q diff -U 0
Files affected: man/ChangeLog nt/ChangeLog
Index: man/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/ChangeLog,v
retrieving revision 1.361
diff -u -U0 -r1.361 ChangeLog
--- man/ChangeLog 1 Oct 2007 08:07:47 -0000 1.361
+++ man/ChangeLog 15 Oct 2007 06:53:37 -0000
@@ -0,0 +1,5 @@
+2007-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * Makefile (info_files): Sync nt/xemacs.mak and man/Makefile.
+ Sort enries to easy future syncs.
+
Index: nt/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/ChangeLog,v
retrieving revision 1.206
diff -u -U0 -r1.206 ChangeLog
--- nt/ChangeLog 21 May 2007 05:02:09 -0000 1.206
+++ nt/ChangeLog 15 Oct 2007 06:53:37 -0000
@@ -0,0 +1,6 @@
+2007-10-15 Adrian Aichner <adrian(a)xemacs.org>
+
+ * xemacs.mak (INFO_FILES): Sync nt/xemacs.mak and man/Makefile
+ (adding beta.info).
+ * xemacs.mak (LISPREF_SRCS): Ditto. Adding packages.texi.
+
xemacs-21.5-clean source patch:
Diff command: cvs -f -z3 -q diff -u -w -N
Files affected: man/Makefile
===================================================================
RCS nt/xemacs.mak
===================================================================
RCS
Index: nt/xemacs.mak
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.122
diff -u -w -r1.122 xemacs.mak
--- nt/xemacs.mak 12 Dec 2006 14:54:49 -0000 1.122
+++ nt/xemacs.mak 15 Oct 2007 06:52:42 -0000
@@ -1447,21 +1447,22 @@
MANDIR = $(SRCROOT)\man
INFODIR = $(SRCROOT)\info
INFO_FILES= \
+ $(INFODIR)\beta.info \
$(INFODIR)\cl.info \
$(INFODIR)\custom.info \
$(INFODIR)\emodules.info \
$(INFODIR)\external-widget.info \
$(INFODIR)\info.info \
+ $(INFODIR)\internals.info \
+ $(INFODIR)\lispref.info \
+ $(INFODIR)\new-users-guide.info \
$(INFODIR)\standards.info \
$(INFODIR)\term.info \
$(INFODIR)\termcap.info \
$(INFODIR)\texinfo.info \
$(INFODIR)\widget.info \
$(INFODIR)\xemacs-faq.info \
- $(INFODIR)\xemacs.info \
- $(INFODIR)\lispref.info \
- $(INFODIR)\new-users-guide.info \
- $(INFODIR)\internals.info
+ $(INFODIR)\xemacs.info
{$(MANDIR)}.texi{$(INFODIR)}.info:
cd $(MANDIR)
@@ -1559,6 +1560,7 @@
$(MANDIR)\lispref\numbers.texi \
$(MANDIR)\lispref\objects.texi \
$(MANDIR)\lispref\os.texi \
+ $(MANDIR)\lispref\packaging.texi \
$(MANDIR)\lispref\positions.texi \
$(MANDIR)\lispref\processes.texi \
$(MANDIR)\lispref\range-tables.texi \
Index: man/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/man/Makefile,v
retrieving revision 1.37
diff -u -w -r1.37 Makefile
--- man/Makefile 30 Sep 2007 15:26:05 -0000 1.37
+++ man/Makefile 15 Oct 2007 06:52:42 -0000
@@ -50,16 +50,16 @@
$(INFODIR)/emodules.info \
$(INFODIR)/external-widget.info \
$(INFODIR)/info.info \
- $(INFODIR)/lispref.info \
$(INFODIR)/internals.info \
+ $(INFODIR)/lispref.info \
$(INFODIR)/new-users-guide.info \
$(INFODIR)/standards.info \
$(INFODIR)/term.info \
$(INFODIR)/termcap.info \
$(INFODIR)/texinfo.info \
$(INFODIR)/widget.info \
- $(INFODIR)/xemacs.info \
- $(INFODIR)/xemacs-faq.info
+ $(INFODIR)/xemacs-faq.info \
+ $(INFODIR)/xemacs.info
html_files = \
$(HTMLDIR)/beta.html \
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT (mh-e)] note new maintainer
16 years, 12 months
Mike Kupfer
NOTE: This patch has been committed.
BTW, I assume I don't have commit access to the top-level MAINTAINERS
file. Could someone (Norbert?) fix the entries for gnus and mh-e to
point to me? (Come to think of it, why is this file under CVS, anyway?
Can't it be generated from the package makefiles?)
Thanks.
ChangeLog addition:
2007-10-14 Mike Kupfer <mike.kupfer(a)xemacs.org>
* Makefile (MAINTAINER): change from XEmacs Beta to me.
mh-e source patch:
Diff command: cvs -q diff -uN
Files affected: Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mh-e/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- Makefile 13 Oct 2007 21:40:02 -0000 1.47
+++ Makefile 14 Oct 2007 23:44:13 -0000
@@ -19,7 +19,7 @@
VERSION = 1.30
AUTHOR_VERSION = 7.4.2
-MAINTAINER = XEmacs Beta <xemacs-beta(a)xemacs.org>
+MAINTAINER = Mike Kupfer <mike.kupfer(a)xemacs.org>
PACKAGE = mh-e
PKG_TYPE = regular
REQUIRES = gnus mail-lib xemacs-base speedbar rmail tm apel sh-script fsf-compat \
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches