Mercurial > hg > xemacs-beta
comparison lisp/code-init.el @ 2508:14f65fa1e69e
[xemacs-hg @ 2005-01-26 09:51:22 by ben]
Undo Stephen's change of 2004-05-11
code-init.el: Undo Stephen's change of 2004-05-11.
Implement no-conversion-coding-system-mapping as a coding
system variable.
author | ben |
---|---|
date | Wed, 26 Jan 2005 09:51:23 +0000 |
parents | 13a418960a88 |
children | 1d74a1d115ee |
comparison
equal
deleted
inserted
replaced
2507:e27943beb30f | 2508:14f65fa1e69e |
---|---|
60 default, but this may change. NOTE: You *REALLY* should not turn off EOL | 60 default, but this may change. NOTE: You *REALLY* should not turn off EOL |
61 detection on Windows! Your files will have lots of annoying ^M's in them | 61 detection on Windows! Your files will have lots of annoying ^M's in them |
62 if you do this." | 62 if you do this." |
63 (dolist (x '(buffer-file-coding-system-for-read | 63 (dolist (x '(buffer-file-coding-system-for-read |
64 keyboard | 64 keyboard |
65 default-process-coding-system-read)) | 65 default-process-coding-system-read |
66 no-conversion-coding-system-mapping)) | |
66 (set-coding-system-variable | 67 (set-coding-system-variable |
67 x (coding-system-change-eol-conversion (get-coding-system-variable x) | 68 x (coding-system-change-eol-conversion (get-coding-system-variable x) |
68 (if flag nil 'lf)))) | 69 (if flag nil 'lf))))) |
69 (set-coding-category-system | |
70 'no-conversion | |
71 (coding-system-change-eol-conversion (coding-category-system 'no-conversion) | |
72 (if flag nil 'lf)))) | |
73 | 70 |
74 (defun coding-system-current-system-configuration () | 71 (defun coding-system-current-system-configuration () |
75 (cond ((memq system-type '(windows-nt cygwin32)) | 72 (cond ((memq system-type '(windows-nt cygwin32)) |
76 (if (featurep 'mule) 'windows-mule 'windows-no-mule)) | 73 (if (featurep 'mule) 'windows-mule 'windows-no-mule)) |
77 ((featurep 'mule) 'unix-mule) | 74 ((featurep 'mule) 'unix-mule) |
115 default-buffer-file-coding-system | 112 default-buffer-file-coding-system |
116 native | 113 native |
117 keyboard | 114 keyboard |
118 terminal | 115 terminal |
119 default-process-coding-system-read | 116 default-process-coding-system-read |
120 default-process-coding-system-write)) | 117 default-process-coding-system-write |
118 no-conversion-coding-system-mapping)) | |
121 | 119 |
122 (defun get-coding-system-variable (var) | 120 (defun get-coding-system-variable (var) |
123 "Return the value of a basic coding system variable. | 121 "Return the value of a basic coding system variable. |
124 This is intended as a uniform interface onto the coding system settings that | 122 This is intended as a uniform interface onto the coding system settings that |
125 control how encoding detection and conversion works. See | 123 control how encoding detection and conversion works. See |
132 (native (coding-system-aliasee 'native)) | 130 (native (coding-system-aliasee 'native)) |
133 (keyboard (coding-system-aliasee 'keyboard)) | 131 (keyboard (coding-system-aliasee 'keyboard)) |
134 (terminal (coding-system-aliasee 'terminal)) | 132 (terminal (coding-system-aliasee 'terminal)) |
135 (default-process-coding-system-read (car default-process-coding-system)) | 133 (default-process-coding-system-read (car default-process-coding-system)) |
136 (default-process-coding-system-write (cdr default-process-coding-system)) | 134 (default-process-coding-system-write (cdr default-process-coding-system)) |
135 (no-conversion-coding-system-mapping | |
136 (coding-category-system 'no-conversion)) | |
137 (t (error 'invalid-constant "Invalid coding system variable" var)))) | 137 (t (error 'invalid-constant "Invalid coding system variable" var)))) |
138 | 138 |
139 (defun set-coding-system-variable (var value) | 139 (defun set-coding-system-variable (var value) |
140 "Set a basic coding system variable to VALUE. | 140 "Set a basic coding system variable to VALUE. |
141 This is intended as a uniform interface onto the coding system settings that | 141 This is intended as a uniform interface onto the coding system settings that |
154 (setq default-process-coding-system | 154 (setq default-process-coding-system |
155 (cons value (cdr default-process-coding-system)))) | 155 (cons value (cdr default-process-coding-system)))) |
156 (default-process-coding-system-write | 156 (default-process-coding-system-write |
157 (setq default-process-coding-system | 157 (setq default-process-coding-system |
158 (cons (car default-process-coding-system) value))) | 158 (cons (car default-process-coding-system) value))) |
159 (no-conversion-coding-system-mapping | |
160 (set-coding-category-system 'no-conversion value)) | |
159 (t (error 'invalid-constant "Invalid coding system variable" var)))) | 161 (t (error 'invalid-constant "Invalid coding system variable" var)))) |
160 | 162 |
161 (defun coding-system-variable-default-value (var &optional config) | 163 (defun coding-system-variable-default-value (var &optional config) |
162 "Return the appropriate default value for a coding system variable. | 164 "Return the appropriate default value for a coding system variable. |
163 | 165 |