Mercurial > hg > xemacs-beta
annotate lisp/code-init.el @ 5492:e82f5b7010fe
Merge some stuff in man, fix up Makefile
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-02-19 Ben Wing <ben@xemacs.org>
* widget.texi:
* widget.texi (Top):
* widget.texi (Introduction):
* widget.texi (User Interface):
* widget.texi (Programming Example):
* widget.texi (Setting Up the Buffer):
* widget.texi (Basic Types):
* widget.texi (link):
* widget.texi (url-link):
* widget.texi (info-link):
* widget.texi (push-button):
* widget.texi (editable-field):
* widget.texi (text):
* widget.texi (menu-choice):
* widget.texi (radio-button-choice):
* widget.texi (item):
* widget.texi (choice-item):
* widget.texi (toggle):
* widget.texi (checkbox):
* widget.texi (checklist):
* widget.texi (editable-list):
* widget.texi (group):
* widget.texi (Sexp Types):
* widget.texi (constants):
* widget.texi (generic):
* widget.texi (atoms):
* widget.texi (composite):
* widget.texi (Widget Properties):
* widget.texi (Defining New Widgets):
* widget.texi (Widget Browser):
* widget.texi (Widget Minor Mode):
* widget.texi (Utilities):
* widget.texi (Widget Wishlist):
* widget.texi (Widget Internals):
* widget.texi (GNU Free Documentation License):
* widget.texi (Index):
Sync with FSF 23.1.92.
2010-02-19 Ben Wing <ben@xemacs.org>
* texinfo/fdl.texi: New file.
* texinfo/texinfo.texi:
* texinfo/texinfo.texi (Top):
* texinfo/texinfo.texi (Copying Conditions):
* texinfo/texinfo.texi (Overview):
* texinfo/texinfo.texi (Reporting Bugs):
* texinfo/texinfo.texi (Using Texinfo):
* texinfo/texinfo.texi (Output Formats):
* texinfo/texinfo.texi (Info Files):
* texinfo/texinfo.texi (Printed Books):
* texinfo/texinfo.texi (Formatting Commands):
* texinfo/texinfo.texi (Conventions):
* texinfo/texinfo.texi (Comments):
* texinfo/texinfo.texi (Minimum):
* texinfo/texinfo.texi (Six Parts):
* texinfo/texinfo.texi (Short Sample):
* texinfo/texinfo.texi (History):
* texinfo/texinfo.texi (Texinfo Mode):
* texinfo/texinfo.texi (Texinfo Mode Overview):
* texinfo/texinfo.texi (XEmacs Editing):
* texinfo/texinfo.texi (Inserting):
* texinfo/texinfo.texi (Showing the Structure):
* texinfo/texinfo.texi (Updating Nodes and Menus):
* texinfo/texinfo.texi (Updating Commands):
* texinfo/texinfo.texi (Updating Requirements):
* texinfo/texinfo.texi (Other Updating Commands):
* texinfo/texinfo.texi (Info Formatting):
* texinfo/texinfo.texi (Printing):
* texinfo/texinfo.texi (Texinfo Mode Summary):
* texinfo/texinfo.texi (Beginning a File):
* texinfo/texinfo.texi (Sample Beginning):
* texinfo/texinfo.texi (Texinfo File Header):
* texinfo/texinfo.texi (First Line):
* texinfo/texinfo.texi (Start of Header):
* texinfo/texinfo.texi (setfilename):
* texinfo/texinfo.texi (settitle):
* texinfo/texinfo.texi (End of Header):
* texinfo/texinfo.texi (Document Permissions):
* texinfo/texinfo.texi (copying):
* texinfo/texinfo.texi (insertcopying):
* texinfo/texinfo.texi (Titlepage & Copyright Page):
* texinfo/texinfo.texi (titlepage):
* texinfo/texinfo.texi (titlefont center sp):
* texinfo/texinfo.texi (title subtitle author):
* texinfo/texinfo.texi (Copyright):
* texinfo/texinfo.texi (end titlepage):
* texinfo/texinfo.texi (headings on off):
* texinfo/texinfo.texi (Contents):
* texinfo/texinfo.texi (The Top Node):
* texinfo/texinfo.texi (Top Node Example):
* texinfo/texinfo.texi (Master Menu Parts):
* texinfo/texinfo.texi (Global Document Commands):
* texinfo/texinfo.texi (documentdescription):
* texinfo/texinfo.texi (setchapternewpage):
* texinfo/texinfo.texi (paragraphindent):
* texinfo/texinfo.texi (firstparagraphindent):
* texinfo/texinfo.texi (exampleindent):
* texinfo/texinfo.texi (Software Copying Permissions):
* texinfo/texinfo.texi (Ending a File):
* texinfo/texinfo.texi (Printing Indices & Menus):
* texinfo/texinfo.texi (File End):
* texinfo/texinfo.texi (Structuring):
* texinfo/texinfo.texi (Tree Structuring):
* texinfo/texinfo.texi (Structuring Command Types):
* texinfo/texinfo.texi (makeinfo top):
* texinfo/texinfo.texi (chapter):
* texinfo/texinfo.texi (unnumbered & appendix):
* texinfo/texinfo.texi (majorheading & chapheading):
* texinfo/texinfo.texi (section):
* texinfo/texinfo.texi (unnumberedsec appendixsec heading):
* texinfo/texinfo.texi (subsection):
* texinfo/texinfo.texi (unnumberedsubsec appendixsubsec subheading):
* texinfo/texinfo.texi (subsubsection):
* texinfo/texinfo.texi (Raise/lower sections):
* texinfo/texinfo.texi (Nodes):
* texinfo/texinfo.texi (Two Paths):
* texinfo/texinfo.texi (Node Menu Illustration):
* texinfo/texinfo.texi (node):
* texinfo/texinfo.texi (Node Names):
* texinfo/texinfo.texi (Writing a Node):
* texinfo/texinfo.texi (Node Line Tips):
* texinfo/texinfo.texi (Node Line Requirements):
* texinfo/texinfo.texi (First Node):
* texinfo/texinfo.texi (makeinfo top command):
* texinfo/texinfo.texi (makeinfo Pointer Creation):
* texinfo/texinfo.texi (anchor):
* texinfo/texinfo.texi (Menus):
* texinfo/texinfo.texi (Menu Location):
* texinfo/texinfo.texi (Writing a Menu):
* texinfo/texinfo.texi (Menu Parts):
* texinfo/texinfo.texi (Less Cluttered Menu Entry):
* texinfo/texinfo.texi (Menu Example):
* texinfo/texinfo.texi (Other Info Files):
* texinfo/texinfo.texi (Cross References):
* texinfo/texinfo.texi (References):
* texinfo/texinfo.texi (Cross Reference Commands):
* texinfo/texinfo.texi (Cross Reference Parts):
* texinfo/texinfo.texi (xref):
* texinfo/texinfo.texi (Reference Syntax):
* texinfo/texinfo.texi (One Argument):
* texinfo/texinfo.texi (Two Arguments):
* texinfo/texinfo.texi (Three Arguments):
* texinfo/texinfo.texi (Four and Five Arguments):
* texinfo/texinfo.texi (Top Node Naming):
* texinfo/texinfo.texi (ref):
* texinfo/texinfo.texi (pxref):
* texinfo/texinfo.texi (inforef):
* texinfo/texinfo.texi (uref):
* texinfo/texinfo.texi (cite):
* texinfo/texinfo.texi (Marking Text):
* texinfo/texinfo.texi (Indicating):
* texinfo/texinfo.texi (Useful Highlighting):
* texinfo/texinfo.texi (code):
* texinfo/texinfo.texi (kbd):
* texinfo/texinfo.texi (key):
* texinfo/texinfo.texi (samp):
* texinfo/texinfo.texi (verb):
* texinfo/texinfo.texi (var):
* texinfo/texinfo.texi (env):
* texinfo/texinfo.texi (file):
* texinfo/texinfo.texi (command):
* texinfo/texinfo.texi (option):
* texinfo/texinfo.texi (dfn):
* texinfo/texinfo.texi (abbr):
* texinfo/texinfo.texi (acronym):
* texinfo/texinfo.texi (indicateurl):
* texinfo/texinfo.texi (email):
* texinfo/texinfo.texi (Emphasis):
* texinfo/texinfo.texi (emph & strong):
* texinfo/texinfo.texi (Smallcaps):
* texinfo/texinfo.texi (Fonts):
* texinfo/texinfo.texi (Quotations and Examples):
* texinfo/texinfo.texi (Block Enclosing Commands):
* texinfo/texinfo.texi (quotation):
* texinfo/texinfo.texi (example):
* texinfo/texinfo.texi (verbatim):
* texinfo/texinfo.texi (verbatiminclude):
* texinfo/texinfo.texi (lisp):
* texinfo/texinfo.texi (small):
* texinfo/texinfo.texi (display):
* texinfo/texinfo.texi (format):
* texinfo/texinfo.texi (exdent):
* texinfo/texinfo.texi (flushleft & flushright):
* texinfo/texinfo.texi (noindent):
* texinfo/texinfo.texi (indent):
* texinfo/texinfo.texi (cartouche):
* texinfo/texinfo.texi (Lists and Tables):
* texinfo/texinfo.texi (Introducing Lists):
* texinfo/texinfo.texi (itemize):
* texinfo/texinfo.texi (enumerate):
* texinfo/texinfo.texi (Two-column Tables):
* texinfo/texinfo.texi (table):
* texinfo/texinfo.texi (ftable vtable):
* texinfo/texinfo.texi (itemx):
* texinfo/texinfo.texi (Multi-column Tables):
* texinfo/texinfo.texi (Multitable Column Widths):
* texinfo/texinfo.texi (Multitable Rows):
* texinfo/texinfo.texi (Special Displays):
* texinfo/texinfo.texi (Floats):
* texinfo/texinfo.texi (float):
* texinfo/texinfo.texi (caption shortcaption):
* texinfo/texinfo.texi (listoffloats):
* texinfo/texinfo.texi (Images):
* texinfo/texinfo.texi (Image Syntax):
* texinfo/texinfo.texi (Image Scaling):
* texinfo/texinfo.texi (Footnotes):
* texinfo/texinfo.texi (Footnote Commands):
* texinfo/texinfo.texi (Footnote Styles):
* texinfo/texinfo.texi (Indices):
* texinfo/texinfo.texi (Index Entries):
* texinfo/texinfo.texi (Predefined Indices):
* texinfo/texinfo.texi (Indexing Commands):
* texinfo/texinfo.texi (Combining Indices):
* texinfo/texinfo.texi (syncodeindex):
* texinfo/texinfo.texi (synindex):
* texinfo/texinfo.texi (New Indices):
* texinfo/texinfo.texi (Insertions):
* texinfo/texinfo.texi (Atsign Braces Comma):
* texinfo/texinfo.texi (Inserting an Atsign):
* texinfo/texinfo.texi (Inserting Braces):
* texinfo/texinfo.texi (Inserting a Comma):
* texinfo/texinfo.texi (Inserting Quote Characters):
* texinfo/texinfo.texi (Inserting Space):
* texinfo/texinfo.texi (Not Ending a Sentence):
* texinfo/texinfo.texi (Ending a Sentence):
* texinfo/texinfo.texi (Multiple Spaces):
* texinfo/texinfo.texi (frenchspacing):
* texinfo/texinfo.texi (dmn):
* texinfo/texinfo.texi (Inserting Accents):
* texinfo/texinfo.texi (Inserting Quotation Marks):
* texinfo/texinfo.texi (Dots Bullets):
* texinfo/texinfo.texi (dots):
* texinfo/texinfo.texi (bullet):
* texinfo/texinfo.texi (TeX and copyright):
* texinfo/texinfo.texi (tex):
* texinfo/texinfo.texi (copyright symbol):
* texinfo/texinfo.texi (registered symbol):
* texinfo/texinfo.texi (euro):
* texinfo/texinfo.texi (pounds):
* texinfo/texinfo.texi (textdegree):
* texinfo/texinfo.texi (minus):
* texinfo/texinfo.texi (geq leq):
* texinfo/texinfo.texi (math):
* texinfo/texinfo.texi (Click Sequences):
* texinfo/texinfo.texi (Glyphs):
* texinfo/texinfo.texi (Glyphs Summary):
* texinfo/texinfo.texi (result):
* texinfo/texinfo.texi (expansion):
* texinfo/texinfo.texi (Print Glyph):
* texinfo/texinfo.texi (Error Glyph):
* texinfo/texinfo.texi (Equivalence):
* texinfo/texinfo.texi (Point Glyph):
* texinfo/texinfo.texi (Breaks):
* texinfo/texinfo.texi (Break Commands):
* texinfo/texinfo.texi (Line Breaks):
* texinfo/texinfo.texi (- and hyphenation):
* texinfo/texinfo.texi (allowcodebreaks):
* texinfo/texinfo.texi (w):
* texinfo/texinfo.texi (tie):
* texinfo/texinfo.texi (sp):
* texinfo/texinfo.texi (page):
* texinfo/texinfo.texi (group):
* texinfo/texinfo.texi (need):
* texinfo/texinfo.texi (Definition Commands):
* texinfo/texinfo.texi (Def Cmd Template):
* texinfo/texinfo.texi (Def Cmd Continuation Lines):
* texinfo/texinfo.texi (Optional Arguments):
* texinfo/texinfo.texi (deffnx):
* texinfo/texinfo.texi (Def Cmds in Detail):
* texinfo/texinfo.texi (Functions Commands):
* texinfo/texinfo.texi (Variables Commands):
* texinfo/texinfo.texi (Typed Functions):
* texinfo/texinfo.texi (Typed Variables):
* texinfo/texinfo.texi (Data Types):
* texinfo/texinfo.texi (Abstract Objects):
* texinfo/texinfo.texi (Object-Oriented Variables):
* texinfo/texinfo.texi (Object-Oriented Methods):
* texinfo/texinfo.texi (Defining Macros):
* texinfo/texinfo.texi (Invoking Macros):
* texinfo/texinfo.texi (Macro Details):
* texinfo/texinfo.texi (alias):
* texinfo/texinfo.texi (definfoenclose):
* texinfo/texinfo.texi (Hardcopy):
* texinfo/texinfo.texi (Use TeX):
* texinfo/texinfo.texi (Format with tex/texindex):
* texinfo/texinfo.texi (Format with texi2dvi):
* texinfo/texinfo.texi (Print with lpr):
* texinfo/texinfo.texi (Within XEmacs):
* texinfo/texinfo.texi (Texinfo Mode Printing):
* texinfo/texinfo.texi (Compile-Command):
* texinfo/texinfo.texi (Requirements Summary):
* texinfo/texinfo.texi (Preparing for TeX):
* texinfo/texinfo.texi (Overfull hboxes):
* texinfo/texinfo.texi (smallbook):
* texinfo/texinfo.texi (A4 Paper):
* texinfo/texinfo.texi (pagesizes):
* texinfo/texinfo.texi (Cropmarks and Magnification):
* texinfo/texinfo.texi (PDF Output):
* texinfo/texinfo.texi (Obtaining TeX):
* texinfo/texinfo.texi (Creating and Installing Info Files):
* texinfo/texinfo.texi (Creating an Info File):
* texinfo/texinfo.texi (makeinfo advantages):
* texinfo/texinfo.texi (Invoking makeinfo):
* texinfo/texinfo.texi (makeinfo options):
* texinfo/texinfo.texi (Pointer Validation):
* texinfo/texinfo.texi (makeinfo in XEmacs):
* texinfo/texinfo.texi (texinfo-format commands):
* texinfo/texinfo.texi (Batch Formatting):
* texinfo/texinfo.texi (Tag and Split Files):
* texinfo/texinfo.texi (Installing an Info File):
* texinfo/texinfo.texi (Directory File):
* texinfo/texinfo.texi (New Info File):
* texinfo/texinfo.texi (Other Info Directories):
* texinfo/texinfo.texi (Installing Dir Entries):
* texinfo/texinfo.texi (Invoking install-info):
* texinfo/texinfo.texi (Generating HTML):
* texinfo/texinfo.texi (HTML Translation):
* texinfo/texinfo.texi (HTML Splitting):
* texinfo/texinfo.texi (HTML CSS):
* texinfo/texinfo.texi (HTML Xref):
* texinfo/texinfo.texi (HTML Xref Link Basics):
* texinfo/texinfo.texi (HTML Xref Node Name Expansion):
* texinfo/texinfo.texi (HTML Xref Command Expansion):
* texinfo/texinfo.texi (HTML Xref 8-bit Character Expansion):
* texinfo/texinfo.texi (HTML Xref Mismatch):
* texinfo/texinfo.texi (Command List):
* texinfo/texinfo.texi (Command Syntax):
* texinfo/texinfo.texi (Tips):
* texinfo/texinfo.texi (Sample Texinfo Files):
* texinfo/texinfo.texi (Short Sample Texinfo File):
* texinfo/texinfo.texi (GNU Sample Texts):
* texinfo/texinfo.texi (Invoking sample):
* texinfo/texinfo.texi (GNU Free Documentation License):
* texinfo/texinfo.texi (Index):
* texinfo/texinfo.texi (Verbatim Copying License):
* texinfo/texinfo.texi (All-permissive Copying License):
* texinfo/texinfo.texi (Include Files):
* texinfo/texinfo.texi (Using Include Files):
* texinfo/texinfo.texi (texinfo-multiple-files-update):
* texinfo/texinfo.texi (Include Files Requirements):
* texinfo/texinfo.texi (Sample Include File):
* texinfo/texinfo.texi (Include Files Evolution):
* texinfo/texinfo.texi (Headings):
* texinfo/texinfo.texi (Headings Introduced):
* texinfo/texinfo.texi (Heading Format):
* texinfo/texinfo.texi (Heading Choice):
* texinfo/texinfo.texi (Custom Headings):
* texinfo/texinfo.texi (Catching Mistakes):
* texinfo/texinfo.texi (makeinfo Preferred):
* texinfo/texinfo.texi (Debugging with Info):
* texinfo/texinfo.texi (Debugging with TeX):
* texinfo/texinfo.texi (Using texinfo-show-structure):
* texinfo/texinfo.texi (Using occur):
* texinfo/texinfo.texi (Running Info-Validate):
* texinfo/texinfo.texi (Using Info-validate):
* texinfo/texinfo.texi (Unsplit):
* texinfo/texinfo.texi (Tagifying):
* texinfo/texinfo.texi (Splitting):
* texinfo/texinfo.texi (Refilling Paragraphs):
* texinfo/texinfo.texi (Command and Variable Index):
* texinfo/texinfo.texi (General Index):
* texinfo/version.texi: New file.
Sync with FSF 23.1.92. Make new directory to hold the files needed
to generate texinfo.info, since there are three such files now.
2010-02-19 Ben Wing <ben@xemacs.org>
* Makefile:
* Makefile (src_files1):
* Makefile (DIR):
* Makefile (texinfo-srcs):
* Makefile ($(INFODIR)/widget.info):
* Makefile ($(INFODIR)/texinfo.info):
* Makefile (.PHONY):
* Makefile (texinfo.dvi):
* Makefile (texinfo.pdf):
* Makefile ($(HTMLDIR)/widget.html):
* Makefile ($(HTMLDIR)/texinfo.html):
Incorporate texinfo.texi moving to a subdirectory texinfo/.
Do some tricks to reduce the amount of duplication while still
maintaining compatible with non-GNU make (at least, with
Solaris make).
* doclicense.texi: New file.
* info.texi:
* info.texi (Top):
* info.texi (Getting Started):
* info.texi (Help-Small-Screen):
* info.texi (Help):
* info.texi (Help-P):
* info.texi (Help-^L):
* info.texi (Help-Inv):
* info.texi (Help-]):
* info.texi (Help-M):
* info.texi (Help-FOO):
* info.texi (Help-Xref):
* info.texi (Help-Int):
* info.texi (Help-Q):
* info.texi (Advanced):
* info.texi (Search Text):
* info.texi (Search Index):
* info.texi (Go to node):
* info.texi (Choose menu subtopic):
* info.texi (Create Info buffer):
* info.texi (XEmacs Info Variables):
* info.texi (Expert Info):
* info.texi (Add):
* info.texi (Menus):
* info.texi (Cross-refs):
* info.texi (Help-Cross):
* info.texi (Tags):
* info.texi (Checking):
* info.texi (Index):
* texinfo.tex:
* texinfo.tex (paragraphindent{%):
* texinfo.tex (sectionheading will have):
* texinfo.tex (chapterzzz{#3}%):
* texinfo.tex (subsubsection = \numberedsubsubsec):
* texinfo.tex (subsubsection = \appendixsubsubsec):
* texinfo.tex (subsubsection = \unnumberedsubsubsec):
* texinfo.tex (sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%):
* texinfo.tex (sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%):
* texinfo.tex (sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%):
* texinfo.tex (sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%):
* texinfo.tex (sectionheading{#1}{subsec}{Yappendix}%):
* texinfo.tex (sectionheading{#1}{subsec}{Ynothing}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Ynumbered}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Yappendix}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Ynothing}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Yomitfromtoc}{}):
* texinfo.tex (sectionheading to do the printing.):
* texinfo.tex (sectionlevel}{#1}{#4}%):
* texinfo.tex (sectionheading, q.v.):
Sync with FSF 23.1.92.
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Fri, 19 Feb 2010 22:39:19 -0600 |
| parents | d2ec55325515 |
| children | 308d34e9f07d |
| rev | line source |
|---|---|
| 771 | 1 ;;; code-init.el --- Handle coding system default values |
| 2 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
3 ;; Copyright (C) 2001, 2002, 2003, 2010 Ben Wing. |
| 771 | 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 | |
| 9 ;; the Free Software Foundation; either version 2, or (at your option) | |
| 10 ;; any later version. | |
| 11 | |
| 12 ;; XEmacs is distributed in the hope that it will be useful, but | |
| 13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 ;; General Public License 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 the | |
| 19 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 20 ;; Boston, MA 02111-1307, USA. | |
| 21 | |
| 22 ;;; Commentary: | |
| 23 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
24 ;; Author: Ben wing, 2001? |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
25 |
| 771 | 26 ;; Placed in a separate file so it can be loaded after the various |
| 27 ;; coding systems have been created, because we'll be using them at | |
| 28 ;; load time. | |
| 29 | |
| 2297 | 30 ;; #### Issues (this discussion probably belongs elsewhere) |
| 31 ;; 1. "Big" characters are unrepresentable. Should give error, warning, | |
| 32 ;; not just substitute "~". | |
| 33 ;; 2. 21.4 compatibility? | |
| 34 ;; 3. make-char: non-mule barfs on non-iso8859-1. | |
| 35 | |
| 771 | 36 ;;; Code: |
| 37 | |
| 38 (defcustom eol-detection-enabled-p (or (featurep 'mule) | |
| 39 (memq system-type '(windows-nt | |
| 40 cygwin32)) | |
| 41 (featurep 'unix-default-eol-detection)) | |
| 42 "True if XEmacs automatically detects the EOL type when reading files. | |
| 43 Normally, this is always the case on Windows or when international (Mule) | |
| 44 support is compiled into this XEmacs. Otherwise, it is currently off by | |
| 45 default, but this may change. Don't set this; nothing will happen. Instead, | |
| 46 use the Options menu or `set-eol-detection'." | |
| 47 :group 'encoding | |
| 48 :type 'boolean | |
| 49 ;; upon initialization, we don't want the whole business of | |
| 50 ;; set-eol-detection to be called. We will init everything appropriately | |
| 51 ;; later in the same file, when reset-language-environment is called. | |
| 52 :initialize #'(lambda (var val) | |
| 1698 | 53 (setq eol-detection-enabled-p (eval val))) |
| 771 | 54 :set #'(lambda (var val) |
| 55 (set-eol-detection val) | |
| 56 (setq eol-detection-enabled-p val))) | |
| 57 | |
| 58 (defun set-eol-detection (flag) | |
| 59 "Enable (if FLAG is non-nil) or disable automatic EOL detection of files. | |
| 60 EOL detection is enabled by default on Windows or when international (Mule) | |
| 61 support is compiled into this XEmacs. Otherwise, it is currently off by | |
| 62 default, but this may change. NOTE: You *REALLY* should not turn off EOL | |
| 63 detection on Windows! Your files will have lots of annoying ^M's in them | |
| 64 if you do this." | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
65 (dolist (x '(bfcs-for-read |
| 771 | 66 keyboard |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
67 process-read |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
68 no-conv-cs)) |
| 771 | 69 (set-coding-system-variable |
| 70 x (coding-system-change-eol-conversion (get-coding-system-variable x) | |
| 2508 | 71 (if flag nil 'lf))))) |
| 771 | 72 |
| 73 (defun coding-system-current-system-configuration () | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
74 "Function to decide which default coding system configuration applies." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
75 (cond ((featurep 'cygwin-use-utf-8) 'cygwin-utf-8) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
76 ((memq system-type '(windows-nt cygwin32)) |
| 771 | 77 (if (featurep 'mule) 'windows-mule 'windows-no-mule)) |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
78 ((featurep 'mule) 'mule) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
79 (eol-detection-enabled-p 'no-mule-eol-detection) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
80 (t 'no-mule-no-eol-detection))) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
81 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
82 (defvar coding-system-default-configuration-table (make-hash-table)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
83 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
84 (defun define-coding-system-default-configuration (name doc props) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
85 (puthash name (nconc `(doc ,doc) props) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
86 coding-system-default-configuration-table)) |
| 771 | 87 |
| 1318 | 88 ;; NOTE NOTE NOTE: These values may get overridden when the language |
| 89 ;; environment is initialized (set-language-environment-coding-systems). | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
90 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
91 'no-mule-no-eol-detection |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
92 "No Mule support, EOL detection not enabled." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
93 '(bfcs-for-read binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
94 default-bfcs binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
95 process-read binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
96 process-write binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
97 keyboard binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
98 native binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
99 no-conv-cs binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
100 terminal binary)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
101 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
102 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
103 'no-mule-eol-detection |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
104 "No Mule support, EOL detection enabled." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
105 '(bfcs-for-read raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
106 default-bfcs binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
107 process-read raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
108 process-write binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
109 keyboard raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
110 native binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
111 no-conv-cs raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
112 terminal binary)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
113 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
114 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
115 'mule |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
116 "Mule support enabled." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
117 '(bfcs-for-read undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
118 default-bfcs iso-2022-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
119 process-read undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
120 process-write binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
121 keyboard undecided-unix |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
122 native binary |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
123 no-conv-cs raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
124 terminal binary)) |
| 771 | 125 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
126 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
127 'windows-no-mule |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
128 "Microsoft Windows, no Mule support." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
129 '(bfcs-for-read raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
130 default-bfcs raw-text-dos |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
131 process-read raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
132 process-write raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
133 keyboard raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
134 native raw-text-dos |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
135 no-conv-cs raw-text |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
136 terminal binary)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
137 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
138 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
139 'windows-mule |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
140 "Microsoft Windows, Mule support enabled." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
141 '(bfcs-for-read undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
142 default-bfcs mswindows-multibyte-dos |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
143 process-read undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
144 process-write mswindows-multibyte-system-default |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
145 keyboard undecided-unix |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
146 native mswindows-multibyte-system-default-dos |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
147 no-conv-cs mswindows-multibyte |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
148 terminal mswindows-multibyte-unix)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
149 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
150 (define-coding-system-default-configuration |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
151 'cygwin-utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
152 "Mule support enabled." |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
153 '(bfcs-for-read undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
154 default-bfcs utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
155 process-read utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
156 process-write utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
157 keyboard utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
158 native utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
159 no-conv-cs utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
160 terminal utf-8)) |
| 771 | 161 |
| 162 (defvar coding-system-default-variable-list | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
163 '(bfcs-for-read |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
164 default-bfcs |
| 771 | 165 native |
| 166 keyboard | |
| 167 terminal | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
168 process-read |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
169 process-write |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
170 no-conv-cs)) |
| 771 | 171 |
| 172 (defun get-coding-system-variable (var) | |
| 173 "Return the value of a basic coding system variable. | |
| 174 This is intended as a uniform interface onto the coding system settings that | |
| 175 control how encoding detection and conversion works. See | |
| 176 `coding-system-variable-default-value' for a list of the possible values of | |
| 177 VAR." | |
| 178 (case var | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
179 (bfcs-for-read buffer-file-coding-system-for-read) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
180 (default-bfcs |
| 771 | 181 (default-value 'buffer-file-coding-system)) |
| 182 (native (coding-system-aliasee 'native)) | |
| 183 (keyboard (coding-system-aliasee 'keyboard)) | |
| 184 (terminal (coding-system-aliasee 'terminal)) | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
185 (process-read (car default-process-coding-system)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
186 (process-write (cdr default-process-coding-system)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
187 (no-conv-cs |
| 2508 | 188 (coding-category-system 'no-conversion)) |
| 771 | 189 (t (error 'invalid-constant "Invalid coding system variable" var)))) |
| 190 | |
| 191 (defun set-coding-system-variable (var value) | |
| 192 "Set a basic coding system variable to VALUE. | |
| 193 This is intended as a uniform interface onto the coding system settings that | |
| 194 control how encoding detection and conversion works. See | |
| 195 `coding-system-variable-default-value' for a list of the possible values of | |
| 196 VAR." | |
| 197 (case var | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
198 (bfcs-for-read |
| 771 | 199 (set-buffer-file-coding-system-for-read value)) |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
200 (default-bfcs |
| 771 | 201 (set-default-buffer-file-coding-system value)) |
| 202 (native (define-coding-system-alias 'native value)) | |
| 203 (keyboard (set-keyboard-coding-system value)) | |
| 204 (terminal (set-terminal-coding-system value)) | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
205 (process-read |
| 771 | 206 (setq default-process-coding-system |
| 207 (cons value (cdr default-process-coding-system)))) | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
208 (process-write |
| 771 | 209 (setq default-process-coding-system |
| 210 (cons (car default-process-coding-system) value))) | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
211 (no-conv-cs |
| 2508 | 212 (set-coding-category-system 'no-conversion value)) |
| 771 | 213 (t (error 'invalid-constant "Invalid coding system variable" var)))) |
| 214 | |
| 215 (defun coding-system-variable-default-value (var &optional config) | |
| 216 "Return the appropriate default value for a coding system variable. | |
| 217 | |
| 218 VAR specifies the variable, and CONFIG the configuration, defaulting | |
| 219 to the current system configuration (as returned by | |
| 220 `coding-system-current-system-configuration'). | |
| 221 | |
| 222 The table of default values looks like this: (see below for abbreviations) | |
| 223 | |
| 224 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
225 NoMule NoMuleEOL Mule MSW MSWMule CygUTF |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
226 ------------------------------------------------------------------------------ |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
227 bfcs-for-read binary raw-text undecided raw-text undecided undecided |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
228 default-bfcs binary binary iso-2022-8 raw-text-dos MSW-MB-dos utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
229 native binary binary binary raw-text-dos MSW-MB-SD-dos utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
230 keyboard binary raw-text undecided- raw-text undecided- utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
231 unix unix |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
232 terminal binary binary binary binary MSW-MB-unix utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
233 process-read binary raw-text undecided raw-text undecided utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
234 process-write binary binary binary raw-text MSW-MB-SD utf-8 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
235 no-conv-cs binary raw-text raw-text raw-text MSW-MB utf-8 |
| 771 | 236 |
| 237 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
238 VAR can be one of: |
| 771 | 239 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
240 `bfcs-for-read' |
| 771 | 241 |
| 242 Lisp variable of the same name; the default coding system used when | |
| 243 reading in a file, in the absence of more specific settings. (See | |
| 244 `insert-file-contents' for a description of exactly how a file's | |
| 245 coding system is determined when it's read in.) | |
| 246 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
247 `default-bfcs' |
| 771 | 248 |
| 249 Default value of `buffer-file-coding-system', the buffer-local | |
| 250 variable specifying a file's coding system to be used when it is | |
| 251 written out. Set using `set-default-buffer-file-coding-system' (or | |
| 252 the primitive `setq-default'). When a file is read in, | |
| 253 `buffer-file-coding-system' for that file is set from the coding | |
| 254 system used to read the file in; the default value applies to newly | |
| 255 created files. | |
| 256 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
257 `native' |
| 771 | 258 |
| 259 The coding system named `native'. Changed using | |
| 260 `define-coding-system-alias'. Used internally when passing | |
| 1318 | 261 text to or from system API's, unless the particular |
| 771 | 262 API specifies another coding system. |
| 263 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
264 `keyboard' |
| 771 | 265 |
| 266 #### fill in | |
| 267 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
268 `terminal' |
| 771 | 269 |
| 270 #### fill in | |
| 271 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
272 `process-read' |
| 771 | 273 |
| 274 #### fill in | |
| 275 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
276 `process-write' |
| 771 | 277 |
| 278 #### fill in | |
| 279 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
280 `no-conv-cs' |
| 771 | 281 |
| 282 Coding system used when category `no-conversion' is detected. | |
| 283 | |
| 284 | |
| 285 CONFIG is one of: (abbreviations in parens) | |
| 286 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
287 `no-mule-no-eol-detection' (NoMule) |
| 771 | 288 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
289 Non-Windows, no Mule support, no automatic EOL detection. (Controlled by |
| 771 | 290 `eol-detection-enabled-p', which is set by the command-line flag |
| 291 -enable-eol-detection or the configure flag --with-default-eol-detection.) | |
| 292 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
293 `unix-no-mule-eol-detection' (NoMuleEOL) |
| 771 | 294 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
295 Non-Windows, no Mule support, automatic EOL detection. |
| 771 | 296 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
297 `unix-mule' (Mule) |
| 771 | 298 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
299 Non-Windows, Mule support. |
| 771 | 300 |
| 301 `windows-no-mule' (MSW) | |
| 302 | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
303 MS Windows or old Cygwin, no Mule support. |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
304 |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
305 `windows-mule' (MSWMule) |
| 771 | 306 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
307 MS Windows or old Cygwin, Mule support. |
| 771 | 308 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
309 `cygwin-utf-8' (CygUTF) |
| 771 | 310 |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
311 Cygwin 1.7 or later, which uses UTF-8 consistently. |
| 771 | 312 |
| 313 The following coding system abbreviations are also used in the table: | |
| 314 | |
| 315 MSW-MB = mswindows-multibyte | |
| 316 MSW-MB = mswindows-multibyte-system-default | |
| 317 " | |
| 318 (setq config (or config (coding-system-current-system-configuration))) | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
319 (or (memq var coding-system-default-variable-list) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
320 (error 'invalid-constant "Invalid coding system variable" var)) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
321 (let ((props (gethash config coding-system-default-configuration-table))) |
|
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
322 (or props (error 'invalid-constant "Invalid coding system configuration" |
| 771 | 323 config)) |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
324 (getf props var))) |
| 771 | 325 |
| 326 (defun reset-coding-system-defaults (&optional config) | |
| 327 "Reset all basic coding system variables are set to their default values. | |
| 328 See `coding-system-variable-default-value'." | |
| 329 (setq config (or config (coding-system-current-system-configuration))) | |
| 330 (mapcar #'(lambda (var) | |
| 331 (set-coding-system-variable | |
| 332 var (coding-system-variable-default-value var config))) | |
| 333 coding-system-default-variable-list)) | |
| 334 | |
| 335 (defun reset-coding-categories-to-default () | |
| 336 "Reset all coding categories (used for automatic detection) to their defaults. | |
| 337 | |
| 338 The order of priorities of coding categories and the coding system | |
| 339 bound to each category are as follows: | |
| 340 | |
| 341 coding category coding system | |
| 342 -------------------------------------------------- | |
| 343 utf-16-little-endian-bom utf-16-little-endian | |
| 344 utf-16-bom utf-16-bom | |
| 985 | 345 utf-8-bom utf-8-bom |
| 771 | 346 iso-7 iso-2022-7bit |
| 347 no-conversion raw-text | |
| 348 utf-8 utf-8 | |
| 349 iso-8-1 iso-8859-1 | |
| 350 iso-8-2 ctext (iso-8859-1 alias) | |
| 351 iso-8-designate ctext (iso-8859-1 alias) | |
| 352 iso-lock-shift iso-2022-lock | |
| 353 shift-jis shift-jis | |
| 354 big5 big5 | |
| 355 utf-16-little-endian utf-16-little-endian | |
| 356 utf-16 utf-16 | |
| 357 ucs-4 ucs-4 | |
| 358 " | |
| 359 ;; #### What a mess! This needs to be overhauled. | |
| 360 | |
| 361 ;; The old table (from FSF synch?) was not what we use (cf mule-coding.el), | |
| 362 ;; and as documented iso-8-designate is inconsistent with iso-2022-8bit-ss2. | |
| 363 ;; The order of priorities of coding categories and the coding system | |
| 364 ;; bound to each category are as follows: | |
| 365 ;; | |
| 366 ;; coding category coding system | |
| 367 ;; -------------------------------------------------- | |
| 368 ;; iso-8-2 iso-8859-1 | |
| 369 ;; iso-8-1 iso-8859-1 | |
| 370 ;; iso-7 iso-2022-7bit | |
| 371 ;; iso-lock-shift iso-2022-lock | |
| 372 ;; iso-8-designate iso-2022-8bit-ss2 | |
| 373 ;; no-conversion raw-text | |
| 374 ;; shift-jis shift_jis | |
| 375 ;; big5 big5 | |
| 376 ;; ucs-4 ---- | |
| 377 ;; utf-8 ---- | |
| 378 (when (featurep 'mule) | |
| 379 (set-coding-category-system 'iso-7 'iso-2022-7) | |
| 380 (set-coding-category-system 'iso-8-1 'iso-8859-1) | |
| 381 (set-coding-category-system 'iso-8-2 'ctext) | |
| 382 (set-coding-category-system 'iso-lock-shift 'iso-2022-lock) | |
| 383 (set-coding-category-system 'iso-8-designate 'ctext) | |
| 384 (if (find-coding-system 'shift-jis) | |
| 385 (set-coding-category-system 'shift-jis 'shift-jis)) | |
| 386 (if (find-coding-system 'big5) | |
| 387 (set-coding-category-system 'big5 'big5)) | |
| 388 ) | |
| 389 (set-coding-category-system | |
| 390 'no-conversion | |
|
4989
d2ec55325515
make utf-8 default for Cygwin 1.7, rewrite init code determining default coding systems
Ben Wing <ben@xemacs.org>
parents:
4568
diff
changeset
|
391 (coding-system-variable-default-value 'no-conv-cs)) |
| 771 | 392 (set-coding-category-system 'ucs-4 'ucs-4) |
| 393 (set-coding-category-system 'utf-8 'utf-8) | |
| 985 | 394 (set-coding-category-system 'utf-8-bom 'utf-8-bom) |
| 771 | 395 (set-coding-category-system 'utf-16-little-endian 'utf-16-little-endian) |
| 396 (set-coding-category-system 'utf-16 'utf-16) | |
| 397 (set-coding-category-system 'utf-16-little-endian-bom | |
| 398 'utf-16-little-endian-bom) | |
| 399 (set-coding-category-system 'utf-16-bom 'utf-16-bom) | |
| 400 (set-coding-priority-list | |
| 401 (if (featurep 'mule) | |
| 402 '(utf-16-little-endian-bom | |
| 403 utf-16-bom | |
| 985 | 404 utf-8-bom |
| 771 | 405 iso-7 |
| 406 no-conversion | |
| 407 utf-8 | |
| 408 iso-8-1 | |
| 409 iso-8-2 | |
| 410 iso-8-designate | |
| 411 iso-lock-shift | |
| 412 shift-jis | |
| 413 big5 | |
| 414 utf-16-little-endian | |
| 415 utf-16 | |
| 416 ucs-4) | |
| 417 '(utf-16-little-endian-bom | |
| 418 utf-16-bom | |
| 985 | 419 utf-8-bom |
| 771 | 420 no-conversion |
| 421 utf-8 | |
| 422 utf-16-little-endian | |
| 423 utf-16 | |
| 424 ucs-4)))) | |
| 425 | |
| 426 (defun reset-language-environment () | |
| 427 "Reset coding system environment of XEmacs to the default status. | |
| 428 All basic coding system variables are set to their default values, as | |
| 429 are the coding categories used for automatic detection and their | |
| 430 priority. | |
| 431 | |
| 432 BE VERY CERTAIN YOU WANT TO DO THIS BEFORE DOING IT! | |
| 433 | |
| 434 For more information, see `reset-coding-system-defaults' and | |
| 435 `reset-coding-categories-to-default'." | |
| 436 (reset-coding-system-defaults) | |
| 437 (reset-coding-categories-to-default)) | |
| 438 | |
| 439 ;; Initialize everything so that the remaining Lisp files can contain | |
| 440 ;; extended characters. (They will be in ISO-7 format) | |
| 441 | |
| 442 ;; !!####!! The Lisp files should all be in UTF-8!!! That way, all | |
| 443 ;; special characters appear as high bits and there's no problem with | |
| 444 ;; the Lisp parser trying to read a Mule file and getting all screwed | |
| 445 ;; up. The only other thing then would be characters; we just need to | |
| 446 ;; modify the Lisp parser to read the stuff directly after a ? as | |
| 447 ;; UTF-8 and return a 30-bit value directly, and modify the character | |
| 448 ;; routines a bit to allow such a beast to exist. MAKE IT A POINT TO | |
| 449 ;; IMPLEMENT THIS AS ONE OF MY FUTURE PROJECTS. --ben | |
| 450 | |
| 451 (reset-language-environment) | |
| 452 | |
|
4568
1d74a1d115ee
Add #'query-coding-region tests; do the work necessary to get them running.
Aidan Kehoe <kehoea@parhasard.net>
parents:
2508
diff
changeset
|
453 (coding-system-put 'raw-text 'safe-charsets '(ascii control-1 latin-iso8859-1)) |
|
1d74a1d115ee
Add #'query-coding-region tests; do the work necessary to get them running.
Aidan Kehoe <kehoea@parhasard.net>
parents:
2508
diff
changeset
|
454 |
| 771 | 455 ;;; code-init.el ends here |
