comparison lisp/code-init.el @ 1318:b531bf8658e9

[xemacs-hg @ 2003-02-21 06:56:46 by ben] redisplay fixes et al. PROBLEMS: Add comment about Cygwin, unexec and sysmalloc. Move some non-general stuff out of general. Make a section for x86. configure.in: Add check for broken alloca in funcalls. mule/mule-cmds.el: Alias file-name to native not vice-versa. Do set EOL of native but not of process output to fix various problems and be consistent with code-init.el. code-cmds.el: Return a name not a coding system. code-init.el: Reindent. Remove `file-name' since it should always be the same as native. unicode.el: Rename to load-unicode-mapping-table as suggested by the anonymous (but rather Turnbullian) comment in unicode.c. xemacs.dsp: Add /k to default build. alloc.c: Make gc_currently_forbidden static. config.h.in, lisp.h: Move some stuff to lisp.h. console-gtk.h, console-impl.h, console-msw.h, console-x.h, event-Xt.c, event-msw.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-x.c, gtk-xemacs.c: Remove duplicated code to redraw exposed area. Add deadbox method needed by the generalized redraw code. Defer redrawing if already in redisplay. frame-msw.c, event-stream.c, frame.c: Add comments about calling Lisp. debug.c, general-slots.h: Move generalish symbols to general-slots.h. doprnt.c: reindent. lisp.h, dynarr.c: Add debug code for locking a dynarr to catch invalid mods. Use in redisplay.c. eval.c: file-coding.c: Define file-name as alias for native not vice-versa. frame-gtk.c, frame-x.c: Move Qwindow_id to general-slots. dialog-msw.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, gui.c, gui.h, menubar-msw.c, menubar.c: Ensure that various glyph functions that eval within redisplay protect the evals. Same for calls to internal_equal(). Modify various functions, e.g. gui_item_*(), to protect evals within redisplay, taking an in_redisplay parameter if it's possible for them to be called both inside and outside of redisplay. gutter.c: Defer specifier-changed updating till after redisplay, if necessary, since we need to enter redisplay to do it. gutter.c: Do nothing if in redisplay. lisp.h: Add version of alloca() for use in function calls. lisp.h: Add XCAD[D+]R up to 6 D's, and aliases X1ST, X2ND, etc. frame.c, frame.h, redisplay.c, redisplay.h, signal.c, toolbar.c: Redo critical-section code and move from frame.c to redisplay.c. Require that every place inside of redisplay catch errors itself, not at the edge of the critical section (thereby bypassing the rest of redisplay and leaving things in an inconsistent state). Introduce separate means of holding frame-size changes without entering a complete critical section. Introduce "post-redisplay" methods for deferring things till after redisplay. Abort if we enter redisplay reentrantly. Disable all quit checking in redisplay since it's too dangerous. Ensure that all calls to QUIT trigger an abort if unprotected. redisplay.c, scrollbar-gtk.c, scrollbar-x.c, scrollbar.c: Create enter/exit_redisplay_critical_section_maybe() for code that needs to ensure it's in a critical section but doesn't interfere with an existing critical section. sysdep.c: Use _wexecve() when under Windows NT for Unicode correctness. text.c, text.h: Add new_dfc() functions, which return an alloca()ed value rather than requiring an lvalue. (Not really used yet; used in another workspace, to come.) Add some macros for SIZED_EXTERNAL. Update the encoding aliases after involved scrutinization of the X manual. unicode.c: Answer the anonymous but suspiciously Turnbullian questions. Rename parse-unicode-translation-table to load-unicode-mapping-table, as suggested.
author ben
date Fri, 21 Feb 2003 06:57:21 +0000
parents 7f62a956b825
children 0b318c558de8
comparison
equal deleted inserted replaced
1317:d9d08dc5e617 1318:b531bf8658e9
1 ;;; code-init.el --- Handle coding system default values 1 ;;; code-init.el --- Handle coding system default values
2 2
3 ;; Copyright (C) 2001, 2002 Ben Wing. 3 ;; Copyright (C) 2001, 2002, 2003 Ben Wing.
4 4
5 ;; This file is part of XEmacs. 5 ;; This file is part of XEmacs.
6 6
7 ;; XEmacs is free software; you can redistribute it and/or modify it 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 8 ;; under the terms of the GNU General Public License as published by
67 (if (featurep 'mule) 'windows-mule 'windows-no-mule)) 67 (if (featurep 'mule) 'windows-mule 'windows-no-mule))
68 ((featurep 'mule) 'unix-mule) 68 ((featurep 'mule) 'unix-mule)
69 (eol-detection-enabled-p 'unix-no-mule-eol-detection) 69 (eol-detection-enabled-p 'unix-no-mule-eol-detection)
70 (t 'unix-no-mule-no-eol-detection))) 70 (t 'unix-no-mule-no-eol-detection)))
71 71
72 ;; NOTE NOTE NOTE: These values may get overridden when the language
73 ;; environment is initialized (set-language-environment-coding-systems).
72 (defvar coding-system-variable-default-value-table 74 (defvar coding-system-variable-default-value-table
73 '((buffer-file-coding-system-for-read binary raw-text undecided raw-text undecided) 75 '((buffer-file-coding-system-for-read
74 (default-buffer-file-coding-system binary binary iso-2022-8 raw-text-dos mswindows-multibyte-dos) 76 binary raw-text undecided raw-text undecided)
75 (file-name binary binary binary raw-text-dos mswindows-multibyte-system-default-dos) 77 (default-buffer-file-coding-system
76 (native binary binary binary raw-text-dos mswindows-multibyte-system-default-dos) 78 binary binary iso-2022-8 raw-text-dos mswindows-multibyte-dos)
77 (keyboard binary raw-text undecided raw-text undecided) 79 (native
80 binary binary binary raw-text-dos mswindows-multibyte-system-default-dos)
81 (keyboard
82 binary raw-text undecided raw-text undecided)
78 ;; the `terminal' coding system is used for output to stderr. such 83 ;; the `terminal' coding system is used for output to stderr. such
79 ;; streams do automatic lf->crlf encoding in the C library, so we need 84 ;; streams do automatic lf->crlf encoding in the C library, so we need
80 ;; to not do the same translations ourselves. 85 ;; to not do the same translations ourselves.
81 (terminal binary binary binary binary mswindows-multibyte-unix) 86 (terminal
82 (default-process-coding-system-read binary raw-text undecided raw-text undecided) 87 binary binary binary binary mswindows-multibyte-unix)
83 (default-process-coding-system-write binary binary binary raw-text mswindows-multibyte-system-default) 88 (default-process-coding-system-read
84 (no-conversion-coding-system-mapping binary raw-text raw-text raw-text mswindows-multibyte) 89 binary raw-text undecided raw-text undecided)
90 (default-process-coding-system-write
91 binary binary binary raw-text mswindows-multibyte-system-default)
92 (no-conversion-coding-system-mapping
93 binary raw-text raw-text raw-text mswindows-multibyte)
85 )) 94 ))
86 95
87 (defvar coding-system-default-configuration-list 96 (defvar coding-system-default-configuration-list
88 '(unix-no-mule-no-eol-detection 97 '(unix-no-mule-no-eol-detection
89 unix-no-mule-eol-detection 98 unix-no-mule-eol-detection
92 windows-mule)) 101 windows-mule))
93 102
94 (defvar coding-system-default-variable-list 103 (defvar coding-system-default-variable-list
95 '(buffer-file-coding-system-for-read 104 '(buffer-file-coding-system-for-read
96 default-buffer-file-coding-system 105 default-buffer-file-coding-system
97 file-name
98 native 106 native
99 keyboard 107 keyboard
100 terminal 108 terminal
101 default-process-coding-system-read 109 default-process-coding-system-read
102 default-process-coding-system-write)) 110 default-process-coding-system-write))
109 VAR." 117 VAR."
110 (case var 118 (case var
111 (buffer-file-coding-system-for-read buffer-file-coding-system-for-read) 119 (buffer-file-coding-system-for-read buffer-file-coding-system-for-read)
112 (default-buffer-file-coding-system 120 (default-buffer-file-coding-system
113 (default-value 'buffer-file-coding-system)) 121 (default-value 'buffer-file-coding-system))
114 (file-name (coding-system-aliasee 'file-name))
115 (native (coding-system-aliasee 'native)) 122 (native (coding-system-aliasee 'native))
116 (keyboard (coding-system-aliasee 'keyboard)) 123 (keyboard (coding-system-aliasee 'keyboard))
117 (terminal (coding-system-aliasee 'terminal)) 124 (terminal (coding-system-aliasee 'terminal))
118 (default-process-coding-system-read (car default-process-coding-system)) 125 (default-process-coding-system-read (car default-process-coding-system))
119 (default-process-coding-system-write (cdr default-process-coding-system)) 126 (default-process-coding-system-write (cdr default-process-coding-system))
128 (case var 135 (case var
129 (buffer-file-coding-system-for-read 136 (buffer-file-coding-system-for-read
130 (set-buffer-file-coding-system-for-read value)) 137 (set-buffer-file-coding-system-for-read value))
131 (default-buffer-file-coding-system 138 (default-buffer-file-coding-system
132 (set-default-buffer-file-coding-system value)) 139 (set-default-buffer-file-coding-system value))
133 (file-name (define-coding-system-alias 'file-name value))
134 (native (define-coding-system-alias 'native value)) 140 (native (define-coding-system-alias 'native value))
135 (keyboard (set-keyboard-coding-system value)) 141 (keyboard (set-keyboard-coding-system value))
136 (terminal (set-terminal-coding-system value)) 142 (terminal (set-terminal-coding-system value))
137 (default-process-coding-system-read 143 (default-process-coding-system-read
138 (setq default-process-coding-system 144 (setq default-process-coding-system
154 160
155 Unix Unix+EOL Unix+Mule MSW MSW+Mule 161 Unix Unix+EOL Unix+Mule MSW MSW+Mule
156 ------------------------------------------------------------------------------ 162 ------------------------------------------------------------------------------
157 bfcs-for-read binary raw-text undecided raw-text undecided 163 bfcs-for-read binary raw-text undecided raw-text undecided
158 default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos 164 default bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos
159 file-name binary binary binary raw-text-dos MSW-MB-SD-dos
160 native binary binary binary raw-text-dos MSW-MB-SD-dos 165 native binary binary binary raw-text-dos MSW-MB-SD-dos
161 keyboard binary raw-text undecided raw-text undecided 166 keyboard binary raw-text undecided raw-text undecided
162 terminal binary binary binary binary MSW-MB-unix 167 terminal binary binary binary binary MSW-MB-unix
163 process-read binary raw-text undecided raw-text undecided 168 process-read binary raw-text undecided raw-text undecided
164 process-write binary binary binary raw-text MSW-MB-SD 169 process-write binary binary binary raw-text MSW-MB-SD
182 the primitive `setq-default'). When a file is read in, 187 the primitive `setq-default'). When a file is read in,
183 `buffer-file-coding-system' for that file is set from the coding 188 `buffer-file-coding-system' for that file is set from the coding
184 system used to read the file in; the default value applies to newly 189 system used to read the file in; the default value applies to newly
185 created files. 190 created files.
186 191
187 `file-name' (file-name)
188
189 The coding system named `file-name'. Changed using
190 `define-coding-system-alias'. Used internally when passing file
191 names to or from system API's, unless the particular API specifies
192 another coding system.
193
194 `native' (native) 192 `native' (native)
195 193
196 The coding system named `native'. Changed using 194 The coding system named `native'. Changed using
197 `define-coding-system-alias'. Used internally when passing 195 `define-coding-system-alias'. Used internally when passing
198 non-file-name text to or from system API's, unless the particular 196 text to or from system API's, unless the particular
199 API specifies another coding system. 197 API specifies another coding system.
200 198
201 `keyboard' (keyboard) 199 `keyboard' (keyboard)
202 200
203 #### fill in 201 #### fill in