Mercurial > hg > xemacs-beta
annotate src/sunpro.c @ 4568:1d74a1d115ee
Add #'query-coding-region tests; do the work necessary to get them running.
lisp/ChangeLog addition:
2008-12-28 Aidan Kehoe <kehoea@parhasard.net>
* coding.el (default-query-coding-region):
Declare using defun*, so we can #'return-from to it on
encountering a safe-charsets value of t. Comment out a few
debug messages.
(query-coding-region):
Correct the docstring, it deals with a region, not a string.
(unencodable-char-position):
Correct the implementation for non-nil COUNT, special-case a zero
value for count, treat it as one. Don't rely on dynamic scope when
calling the main lambda.
* unicode.el (unicode-query-coding-region):
Comment out some debug messages here.
* mule/mule-coding.el (8-bit-fixed-query-coding-region):
Comment out some debug messages here.
* code-init.el (raw-text):
Add a safe-charsets property to this coding system.
* mule/korean.el (iso-2022-int-1):
* mule/korean.el (euc-kr):
* mule/korean.el (iso-2022-kr):
Add safe-charsets properties for these coding systems.
* mule/japanese.el (iso-2022-jp):
* mule/japanese.el (jis7):
* mule/japanese.el (jis8):
* mule/japanese.el (shift-jis):
* mule/japanese.el (iso-2022-jp-1978-irv):
* mule/japanese.el (euc-jp):
Add safe-charsets properties for all these coding systems.
* mule/iso-with-esc.el:
Add safe-charsets properties to all the coding systems in
here. Comment on the downside of a safe-charsets value of t for
iso-latin-1-with-esc.
* mule/hebrew.el (ctext-hebrew):
Add a safe-charsets property for this coding system.
* mule/devanagari.el (in-is13194-devanagari):
Add a safe-charsets property for this coding system.
* mule/chinese.el (cn-gb-2312):
* mule/chinese.el (hz-gb-2312):
* mule/chinese.el (big5):
Add safe-charsets properties for these coding systems.
* mule/latin.el (iso-8859-14):
Add an implementation for this, using #'make-8-bit-coding-system.
* mule/mule-coding.el (ctext):
* mule/mule-coding.el (iso-2022-8bit-ss2):
* mule/mule-coding.el (iso-2022-7bit-ss2):
* mule/mule-coding.el (iso-2022-jp-2):
* mule/mule-coding.el (iso-2022-7bit):
* mule/mule-coding.el (iso-2022-8):
* mule/mule-coding.el (escape-quoted):
* mule/mule-coding.el (iso-2022-lock):
Add safe-charsets properties for all these coding systems.
src/ChangeLog addition:
2008-12-28 Aidan Kehoe <kehoea@parhasard.net>
* file-coding.c (Fmake_coding_system):
Document our use of the safe-chars and safe-charsets properties,
and the differences compared to GNU.
(make_coding_system_1): Don't drop the safe-chars and
safe-charsets properties.
(Fcoding_system_property): Return the safe-chars and safe-charsets
properties when asked for them.
* file-coding.h (CODING_SYSTEM_SAFE_CHARSETS):
* coding-system-slots.h:
Make the safe-chars and safe-charsets slots available in these
headers.
tests/ChangeLog addition:
2008-12-28 Aidan Kehoe <kehoea@parhasard.net>
* automated/query-coding-tests.el:
New file, testing the functionality of #'query-coding-region and
#'query-coding-string.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 28 Dec 2008 14:46:24 +0000 |
parents | e91cf17f6ab7 |
children | 308d34e9f07d |
rev | line source |
---|---|
428 | 1 /* Sunpro-specific routines. |
2 | |
3 Copyright (C) 1994 Sun Microsystems, Inc. | |
4 | |
5 This file is part of XEmacs. | |
6 | |
7 XEmacs is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Synched up with: Not in FSF. */ | |
23 | |
4105 | 24 /* Commentary: |
25 | |
26 According to Paul Keusemann in <20070802140358.GA19566@visi.com>, this | |
27 feature probably still works as of 2007-08-02. However, that doesn't seem | |
28 reliable since there doesn't seem to be a way to configure it! */ | |
29 | |
428 | 30 #include <config.h> |
31 #include "lisp.h" | |
32 | |
33 /* #### | |
34 | |
35 The following junk used to be in lisp/prim/files.el. It obviously | |
36 doesn't belong there, but should go somewhere. | |
37 | |
38 (if (fboundp 'ut-log-text) ;; #### Sun stuff; what is this? | |
39 (ut-log-text "Reading a file.")) | |
40 */ | |
41 | |
42 /* Whether usage tracking is turned on (Sun only) */ | |
43 Lisp_Object Vusage_tracking; | |
44 #ifdef USAGE_TRACKING | |
45 #include <ut.h> | |
46 #endif | |
47 | |
48 DEFUN ("ut-log-text", Fut_log_text, 1, MANY, 0, /* | |
49 Log a usage-tracking message if `usage-tracking' is non-nil. | |
50 Args are the same as to `format'. Returns whether the message was | |
51 actually logged. If usage-tracking support was not compiled in, this | |
52 function has no effect and always returns `nil'. See function | |
53 `has-usage-tracking-p'. | |
54 */ | |
2286 | 55 #ifdef USAGE_TRACKING |
56 (int nargs, Lisp_Object *args) | |
57 #else | |
58 (int UNUSED (nargs), Lisp_Object *UNUSED (args)) | |
59 #endif | |
4105 | 60 ) |
428 | 61 { |
62 #ifdef USAGE_TRACKING | |
63 Lisp_Object xs; | |
771 | 64 unsigned char *s; |
428 | 65 |
66 if (!NILP (Vusage_tracking)) | |
67 { | |
68 xs = Fformat (nargs, args); | |
69 CHECK_STRING (xs); | |
70 s = XSTRING_DATA (xs); | |
71 ut_log_text ((char *) s); | |
72 } | |
73 return Vusage_tracking; | |
74 #else | |
75 return Qnil; | |
76 #endif | |
77 } | |
78 | |
79 | |
80 /************************************************************************/ | |
81 /* initialization */ | |
82 /************************************************************************/ | |
83 | |
84 void | |
85 syms_of_sunpro (void) | |
86 { | |
87 DEFSUBR (Fut_log_text); | |
88 } | |
89 | |
90 void | |
91 vars_of_sunpro (void) | |
92 { | |
93 DEFVAR_LISP ("usage-tracking", &Vusage_tracking /* | |
94 Whether usage tracking is turned on (Sun internal use only). | |
95 Has no effect if usage tracking support has not been compiled in. | |
96 */ ); | |
97 Vusage_tracking = Qnil; | |
98 | |
99 Fprovide (intern ("sparcworks")); | |
100 #ifdef USAGE_TRACKING | |
101 Fprovide (intern ("usage-tracking")); | |
102 #endif | |
103 } | |
104 | |
105 void | |
106 init_sunpro (void) | |
107 { | |
108 Vusage_tracking = Qnil; | |
109 #ifdef USAGE_TRACKING | |
110 if (!purify_flag) | |
111 { /* Enabled only when not dumping an executable */ | |
112 Vusage_tracking = Qt; | |
113 ut_initialize ("xemacs", NULL, NULL); | |
114 } | |
115 #endif | |
116 } |