Mercurial > hg > xemacs-beta
changeset 8:4b173ad71786 r19-15b5
Import from CVS: tag r19-15b5
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 08:47:16 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 08:47:35 2007 +0200 @@ -1,8 +1,17 @@ -*- indented-text -*- +to 19.15 beta5 +-- tm-7.97 +-- InfoDock man.el +-- Fix long-standing race condition in timeout handling (courtesy of David + Moore). +-- next-line-add-newlines now defaults to nil +-- Miscellaneous bug fixes. +-- kp_ X11 keysyms now recognized as kp-. + to 19.15 beta4 -- Default JPEG image loading is now old tempfile code, but should work again. -- Miscellaneous bug fixes courtesy of Christoph Wedler --- mic-paren.el courtesy of Mikael Sjödin +-- mic-paren.el courtesy of Mikael Sjdin -- lpr.el/ps-print.el - Allow dynamic expansion of lpr-switches/ps-lpr-switches. -- Lisp Bug fixes
--- a/Makefile.in Mon Aug 13 08:47:16 2007 +0200 +++ b/Makefile.in Mon Aug 13 08:47:35 2007 +0200 @@ -300,9 +300,6 @@ dynodump/Makefile: ${srcdir}/dynodump/Makefile.in.in config.status ./config.status -man/Makefile: ${srcdir}/man/Makefile.in.in config.status - ./config.status - src/config.h: ${srcdir}/src/config.h.in ./config.status
--- a/configure Mon Aug 13 08:47:16 2007 +0200 +++ b/configure Mon Aug 13 08:47:35 2007 +0200 @@ -95,7 +95,7 @@ with_x11='' rel_alloc='default' use_system_malloc='default' -internal_makefile_list='Makefile lib-src/Makefile.in man/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' +internal_makefile_list='Makefile lib-src/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' energize_version='no' native_sound_lib='' # make normal error-checking be the default in alpha and beta versions, so @@ -8475,7 +8475,6 @@ # src/Makefile from ${srcdir}/src/Makefile.in # lwlib/Makefile from ${srcdir}/lwlib/Makefile.in # lib-src/Makefile from ${srcdir}/lib-src/Makefile.in -# man/Makefile from ${srcdir}/man/Makefile.in # man/*/Makefile from ${srcdir}/man/*/Makefile.in # dynodump/Makefile from ${srcdir}/dynodump/Makefile.in # and possibly @@ -8560,23 +8559,6 @@ rm -f junk.c junk.cpp; )' eval `echo $dynodump_makefile_command` -man_makefile_command='echo "creating man/Makefile"; - topsrcdir='"${topsrcdir}"'; -( cd ./man; - rm -f junk.c; - sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; - eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; - < junk.cpp '\ -' sed -e '\''s/^#.*//'\'' '\ -' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\ -' -e '\''s/^ / /'\'' '\ -' | sed -n -e '\''/^..*$/p'\'' '\ -' > Makefile.new; - chmod 444 Makefile.new; - mv -f Makefile.new Makefile; - rm -f junk.c junk.cpp; -)' -eval `echo $man_makefile_command` if [ "${with_energize}" = "yes" ]; then energize_makefile_command='echo "creating lwlib/energize/Makefile"; topsrcdir='"${topsrcdir}"'; @@ -8598,7 +8580,7 @@ fi # AC-OUTPUT has created `config.status' already. We need to add the # above commands to re-create `src/Makefile', `lwlib/Makefile', -# `lib-src/Makefile', `dynodump/Makefile', `man/Makefile', and possibly +# `lib-src/Makefile', `dynodump/Makefile', and possibly # `lwlib/energize/Makefile', and we need to insert them before the final # "exit 0" which appears at the end of `config.status'. <config.status sed -e 's/^exit 0$//' >config.new @@ -8615,7 +8597,7 @@ chmod +x config.status # Don't let the fact that we just rewrote config.status make Makefile think # that it is now newer. We have just rewritten all of the Makefiles as well. -MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile lib-src/Makefile.in dynodump/Makefile dynodump/Makefile.in lwlib/Makefile lwlib/Makefile.in man/Makefile man/Makefile.in" +MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile lib-src/Makefile.in dynodump/Makefile dynodump/Makefile.in lwlib/Makefile lwlib/Makefile.in" for file in $MFS; do chmod a+w $file; touch $file; chmod 444 $file done
--- a/configure.in Mon Aug 13 08:47:16 2007 +0200 +++ b/configure.in Mon Aug 13 08:47:35 2007 +0200 @@ -110,7 +110,7 @@ with_x11='' rel_alloc='default' use_system_malloc='default' -internal_makefile_list='Makefile lib-src/Makefile.in man/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' +internal_makefile_list='Makefile lib-src/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' energize_version='no' native_sound_lib='' # make normal error-checking be the default in alpha and beta versions, so @@ -1537,6 +1537,20 @@ ### Eric Raymond says we should accept strings like "sysvr4" to mean ### "System V Release 4"; he writes, "The old convention encouraged ### confusion between `system' and `release' levels'." +### +### We rely on cpp to generate makefiles from Makefile.in.in templates. +### There is at least one drawback to that. Since cpp generally has +### built-in macro definitions like `#define unix' or `#define i386', +### we must be careful to prevent it from substituting these occurences +### in certain places in the makefiles. Pathnames for architecture- +### specific files come to mind. +### This is where CPPFLAGS_MAKEFILEGEN comes in. We try to selectively +### disable (potentially) predefined macros that we find to be part of +### the configuration string. +### This is but a poor method to help us fight off cpp, but it covers +### those cases that used to bite me. <mdiers@logware.de> + +CPPFLAGS_MAKEFILEGEN="" # we normally do not need any extra flags machine='' opsys='' unported=no need_dynodump=no case "${canonical}" in @@ -2265,6 +2279,7 @@ ## Intel 386 machines where we don't care about the manufacturer i[3-9]86-*-* ) machine=intel386 + CPPFLAGS_MAKEFILEGEN="${CPPFLAGS_MAKEFILEGEN} -Ui386" case "${canonical}" in *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; *-isc2.2* ) opsys=isc2-2 ;; @@ -2295,8 +2310,8 @@ else NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; fi ;; - *-386bsd* ) opsys=386bsd ;; - *-freebsd* ) opsys=freebsd ;; + *-386bsd* ) opsys=386bsd ;; + *-freebsd* ) opsys=freebsd ;; *-nextstep* ) opsys=nextstep ;; ## Otherwise, we'll fall through to the generic opsys code at the bottom. esac @@ -2540,14 +2555,7 @@ #### Now that we know whether we are using GCC, we can decide whether #### to use that one. -#### Also, GNU CPP by default defines certain add'l macros that could -#### hurt us when generating makefiles. We want to switch off these -#### add'l macros for the purpose of generating makefiles. - -CPPFLAGS_MAKEFILEGEN="" -if [ "x$GCC" = x1 ] ; then - CPPFLAGS_MAKEFILEGEN=" -undef " -elif [ "x$NON_GNU_CPP" = x ] ; then +if [ "x$GCC" = x1 ] || [ "x$NON_GNU_CPP" = x ] ; then true else if [ "x$CPP" = x ]; then @@ -4442,7 +4450,6 @@ # src/Makefile from ${srcdir}/src/Makefile.in # lwlib/Makefile from ${srcdir}/lwlib/Makefile.in # lib-src/Makefile from ${srcdir}/lib-src/Makefile.in -# man/Makefile from ${srcdir}/man/Makefile.in # man/*/Makefile from ${srcdir}/man/*/Makefile.in # dynodump/Makefile from ${srcdir}/dynodump/Makefile.in # and possibly @@ -4527,23 +4534,6 @@ rm -f junk.c junk.cpp; )' eval `echo $dynodump_makefile_command` -man_makefile_command='echo "creating man/Makefile"; - topsrcdir='"${topsrcdir}"'; -( cd ./man; - rm -f junk.c; - sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; - eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; - < junk.cpp '\ -' sed -e '\''s/^#.*//'\'' '\ -' -e '\''s/^[ \f\t][ \f\t]*$//'\'' '\ -' -e '\''s/^ / /'\'' '\ -' | sed -n -e '\''/^..*$/p'\'' '\ -' > Makefile.new; - chmod 444 Makefile.new; - mv -f Makefile.new Makefile; - rm -f junk.c junk.cpp; -)' -eval `echo $man_makefile_command` if [ "${with_energize}" = "yes" ]; then energize_makefile_command='echo "creating lwlib/energize/Makefile"; topsrcdir='"${topsrcdir}"'; @@ -4565,7 +4555,7 @@ fi # AC-OUTPUT has created `config.status' already. We need to add the # above commands to re-create `src/Makefile', `lwlib/Makefile', -# `lib-src/Makefile', `dynodump/Makefile', `man/Makefile', and possibly +# `lib-src/Makefile', `dynodump/Makefile', and possibly # `lwlib/energize/Makefile', and we need to insert them before the final # "exit 0" which appears at the end of `config.status'. <config.status sed -e 's/^exit 0$//' >config.new @@ -4582,7 +4572,7 @@ chmod +x config.status # Don't let the fact that we just rewrote config.status make Makefile think # that it is now newer. We have just rewritten all of the Makefiles as well. -MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile lib-src/Makefile.in dynodump/Makefile dynodump/Makefile.in lwlib/Makefile lwlib/Makefile.in man/Makefile man/Makefile.in" +MFS="Makefile src/Makefile src/Makefile.in lib-src/Makefile lib-src/Makefile.in dynodump/Makefile dynodump/Makefile.in lwlib/Makefile lwlib/Makefile.in" for file in $MFS; do chmod a+w $file; touch $file; chmod 444 $file done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/ns/XEmacs.info Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,8 @@ +Title XEmacs +Version 19.13 +Description XEmacs has native support for the NeXTstep window system. If you have installed the old XEmacs.app in /LocalApps, don't forget to delete it first. Installation will also create links to the /usr/local hierarchy which makes XEmacs accessible to shell users. +DefaultLocation /LocalApps +Relocatable NO +Application YES +DiskName XEmacs19.13 +DeleteWarning Removing this package will also delete the links to it in the /usr/local hierachy.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-netscape.dtd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1475 @@ +<!-- + html3.dtd + + Document Type Definition for the HyperText Markup Language (HTML DTD) + + Draft: Fri 24-Mar-95 09:46:33 + + Author: Dave Raggett <dsr@hplb.hpl.hp.com> + + W3O is developing a testbed browser to provide practical + experience with HTML 3.0 before it becomes a standard. + See: http://www.w3.org/hypertext/WWW/Arena/ + + This is an open process and comments are welcomed on the + www-html mailing list. + + Please use the following MIME content type: + + Content-Type: text/html; version=3.0 + + This will allow clients to distinguish HTML 3.0 from current + HTML documents. This is most easily achieved by saving + files with the extension ".html3" or ".ht3" so that servers + can easily distinguish these files from HTML 2.0 files. + + The entity HTML.Recommended can be used to give a more rigorous + version of the DTD suitable for use with SGML authoring tools. + The default version of the DTD offers a laxer interpretation, + e.g. allowing authors to omit leading <P> elements. You can + switch on the more rigorous version of the DTD by including + the following at the start of your HTML document. + + <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN//" + [ <!ENTITY % HTML.Recommended "INCLUDE"> ] > + + + Design Objectives: + + o Backwards compatibility with 2.0 + + o Tightening up HTML.Recommended and + moving more things to HTML.Deprecated + + o Keep HTML - simple don't compete with CALS + + o Make it practical for people to edit HTML 3.0 + documents directly, i.e. avoid long names. + + o Tables, figures and math from HTML+ + with tweaks based on recent experience + + o Client-side event handling for figures + and graphical form selection menus + + o Add limited presentational controls with + a view to use of linked style sheets + (style overrides are supported) + + o Compatibility with ICADD as per Yuri's suggestions + + HTML 3.0 relies on linked style info to give authors + control over the appearence of documents. Such info is + placed in a linked style sheet, or as overrides in the + HTML document head, using the STYLE element. The generic + CLASS attribute can be used to subclass elements when + you want to use a different style from normal, e.g. you + might use <h2 class=bigcaps> for headers with enlarged + capital letters. Note that the class attribute has a + wider scope than just style changes, e.g. browsers could + provide the means for searching through documents, + restricting search according to element class values. + + The DTD contains a small number of attributes for direct + control of basic alignment parameters; column widths for + tables; support for custom bullets, sequence numbering for + lists and headers; and text flow. These attributes offer + control over appearence which would be inconvenient to + express exclusively via associated style sheets. + + The MD attribute for each hypertext or inline link specifies a + message digest such as MD5 for the linked object and is needed + to ensure someone hasn't tampered with a linked document. + + History: + + 24th March '95 + + Changed ROLE->CLASS for HTML element + Added dummy elements to fix problem with mixed + content models for BODY, BLOCKQUOTE/BQ and FIG + Dropped audio fields from FORMs + Reinstated MIN/MAX for range fields + Reinstated DISABLED and ERROR attributes for fields + + 22nd March '95 + + Changed from em to en units. The latter + is a typographical unit = half point size + Merged NEEDS into CLEAR for control of textflow + + 21st March '95 + + Added REL=Banner to LINK element + Added BANNER element in place of <DIV CLASS=BANNER> + Added RANGE and SPOT elements + Added FN in place of <NOTE ROLE=FOOTNOTE> + Changed ROLE->CLASS for NOTE element + + 17th March '95 + + Fixed bug in PRE content model + Changed external references to omit trailling // + Dropped <!DOCTYPE HTML [ ... ]> wrapper to avoid problems + with "real" sgml parsers + Added NOFLOW attribute to FIG and TABLE + Fixed typo in IMG ALIGN attribute + Made SELECT match IMG for graphic attributes + Added decimal alignment for tabs and table cells + Added ALIGN attribute to TEXTAREA for parity + with IMG and INPUT, including ALIGN=LEFT etc. + + 13th March '95 + + Dropped MARK tag on advice from SGML Open + Allowed spaces in table colspec attribute + Changed ARRAY element + Added CHOOSE tag to BOX element + Cleaned up PRE content model + Obsoleted tags incompatible with SGML + + 6th March '95 + + Added several tags to MATH: %mathface, %mathvec + and improved ROOT, with new SQRT convience tag + + 1st March '95 + + Dropped align attribute from BR element + Added indent attribute to TAB + Added optional CREDIT to end of BQ + Changed FIG to %body.content to allow headers + + 22nd February '95 + + Added align attribute, and dropped before, after, center and right + attributes to clean up TAB element + Added INS and DEL for legal documents + Added CREDIT to end of FIG element + Dropped FN in favor of <NOTE ROLE=FootNote> + + 9th Feburuary '95 + + Dropped base attribute mechanism for scoping relative URLs + Dropped nofold attribute for disabling whitespace folding + Dropped border width attributes for FIG (-> style sheet) + Dropped delims attribute from math BOX element + Dropped stylistic attributes from OL such as inherit (-> stylesheet) + Added baseline to list of valign attribute values for tables. + Added DIV element for generic container class and static banners + Added MARK element for marked range class + Added closed set of LINK REL values for toolbars + Added numbering attributes to headers + Added bullet attributes to headers + Added TERM element to math for style sheet control of term rendering + Changed to imagemap=URI for server-side event handling for FIG/OVERLAY + Changed delimiter attributes for math arrays + Changed ROOT element for maths to allow an arbitrary radix + Simplified numbering attributes for ordered lists + Simplified STYLE element to leave binding to style language +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Netscape//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Netscape//EN"> + <html> + ... + </html> + -- + > + +<!--================== Flags for Marked Sections ==========================--> + +<!ENTITY % HTML.Recommended "IGNORE" + -- Certain features of the language are necessary for compatibility + with widespread usage, but they may compromise the structural + integrity of a document. This feature test entity enables + a more prescriptive document type definition that eliminates + the above features. + --> + +<![ %HTML.Recommended [ + <!ENTITY % HTML.Deprecated "IGNORE"> +]]> + +<!ENTITY % HTML.Deprecated "INCLUDE" + -- Certain features of the language are necessary for compatibility + with earlier versions of the specification, but they tend + to be used an implemented inconsistently, and their use is + deprecated. This feature test entity enables a document type + definition that eliminates these features. + --> + +<!ENTITY % HTML.Obsoleted "IGNORE" + -- The XMP, LISTING and PLAINTEXT tags are incompatible with SGML + and derive from very early versions of HTML. They require non- + standard parsers and will cause problems for processing + documents with standard SGML tools. + --> + +<!--================== Imported Names =====================================--> + +<!ENTITY % Content-Type "CDATA" + -- meaning a MIME content type, as per RFC1521 + --> + +<!ENTITY % HTTP-Method "GET | POST" + -- as per HTTP specification + --> + +<!ENTITY % URI "CDATA" + -- The term URI means a CDATA attribute + whose value is a Uniform Resource Identifier, + as defined by + "Uniform Resource Identifiers" by Tim Berners-Lee + aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html + aka RFC 1630 + + Note that CDATA attributes are limited by the LITLEN + capacity (1024 in the current version of html.decl), + so that URIs in HTML have a bounded length. + + --> + +<!ENTITY % REAL "CDATA" -- real numbers (not in SGML) --> + +<!ENTITY % SHAPE "CDATA" + -- Shape of hotzone in image. + + All coordinates are assumed to be numbers in the range 0 to 1 + and interpreted as fractional width/height and measured from + the top left corner of the associated image. + + The attribute value is a string taking one of the following forms: + + "default" + + Used to define a default link for the figure background. + + "circle x, y, r" + + (x, y) define the center and r the radius. + + "rect x, y, w, h" + + (x, y) defines upper left, and w and h the width and height. + + "polygon x1, y1, x2, y2, ..." + + Given n pairs of x, y coordinates, the polygon is closed by a + line linking the n'th point to the first. Intersecting polygons + use the non-zero winding number rule to determine if a point lies + inside the polygon.I + -- +> + +<!ENTITY % COLOR "CDATA"> + +<!-- 3.0 Parameter Entities --> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> + +<![ %HTML.Obsoleted [ + <!ENTITY % preformatted "PRE | XMP | LISTING"> +]]> + + +<![ %HTML.Deprecated [ + <!ENTITY % list "UL | OL | DIR | MENU"> + <!ENTITY % blockquote "BLOCKQUOTE | BQ"> +]]> + +<!ENTITY % list "UL | OL"> + +<!ENTITY % blockquote "BQ"> + +<!ENTITY % preformatted "PRE"> + + +<!-- The CLASS attribute is used to subclass HTML elements for + rendering purposes, when used with style sheets, e.g. DSSSL lite --> + +<!ENTITY % attrs -- common attributes for elements -- + 'id ID #IMPLIED -- as target for hrefs (link ends) -- + lang CDATA "en.us" -- ISO language, country code -- + class NAMES #IMPLIED -- for subclassing elements --'> + +<!-- SGML standard forces different NAMES for all attribute values + in the same element, regardless of the attribute name! As a result + CDATA is used for CLEAR attribute to avoid clash with ALIGN attribute.--> + +<!-- +When text flows around a figure or table in the margin, you sometimes want +to start an element like a header, paragraph or list below the figure rather +than alongside it. The CLEAR attribute allows you to move down unconditionally: + + clear=left move down until left margin is clear + clear=right move down until right margin is clear + clear=all move down until both margins are clear + +Alternatively, you can decide to place the element alongside the figure just +so long as there is enough room. The minimum width needed is specified as: + + clear="40 en" move down until there is at least 40 en units free + clear="100 pixels" move down until there is at least 100 pixels free + +The style sheet (or browser defaults) may provide default minimum widths for +each class of block-like elements. +--> + +<!ENTITY % needs -- Attributes for controlling text flow. Used in headers + and other elements to guarantee sufficient room -- + 'clear CDATA #IMPLIED'> + +<!-- + The following attribute may be included where ever a URL can be given: + + md message digest e.g. md="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ" + where the digest is base64 encoded and preceded by a prefix + denoting the algorithm (in this case MD5). +--> + +<!ENTITY % url.link -- Attributes associated with URL based links -- + "md CDATA #IMPLIED -- message digest for linked object --"> + +<!--================ Character mnemonic entities ==========================--> + +<!-- The HTML list of Latin-1 entities includes the full range + of characters in widely available Latin-1 fonts, and as such + is a mixture of ISOlat1 and other ISO publishing symbols --> + +<!ENTITY % HTMLlat1 PUBLIC + "-//IETF//ENTITIES Added Latin 1 for HTML//EN"> +%HTMLlat1; + +<!--================ Entities for special symbols =========================--> + +<!ENTITY emsp SDATA "[emsp ]" -- em space --> +<!ENTITY ensp SDATA "[ensp ]" -- en space (1/2-em) --> +<!ENTITY mdash SDATA "[ndash ]" -- em dash --> +<!ENTITY ndash SDATA "[ndash ]" -- en dash (1/2-em) --> +<!ENTITY nbsp SDATA "[nbsp ]" -- non breaking space --> +<!ENTITY shy SDATA "[shy ]" -- soft hyphen --> +<!ENTITY copy SDATA "[copy ]" -- copyright sign --> +<!ENTITY trade SDATA "[trade ]" -- trade mark sign --> +<!ENTITY reg SDATA "[reg ]" -- registered sign --> + +<!--================ Entities for standard icons ==========================--> + +<!-- a range of standard icons such as &folder; for use + in speeding up display of directory listings etc. --> + +<!-- <!ENTITY % HTMLicons PUBLIC --> +<!-- "-//IETF//ENTITIES icons for HTML//EN"> --> +<!-- %HTMLicons; --> + +<!--================ Entities for math symbols ============================--> + +<!-- ISO subset chosen for use with the widely available Adobe math font --> + +<!-- <!ENTITY % HTMLmath PUBLIC --> +<!-- "-//IETF//ENTITIES Math and Greek for HTML//EN"> --> +<!-- %HTMLmath; --> + +<!--=================== Text Markup =======================================--> + +<!ENTITY % font " U | S | TT | I | BIG | SMALL"> + +<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE | NOBR | CENTER"> + +<!ENTITY % misc "Q | LANG | AU | DFN | PERSON | ACRONYM | ABBREV | INS | DEL"> + +<!ENTITY % special "TAB | MATH | A | IMG | BR | WBR"> + +<!ENTITY % notmath "%font | %phrase | %special | %misc"> + +<!ENTITY % text "#PCDATA | SUB | SUP | B | FONT | %notmath"> + + +<!ENTITY % pre.exclusion "TAB|MATH|IMG|BIG|SMALL|SUB|SUP"> + +<!ELEMENT (%font|B|%phrase|%misc) - - (%text)+> +<!ATTLIST (%font|B|%phrase|%misc) %attrs;> + +<!-- Subscripts and superscripts. The ALIGN attribute is only used for math --> + +<!ELEMENT (SUB|SUP) - - (%text)+> +<!ATTLIST (SUB|SUP) + %attrs; + align (left|center|right) #IMPLIED + > + +<!ELEMENT FONT - - (%text)+> +<!ATTLIST FONT + size NUMBER #IMPLIED + > + +<!ELEMENT BASEFONT - - (%text)+> +<!ATTLIST BASEFONT + size NUMBER #IMPLIED + > + +<!-- Forced line break --> + +<!ELEMENT BR - O EMPTY> +<!ATTLIST BR + %attrs; + %needs; -- for control of text flow -- + > + +<!-- Named left, center and right tab stops (independent of '\t' char) --> + +<!ELEMENT TAB - O EMPTY> +<!ATTLIST TAB + id ID #IMPLIED -- defines named tab stop -- + indent NUMBER 0 -- en units before new tab stop -- + to IDREF #IMPLIED -- jump to named tab stop -- + align (left|center|right|decimal) left + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + > + +<!ELEMENT NOBR - O (%text)+> + +<!ELEMENT WBR - O EMPTY> + +<!ELEMENT CENTER - O (%text)+> + +<!--================== Link Markup ========================================--> + +<!-- + With HTML 3.0 you can use ID attributes on most elements for named + link ends. The use of the NAME attribute on anchors is deprecated. + + Do we want to support arbitrary elements for link starts? This would + involve adding HREF and related attributes to most elements. +--> + +<![ %HTML.Deprecated [ + <!ENTITY % linkName "name CDATA #IMPLIED -- named link end --"> +]]> + +<!ENTITY % linkName ""> + + +<!ENTITY % ToolBar "home|toc|index|glossary|copyright| + up|previous|next|help|bookmark" + + -- LINK RELationship values which are used to create toolbar + buttons or menu items for navigation, where toc stands + for table of contents and bookmark provides for an open + ended set of links, i.e. you can use multiple bookmarks + for key entry points. Use the optional TITLE attribute + to override default names. + --> + +<!ENTITY % linkType "NAME" + -- A definitive list will be specified at a later date. + + They are used + + a) by stylesheets to control how collections of + html nodes are rendered into printed documents + + b) for document specific toolbars/menus when used + with the LINK element in document head: + + "home|toc|index|glossary|copyright| + up|previous|next|help|bookmark" + + where toc stands for table of contents and + bookmark provides for an open ended set of links, + i.e. you can use several bookmarks for key entry + points. Use the optional TITLE attribute to + override default names. + + c) for hypertext paths or guided tours, + with REL=NODE and REL=PATH. + + d) to make a link to a style sheet, e.g. rel=stylesheet + (used only with the LINK element). + + e) to make a link to a separate banner, e.g. rel=banner + (used only with the LINK element). + --> + + +<!ENTITY % linkExtraAttributes -- URN moved to %url.link -- + "rel %linkType #IMPLIED -- forward relationship type -- + rev %linkType #IMPLIED -- reversed relationship type + to referent data -- + title CDATA #IMPLIED -- advisory only -- + methods NAMES #IMPLIED -- supported public methods of the object: + TEXTSEARCH, GET, HEAD, ... -- + "> + +<![ %HTML.Deprecated [ + <!ENTITY % A.content "(%heading|%text)+"> +]]> + +<!ENTITY % A.content "(%text)+"> + +<!ELEMENT A - - %A.content -(A)> + +<!ATTLIST A + %attrs; + href %URI; #IMPLIED + %url.link; -- standard link attributes -- + %linkName; -- name attribute is deprecated; use ID instead -- + shape %SHAPE; #IMPLIED -- for shaped hotzones in FIGs -- + %linkExtraAttributes; + > + +<!--=================== Images ============================================--> + +<!-- Desired widths are used for negotiating image size + with the module responsible for painting the image. + align=left or right cause image to float to margin + and for subsequent text to wrap around image --> + +<!ELEMENT IMG - O EMPTY -- Embedded image --> +<!ATTLIST IMG + %attrs; + src %URI; #REQUIRED -- URI of image to embed -- + %url.link; -- standard link attributes -- + alt CDATA #IMPLIED -- for display in place of image -- + align + (left|right|top|texttop|middle|absmiddle|baseline|bottom|absbottom) top -- relative to baseline -- + width NUMBER #IMPLIED -- desired width in en's or pixels -- + height NUMBER #IMPLIED -- desired height in en's or pixels -- + border NUMBER #IMPLIED + vspace NUMBER #IMPLIED + hspace NUMBER #IMPLIED + units (en|pixels) pixels -- units for width and height -- + ismap (ismap) #IMPLIED -- pass clicks to server -- + > + +<!--=================== Paragraphs=========================================--> + +<!ELEMENT P - O (%text)+> +<!ATTLIST P + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!--=================== Headings, Titles, Sections ========================--> + +<!ELEMENT HR - O EMPTY -- customizable horizontal rule --> +<!ATTLIST HR + %attrs; + src %URI; #IMPLIED -- URI of custom rule graphic -- + %url.link; -- standard link attributes -- + %needs; -- for control of text flow -- + size NUMBER #IMPLIED -- thickness of rule -- + width NUMBER #IMPLIED -- width of rule -- + align (left|right|center) #IMPLIED -- relative to margin -- + noshade (noshade) #IMPLIED -- fancy shading -- + > + +<!-- + Headers can be numbered, although this is a matter for style sheets. + The style sheet controls the numbering style: + + a) whether the parent numbering is inherited, e.g. 5.i.c + where 5 is the current sequence number for H1 headers, and + 1 is the number for H2 headers and 3 for H3 headers. + + b) what style is used for current sequence number + e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman + or a numbering scheme appropriate for the current language + + The skip attribute is used to skip over sequence numbers for items + which have been left out of the list, e.g. skip=3 advances the + sequence number past 3 omitted items. The seqnum sets the sequence + number to a specified value. Note that the style sheet may take + advantage of the sequence number for higher level headers. + + The dingbat or src attributes may be used to specify a bullet like + image to be placed adjacent to the header. Defining this in the + header element simplifies the document markup and avoids the need + to use the clear or needs attribute in the following element to + prevent it flowing around this image. +--> + +<!ELEMENT ( %heading ) - - (%text;)+> +<!ATTLIST ( %heading ) + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + seqnum NUMBER #IMPLIED -- starting sequence number -- + skip NUMBER 0 -- skip seq nums for missing items -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- bullet defined by graphic -- + %url.link; -- standard link attributes -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!ELEMENT TITLE - - (#PCDATA) + -- The TITLE element is not considered part of the flow of text. + It should be displayed, for example as the page header or + window title. + --> + +<!--=================== Text Flows ========================================--> + +<!ENTITY % block + "P | %list | DL + | %preformatted + | %blockquote + | FORM | ISINDEX | FN + | TABLE | FIG | NOTE"> + +<!-- + ((%block)* | (%text)*) would be much nicer as it would avoid the need + for a <P> tag when all you want is a few words of text. The problem + is that it also prevents: "<LI> <P>some text" since it forbids PCDATA + and hence the white space between the <LI> and the <P>. +--> + +<![ %HTML.Recommended [ + <!ENTITY % flow "(%block)*"> +]]> + +<!ENTITY % flow "(%text | %block)*"> + +<!ELEMENT PRE - - (%text)* -(%pre.exclusion)> + +<!ATTLIST PRE + %attrs; + width NUMBER #implied + %needs; -- for control of text flow -- + > + +<![ %HTML.Obsoleted [ + +<!ENTITY % literal "CDATA" + -- special non-conforming parsing mode where + the only markup signal is the end tag + in full. This will cause problems for + standard SGML tools! + --> + +<!ELEMENT XMP - - %literal> +<!ELEMENT LISTING - - %literal> +<!ELEMENT PLAINTEXT - O %literal> + +]]> + +<!--=================== Lists =============================================--> + +<!ELEMENT DL - - (LH?, (DT|DD)+) -- this is perhaps too lax? --> +<!ATTLIST DL + %attrs; + %needs; -- for control of text flow -- + compact (compact) #IMPLIED -- more compact style -- + > + +<!ELEMENT DT - O (%text)+> +<!ELEMENT DD - O %flow;> +<!ATTLIST (DT|DD) + %attrs; + %needs; -- for control of text flow -- + > + + +<!ELEMENT (OL|UL) - - (LH?, LI+) -- should we allow a list header ? --> + +<!-- style sheet controls numbering style + a) whether the parent numbering is inherited, e.g. 5.1.c + b) what style is used for current sequence number + e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman + or a numbering scheme for the current language +--> +<!ATTLIST OL + %attrs; + %needs; -- for control of text flow -- + continue (continue) #IMPLIED -- don't restart sequence number -- + seqnum NUMBER #IMPLIED -- starting sequence number -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!-- Unordered lists: + + o single or multicolumn with + horizontal or vertical wrapping + + o plain or bulletted list items + + o bullets can be customised via: + - entities (dingbats in HTMLicons) + - external graphic via URL + - individual attributes on LI tags +--> +<!ATTLIST UL + %attrs; + %needs; -- for control of text flow -- + wrap (vert|horiz|none) none -- multicolumn list style -- + plain (plain) #IMPLIED -- suppress bullets -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- bullet defined by graphic -- + %url.link; -- standard link attributes -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!ELEMENT LH - O (%text;)+ -- list header --> +<!ATTLIST LH %attrs;> + +<!-- + For unordered lists, you can override the standard bullet with + a custom graphic specified via a URI e.g. src="splash.gif" or + a reference to one of the HTMLicons graphics e.g. dingbat=folder + + The skip attribute is used with ordered lists to skip over sequence + numbers for items which have been left out of the list, e.g. skip=3 + advances the sequence number past 3 omitted items. +--> + +<!ELEMENT LI - O %flow; -- list item --> +<!ATTLIST LI + %attrs; + %needs; -- for control of text flow -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- custom bullet graphic -- + %url.link; -- standard link attributes -- + skip NUMBER 0 -- skip seq nums for missing items -- + > + +<!-- DIR and MENU are now subsumed by UL with type=plain. Use the + wrap attribute to control wrapping style for multicolumn lists --> + +<![ %HTML.Deprecated [ + <!ELEMENT (DIR|MENU) - - (LI)+ -(%block)> + <!ATTLIST (DIR|MENU) + compact (compact) #IMPLIED> +]]> + +<!--=================== Document Body =====================================--> + +<![ %HTML.Recommended [ + <!ENTITY % body.content "(DIV|%heading|%block|HR|ADDRESS)*" + -- <h1>Heading</h1> + <p>Text ... + is preferred to + <h1>Heading</h1> + Text ... + --> +]]> + +<!ENTITY % body.content "(DIV | %heading | %text | %block | HR | ADDRESS)*"> + +<!ELEMENT BODY O O (BANNER?, BODYTEXT) +(SPOT)> +<!ATTLIST BODY + %attrs; + background %URI; #IMPLIED -- texture tile for document background -- + bgcolor %COLOR; #IMPLIED + text %COLOR; #IMPLIED + link %COLOR; #IMPLIED + vlink %COLOR; #IMPLIED + alink %COLOR; #IMPLIED + > + +<!ELEMENT BODYTEXT O O %body.content -- dummy element --> + +<!-- + The BANNER element is used for a banner section which appears at + the top of the window and doesn't scroll with window contents. + This can be used for corporate logos, copyright statements and + disclaimers, as well as customized navigation/search controls. +--> +<!ELEMENT BANNER - - %body.content> +<!ATTLIST BANNER %attrs; > + +<!-- SPOT is used to insert IDs at arbitrary places + e.g. for end points of a marked range (see RANGE) --> +<!ELEMENT SPOT - O EMPTY> +<!ATTLIST SPOT id ID #REQUIRED> + +<!ELEMENT (%blockquote) - - (BODYTEXT, CREDIT?)> +<!ATTLIST (%blockquote) + %attrs; + %needs; -- for control of text flow -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!ENTITY % address.content "((%text;)* | P*)"> + +<!ELEMENT ADDRESS - - %address.content> +<!ATTLIST ADDRESS + %attrs; + %needs; -- for control of text flow -- + > + +<!-- + DIV can be used with the CLASS attribute to represent different + kinds of container, e.g. chapter, section, abstract, appendix. +--> + +<!ELEMENT DIV - - %body.content> +<!ATTLIST DIV + %attrs; + %needs; -- for control of text flow -- + align (left|center|right) left -- alignment of following text -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!--================ Forms ===============================================--> + +<!-- + As HTML 2.0 plus a few extensions: + + a) A RANGE control which varies between pair of values + specified with the size attribute, e.g. SIZE="1, 10" + + b) FILE widget for uploading one or more files to a server + + c) SCRIBBLE on image widget that sends the "ink" to the server + + d) SUBMIT/RESET buttons can now be customised with an image. + This subsumes the IMAGE type which is now deprecated. + + e) Graphical SELECTion menus are now supported, using + the new SHAPE attribute on OPTION elements. + + Further extensions are in the pipeline (e.g. table entry, + multiple data formats for textarea fields and client-side + scripts with custom widgets) but will have to wait until + the backlog of implementation work diminishes. +--> + +<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> +<!ATTLIST FORM + action %URI #REQUIRED -- server-side form handler -- + method (%HTTP-Method) GET -- see HTTP specification -- + enctype %Content-Type; "application/x-www-form-urlencoded" + script %URI #IMPLIED -- link to client-side script -- + > + +<![ %HTML.Deprecated [ + <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT + | RESET | RANGE | FILE | SCRIBBLE | HIDDEN | IMAGE)"> +]]> + +<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT + | RESET | RANGE | FILE | SCRIBBLE | HIDDEN)"> + +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + %attrs; + type %InputType TEXT + name NAME #IMPLIED -- required for all but submit and reset -- + value CDATA #IMPLIED -- required for radio buttons & checkboxes -- + disabled (disabled) #IMPLIED -- read-only fields -- + error CDATA #IMPLIED -- why field is in error -- + checked (checked) #IMPLIED -- for radio buttons and check boxes -- + size NUMBER #IMPLIED -- visible width of TEXT fields -- + maxlength NUMBER #IMPLIED -- max number of chars for TEXT fields -- + min %REAL #IMPLIED -- lower limit for RANGE fields -- + max %REAL #IMPLIED -- upper limit for RANGE fields -- + accept CDATA #IMPLIED -- list of MIME types for file fields -- + src %URI #IMPLIED -- for fields with background images -- + %url.link; -- standard link attributes -- + align (top|middle|bottom|left|right) top + > + +<!-- + SRC attribute added for graphical selection menus + The WIDTH, HEIGHT and UNITS attributes apply to the + image specified by the SRC attribute. + --> + +<!ELEMENT SELECT - - (OPTION+) -(INPUT|TEXTAREA|SELECT)> +<!ATTLIST SELECT + %attrs; + name CDATA #REQUIRED + multiple (multiple) #IMPLIED + disabled (disabled) #IMPLIED -- read-only menu -- + error CDATA #IMPLIED -- why selections are in error -- + src %URI #IMPLIED -- for graphical selection menus -- + %url.link; -- standard link attributes -- + width NUMBER #IMPLIED -- desired width of in en's or pixels -- + height NUMBER #IMPLIED -- desired height in en's or pixels -- + units (en|pixels) pixels -- units for width and height -- + align (top|middle|bottom|left|right) top + > + +<!ELEMENT OPTION - O (#PCDATA)> +<!ATTLIST OPTION + %attrs; + selected (selected) #IMPLIED + value CDATA #IMPLIED -- default to element content -- + shape %SHAPE; #IMPLIED -- for graphical selection menus -- + disabled (disabled) #IMPLIED -- unselectable option -- + error CDATA #IMPLIED -- why this choice is in error -- + > + +<!-- + Multi-line text input field. align=left or right + causes the field to float to margin and for + subsequent text to wrap around the field. +--> + +<!ELEMENT TEXTAREA - - (#PCDATA) -(INPUT|TEXTAREA|SELECT)> +<!ATTLIST TEXTAREA + %attrs; + name CDATA #REQUIRED + rows NUMBER #REQUIRED + cols NUMBER #REQUIRED + disabled (disabled) #IMPLIED -- read-only field -- + error CDATA #IMPLIED -- why field is in error -- + align (top|middle|bottom|left|right) top + > + +<!--======================= Captions ======================================--> + +<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> +<!ATTLIST CAPTION + %attrs; + align (top|bottom|left|right) #IMPLIED + > +<!--======================= Tables ========================================--> + +<!-- + Tables and figures can be aligned in several ways: + + bleedleft flush left with the left (window) border + left flush left with the left text margin + center centered (text flow is disabled for this mode) + right flush right with the right text margin + bleedright flush right with the right (window) border + justify when applicable the table/figure should stretch + to fill space between the text margins + + Note: text will flow around the table or figure if the browser + judges there is enough room and the alignment is not centered + or justified. The table or figure may itself be part of the + text flow around some earlier figure. You can in this case use + the clear or needs attributes to move the new table or figure + down the page beyond the obstructing earlier figure. Similarly, + you can use the clear or needs attributes with other elements + such as headers and lists to move them further down the page. +--> + +<!ENTITY % block.align + "align (bleedleft|left|center|right|bleedright|justify) center"> + +<!-- + The HTML 3.0 table model has been chosen for its simplicity + and the ease in writing filters from common DTP packages. + + By default the table is automatically sized according to the + cell contents and the current window size. Specifying the columns + widths using the colspec attribute allows browsers to start + displaying the table without having to wait for last row. + + The colspec attribute is a list of column widths and alignment + specifications. The columns are listed from left to right with + a capital letter followed by a number, e.g. COLSPEC="L20 C8 L40". + The letter is L for left, C for center, R for right alignment of + cell contents. J is for justification, when feasible, otherwise + this is treated in the same way as L for left alignment. + Column entries are delimited by one or more space characters. + + The number specifies the width in en's, pixels or as a + fractional value of the table width, as according to the + associated units attribute. This approach is more compact + than used with most SGML table models and chosen to simplify + hand entry. The width attribute allows you to specify the + width of the table in pixels, en units or as a percentage + of the space between the current left and right margins. + + To assist with rendering to speech, row and column headers + can be given short names using the AXIS attribute. The AXES + attribute is used to explicitly specify the row and column + names for use with each cell. Otherwise browsers can follow + up columns and left along rows (right for some languages) + to find the corresponding header cells. + + Table content model: Braille limits the width of tables, + placing severe limits on column widths. User agents need + to render big cells by moving the content to a note placed + before the table. The cell is then rendered as a link to + the corresponding note. + + To assist with formatting tables to paged media, authors + can differentiate leading and trailing rows that are to + be duplicated when splitting tables across page boundaries. + The recommended way is to subclass rows with the CLASS attribute + For example: <TR CLASS=Header>, <TR CLASS=Footer> are used for + header and footer rows. Paged browsers insert footer rows at + the bottom of the current page and header rows at the top of + the new page, followed by the remaining body rows. +--> + +<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> +<!ATTLIST TABLE + %attrs; + %needs; -- for control of text flow -- + border (border) #IMPLIED -- draw borders -- + colspec CDATA #IMPLIED -- column widths and alignment -- + units (en|pixels|relative) en -- units for column widths -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + width NUMBER #IMPLIED -- absolute or percentage width -- + %block.align; -- horizontal alignment -- + noflow (noflow) #IMPLIED -- noflow around table -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + > + +<!ENTITY % cell "TH | TD"> +<!ENTITY % horiz.align "left|center|right|justify"> +<!ENTITY % vert.align "top|middle|bottom|baseline"> + +<!-- + Browsers should tolerate an omission of the first <TR> + tag as it is implied by the context. Missing trailing + <TR>s implied by rowspans should be ignored. + + The alignment attributes act as defaults for rows + overriding the colspec attribute and being in turn + overridden by alignment attributes on cell elements. + Use valign=baseline when you want to ensure that text + in different cells on the same row is aligned on the + same baseline regardless of fonts. It only applies + when the cells contain a single line of text. +--> + +<!ELEMENT TR - O (%cell)* -- row container --> +<!ATTLIST TR + %attrs; + align (%horiz.align) #IMPLIED -- horizontal alignment -- + valign (%vert.align) top -- vertical alignment -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + > + +<!-- + Note that table cells can include nested tables. + Missing cells are considered to be empty, while + missing rows should be ignored, i.e. if a cell + spans a row and there are no further TR elements + then the implied row should be ignored. +--> + +<!ELEMENT (%cell) - O %body.content> +<!ATTLIST (%cell) + %attrs; + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align (%horiz.align) #IMPLIED -- horizontal alignment -- + valign (%vert.align) top -- vertical alignment -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + axis CDATA #IMPLIED -- axis name, defaults to element content -- + axes CDATA #IMPLIED -- comma separated list of axis names -- + > + +<!--====================== Figures ========================================--> + +<!-- + The element contains text for use in non-graphical displays. Note that + you can use the shape attribute in anchors to specify hotzones on images. + This provides for local processing of pointer clicks and a unified method + for dealing with graphical and non-graphical displays. + + Text is flowed around figures when the figure is left or right aligned. + You can request the browser to move down until there is enough room for + the next element, see the CLEAR and NEED attributes (in %needs) + + Figures offer a path towards embedding arbitrary information formats + via some kind of OLE/OpenDoc mechanism. +--> + +<!ELEMENT FIG - - (OVERLAY*, CAPTION?, FIGTEXT, CREDIT?) -(FIG|IMG)> +<!ATTLIST FIG + %attrs; + %needs; -- for control of text flow -- + src %URI; #REQUIRED -- URI of document to embed -- + %url.link; -- standard link attributes -- + %block.align; -- horizontal alignment -- + noflow (noflow) #IMPLIED -- noflow around figure -- + width NUMBER #IMPLIED -- desired width in units -- + height NUMBER #IMPLIED -- desired height in units -- + units (en|pixels) pixels -- specifies units as en's or pixels -- + imagemap (%URI) #IMPLIED -- pass background clicks to server -- + > + +<!ELEMENT FIGTEXT O O %body.content -- dummy element --> + +<!-- + Figure overlays. When combined with local caching, overlays + provide a cheap way of modifying a larger base image sent as + part of a previous page. +--> + +<!ELEMENT OVERLAY - O EMPTY -- image overlay --> +<!ATTLIST OVERLAY + src %URI; #REQUIRED -- URI of image overlay -- + %url.link; -- standard link attributes -- + units (en|pixels) pixels -- specifies units as en's or pixels -- + x NUMBER 0 -- offset from left in units -- + y NUMBER 0 -- offset from top in units -- + width NUMBER #IMPLIED -- desired width in units -- + height NUMBER #IMPLIED -- desired height in units -- + imagemap (%URI) #IMPLIED -- pass background clicks to server -- + > + +<!ELEMENT CREDIT - - (%text;)* -- source of image --> +<!ATTLIST CREDIT + %attrs; + > + +<!--======================== Notes ========================================--> + +<!-- +The NOTE element is used for admonishments. The CLASS attribute +is used to differentiate NOTE's, e.g. Note, Caution or Warning. +--> + +<!ELEMENT NOTE - - %body.content; -- admonishment --> +<!ATTLIST NOTE + %attrs; + src %URI; #IMPLIED -- URI of custom graphic -- + %url.link; -- standard link attributes -- + %needs; -- for control of text flow -- + > + +<!--======================== Footnotes ====================================--> + +<!-- +Typically rendered as popup note. These elements are referenced +by hypertext links specified with the anchor element. +--> +<!ELEMENT FN - - %body.content;> +<!ATTLIST FN %attrs;> + +<!--======================== Math ========================================--> + +<!-- Use     etc for greater control of spacing. --> + +<!-- Subscripts and Superscripts + + <SUB> and <SUP> are used for subscripts and superscripts. + + i j + X <SUP>i</SUP>Y<SUP>j</SUP> is X Y + + i.e. the space following the X disambiguates the binding. + The align attribute can be used for horizontal alignment, + e.g. to explicitly place an index above an element: + i + X<sup align=center>i</sup> produces X + +Short references are defined for superscripts, subscripts and boxes +to save typing when manually editing HTML math, e.g. + + x^2^ is mapped to x<sup>2</sup> + y_z_ is mapped to y<sub>z</sub> + {a+b} is mapped to <box>a + b</box> + +Note that these only apply within the MATH element and can't be +used in normal text! +--> +<!ENTITY REF1 STARTTAG "SUP"> +<!ENTITY REF2 ENDTAG "SUP"> +<!ENTITY REF3 STARTTAG "SUB"> +<!ENTITY REF4 ENDTAG "SUB"> +<!ENTITY REF5 STARTTAG "BOX"> +<!ENTITY REF6 ENDTAG "BOX"> + +<!USEMAP MAP1 MATH> +<!USEMAP MAP2 SUP> +<!USEMAP MAP3 SUB> +<!USEMAP MAP4 BOX> + +<!SHORTREF MAP1 "^" REF1 + "_" REF3 + "{" REF5 > + +<!SHORTREF MAP2 "^" REF2 + "_" REF3 + "{" REF5 > + +<!SHORTREF MAP3 "_" REF4 + "^" REF1 + "{" REF5 > + +<!SHORTREF MAP4 "}" REF6 + "^" REF1 + "_" REF3 + "{" REF5 > + +<!-- + The inclusion of %math and exclusion of %notmath is used here + to alter the content model for the B, SUB and SUP elements, + to limit them to formulae rather than general text elements. +--> + +<!ENTITY % mathvec "VEC|BAR|DOT|DDOT|HAT|TILDE" -- common accents --> +<!ENTITY % mathface "B|T|BT" -- control of font face --> +<!ENTITY % math "BOX|ABOVE|BELOW|%mathvec|ROOT|SQRT|ARRAY|SUB|SUP|%mathface"> +<!ENTITY % formula "#PCDATA|%math"> + +<!ELEMENT MATH - - (#PCDATA)* -(%notmath) +(%math)> +<!ATTLIST MATH + id ID #IMPLIED + class NAMES #IMPLIED -- e.g. class=chem --> + +<!-- The BOX element acts as brackets. Delimiters are optional and + stretch to match the height of the box. The OVER element is used + when you want a line between numerator and denominator. This line + is suppressed with the alternative ATOP element. CHOOSE acts like + ATOP but adds enclosing round brackets as a convenience for binomial + coefficients. Note the use of { and } as shorthand for <BOX> and + </BOX> respectively: + + 1 + X + {1 + X<OVER>Y} is _______ + Y + + a + b + {a + b<ATOP>c - d} is + c - d + + The delimiters are represented using the LEFT and RIGHT + elements as in: + + {[<LEFT>x + y<RIGHT>]} is [ x + y ] + {(<LEFT>a<RIGHT>]} is (a] + {||<LEFT>a<RIGHT>||} is || a || + + Use { and } for "{" and "}" respectively as + these symbols are used as shorthand for BOX, e.g. + + {{<LEFT>a+b<RIGHT>}} is {a+b} + + You can stretch definite integrals to match the integrand, e.g. + + {∫<SUB>a</SUB><SUP>b</SUP><LEFT>{f(x)<over>1+x} dx} + + b + / f(x) + | ----- dx + / 1 + x + a + + Note the complex content model for BOX is a work around + for the absence of support for infix operators in SGML. + + You can get oversize delimiters with the SIZE attribute, + for example <BOX SIZE=large>(<LEFT>...<RIGHT>)</BOX> + + Note that the names of common functions are recognized + by the parser without the need to use "&" and ";" around + them, e.g. int, sum, sin, cos, tan, ... +--> + +<!ELEMENT BOX - - ((%formula)*, (LEFT, (%formula)*)?, + ((OVER|ATOP|CHOOSE), (%formula)*)?, + (RIGHT, (%formula)*)?)> +<!ATTLIST BOX + size (normal|medium|large|huge) normal -- oversize delims --> + +<!ELEMENT (OVER|ATOP|CHOOSE|LEFT|RIGHT) - O EMPTY> + +<!-- Horizontal line drawn ABOVE contents + The symbol attribute allows authors to supply + an entity name for an accent, arrow symbol etc. + Generalisation of LaTeX's overline command. + + e.g. <above sym=ssmile>x</above> + places an upwardly turning curve above the "x" + --> + +<!ELEMENT ABOVE - - (%formula)+> +<!ATTLIST ABOVE sym ENTITY #IMPLIED> + +<!-- Horizontal line drawn BELOW contents + The symbol attribute allows authors to + supply an entity name for an arrow symbol etc. + Generalisation of LaTeX's underline command. + --> + +<!ELEMENT BELOW - - (%formula)+> +<!ATTLIST BELOW sym ENTITY #IMPLIED> + +<!-- Convenience tags for common accents: + vec, bar, dot, ddot, hat and tilde +--> + +<!ELEMENT (%mathvec) - - (%formula)+> + +<!-- + T and BT are used to designate terms which should + be rendered in an upright font (& bold face for BT) +--> + +<!ELEMENT (T|BT) - - (%formula)+> +<!ATTLIST (T|BT) class NAMES #IMPLIED> + +<!-- Roots e.g. <ROOT>3<OF>1+x</ROOT> --> + +<!ELEMENT ROOT - - ((%formula)+, OF, (%formula)+)> +<!ELEMENT OF - O (%formula)* -- what the root applies to --> + +<!ELEMENT SQRT - - (%formula)* -- square root convenience tag --> + +<!-- LaTeX like arrays. The COLDEF attribute specifies + a single capital letter for each column determining + how the column should be aligned, e.g. coldef="CCC" + + "L" left + "C" center + "R" right + + An optional separator letter can occur between columns + and should be one of + - or =, e.g. "C+C+C+C=C". + Whitespace within coldef is ignored. By default, the + columns are all centered. + + The ALIGN attribute alters the vertical position of the + array as compared with preceding and following expressions. + + Use LDELIM and RDELIM attributes for delimiter entities. + When the LABELS attribute is present, the array is + displayed with the first row and the first column as + labels displaced from the other elements. In this case, + the first element of the first row should normally be + left blank. + + Use &vdots; &cdots; and &ddots; for vertical, horizontal + and diagonal ellipsis dots. Use &dotfill; to fill an array + cell with horizontal dots (e.g. for a full row). + Note &ldots; places the dots on the baseline, while &cdots; + places them higher up. +--> + +<!ELEMENT ARRAY - - (ROW)+> +<!ATTLIST ARRAY + align (top|middle|bottom) middle -- vertical alignment -- + coldef CDATA #IMPLIED -- column alignment and separator -- + ldelim CDATA #IMPLIED -- stretchy left delimiter -- + rdelim CDATA #IMPLIED -- stretchy right delimiter -- + labels (labels) #IMPLIED -- TeX's \bordermatrix style --> + +<!ELEMENT ROW - O (ITEM)*> +<!ELEMENT ITEM - O (%formula)*> +<!ATTLIST ITEM + align CDATA #IMPLIED -- override coldef alignment -- + colspan NUMBER 1 -- merge columns as per TABLE -- + rowspan NUMBER 1 -- merge rows as per TABLE --> + +<!--================ Document Head ========================================--> + +<![ %HTML.Deprecated [ + <!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? + & META* & LINK* & RANGE* & NEXTID?"> +]]> + +<!ENTITY % head.nextid ""> + +<!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? + & META* & LINK* & RANGE*"> + +<!ELEMENT HEAD O O (%head.content)> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + href %URI #REQUIRED + %linkExtraAttributes; > + +<!ELEMENT RANGE - O EMPTY> +<!ATTLIST RANGE + id ID #IMPLIED -- for naming marked range -- + class NAMES #IMPLIED -- for subclassing -- + from IDREF #REQUIRED -- start of marked range -- + until IDREF #REQUIRED -- end of marked range -- + > + +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX + href %URI #IMPLIED -- server handling queries -- + prompt CDATA #IMPLIED -- prompt message --> + +<!-- + The BASE element gives the base URL for + dereferencing relative URLs, e.g. + + <BASE href="http://foo.com/images"> + ... + <IMG SRC="bar.gif"> + + The image is deferenced to + + http://foo.com/images/bar.gif +--> + +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE + id ID #IMPLIED + href %URI; #REQUIRED + > + +<![ %HTML.Deprecated [ + <!ELEMENT NEXTID - O EMPTY> + <!ATTLIST NEXTID N CDATA #REQUIRED> +]]> + +<!ELEMENT META - O EMPTY -- Generic Metainformation --> +<!ATTLIST META + http-equiv NAME #IMPLIED -- HTTP response header name -- + name NAME #IMPLIED -- metainformation name -- + content CDATA #REQUIRED -- associated information -- + > + +<!-- + A style sheet can be associated with the document using the + LINK element, e.g. <LINK rel=style href="housestyle.dsssl">. + Style overrides can be placed in the document head using the + STYLE element, e.g. + + <style notation=dsssl-lite> + dsss-lite stuff + </style> + + Later on in the document you can use: + + <h2 class=bigcaps>Header with bigger than normal capitals</h2> + <p class=abstract>A paragraph with a unique style of its own + ... + + Statements in the given style notation + + The tag names, class and id attributes are used in the style sheet + notation to describe how to render matching elements. +--> + +<!ENTITY % style-notations "dsssl-lite | w3c-style"> +<!NOTATION dsssl-lite PUBLIC + "ISO/IEC 10179:1995//NOTATION DSSSL Style Language//EN"> + +<!NOTATION w3c-style PUBLIC "IETF/RFC nnn/W3C Style Language//EN"> + +<!ELEMENT STYLE - O (#PCDATA)> +<!ATTLIST STYLE + notation NOTATION (%style-notations;) #REQUIRED +> + +<!--================ Document Structure ===================================--> + +<!ENTITY % html.content "HEAD, BODY"> + +<!ELEMENT HTML O O (%html.content)> +<!ENTITY % version.attr 'VERSION CDATA #FIXED "&HTML.Version;"'> + +<!-- suggested roles are: TOC, DOC, DOCPART, HITLIST, DIALOG --> + +<!ATTLIST HTML + %version.attr; -- report DTD version to application -- + urn CDATA #IMPLIED -- universal resource name for this document -- + class NAMES #IMPLIED -- role of this document, eg table of contents -- + > + +<!-- The END -->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-plus+.dtd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,545 @@ +<!DOCTYPE HTMLPLUS [ + +<!-- DTD for HTML+ It assumes the default <!SGML> declaration. + + Markup minimisation should be avoided with the exception of </> + for the endtag. Browsers should be forgiving of markup errors. + + Common Attributes: + + id The id attribute allows authors to name elements such as + headers and paragraphs as potential destinations for links. + Note links don't specify points, but rather extended objects. + + index Allows authors to specify how given headers etc should be + indexed as primary or secondary keys, where "/" separates + primary from secondary keys ";" separates multiple entries +--> + +<!-- ENTITY DECLARATIONS with <!ENTITY> + + <!ENTITY % foo "X | Y | Z"> is a macro definition for parameters and + in subsequent statements, the string "%foo;" is expanded to "X | Y | Z" + + Various classes of SGML text types: + + #CDATA text which doesn't include markup or entity references + + #RCDATA text with entity references but no markup + + #PCDATA text occurring in a context in which markup and entity + references may occur. +--> + +<!ENTITY % URL "CDATA" -- a URL or URN designating a hypertext node --> +<!ENTITY % text "#PCDATA|A|IMG|EM|EMBED|INPUT|SP|BR|ADDRESS|CHANGED"> +<!ENTITY % paras "P|PRE|FIG|HR"> +<!ENTITY % lists "UL|OL|DL"> +<!ENTITY % misc "TBL|FORM|PANEL|GROUP"> +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> +<!ENTITY % table "%text;|P|%heading;|%lists;"> +<!ENTITY % main "%heading;|%misc;|%lists;|%paras;|%text;"> +<!ENTITY % setup "(TITLE? & HTML? &ISINDEX? & NEXTID? & LINK* & BASE?)"> + +<!-- + <!ELEMENT tagname - - CONTENT> elements needing closing tags + <!ELEMENT tagname - O CONTENT> elements without closing tags + <!ELEMENT tagname - O EMPTY> elements without content or closing tags + + The content definition is: + a) an entity reference as defined above + b) a tagname + c) (brackets enclosing the above) + + These may be combined with the operators: + + A* A occurs zero or more times + A+ A occurs one or more times + AÝB implies either A or B + A? A may occur zero or one times + A,B implies first A then B +--> + +<!ELEMENT HTMLPLUS O O ((HEAD, BODY) | ((%setup;), (%main;)*))> + +<!ELEMENT HEAD - - (%setup;)> + +<!ELEMENT BODY - - (%main;)*> + +<!-- Document title --> + +<!ELEMENT TITLE - - (#PCDATA | EM)+> +<!ATTLIST TITLE + id ID #IMPLIED -- link destination -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Document/Node role for cataloging documents held by servers --> + +<!ELEMENT HTML - O (EMPTY)> + +<!ATTLIST HTML role CDATA #IMPLIED -- home page, index, ... --> + +<!-- Floating panel which can be moved around relative to the normal text + flow. Often rendered with a different background and possibly framed. The + panel can be anchored to a named point in the document as specified by the + AT attribute. The panel may be placed at that point or after, but not + before. +--> + +<!ELEMENT PANEL - - (TITLE?, (%main;)*)> + +<!ATTLIST PANEL + id ID #IMPLIED -- defines link destination -- + at IDREF #IMPLIED -- anchor point -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Document headers --> + +<!ELEMENT (%heading;) - - (#PCDATA | A | EM)+> + +<!ATTLIST (%heading;) + id ID #IMPLIED -- defines link destination -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- logical emphasis with optional style hints --> + +<!ELEMENT EM - - (%text;)*> + +<!ATTLIST EM + role CDATA #IMPLIED -- semantic category e.g. CITE -- + b (b) #IMPLIED -- render in bold font -- + i (i) #IMPLIED -- render in italic font -- + u (u) #IMPLIED -- underline text -- + tt (tt) #IMPLIED -- render in typewriter font -- + tr (tr) #IMPLIED -- render in serif (Times Roman) font -- + hv (hv) #IMPLIED -- render in sans serif (Helvetica) font -- + sup (sup) #IMPLIED -- superscript -- + sub (sub) #IMPLIED -- subscript -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Paragraphs with different roles and optional style hints --> + +<!ELEMENT P - O (%text;)+> + +<!ATTLIST P + id ID #IMPLIED -- link destination -- + role CDATA #IMPLIED -- semantic role -- + align CDATA #IMPLIED -- left, center or right -- + indent (indent) #IMPLIED -- indented margins -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT HR - O EMPTY -- horizontal rule --> + +<!ELEMENT BR - O EMPTY -- line break --> + +<!ELEMENT SP - O EMPTY -- unbreakable space --> + +<!-- Preformatted text with fixed pitch font, respecting original spacing + and newlines. Authors can also request proportional fonts. Further control + is possible with EM. +--> + +<!ELEMENT ADDRESS - - (%text;|P)+> + +<!ELEMENT PRE - - (%text;)+> + +<!ATTLIST PRE + id ID #IMPLIED -- link destination -- + style CDATA #IMPLIED -- various styles -- + tr (tr) #IMPLIED -- serif (Times Roman) font -- + hv (hv) #IMPLIED -- sans serif (Helvetica) font -- + width NUMBER #IMPLIED -- e.g. 40, 80, 132 -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Lists which can be nested --> + +<!ELEMENT OL - - (LI | UL | OL)+ -- ordered list --> + +<!ATTLIST OL + id ID #IMPLIED + compact (compact) #IMPLIED + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT UL - - (LI | UL | OL)+ -- unordered list --> + +<!ATTLIST UL + id ID #IMPLIED -- link destination -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + narrow (narrow) #IMPLIED -- narrow perhaps multi columns -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- List items for UL and OL lists --> + +<!ELEMENT LI - O (P|%text;)+> + +<!ATTLIST LI + id ID #IMPLIED + src %URL; #IMPLIED -- icon for use in place of bullet -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Definition Lists (terms + definitions) --> + +<!ELEMENT DL - - (DT,DD)+ -- DT and DD *MUST* be paired -- > + +<!ATTLIST DL + id ID #IMPLIED + compact (compact) #IMPLIED + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT DT - O (%text;)+ -- term text -- > + +<!ELEMENT DD - O (P|QUOTE|UL|OL|%text;)+ -- definition text -- > + +<!ATTLIST (DT|DD) + id ID #IMPLIED + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Tables with titles and column headers, e.g. + + <tbl border> + <tt> An Example of a Table + <th> <th s="2"> average <th> other <tr> + <th> <th> height <th> weight <th> category <tr> + <td> males <td> 1.9 <td> .003 <td> yyy <tr> + <td> females <td> 1.7 <td> .002 <td> xxx + </tbl> +--> + +<!ELEMENT TBL - - (TT?, (TH|TD|TR|TB)*) -- mixed headers and data --> + +<!ATTLIST TBL + id ID #IMPLIED + compact (compact) #IMPLIED -- if present use compact style -- + border (border) #IMPLIED -- if present draw borders -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT TT - O (%text;)+ -- table title --> + +<!ATTLIST TT top (top) #IMPLIED -- place title above table --> + +<!ELEMENT TH - O (%table;)* -- a header cell --> + +<!ATTLIST TH + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align CDATA #IMPLIED -- left, center or right --> + +<!ELEMENT TD - O (%table;)* -- a data cell --> + +<!ATTLIST TD + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align CDATA #IMPLIED -- left, center or right --> + +<!ELEMENT TR - O EMPTY -- row *separator* not terminator --> + +<!ELEMENT TB - O EMPTY -- vertical break of 1/2 line spacing --> + +<!-- Forms composed from input fields and selection menus + + These elements define fields which users can type into or select with mouse + clicks. The browser should manage the input focus e.g. with the tab/shift + tab keys and mouse clicks. + + The enter/return key is then taken to mean the use has filled in the form + and wants the apppropriate action taken: + + - send as query/update to WWW server + - email/fax to designated person + + The action is specified as a URL, e.g. "mailto:dsr@hplb.hpl.hp.com You can + specify additional mail headers with the MH tag: + + <MH>Subject: Please add me to tennis tournament</MH> + + Each FORM should include one or more INPUT elements which can be layed out + with normal and preformatted text, lists and tables. +--> + +<!ELEMENT FORM - - (MH?,(%main;)*)> + +<!ATTLIST FORM + id ID #IMPLIED + action %URL; #IMPLIED + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT MH - - CDATA -- one or more RFC 822 header fields --> + +<!ATTLIST MH hidden (hidden) #IMPLIED -- hide mail headers from view --> + +<!-- INPUT elements should be defined within a FORM element. + + Users can alter the value of the INPUT element by typing or clicking with + the mouse. Use radio buttons for selecting one attribute value from a set + of alternatives. In this case there will be several INPUT elements with the + same name. Attributes which can take multiple values at the same time + should be defined with checkboxes: define each allowed value in a separate + INPUT element but with the same attribute name. For checkboxes and radio + buttons, the value doesn't change, instead the state of the button shown by + the presence or absence of the checked attribute in each element. + The size attribute specifies the size of the input field as appropriate to + each type. For text this gives the width in characters and height in lines + (separated by an "x"). For numbers this gives the maximum precision. +--> + +<!ELEMENT INPUT - O EMPTY> + +<!ATTLIST INPUT + name CDATA #IMPLIED -- attribute name (may not be unique) -- + type CDATA #IMPLIED --TEXT,URL,INT,FLOAT,DATE,CHECKBOX,RADIO-- + size CDATA #IMPLIED -- e.g."32x4" for multiline text -- + value CDATA #IMPLIED -- attribute value (altered by user) -- + checked (checked) #IMPLIED -- for check boxes and radio buttons -- + disabled (disabled) #IMPLIED -- if grayed out -- + error (error) #IMPLIED -- if in error --> + +<!-- Embedded Data + + You can embed information in a foreign format into the HTML+ document. This + is very convenient for mathematical equations and simple drawings. Images + and complex drawings are better specified as linked documents using the FIG + or IMG elements. + + Arbitrary 8 bit data is allowed but any occurrences of the following chars + must be escaped as shown: + + "&" by "&" + "<" by "<" + ">" by ">" + + The browser can pipe such data thru filters to generate the corresponding + pixmap The data format is specified as a MIME content type, e.g. "text/eqn" +--> + +<!ELEMENT EMBED - - (RCDATA)> + +<!ATTLIST EMBED + id ID #IMPLIED + type CDATA #IMPLIED -- mime content type -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!-- Figures + + The image/drawing is specified by a URL or as embedded data for simple + drawings. The element's text serves as the caption. Use the emphasis with + style = "credits" to record photo credits etc. + + FIGD allows dumb terminals etc to show a textual description in place + of the actual sound sequence, image, movie or graphic. +--> + +<!ELEMENT FIG - - (EMBED?, FIGD?, (FIGA|FIGT)*, (%text;)*)> +<!ATTLIST FIG + id ID #IMPLIED + align CDATA #IMPLIED -- position: left, right or center -- + cap CDATA #IMPLIED -- caption at left, right, top, bottom -- + noflow (noflow) #IMPLIED -- disables text flow -- + ismap (ismap) #IMPLIED -- server can handle mouse clicks/drags -- + src %URL; #IMPLIED -- link to image data -- + index CDATA #IMPLIED -- entries for index compilation --> + +<!ELEMENT FIGD - - (%table;) -- figure description --> + +<!-- Figure anchors designate polygonal areas on the figure which can be + clicked with the mouse. The default area is the whole of the figure. This + mechanism interprets mouse clicks locally, and browsers can choose to + highlight the designated area (or change the mouse sprite) when the mouse + is moved over the area. + + Note that polygons may be non-convex or even intersect themselves, thereby + complicating the definition of what is enclosed by the polygon. Holes are + excluded. +--> + +<!ELEMENT FIGA - O EMPTY> + +<!ATTLIST FIGA + href %URL; #REQUIRED -- link to traverse when clicked -- + area NUMBERS #IMPLIED -- x1,y1,x2,y2,x3,y3,... --> + +<!-- FIGT Text on top of an figure background, or in a colored background + box which sits arbitrarily on top of an figure background. The text can + include headers, lists and tables etc. The width attribute allows you to + limit the width of the text box. The height is then determined + automatically by the browser. + + FIGT can also be used to position a graphic on top of a picture using an + IMG element within FIGT. In this case the chromakey attribute may allow + parts of the underlying image to show through. + You can make the whole of the box into a hypertext link. This will act as + if it is underneath any hypertext links specified by the overlay markup + itself. +--> + +<!ELEMENT FIGT - - (%main;)> +<!ATTLIST FIGT + at NUMBERS #IMPLIED -- upper left origin for text -- + width NUMBER #IMPLIED -- given as fraction of picture -- + framed (framed) #IMPLIED -- framed with coloured background -- + href %URL; #IMPLIED -- link to traverse when clicked --> + +<!-- inline icons/small graphics + + The align attribute defines whether the top middle or bottom of the graphic + and current text line should be aligned vertically + + The SEETHRU attribute is intended as a chromakey to allow a given colour to + be designated as "transparent". Pixels with this value should not be + painted. The exact format of this attribute's value has yet to be defined. + + Use the FIG tag for captioned figures with active areas etc. +--> + +<!ELEMENT IMG - O EMPTY> + +<!ATTLIST IMG + src %URL; #REQUIRED -- where to get image data -- + align CDATA #IMPLIED -- top, middle or bottom -- + seethru CDATA #IMPLIED -- for transparency -- + ismap (ismap) #IMPLIED -- send mouse clicks/drags to server --> + +<!-- Hierarchical groups for books, chapters, sections etc. --> + +<!ELEMENT GROUP - - ((TITLE|LINK*), (%main;)*)> + +<!ATTLIST GROUP + id ID #IMPLIED + role CDATA #IMPLIED -- book, chapter, section etc. -- + inset (inset) #IMPLIED -- rendering hint: indent margins --> + +<!-- change bars defined by a matched pair of CHANGED elements: + + <changed id=z34> changed text <changed idref=z34> + + This tag can't act as a container, since changes don't respect + the nesting implied by paragraphs, headers, lists etc. +--> + +<!ELEMENT CHANGED - O EMPTY> + +<!ATTLIST CHANGED -- one of id and idref is always required -- + id ID #IMPLIED -- signals start of changes -- + idref IDREF #IMPLIED -- signals end of changes --> + +<!-- Hypertext Links from points within document nodes --> + +<!ELEMENT A - - (#PCDATA | IMG | EM | EMBED)*> + +<!ATTLIST A + id ID #IMPLIED -- as target of link -- + name CDATA #IMPLIED -- backwards compatibility -- + href %URL; #IMPLIED -- destination node -- + role CDATA #IMPLIED -- role of link, e.g. "partof" -- + effect CDATA #IMPLIED -- replace/new/overlay -- + print CDATA #IMPLIED -- reference/footnote/section -- + title CDATA #IMPLIED -- when otherwise unavailable -- + type CDATA #IMPLIED -- for presentation cues -- + size NAMES #IMPLIED -- for progress cues --> + +<!-- Other kinds of relationships between documents --> + +<!ELEMENT LINK - O EMPTY> + +<!ATTLIST LINK + href %URL; #IMPLIED -- destination node -- + role CDATA #IMPLIED -- role played, e.g. "toc" --> + +<!-- Original document URL for resolving relative URLs --> + +<!ELEMENT BASE - O EMPTY> + +<!ATTLIST BASE HREF %URL; #IMPLIED> + +<!-- Signifies the document's URL accepts queries --> + +<!ELEMENT ISINDEX - O (EMPTY)> + +<!ATTLIST ISINDEX href %URL; #IMPLIED -- defaults to document's URL --> + +<!-- For use with autonumbering editors - don't reuse ids, + instead, allocate next one starting from this one --> + +<!ELEMENT NEXTID - O (EMPTY)> + +<!ATTLIST NEXTID N NAME #REQUIRED> + +<!-- Mnemonic character entities. --> + +<!ENTITY AElig "Æ" -- capital AE diphthong (ligature) --> +<!ENTITY Aacute "Á" -- capital A, acute accent --> +<!ENTITY Acirc "Â" -- capital A, circumflex accent --> +<!ENTITY Agrave "À" -- capital A, grave accent --> +<!ENTITY Aring "Å" -- capital A, ring --> +<!ENTITY Atilde "Ã" -- capital A, tilde --> +<!ENTITY Auml "Ä" -- capital A, dieresis or umlaut mark --> +<!ENTITY Ccedil "Ç" -- capital C, cedilla --> +<!ENTITY ETH "Ð" -- capital Eth, Icelandic --> +<!ENTITY Eacute "É" -- capital E, acute accent --> +<!ENTITY Ecirc "Ê" -- capital E, circumflex accent --> +<!ENTITY Egrave "È" -- capital E, grave accent --> +<!ENTITY Euml "Ë" -- capital E, dieresis or umlaut mark --> +<!ENTITY Iacute "Í" -- capital I, acute accent --> +<!ENTITY Icirc "Î" -- capital I, circumflex accent --> +<!ENTITY Igrave "Ì" -- capital I, grave accent --> +<!ENTITY Iuml "Ï" -- capital I, dieresis or umlaut mark --> +<!ENTITY Ntilde "Ñ" -- capital N, tilde --> +<!ENTITY Oacute "Ó" -- capital O, acute accent --> +<!ENTITY Ocirc "Ô" -- capital O, circumflex accent --> +<!ENTITY Ograve "Ò" -- capital O, grave accent --> +<!ENTITY Oslash "Ø" -- capital O, slash --> +<!ENTITY Otilde "Õ" -- capital O, tilde --> +<!ENTITY Ouml "Ö" -- capital O, dieresis or umlaut mark --> +<!ENTITY THORN "Þ" -- capital THORN, Icelandic --> +<!ENTITY Uacute "Ú" -- capital U, acute accent --> +<!ENTITY Ucirc "Û" -- capital U, circumflex accent --> +<!ENTITY Ugrave "Ù" -- capital U, grave accent --> +<!ENTITY Uuml "Ü" -- capital U, dieresis or umlaut mark --> +<!ENTITY Yacute "Ý" -- capital Y, acute accent --> +<!ENTITY aacute "á" -- small a, acute accent --> +<!ENTITY acirc "â" -- small a, circumflex accent --> +<!ENTITY aelig "æ" -- small ae diphthong (ligature) --> +<!ENTITY agrave "à" -- small a, grave accent --> +<!ENTITY amp "&" -- ampersand --> +<!ENTITY aring "å" -- small a, ring --> +<!ENTITY atilde "ã" -- small a, tilde --> +<!ENTITY auml "ä" -- small a, dieresis or umlaut mark --> +<!ENTITY ccedil "ç" -- small c, cedilla --> +<!ENTITY eacute "é" -- small e, acute accent --> +<!ENTITY ecirc "ê" -- small e, circumflex accent --> +<!ENTITY egrave "è" -- small e, grave accent --> +<!ENTITY eth "ð" -- small eth, Icelandic --> +<!ENTITY euml "ë" -- small e, dieresis or umlaut mark --> +<!ENTITY gt ">" -- greater than --> +<!ENTITY iacute "í" -- small i, acute accent --> +<!ENTITY icirc "î" -- small i, circumflex accent --> +<!ENTITY igrave "ì" -- small i, grave accent --> +<!ENTITY iuml "ï" -- small i, dieresis or umlaut mark --> +<!ENTITY lt "<" -- less than --> +<!ENTITY ntilde "ñ" -- small n, tilde --> +<!ENTITY oacute "ó" -- small o, acute accent --> +<!ENTITY ocirc "ô" -- small o, circumflex accent --> +<!ENTITY ograve "ò" -- small o, grave accent --> +<!ENTITY oslash "ø" -- small o, slash --> +<!ENTITY otilde "õ" -- small o, tilde --> +<!ENTITY ouml "ö" -- small o, dieresis or umlaut mark --> +<!ENTITY szlig "ß" -- small sharp s, German (sz ligature) --> +<!ENTITY thorn "þ" -- small thorn, Icelandic --> +<!ENTITY uacute "ú" -- small u, acute accent --> +<!ENTITY ucirc "û" -- small u, circumflex accent --> +<!ENTITY ugrave "ù" -- small u, grave accent --> +<!ENTITY uuml "ü" -- small u, dieresis or umlaut mark --> +<!ENTITY yacute "ý" -- small y, acute accent --> +<!ENTITY yuml "ÿ" -- small y, dieresis or umlaut mark --> + +<!-- dash entities --> + +<!ENTITY endash "--" -- En dash --> +<!ENTITY emdash "---" -- Em dash --> + +<!-- The END --> + +]> + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-plus.dtd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,925 @@ +<!SGML "ISO 8879:1986" +-- + Document Type Definition for the HyperText Markup Language Plus + for use with the World Wide Web application (HTML+ DTD). + This DTD is designed for use with SGML authoring tools and + it is expected that most browsers will tolerate omissions, + in particular, missing <DIVn> elements and <P> start tags + following headers, which can easily be inferred from the context. + + The HTML+ DTD which is structured as an HTML core plus a + number of additional modules which can be included by an + entity definition in a document's <!DOCTYPE> element. + You can include specific features in your document + using the DOCTYPE declaration at the start, e.g. + + <!DOCTYPE htmlplus [ + <!ENTITY % HTML.tables "INCLUDE"> + <!ENTITY % HTML.forms "INCLUDE"> + ]> + + This spec also allows for authors to extend the DTD and + to define how any new elements are rendered in terms of + existing ones. This should be used with caution. + + I would like to acknowledge the influence of the TEI DTDs + which proved very helpful in restructuring the DTD. + + Dave Raggett 21st March 1994 + + Changes: + + Added support for graphical menus to SELECT/OPTION. + + Liberalised content model for headers to %text; + Added SPACES attribute to P element to preserve spaces. + + Dropped the LIT element and changed the TAB element + over to the LaTeX model. Added NOWRAP to P element. + Replaced TH/TD's align=numeric with ALIGNON="." etc. + + Made anchor NAME attribute conditional on HTML.obsolete + Added HTML.obsolete for obsoleted HTML elements + + Added SIG attribute to A and LINK for specifying + a digital signature to attest that a linked document + is unchanged. + + SRC attribute added to NOTE to allow authors to override + the default icon chosen on the basis of the ROLE attribute. + + Switched REL/REV back to CDATA to avoid trouble with duplicate + name or name token error. Using an explicit list of relationship + types would force us to drop REV. + + Added top/bottom alignment attribute to CAPTION + + REL and REV domains now defined by parameter entities + + SRC attribute added to LINK to allow images to be used + in document specific toolbar + + Baseline attribute added to FIG and IMG to give precise + control of vertical position relative to baseline. + + Revised comments for <A> and <LINK> to remove references to + obsoleted timing attributes and to add a list of "standard" + relationship types. + + CHANGED element now uses more meaningful attribute names. + + STATE dropped in favor of INPUT with TYPE="hidden". Forms now + support a link to a script for client-side execution of constraints. + + The element definition for DIV1..DIV6 and P no longer permit the + start tag to be omitted. This was regrettably forced by a + restriction in the SGML standard. Browsers *must* be capable of + inferring them when missing,in order to cope with legacy documents. + + Fixed some errors in earlier version to do with start tags and + definitions of parameter entities. The content model for FIG has + been changed to use a P element for text to avoid an SGML parsing + problem with a line break before the caption. +-- +CHARSET + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 9 UNUSED + 9 2 9 + 11 2 UNUSED + 13 1 13 + 14 18 UNUSED + 32 95 32 + 127 1 UNUSED + BASESET "ISO Registration Number 100//CHARSET + ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" + DESCSET 128 32 UNUSED + 160 95 32 + 255 1 UNUSED + +CAPACITY SGMLREF + TOTALCAP 150000 + GRPCAP 150000 + +SCOPE DOCUMENT +SYNTAX + SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 128 0 + FUNCTION RE 13 + RS 10 + SPACE 32 + TAB SEPCHAR 9 + NAMING LCNMSTRT "" + UCNMSTRT "" + LCNMCHAR ".-" + UCNMCHAR ".-" + NAMECASE GENERAL YES + ENTITY NO + DELIM GENERAL SGMLREF + SHORTREF SGMLREF + NAMES SGMLREF + QUANTITY SGMLREF + NAMELEN 32 + TAGLVL 100 + LITLEN 1024 + GRPGTCNT 150 + GRPCNT 64 + +FEATURES + MINIMIZE + DATATAG NO + OMITTAG YES + RANK NO + SHORTTAG NO + LINK + SIMPLE NO + IMPLICIT NO + EXPLICIT NO + OTHER + CONCUR NO + SUBDOC NO + FORMAL YES + APPINFO NONE +> + +<!DOCTYPE HTMLPLUS [ + +<!-- DTD for HTML+ +Markup minimisation should be avoided, otherwise the default <!SGML> +declaration is fine. Browsers should be forgiving of markup errors, +while authoring tools *should* enforce compliance with the DTD. + +Common Attributes: + +id This attribute allows authors to name elements such as headers + and paragraphs as potential destinations for links. Note that + links don't specify points, but rather extended objects. + +charset This allows authors to switch to a different char set for + quotations or list etc. This is particularly useful for oriental + languages which need two byte character codes, e.g. see RFC 1468 + "Japanese Character Encoding for Internet Messages" + +ENTITY DECLARATIONS + + <!ENTITY % foo "X | Y | Z"> is a macro definition for parameters and in + subsequent statements, the string "%foo;" is expanded to "X | Y | Z" + + Various classes of SGML text types: + + CDATA text which doesn't include markup or entity references + RCDATA text with entity references but no markup + PCDATA text occurring in a context in which markup and entity references + may occur. +--> + +<!-- Core HTML+ DTD omits following features --> +<!ENTITY % HTML.math "IGNORE"> +<!ENTITY % HTML.tables "IGNORE"> +<!ENTITY % HTML.figures "IGNORE"> +<!ENTITY % HTML.emph "IGNORE"> +<!ENTITY % HTML.forms "IGNORE"> +<!ENTITY % HTML.obsolete "IGNORE"> + +<!ENTITY % cextra "" -- for character-like elements --> +<!ENTITY % pextra "" -- for paragraph-like elements --> + +<!-- %cextra; and %pextra are designed to allow document specific + extensions to the HTML+ DTD, e.g. + + <!DOCTYPE htmlplus [ + <!ENTITY % cextra "|PROPNAME"> + <!ELEMENT PROPNAME - - CDATA> + ]> + + Use the RENDER element to specify how the browser should + display new elements in terms of existing ones, e.g. + + <RENDER tag="PROPNAME" style="I"> +--> + +<!ENTITY % URL "CDATA" -- a URL or URN designating a hypertext node --> + +<!-- Browsers should render the following types of emphasis + distinctly when the obvious rendering is impractical + + I = italic, B = bold, U = underline, S = strikethru, + TT = teletype font, SUP = superscript, SUB = subscript + REV = reverse video for highlighting hit areas in the result of a query + Q = inline quote (render according to local conventions) +--> + +<!ENTITY % emph1 "I|B|U|TT|CITE|EM|STRONG|KBD|VAR|DFN|CODE|SAMP"> +<!ENTITY % emph2 "S|Q|PERSON|ACRONYM|ABBREV|CMD|ARG|REMOVED|ADDED|REV"> +<!ENTITY % emph3 "SUP|SUB|CHANGED|TAB|HIDE"> + +<![ %HTML.emph [ <!ENTITY % emph "%emph1;|%emph2;|%emph3;"> ]]> +<!ENTITY % emph "%emph1;"> + +<![ %HTML.emph [ <!ENTITY % misc1 "|RENDER|FOOTNOTE|MARGIN"> ]]> +<!ENTITY % misc1 ""> + +<![ %HTML.forms [ <!ENTITY % misc2 "|INPUT|TEXTAREA|SELECT"> ]]> +<!ENTITY % misc2 ""> + +<!ENTITY % misc "BR %misc1 %misc2; %cextra;"> + +<![ %HTML.figures [ <!ENTITY % text "#PCDATA|A|IMG|FIG|%emph;|%misc;"> ]]> +<!ENTITY % text "#PCDATA|A|IMG|%emph;|%misc;"> + +<![ %HTML.emph [ <!ENTITY % paras "P|PRE|%pextra;"> ]]> +<!ENTITY % paras "P|PRE %pextra;"> + +<!ENTITY % lists "UL|OL|DL"> + +<![ %HTML.emph [ <!ENTITY % block1 "NOTE|QUOTE|ABSTRACT|ADDRESS|HR"> ]]> +<!ENTITY % block1 "ADDRESS|HR"> + +<![ %HTML.tables [ <!ENTITY % block2 "|TABLE"> ]]> +<!ENTITY % block2 ""> + +<![ %HTML.forms [ <!ENTITY % block3 "|FORM"> ]]> +<!ENTITY % block3 ""> + +<![ %HTML.math [ <!ENTITY % block4 "|MATH"> ]]> +<!ENTITY % block4 ""> + +<![ %HTML.obsolete [ <!ENTITY % block5 "|MENU|DIR|BLOCKQUOTE"> ]]> +<!ENTITY % block5 ""> + +<!ENTITY % block "%block1; %block2; %block3; %block4; %block5;"> + +<![ %HTML.emph [<!ENTITY % setup1 "& RENDER*"> ]]> +<!ENTITY % setup1 ""> + +<!ENTITY % setup "(TITLE? & ISINDEX? & BASE? & META* & LINK* %setup1;)"> + +<!ENTITY % main "%block;|%lists;|%paras;"> + +<!-- these entities are used to simplify element definitions --> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> +<!ENTITY % table "P|%heading;|%lists;"> +<!ENTITY % math "BOX|ARRAY|ROOT|%text;"> + +<![ %HTML.obsolete [<!ENTITY % anchorname "name NMTOKEN #IMPLIED"> ]]> +<!ENTITY % anchorname ""> + +<!-- Browsers should as a minimum support the following types + of INPUT fields, in addition to TEXTAREA and SELECT: + + text, checkbox, radio, submit, and reset + + password, int, float, date, url can be mapped to text fields + while image, scribble and audio fields can be ignored +--> + +<![ %HTML.forms [ + <!ENTITY % fields "text|password|checkbox|radio|submit|reset|int| + float|date|url|hidden|range|scribble|audio"> +]]> + + +<!-- Core DTD includes basic Latin-1 entities --> +<!ENTITY % ISOlat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN"> +%ISOlat1; + +<!-- additional entities normally found in Latin-1 char sets--> +<!ENTITY % ISOnum PUBLIC "ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN"> +%ISOnum; + +<!-- diacritical marks normally found in Latin-1 char sets--> +<!ENTITY % ISOdia PUBLIC "ISO 8879-1986//ENTITIES Diacritical Marks//EN"> +%ISOdia; + +<!-- misc. from ISO Publishing entities --> +<!ENTITY ndash SDATA "[ndash ]"--=en dash--> +<!ENTITY mdash SDATA "[ndash ]"--=em dash--> +<!ENTITY ensp SDATA "[ensp ]"--=en space (1/2-em)--> +<!ENTITY emsp SDATA "[emsp ]"--=em space--> +<!ENTITY hellip SDATA "[hellip]"--=ellipsis (horizontal)--> +<!ENTITY vellip SDATA "[vellip]"--=ellipsis (vertical)--> + +<!-- maths symbols when needed --> +<![ %HTML.math [ + <!ENTITY % ISOtech PUBLIC "ISO 8879-1986//ENTITIES General Technical//EN"> + %ISOtech; + + <!ENTITY % ISOgrk3 PUBLIC "ISO 8879-1986//ENTITIES Greek Symbols//EN"> + %ISOgrk3; + + <!ENTITY % ISOamso PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Ordinary//EN"> + %ISOamso; + + <!ENTITY % ISOamsr PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Relations//EN"> + %ISOamsr; + + <!ENTITY % ISOamsc PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Delimiters//EN"> + %ISOamsc; + + <!-- misc. from ISO Binary and Large operators --> + + <!ENTITY thinsp SDATA "[thinsp]"--=thin space (1/6 em)--> + <!ENTITY coprod SDATA "[coprod]"--/coprod L: coproduct operator--> + <!ENTITY prod SDATA "[prod ]"--/prod L: product operator--> + <!ENTITY sum SDATA "[sum ]"--/sum L: summation operator--> +]]> + +<!-- Basic types of elements: + <!ELEMENT tagname - - CONTENT> elements needing end tags + <!ELEMENT tagname - O CONTENT> elements with optional end tags + <!ELEMENT tagname - O EMPTY> elements without content or end tags + +The content definition is: + - an entity definition as defined above + - a tagname + - (brackets enclosing the above) +These may be combined with the operators: + A* A occurs zero or more times + A+ A occurs one or more times + A|B implies either A or B + A? A occurs zero or one times + A,B implies first A then B + A&B either or both A and B (in either order A B or B A) +--> + +<!ELEMENT HTMLPLUS O O (HEAD, BODY)> +<!ATTLIST HTMLPLUS + version CDATA #IMPLIED -- the HTML+ version number -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT HEAD - O (%setup;) -- delimits document wide properties --> +<!ELEMENT BODY - O ((%main;)*, DIV6*, DIV5*, DIV4*, DIV3*, DIV2*, DIV1*)> + +<!-- + Browsers *must* tolerate missing DIVn tags, e.g. the presence of an + <H1> tag implies a DIV1 element enclosing it and the following text. + The SGML standard unfortunately doesn't permit such inferences due + to a decision made to simplify writing general SGML parsers. +--> + +<!ELEMENT DIV1 - - (H1, (%main;)*, DIV6*, DIV5*, DIV4*, DIV3*, DIV2*)> +<!ELEMENT DIV2 - - (H2, (%main;)*, DIV6*, DIV5*, DIV4*, DIV3*)> +<!ELEMENT DIV3 - - (H3, (%main;)*, DIV6*, DIV5*, DIV4*)> +<!ELEMENT DIV4 - - (H4, (%main;)*, DIV6*, DIV5*)> +<!ELEMENT DIV5 - - (H5, (%main;)*, DIV6*)> +<!ELEMENT DIV6 - - (H6, (%main;)*)> + +<!ATTLIST (DIV6|DIV5|DIV4|DIV3|DIV2|DIV1) + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- Document headers --> +<!ELEMENT (%heading;) - - (%text;)+> +<!ATTLIST (%heading;) + id ID #IMPLIED -- defines link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- character emphasis --> +<!ELEMENT (%emph1;) - - (%text;)+> +<!ATTLIST (%emph1;) + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- + Paragraphs which act as containers for the following text + + Browsers *must* be capable of inferring missing <P> + start tags from the content model. Basically, if the parser + comes across unexpected %text; then there's a missing <P>. +--> +<!ELEMENT P - O (%text;)+> +<!ATTLIST P + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + nowrap (nowrap) #IMPLIED -- disable word wrap -- + spaces (spaces) #IMPLIED -- preserve spaces -- + align (left|indent|center|right|justify) left> + +<!ELEMENT HR - O EMPTY -- Horizontal Rule --> +<!ELEMENT BR - O EMPTY -- forced line break --> + +<!ELEMENT PRE - - (%text;)+ -- preformatted fixed pitch text --> +<!ATTLIST PRE + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT ADDRESS - - (P)+ -- info on author --> +<!ATTLIST ADDRESS + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- Lists which can be nested --> +<!ELEMENT OL - - (LI)+ -- ordered list --> +<!ATTLIST OL + id ID #IMPLIED + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + compact (compact) #IMPLIED -- reduced interitem spacing --> + +<!ELEMENT UL - - (LI)+ -- unordered list --> +<!ATTLIST UL + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + plain (plain) #IMPLIED -- suppress bullets -- + wrap (vert|horiz|none) none -- multicolumn list wrap style --> + +<!-- List items for UL and OL lists + The icon or label overides the default rendering --> +<!ELEMENT LI - O (DL|UL|OL|P|HR)+ -- should we add PRE? --> +<!ATTLIST LI + id ID #IMPLIED + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + icon %URL; #IMPLIED -- icon for use in place of bullet -- + label CDATA #IMPLIED -- when you can't show the icon --> + +<!-- Definition Lists (terms + definitions) --> +<!ELEMENT DL - - (DT*,DD)+> +<!ATTLIST DL + id ID #IMPLIED + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + compact (compact) #IMPLIED -- reduced interitem spacing --> + +<!ELEMENT DT - O (%text;)+ -- term text -- > +<!ELEMENT DD - O (P|UL|OL|DL|HR)+ -- definition text (should we add PRE?)-- > +<!ATTLIST (DT|DD) + id ID #IMPLIED + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- Hypertext Links from points within document nodes + + The HREF attribute specifies the link destination as a URL or URN. + In figures, the SHAPE attribute defines the extent of the link as + a polygonal region, and is used with the FIG element. + + The PRINT attribute determines how the browser should deal with + links when printing this document. This makes it possible for + users to print a document and related subdocuments with a single + menu action. If PRINT="Section", then the link is followed and + printed as a follow-on section after the current document. If + PRINT="Footnote" and the linked document is sufficiently small + then it is included as a footnote. If PRINT="Reference" then the + document's URL (and title) is included in a footnote or in a list + of references at the end of the document. + + The TITLE attribute may be used for links in which the destination + node doesn't define a title itself, e.g. non-html documents. + + The REL attribute is used to specify how the browser interprets + the link when this document is being used as a hypertext path + REL="Path" causes the linked document to be treated as a path + and inserted into the current path, while REL="Node" treats + the linked document as a node on the current path. REL="Embed" + is a hint to embed the referenced node into the current document. + + The SIG attribute allows authors to specify a digital signature + of linked documents to check that they haven't been changed. + It starts with a prefix denoting the algorithm used, in particular + SIG="md5:2l3k4j2lkj423l" denotes the MD5 signature: 2l3k4j2lkj423l + which is encoded using the standard MIME base64 representation +--> + +<!ELEMENT A - - (#PCDATA | IMG | %emph;)*> +<!ATTLIST A + id ID #IMPLIED -- as target of link -- + %anchorname; -- see HTML.obsolete -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + shape CDATA #IMPLIED -- list of points for shaped buttons -- + href %URL; #IMPLIED -- destination node -- + rel CDATA #IMPLIED -- forward relationship type -- + rev CDATA #IMPLIED -- reverse relationship type -- + print CDATA #IMPLIED -- reference/footnote/section -- + title CDATA #IMPLIED -- when otherwise unavailable -- + sig CDATA #IMPLIED -- MD5 digital signature --> + +<!-- Other kinds of relationships between documents + + There are a set of standard RELationship types which alter the + browser's navigation menu: + + UseIndex searchable index + UseGlossary shared glossary + Contents shared contents page + Previous previous document in a hypertext path + Next next document in a hypertext path + Bookmark named with the title attribute + Made Defines who is the "maker" of this document + Help provides help on this document + Annotation an additional note on current document + Reply a note with equal footing to current document + Subdocument defines parent->child relationship + Parent defines child->parent relationship + StyleSheet an associated style sheet + + Bookmarks allow authors to define a set of useful links + which are to be accessed via a menu, rather than as conventional + in-line hypertext links. Previous and Next links are inserted + by the browser when interpreting a separate document as a path. + See above description of REL="Node" and REL="Path" for <A>. + + The FROM attribute makes it possible to specify annotation + links separately from the document text flow. The FROM + attribute specifies an ID for the source of a link, while + the HREF attribute specifies its destination. HTTP servers + can use the WWW-Link: header to "insert" such annotations + into documents. +--> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + id ID #IMPLIED -- to allow meta info on links -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + from IDREF #IMPLIED -- starting point -- + href %URL; #REQUIRED -- destination node -- + rel CDATA #IMPLIED -- forward relationship type -- + rev CDATA #IMPLIED -- reverse relationship type -- + src %URL; #IMPLIED -- an image for displaying link -- + print CDATA #IMPLIED -- reference/footnote/section -- + title CDATA #IMPLIED -- when otherwise unavailable -- + seal CDATA #IMPLIED -- MD5 digital signature --> + +<!-- Document title --> +<!ELEMENT TITLE - - (#PCDATA | %emph;)+> +<!ATTLIST TITLE + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- Original document URL for resolving relative URLs --> +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE HREF %URL; #IMPLIED> + +<!-- Signifies the document's URL accepts queries, + and may be implied by HTTP header info --> +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX href %URL; #IMPLIED -- defaults to document's URL --> + +<!-- + Servers should read the document head to generate HTTP headers + corresponding to META elements, e.g. if the document contains: + + <meta name="Expires" value="Tue, 04 Dec 1993 21:29:02 GMT"> + + The server should include the HTTP date format header field: + + Expires: Tue, 04 Dec 1993 21:29:02 GMT + + Other likely names are "Keywords", "Created", "Owner" (a name) + and "Reply-To" (an email address) +--> + +<!ELEMENT META - O EMPTY> +<!ATTLIST META + id ID #IMPLIED -- to allow meta info -- + name CDATA #IMPLIED -- HTTP header e.g. "Expires" -- + value CDATA #IMPLIED -- associated value --> + +<![ %HTML.obsolete [ + +<!ELEMENT (MENU|DIR) - - (LI)+ -- plain single/multicolumn lists--> +<!ATTLIST (MENU|DIR) + compact (compact) #IMPLIED -- reduced interitem spacing --> + +<!ELEMENT BLOCKQUOTE - - (P)+ -- extended quotes --> + +]]> + +<![ %HTML.emph [ + +<!-- additional character emphasis --> +<!ELEMENT (%emph2;) - - (%text;)*> +<!ATTLIST (%emph2;) + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT (SUP|SUB) - - (%text;)* -- superscripts and subscripts --> +<!ATTLIST (SUP|SUB) + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT (FOOTNOTE|MARGIN) - - (%text;)* -(FOOTNOTE|MARGIN)> +<!ATTLIST (FOOTNOTE|MARGIN) + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- RENDER only appears in the document head --> +<!ELEMENT RENDER -O EMPTY -- how to render unknown elements --> +<!ATTLIST RENDER + id ID #IMPLIED -- to allow meta info -- + tag CDATA #IMPLIED -- tag name -- + equiv CDATA #IMPLIED -- HTML+ equivalent tag name -- + style NAMES #IMPLIED -- space separated list of styles --> + +<!-- Based on LaTeX's tabbing environment --> +<!ELEMENT TAB - O EMPTY> +<!ATTLIST TAB + id ID #IMPLIED -- used to set a tab stop -- + to IDREF #IMPLIED -- move to previously defined tab stop -- + before NUMBER 0 -- scaled em spaces before tab stop -- + after NUMBER 0 -- scaled em spaces after tab stop -- + reset (reset) #IMPLIED -- clear all previous tab stops --> + +<!-- content is hidden, equivalent of LaTeX's \kill --> +<!ELEMENT HIDE - - (%text;) (-HIDE)> + +<!ELEMENT QUOTE - - (P*) -- block quote --> +<!ATTLIST QUOTE + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT ABSTRACT - - (P*) -- document summary --> +<!ATTLIST ABSTRACT + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- often rendered with an icon in left margin, + the role is shown before the first paragraph --> +<!ELEMENT NOTE - - (P*) -- admonishment --> +<!ATTLIST NOTE + id ID #IMPLIED -- link destination -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + src %URL; #IMPLIED -- url for the icon -- + role (Simple|Tip|Note|Warning|Error) Simple > + +<!-- change bars can bridge markup boundaries --> +<!ELEMENT CHANGED - O EMPTY> +<!ATTLIST CHANGED -- one of id or idref is always required -- + begin ID #IMPLIED -- signals beginning of changes -- + end IDREF #IMPLIED -- signals end of changes --> +]]> + + +<![ %HTML.figures [ <!ENTITY % HTML.captions "INCLUDE"> ]]> +<![ %HTML.tables [ <!ENTITY % HTML.captions "INCLUDE"> ]]> +<!ENTITY % HTML.captions "IGNORE"> + +<![ %HTML.captions [ + +<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> +<!ATTLIST CAPTION + id ID #IMPLIED + align (top|bottom) #IMPLIED + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> +]]> + +<![ %HTML.tables [ + +<!-- a pre-pass is needed to count columns and determine + min/max widths before sizing to match window size --> + +<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> +<!ATTLIST TABLE + id ID #IMPLIED + border (border) #IMPLIED -- draw borders -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- browsers should tolerate an omission of the first + <TR> tag as it is implied by the context --> +<!ELEMENT TR - O (TH|TD)* -- acts like row separator --> +<!ATTLIST TR id ID #IMPLIED> + +<!ELEMENT TH - O (%table;)* -- a header cell --> +<!ATTLIST TH + id ID #IMPLIED + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align (left|center|right) center + alignon CDATA #IMPLIED -- align on decimal point etc -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!ELEMENT TD - O (%table;)* -- a data cell --> +<!ATTLIST TD + id ID #IMPLIED + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align (left|center|right) center + alignon CDATA #IMPLIED -- align on decimal point etc -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> +]]> + +<![ %HTML.forms [ + +<!-- + The form contents are sent to the server upon pressing a submit + button. Forms can be associated with scripts, e.g. to make one + selection field effect which options are enabled for other fields. + + Clicking on a selection or typing into a text field result in events + which are processed by the script. Event handlers are associated + with each field or with the form itself. The script language is + deliberately restricted to avoid any security issues. + + Fields can be disabled (greyed out) or marked as being in error. + The MESSAGE element may be used by the server to set error messages. + Servers can store state information in forms with hidden input fields. + These are not displayed and can be used to hold transaction handles etc. +--> + +<!ELEMENT FORM - - ((%main;)*, MESSAGE?) -(FORM) -- forms can't be nested --> +<!ATTLIST FORM + id ID #IMPLIED + action %URL; #IMPLIED -- defaults for URL for current doc -- + method CDATA #IMPLIED -- GET, PUT, POST, DELETE etc. -- + enctype CDATA #IMPLIED -- encoding type for form transfers -- + script %URL; #IMPLIED -- locally executed event handlers -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- Types of INPUT field: + text: one line text fields, size gives visible width of field in chars + where value may grow beyond this up to MAX (MAXLENGTH) chars. + password: like text fields but with no echo of typed characters + checkbox: for simple yes/no choices + radio: for one from many choices, each radio button in a group + has the same NAME but a different VALUE. + submit: Sends form to server. If the SRC attribute specifies an + icon the point clicked is sent to the server. The default + NAME for this field is "Submit". Use different names for + multiple submit buttons in a form. + reset: Resets fields to their initial values. + int: for input of integers, SIZE attribute gives width of field + float: for input of floating point numbers + date: for input of dates + url: for input of universal resource locators + hidden: used by server for state info, opaque to client + range: integer range from MIN to MAX, rendered as a slider etc. + scribble: pen input, which may include time and pressure info + audio: sound input with up to MAX seconds +--> +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + id ID #IMPLIED -- to allow meta info -- + name CDATA #IMPLIED -- attribute name (may not be unique) -- + type (%fields) text -- a wide variety of field types -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- + size CDATA #IMPLIED -- visible size of text fields -- + min NUMBER #IMPLIED -- for range controls -- + max NUMBER #IMPLIED -- for range controls or text fields -- + maxlength NUMBER #IMPLIED -- max length of text fields (equiv to max)-- + value CDATA #IMPLIED -- attribute value (altered by user) -- + checked (checked) #IMPLIED -- for check boxes and radio buttons -- + disabled (disabled) #IMPLIED -- if grayed out -- + error (error) #IMPLIED -- if in error -- + src %URL; #IMPLIED -- for SUBMIT, SCRIBBLE & AUDIO fields -- + alt CDATA #IMPLIED -- alternative text for VT100's etc -- + align (top|middle|bottom) top -- for IMAGE fields only --> + +<!-- multiline text input fields, we probably will want + to generalise this to accept arbitrary clipboard data + e.g. hypertext and images, in addition to plain text --> +<!ELEMENT TEXTAREA - - RCDATA -- multi-line text fields --> +<!ATTLIST TEXTAREA + id ID #IMPLIED -- to allow meta info -- + name CDATA #IMPLIED -- attribute name (may not be unique) -- + cols NUMBER #IMPLIED -- visible width in characters -- + rows NUMBER #IMPLIED -- visible height in characters -- + wrap (wrap) #IMPLIED -- wrap input in text area -- + disabled (disabled) #IMPLIED -- if grayed out -- + error (error) #IMPLIED -- if in error -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- + The EDIT attribute when present allows you to type and + edit the selected option. + + The SRC attribute allows for graphical menus, e.g. users + wanting to buy a house could click on each of the areas on + a map that they were interested in. + --> +<!ELEMENT SELECT - - (OPTION+) -- combo style selection lists --> +<!ATTLIST SELECT + id ID #IMPLIED -- to allow meta info -- + name CDATA #IMPLIED -- attribute name (may not be unique) -- + edit NUMBER #IMPLIED -- width of editable selection -- + multiple (multiple) #IMPLIED -- permits multiple selections -- + error (error) #IMPLIED -- if in error -- + src %URL; #IMPLIED -- for graphical menus -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- The SHAPE attribute defines a region in the image that + is specified by the SRC attribute for the SELECT element --> +<!ELEMENT OPTION - O RCDATA> +<!ATTLIST OPTION + id ID #IMPLIED -- to allow meta info -- + value CDATA #IMPLIED -- attribute value -- + selected (selected) #IMPLIED -- if initially selected -- + disabled (disabled) #IMPLIED -- if grayed out -- + shape CDATA #IMPLIED -- list of points for shaped region -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> + +<!-- + Scripts executed by the client need a way of displaying + warning/error messages. We define an element so that the + server too can initialise this one-per-form message area. + Clients should preferably avoid displaying the message + in-line, as the window size may prevent the user from + seeing the message. + --> +<!ELEMENT MESSAGE - O RCDATA -- place for error/warning/info --> +<!ATTLIST MESSAGE + id ID #IMPLIED -- to allow meta info -- + status (info|warning|error) info + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> +]]> + +<![ %HTML.figures [ + +<!-- figures which subsume the role of the earlier IMG element. + + Behaves identically to IMG for align = top, middle or bottom. + Otherwise figure is inserted after next line break (soft or hard). + For align=left, the image is left aligned and text is flowed + on the right of the image, and similarly for align=right, with + no text flow for align=center (the default). The caption is + placed under the image. + + Finer control of the vertical positioning relative to the text + line is possible with the baseline attribute. When present, the + figure acts like the IMG element but is shifted so that the baseline + occurs at the specified number of pixels above the bottom of the image. + If this is given as a floating point number, it is interpreted as a + fraction of the image height and must lie in the range (0.0 to 1.0) + + The <A> element is used for shaped buttons handled by browser, + while the ISMAP mechanism sends pointer clicks/drags to server. + The text contained by this element is used for text-only displays + and authors should remember to provide effective descriptions, + including label text for shaped buttons. +--> +<!ELEMENT FIG - - (CAPTION?, P*)> +<!ATTLIST FIG + id ID #IMPLIED + align (top|middle|bottom|left|center|right) center -- position -- + baseline NUMBER #IMPLIED -- height of baseline above image bottom -- + ismap (ismap) #IMPLIED -- server can handle mouse clicks/drags -- + src %URL; #IMPLIED -- link to image data -- + charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> +]]> + +<!-- img is left in for at least the short term --> +<!ELEMENT IMG - O EMPTY> +<!ATTLIST IMG + src %URL; #REQUIRED -- where to get image data -- + align (top|middle|bottom) top -- top, middle or bottom -- + baseline NUMBER #IMPLIED -- height of baseline above image bottom -- + alt CDATA #IMPLIED -- description for text-only displays -- + ismap (ismap) #IMPLIED -- send mouse clicks/drags to server --> + +<![ %HTML.math [ + +<!-- Proposal for representing formulae + + Delimiters should stretch to match the size of the delimited + object. <SUB> and <SUP> are used for subscripts and superscripts + + i j + X <SUP>i</SUP>Y<SUP>j</SUP> is X Y + + i.e. the space following the X disambiguates the binding. +--> + +<!ELEMENT MATH - - (%math;)*> +<!ATTLIST MATH id ID #IMPLIED> + +<!-- Invisible brackets which may also be + used for numerators and denominators: + + 1 + X + <BOX>1 + X<OVER>Y</BOX> is _______ + Y + + _____ + <BOX><OVER>X + Y</BOX> is X + Y +--> +<!ELEMENT BOX - - ((%math;)*, (OVER, (%math;)*)?)> + +<!-- Horizontal line between numerator and denominator + The symbol attribute allows authors to supply an + entity name for an arrow symbol etc. + --> +<!ELEMENT OVER - O EMPTY> +<!ATTLIST OVER symbol ENTITY #IMPLIED> + +<!-- Roots - default to square root --> +<!ELEMENT ROOT - - (%math;)*> +<!ATTLIST ROOT root CDATA #IMPLIED> + +<!-- LaTeX like arrays. The align attribute specifies + a single letter for each column, which also determines + how the column should be aligned, e.g. align=ccc" + + "l" left + "c" center + "r" right +--> +<!ELEMENT ARRAY - - (ITEM)+> +<!ATTLIST ARRAY align CDATA #REQUIRED> + +<!ELEMENT ITEM - O (%math;)*> + +]]> + +<!-- The END --> +]> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html2.decl Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,78 @@ +<!SGML "ISO 8879:1986" +-- +SGML Declaration for HyperText Markup Language (HTML). +-- +CHARSET + BASESET "ISO 646:1983//CHARSET + International Reference Version + (IRV)//ESC 2/5 4/0" + DESCSET 0 9 UNUSED + 9 2 9 + 11 2 UNUSED + 13 1 13 + 14 18 UNUSED + 32 95 32 + 127 1 UNUSED + BASESET "ISO Registration Number 100//CHARSET + ECMA-94 Right Part of + Latin Alphabet Nr. 1//ESC 2/13 4/1" + DESCSET 128 32 UNUSED + 160 96 32 +CAPACITY SGMLREF + TOTALCAP 150000 + GRPCAP 150000 +ENTCAP 150000 +SCOPE DOCUMENT +SYNTAX + SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127 + BASESET "ISO 646:1983//CHARSET + International Reference Version + (IRV)//ESC 2/5 4/0" + DESCSET 0 128 0 + FUNCTION + RE 13 + RS 10 + SPACE 32 + TAB SEPCHAR 9 + NAMING LCNMSTRT "" + UCNMSTRT "" + LCNMCHAR ".-" + UCNMCHAR ".-" + NAMECASE GENERAL YES + ENTITY NO + DELIM GENERAL SGMLREF + SHORTREF SGMLREF + NAMES SGMLREF + QUANTITY SGMLREF + ATTSPLEN 2100 + LITLEN 1024 + NAMELEN 72 -- somewhat arbitrary; taken from + internet line length conventions -- + PILEN 1024 + TAGLVL 100 + TAGLEN 2100 + GRPGTCNT 150 + GRPCNT 64 +FEATURES + MINIMIZE + DATATAG NO + OMITTAG YES + RANK NO + SHORTTAG YES + LINK + SIMPLE NO + IMPLICIT NO + EXPLICIT NO + OTHER + CONCUR NO + SUBDOC NO + FORMAL YES + APPINFO "SDA" -- conforming SGML Document Access application + -- +> +<!-- +$Id: html2.decl,v 1.1.1.1 1996/12/18 03:28:57 steve Exp $ +Author: Daniel W. Connolly <connolly@w3.org> +See also: http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html + -->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html3.decl Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,163 @@ +<!SGML "ISO 8879:1986" +-- + Document Type Definition for the HyperText Markup Language Plus + for use with the World Wide Web application (HTML+ DTD). + This DTD is designed for use with SGML authoring tools and + it is expected that most browsers will tolerate omissions, + in particular, missing <DIVn> elements and <P> start tags + following headers, which can easily be inferred from the context. + + The HTML+ DTD which is structured as an HTML core plus a + number of additional modules which can be included by an + entity definition in a document's <!DOCTYPE> element. + You can include specific features in your document + using the DOCTYPE declaration at the start, e.g. + + <!DOCTYPE htmlplus [ + <!ENTITY % HTML.tables "INCLUDE"> + <!ENTITY % HTML.forms "INCLUDE"> + ]> + + This spec also allows for authors to extend the DTD and + to define how any new elements are rendered in terms of + existing ones. This should be used with caution. + + I would like to acknowledge the influence of the TEI DTDs + which proved very helpful in restructuring the DTD. + + Dave Raggett <dsr@hplb.hpl.hp.com> 5th April 1994 + + Changes: + + Added align attribute to headers with same values + and meaning as for paragraphs. + + Added prologue and epilogue elements and fixed bug + in definition of %paras with HTML.emph. + + Added entity names for standard icons c/o Bert Bos. + This are enabled with the HTML.icons switch. + + Added PRE to content model for LI and DD, and changed + DL to require at least one DT per DD. Math is now + part of %text; but can't be nested. + + Tried to permit an optional epilogue following last + division, but sgmls gave: Content model is ambiguous + + Added support for graphical menus to SELECT/OPTION. + + Liberalised content model for headers to %text; + Added optional NOFOLD attribute to P element to + inhibit SGML folding of whitespace. + + Dropped the LIT element and changed the TAB element + over to the LaTeX model. Added NOWRAP to P element. + Replaced TH/TD's align=numeric with ALIGNON="." etc. + + Made anchor NAME attribute conditional on HTML.obsolete + Added HTML.obsolete for obsoleted HTML elements + + Added SIG attribute to A and LINK for specifying + a digital signature to attest that a linked document + is unchanged. + + SRC attribute added to NOTE to allow authors to override + the default icon chosen on the basis of the ROLE attribute. + + Switched REL/REV back to CDATA to avoid trouble with duplicate + name or name token error. Using an explicit list of relationship + types would force us to drop REV. + + Added top/bottom alignment attribute to CAPTION + + REL and REV domains now defined by parameter entities + + SRC attribute added to LINK to allow images to be used + in document specific toolbar + + Baseline attribute added to FIG and IMG to give precise + control of vertical position relative to baseline. + + Revised comments for <A> and <LINK> to remove references to + obsoleted timing attributes and to add a list of "standard" + relationship types. + + CHANGED element now uses more meaningful attribute names. + + STATE dropped in favor of INPUT with TYPE="hidden". Forms now + support a link to a script for client-side execution of constraints. + + The element definition for DIV1..DIV6 and P no longer permit the + start tag to be omitted. This was regrettably forced by a + restriction in the SGML standard. Browsers *must* be capable of + inferring them when missing,in order to cope with legacy documents. + + Fixed some errors in earlier version to do with start tags and + definitions of parameter entities. The content model for FIG has + been changed to use a P element for text to avoid an SGML parsing + problem with a line break before the caption. +-- +CHARSET + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 9 UNUSED + 9 2 9 + 11 2 UNUSED + 13 1 13 + 14 18 UNUSED + 32 95 32 + 127 1 UNUSED + BASESET "ISO Registration Number 100//CHARSET + ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" + DESCSET 128 32 UNUSED + 160 95 32 + 255 1 UNUSED + +CAPACITY SGMLREF + TOTALCAP 150000 + GRPCAP 150000 + +SCOPE DOCUMENT +SYNTAX + SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 128 0 + FUNCTION RE 13 + RS 10 + SPACE 32 + TAB SEPCHAR 9 + NAMING LCNMSTRT "" + UCNMSTRT "" + LCNMCHAR ".-" + UCNMCHAR ".-" + NAMECASE GENERAL YES + ENTITY NO + DELIM GENERAL SGMLREF + SHORTREF SGMLREF + NAMES SGMLREF + QUANTITY SGMLREF + NAMELEN 32 + TAGLVL 100 + LITLEN 1024 + GRPGTCNT 150 + GRPCNT 64 + +FEATURES + MINIMIZE + DATATAG NO + OMITTAG YES + RANK NO + SHORTTAG NO + LINK + SIMPLE NO + IMPLICIT NO + EXPLICIT NO + OTHER + CONCUR NO + SUBDOC NO + FORMAL YES + APPINFO NONE +>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/htmlplus.decl Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,163 @@ +<!SGML "ISO 8879:1986" +-- + Document Type Definition for the HyperText Markup Language Plus + for use with the World Wide Web application (HTML+ DTD). + This DTD is designed for use with SGML authoring tools and + it is expected that most browsers will tolerate omissions, + in particular, missing <DIVn> elements and <P> start tags + following headers, which can easily be inferred from the context. + + The HTML+ DTD which is structured as an HTML core plus a + number of additional modules which can be included by an + entity definition in a document's <!DOCTYPE> element. + You can include specific features in your document + using the DOCTYPE declaration at the start, e.g. + + <!DOCTYPE htmlplus [ + <!ENTITY % HTML.tables "INCLUDE"> + <!ENTITY % HTML.forms "INCLUDE"> + ]> + + This spec also allows for authors to extend the DTD and + to define how any new elements are rendered in terms of + existing ones. This should be used with caution. + + I would like to acknowledge the influence of the TEI DTDs + which proved very helpful in restructuring the DTD. + + Dave Raggett <dsr@hplb.hpl.hp.com> 5th April 1994 + + Changes: + + Added align attribute to headers with same values + and meaning as for paragraphs. + + Added prologue and epilogue elements and fixed bug + in definition of %paras with HTML.emph. + + Added entity names for standard icons c/o Bert Bos. + This are enabled with the HTML.icons switch. + + Added PRE to content model for LI and DD, and changed + DL to require at least one DT per DD. Math is now + part of %text; but can't be nested. + + Tried to permit an optional epilogue following last + division, but sgmls gave: Content model is ambiguous + + Added support for graphical menus to SELECT/OPTION. + + Liberalised content model for headers to %text; + Added optional NOFOLD attribute to P element to + inhibit SGML folding of whitespace. + + Dropped the LIT element and changed the TAB element + over to the LaTeX model. Added NOWRAP to P element. + Replaced TH/TD's align=numeric with ALIGNON="." etc. + + Made anchor NAME attribute conditional on HTML.obsolete + Added HTML.obsolete for obsoleted HTML elements + + Added SIG attribute to A and LINK for specifying + a digital signature to attest that a linked document + is unchanged. + + SRC attribute added to NOTE to allow authors to override + the default icon chosen on the basis of the ROLE attribute. + + Switched REL/REV back to CDATA to avoid trouble with duplicate + name or name token error. Using an explicit list of relationship + types would force us to drop REV. + + Added top/bottom alignment attribute to CAPTION + + REL and REV domains now defined by parameter entities + + SRC attribute added to LINK to allow images to be used + in document specific toolbar + + Baseline attribute added to FIG and IMG to give precise + control of vertical position relative to baseline. + + Revised comments for <A> and <LINK> to remove references to + obsoleted timing attributes and to add a list of "standard" + relationship types. + + CHANGED element now uses more meaningful attribute names. + + STATE dropped in favor of INPUT with TYPE="hidden". Forms now + support a link to a script for client-side execution of constraints. + + The element definition for DIV1..DIV6 and P no longer permit the + start tag to be omitted. This was regrettably forced by a + restriction in the SGML standard. Browsers *must* be capable of + inferring them when missing,in order to cope with legacy documents. + + Fixed some errors in earlier version to do with start tags and + definitions of parameter entities. The content model for FIG has + been changed to use a P element for text to avoid an SGML parsing + problem with a line break before the caption. +-- +CHARSET + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 9 UNUSED + 9 2 9 + 11 2 UNUSED + 13 1 13 + 14 18 UNUSED + 32 95 32 + 127 1 UNUSED + BASESET "ISO Registration Number 100//CHARSET + ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" + DESCSET 128 32 UNUSED + 160 95 32 + 255 1 UNUSED + +CAPACITY SGMLREF + TOTALCAP 150000 + GRPCAP 150000 + +SCOPE DOCUMENT +SYNTAX + SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 + 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 + BASESET "ISO 646:1983//CHARSET + International Reference Version (IRV)//ESC 2/5 4/0" + DESCSET 0 128 0 + FUNCTION RE 13 + RS 10 + SPACE 32 + TAB SEPCHAR 9 + NAMING LCNMSTRT "" + UCNMSTRT "" + LCNMCHAR ".-" + UCNMCHAR ".-" + NAMECASE GENERAL YES + ENTITY NO + DELIM GENERAL SGMLREF + SHORTREF SGMLREF + NAMES SGMLREF + QUANTITY SGMLREF + NAMELEN 32 + TAGLVL 100 + LITLEN 1024 + GRPGTCNT 150 + GRPCNT 64 + +FEATURES + MINIMIZE + DATATAG NO + OMITTAG YES + RANK NO + SHORTTAG NO + LINK + SIMPLE NO + IMPLICIT NO + EXPLICIT NO + OTHER + CONCUR NO + SUBDOC NO + FORMAL YES + APPINFO NONE +>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/sinfo.dtd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,437 @@ +<!-- This is sinfo.dtd, + by MORIOKA Tomohiko + $Id: sinfo.dtd,v 1.1 1996/12/22 00:34:43 steve Exp $ +--> + +<!entity % emph + "em|it|bf|sf|sl|tt|cparam|code|verb|var|mail|file|kbd|key"> + +<!entity % index "idx|cdx" > + +<!-- url added by HG; htmlurl added by esr --> +<!entity % xref + " a|label|ref|dref|cf|cite|ncite|concept " > + +<!entity % inline + " (#pcdata | f| x| %emph; |sq| %xref | %index )* " > + +<!entity % list + " list | ul | ol | dl | kl | vl | memo | lisp | rfc | standard + | report " > + +<!entity % par + " %list; | comment | lq | quote | tscreen " > + +<!entity % mathpar " dm | eq " > + +<!entity % thrm + " defun | define | defvar | prop | lemma | coroll | proof | theorem " > + +<!entity % sectpar + " %par; | figure | table | faq | hrule | %mathpar; | + %thrm; "> +<!element sinfo o o (head, body) > + +<!element head - - (titlepag, header?, toc?, lof?, lot?)> +<!attlist head opts cdata "null"> + +<!element body - - ( abstract?, (p|noindent)*, h1*, + (appendix, h1+)?, biblio?) +(footnote)> +<!attlist body opts cdata "null"> + +<!entity % general system -- general purpose characters -- > +%general; +<!entity Ae 'Ä' > +<!entity ae 'ä' > +<!entity Oe 'Ö' > +<!entity oe 'ö' > +<!entity Ue 'Ü' > +<!entity ue 'ü' > +<!entity sz 'ß' > +<!element noindent o o (( %inline | %sectpar )+) +(newline) > +<!element p o o (( %inline | %sectpar )+) +(newline) > +<!entity ptag '<p>' > +<!entity psplit '</p><p>' > + +<!element em - - (%inline)> +<!element bf - - (%inline)> +<!element it - - (%inline)> +<!element sf - - (%inline)> +<!element sl - - (%inline)> +<!element tt - - (%inline)> +<!element sq - - (%inline)> +<!element cparam - - (%inline)> + +<!entity ftag '<f>' -- formula begin -- > +<!entity qendtag '</sq>'> + +<!element lq - - ((p|noindent)*)> +<!element quote - - ((%inline; | %sectpar;)*, (p|noindent)*)+ > +<!element tscreen - - ((%inline; | %sectpar;)*, (p|noindent)*)+ > +<!element ul - - (li+)> +<!element ol - - (li+)> +<!element list - - (li+)> +<!element memo - - ((%inline; | %sectpar; )*, (p|noindent)*)+ > +<!attlist memo title cdata "Memo"> +<!element rfc - o empty> +<!attlist rfc + name cdata #implied + number cdata #required + type cdata #implied + author cdata #required + title cdata #required + date cdata #required + obsolete cdata #implied> +<!element standard - o empty> +<!attlist standard + abbrev cdata #implied + org cdata #implied + title-cn cdata #implied + title-en cdata #implied + title-fr cdata #implied + title-ja cdata #implied + number cdata #required + year cdata #implied> +<!element report - o empty> +<!attlist report + abbrev cdata #implied + author cdata #required + title-cn cdata #implied + title-en cdata #implied + title-fr cdata #implied + title-ja cdata #implied + date cdata #implied> +<!element dl - - (dt,dd)+ > +<!element dt - o ((%inline; | %sectpar;)*, (p|noindent)*) > +<!element dd - o ((%inline; | %sectpar;)*, (p|noindent|newline)*) > + +<!element kl - - ((kt,kd)|(dt,dd))+ > +<!element kt - o ((%inline; | %sectpar;)*, (p|noindent)*) > +<!element kd - o ((%inline; | %sectpar;)*, (p|noindent|newline)*) > + +<!element vl - - (dt,dd)+ > + +<!element li - o ((%inline; | %sectpar;)*, (p|noindent)*) > + +<!element tag - o (%inline)> +<!entity space " "> +<!entity null ""> + +<!element faq - - (keyword?, (poster?, pdate?, (question| answer| coment)? )*)+> +<!element keyword - o (%inline;)*> +<!element poster - o (%inline;)*> +<!element pdate - o (%inline;)*> +<!element question - o ((%inline; | %sectpar;)*, (p|noindent)*)+> +<!element answer - o ((%inline; | %sectpar;)*, (p|noindent)*)+> +<!element coment - o ((%inline; | %sectpar;)*, (p|noindent)*)+> +<!element hrule - o empty > + +<!element figure - - ((eps | ph ), caption?)> +<!attlist figure + loc cdata "tbp"> + +<!-- eps attributes added by mb and td --> +<!element eps - o empty > +<!attlist eps + file cdata #required + height cdata "5cm" + angle cdata "0"> + +<!element ph - o empty > +<!attlist ph + vspace cdata #required> + +<!element caption - o (%inline)> + +<!element rowsep - o empty> +<!element colsep - o empty> +<!element hline - o empty> + +<!entity rowsep "<rowsep>"> +<!entity colsep "<colsep>"> + +<!element table - - (tabular, caption?) > +<!attlist table + loc cdata "tbp"> + +<!element code - - rcdata> +<!element verb - - rcdata> +<!element var - - rcdata> +<!element lisp - - rcdata> +<!element mail - - rcdata> +<!element file - - rcdata> +<!element kbd - - rcdata> +<!element key - - rcdata> + +<!shortref ttmap -- also on one-line -- + "B&#RE;" space + "&#RS;&#RE;" null + "&#RS;B&#RE;" null + "&#RS;B" null + '#' num + '%' percnt + '~' tilde + '_' lowbar + '^' circ + '{' lcub + '}' rcub + '|' verbar > + +<!usemap ttmap tt> +<!element mc - - cdata > +<!entity % sppos "tu" > +<!entity % fcs "%sppos;|phr" > +<!entity % fcstxt "#pcdata|mc|%fcs;" > +<!entity % fscs "rf|v|fi" > +<!entity % limits "pr|in|sum" > +<!entity % fbu "fr|lim|ar|root" > +<!entity % fph "unl|ovl|sup|inf" > +<!entity % fbutxt "(%fbu;) | (%limits;) | + (%fcstxt;)|(%fscs;)|(%fph;)" > +<!entity % fphtxt "p|#pcdata" > +<!element f - - ((%fbutxt;)*) > + +<!entity fendtag '</f>' -- formula end -- > + +<!shortref fmap + "&#RS;B" null + "&#RS;B&#RE;" null + "&#RS;&#RE;" null + "_" thinsp + "~" nbsp + "]" fendtag + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap fmap f > + +<!element dm - - ((%fbutxt;)*)> +<!element eq - - ((%fbutxt;)*)> + +<!shortref dmmap + "&#RE;" space + "_" thinsp + "~" nbsp + "]" fendtag + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub + "|" verbar> + +<!usemap dmmap (dm,eq)> +<!element fr - - (nu,de) > +<!element nu o o ((%fbutxt;)*) > +<!element de o o ((%fbutxt;)*) > +<!element sub o o ((%fbutxt;)*) > +<!element super o o ((%fbutxt;)*) > +<!element opd - o ((%fbutxt;)*) > +<!element pr - - (ll,u,opd?) > +<!element in - - (ll,u,opd?) > +<!element sum - - (ll,u,opd?) > +<!element lim - - (op,ll,u,opd?) > +<!element op o o (%fcstxt;|rf|%fph;) -(tu) > +<!element root - - ((%fbutxt;)*) > +<!attlist root + n cdata ""> +<!element col o o ((%fbutxt;)*) > +<!element row o o (col, (arc, col)*) > + +<!element ar - - (row, (arr, row)*) > +<!attlist ar + ca cdata #required > +<!element arr - o empty > +<!element arc - o empty > +<!entity arr "<arr>" > +<!entity arc "<arc>" > + +<!shortref arrmap + "&#RE;" space + "@" arr + "|" arc + "_" thinsp + "~" nbsp + "#" num + "%" percnt + "^" circ + "{" lcub + "}" rcub > + +<!usemap arrmap ar > +<!element sup - - ((%fbutxt;)*) -(tu) > +<!element inf - - ((%fbutxt;)*) -(tu) > +<!element unl - - ((%fbutxt;)*) > +<!element ovl - - ((%fbutxt;)*) > +<!element rf - o (#pcdata) > +<!element phr - o ((%fphtxt;)*) > +<!element v - o ((%fcstxt;)*) + -(tu|%limits;|%fbu;|%fph;) > +<!element fi - o (#pcdata) > +<!element tu - o empty > + +<!element defun - - (args?,opts?,rest?,(p|noindent|newline)*)> +<!attlist defun + name cdata #required> +<!element args - o (#pcdata)> +<!element opts - o (#pcdata)> +<!element rest - o (#pcdata)> + +<!element define - - (args?,opts?,rest?,(p|noindent|newline)*)> +<!attlist define + type cdata #required + name cdata #required> + +<!element defvar - - ((p|noindent)+) > +<!attlist defvar + name cdata #required> +<!element prop - - (thtag?, p+) > +<!element lemma - - (thtag?, p+) > +<!element coroll - - (thtag?, p+) > +<!element proof - - (p+) > +<!element theorem - - (thtag?, p+) > +<!element thtag - - (%inline)> + +<!entity qtag '<sq>' > + +<!element label - o empty> +<!attlist label id cdata #required> + +<!element concept - - cdata> + +<!element a - - (p+)> +<!attlist a + file cdata #implied + node cdata #implied + href cdata #implied> + +<!element cf - o empty> +<!attlist cf + file cdata #implied + node cdata #implied + href cdata #implied > + +<!element ref - o empty> +<!attlist ref + file cdata #implied + node cdata #implied> + +<!element dref - - cdata> +<!attlist dref + file cdata #implied> + +<!element comment - - (%inline)> +<!element x - - ((#pcdata | mc)*) > +<!usemap #empty x > + +<!-- Hacked by mdw, abstract now part of titlepag --> +<!element titlepag o o (title, author, date?, trans?, tdate?)> +<!element title - o (%inline, subtitle?) +(newline)> +<!element subtitle - o (%inline)> +<!element author - o (name, thanks?, inst?, mail?, + (and, name, thanks?, inst?)*)> +<!element trans - o (name, thanks?, inst?, + (and, name, thanks?, inst?)*)> +<!element name o o (%inline) +(newline)> +<!element and - o empty> +<!element thanks - o (%inline)> +<!element inst - o (%inline) +(newline)> +<!element date - o (#pcdata) > +<!element tdate - o (#pcdata) > + +<!element newline - o empty > +<!entity nl "<newline>"> + +<!-- Hacked by ono --> +<!element abstract - o (%inline, (p|noindent)*)+ +(newline)> + + +<!element toc - o empty> +<!element lof - o empty> +<!element lot - o empty> +<!element header - - (lhead, rhead) > +<!element lhead - o (%inline)> +<!element rhead - o (%inline)> +<!entity % sec-b "(p|noindent)*, (cindex|findex|vindex)* " > +<!entity % sect "heading, node?, %sec-b " > +<!element heading o o (%inline)> +<!element h1 - o (%sect, h2*) +(footnote)> +<!element h2 - o (%sect, h3*)> +<!element h3 - o (%sect, h4*)> +<!element h4 - o (%sect, h5*)> +<!element h5 - o (%sect)> +<!element node - o (heading)> +<!element cindex - o empty> +<!element findex - o empty> +<!element vindex - o empty> +<!element appendix - o empty > +<!element footnote - - (%inline)> +<!element cite - o empty> +<!attlist cite + id cdata #required> + +<!element ncite - o empty> +<!attlist ncite + id cdata #required + note cdata #required> + +<!element idx - - (#pcdata)> +<!element cdx - - (#pcdata)> + +<!element biblio - o empty> +<!attlist biblio + style cdata "sinfo" + files cdata ""> +<!element slides - - (slide*) > + +<!attlist slides + opts cdata "null"> +<!element slide - o (title?, p+) > +<!entity % addr "(address?, email?, phone?, fax?)" > + +<!element letter - - + (from, %addr, to, %addr, cc?, subject?, sref?, rref?, + rdate?, opening, p+, closing, encl?, ps?)> + +<!attlist letter + opts cdata "null"> + +<!element from - o (#pcdata) > +<!element to - o (#pcdata) > + +<!element address - o (#pcdata) +(newline) > +<!element email - o (#pcdata) > +<!element phone - o (#pcdata) > +<!element fax - o (#pcdata) > + +<!element subject - o (%inline;) > +<!element sref - o (#pcdata) > +<!element rref - o (#pcdata) > +<!element rdate - o (#pcdata) > + +<!element opening - o (%inline;) > + +<!element closing - o (%inline;) > +<!element cc - o (%inline;) +(newline) > +<!element encl - o (%inline;) +(newline) > + +<!element ps - o (p+) > + +<!element telefax - - + (from, %addr, to, address, email?, + phone?, fax, cc?, subject?, + opening, p+, closing, ps?)> + +<!attlist telefax + opts cdata "null" + length cdata "2"> + +<!element notes - - (title?, p+) > +<!attlist notes + opts cdata "null" > + +<!-- end of sinfo dtd -->
--- a/etc/tests/external-widget/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ b/etc/tests/external-widget/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -1,4 +1,4 @@ -CFLAGS += -Xc -g -DTOOLTALK +CFLAGs += -Xc -g -DTOOLTALK EMACSHOME = ../../.. EMACSLIBDIR = $(EMACSHOME)/editor/src EMACSINCLUDEDIR = $(EMACSHOME)/editor/src
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib-src/fakelisp.c Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,52 @@ +#include "fakelisp.h" + +void *Lisp_Object_Table[4096]; +int Lisp_Object_Index = 0; + +Lisp_Object +make_vector(len) + int len; +{ + Lisp_Object val = Lisp_Object_Index++; + + Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_Vector)); + XVECTOR (val)->size = len; + XVECTOR (val)->contents = + (Lisp_Object *) malloc ((sizeof (Lisp_Object)) * len); + return (val | (Lisp_Vector << VALBITS)); +} + +Lisp_Object +make_string(str) + char *str; +{ + Lisp_Object val = Lisp_Object_Index++; + int len = strlen (str); + + Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_String)); + XSTRING (val)->size = len; + XSTRING (val)->data = (unsigned char *) malloc (len + 1); + memcpy (XSTRING (val)->data, str, len + 1); + return (val | (Lisp_String << VALBITS)); +} + +Lisp_Object +make_symbol(name) + char *name; +{ + Lisp_Object val = Lisp_Object_Index++; + int len = strlen (name); + + Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_Symbol)); + XSYMBOL (val)->name = (unsigned char *) malloc (len + 1); + memcpy (XSYMBOL (val)->name, name, len + 1); + XSYMBOL (val)->value = Qnil; + return (val | (Lisp_String << VALBITS)); +} + +Lisp_Object +Fsymbol_value(obj) + Lisp_Object obj; +{ + return XSYMBOL (obj)->value; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib-src/fakelisp.h Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,75 @@ +#ifndef _FAKELISP_H +#define _FAKELISP_H + +#include <config.h> + +/* Cancel substitutions made by config.h for Emacs. */ +#undef open +#undef read +#undef write +#undef close + +/* We used to test for `BSTRING' here, but only GCC and Emacs define + `BSTRING', as far as I know, and neither of them use this code. */ +#if HAVE_STRING_H || STDC_HEADERS +#include <string.h> +#ifndef bcmp +#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) +#endif +#ifndef bcopy +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif +#ifndef bzero +#define bzero(s, n) memset ((s), 0, (n)) +#endif +#else +#include <strings.h> +#endif + +typedef unsigned int Lisp_Object; + +enum Lisp_Type { + Lisp_Int, + Lisp_Symbol, + Lisp_String, + Lisp_Vector +}; + +#ifndef VALBITS /* hir, 1994.12.19 */ +#define VALBITS 24 +#endif +#define VALMASK ((1 << VALBITS) - 1) + +#define XTYPE(x) ((enum Lisp_Type)((x)>>VALBITS)) + +struct Lisp_Vector { + int size; + Lisp_Object *contents; +}; + +struct Lisp_String { + int size; + unsigned char *data; +}; + +struct Lisp_Symbol { + unsigned char *name; + Lisp_Object value; +}; + +#define Qnil (Lisp_Object)(Lisp_Symbol << VALBITS) +#define Qt (Lisp_Object)((Lisp_Symbol << VALBITS) | 1) + +#define XFASTINT(x) (x) +#define XVECTOR(x) ((struct Lisp_Vector *)Lisp_Object_Table[(x)&VALMASK]) +#define XSTRING(x) ((struct Lisp_String *)Lisp_Object_Table[(x)&VALMASK]) +#define XSYMBOL(x) ((struct Lisp_Symbol *)Lisp_Object_Table[(x)&VALMASK]) + +extern void *Lisp_Object_Table[4096]; + +extern Lisp_Object make_vector(), make_string(), make_symbol(); +extern Lisp_Object Fsymbol_value(); + +#define GLYPH unsigned int + +#endif /* _FAKELISP_H */
--- a/lisp/comint/telnet.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/comint/telnet.el Mon Aug 13 08:47:35 2007 +0200 @@ -55,7 +55,9 @@ (defvar telnet-new-line "\r") (defvar telnet-mode-map nil) -(defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *") +(defvar telnet-default-prompt-pattern "^[^#$%>\n]*[#$%>] *") +(defvar telnet-prompt-pattern telnet-default-prompt-pattern) + (defvar telnet-replace-c-g nil) (make-variable-buffer-local (defvar telnet-remote-echoes t @@ -117,7 +119,7 @@ "Tries to put correct initializations in. Needs work." (let ((case-fold-search t)) (cond ((string-match "unix" string) - (setq telnet-prompt-pattern comint-prompt-pattern) + (setq telnet-prompt-pattern comint-prompt-regexp) (setq telnet-new-line "\n")) ((string-match "tops-20" string) ;;maybe add telnet-replace-c-g (setq telnet-prompt-pattern "[@>] *"))
--- a/lisp/electric/ebuff-menu.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/electric/ebuff-menu.el Mon Aug 13 08:47:35 2007 +0200 @@ -179,9 +179,18 @@ (if electric-buffer-menu-mode-map nil (let ((map (make-keymap)) (submap (make-keymap))) - (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) + ;(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) ; FSF + (let ((i 0)) + (while (< i 128) + (define-key map (make-string 1 i) 'Electric-buffer-menu-undefined) + (setq i (1+ i)))) (define-key map "\e" submap) - (fillarray (car (cdr submap)) 'Electric-buffer-menu-undefined) + ;(fillarray (car (cdr submap)) 'Electric-buffer-menu-undefined) ; FSF + (let ((map2 (lookup-key map "\e")) + (i 0)) + (while (< i 128) + (define-key map2 (make-string 1 i) 'Electric-buffer-menu-undefined) + (setq i (1+ i)))) (define-key map "\C-z" 'suspend-emacs) (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) (define-key map (char-to-string help-char) 'Helper-help)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/gnus-scomo.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,110 @@ +;;; gnus-scomo.el --- mode for editing Gnus score files +;; Copyright (C) 1996 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> +;; Keywords: news, mail + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;;; Code: + +(require 'easymenu) +(require 'timezone) +(eval-when-compile (require 'cl)) + +(defvar gnus-score-mode-hook nil + "*Hook run in score mode buffers.") + +(defvar gnus-score-menu-hook nil + "*Hook run after creating the score mode menu.") + +(defvar gnus-score-edit-exit-function nil + "Function run on exit from the score buffer.") + +(defvar gnus-score-mode-map nil) +(unless gnus-score-mode-map + (setq gnus-score-mode-map (copy-keymap emacs-lisp-mode-map)) + (define-key gnus-score-mode-map "\C-c\C-c" 'gnus-score-edit-exit) + (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) + (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) + +;;;###autoload +(defun gnus-score-mode () + "Mode for editing Gnus score files. +This mode is an extended emacs-lisp mode. + +\\{gnus-score-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map gnus-score-mode-map) + (when menu-bar-mode + (gnus-score-make-menu-bar)) + (set-syntax-table emacs-lisp-mode-syntax-table) + (setq major-mode 'gnus-score-mode) + (setq mode-name "Score") + (lisp-mode-variables nil) + (make-local-variable 'gnus-score-edit-exit-function) + (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + +(defun gnus-score-make-menu-bar () + (unless (boundp 'gnus-score-menu) + (easy-menu-define + gnus-score-menu gnus-score-mode-map "" + '("Score" + ["Exit" gnus-score-edit-exit t] + ["Insert date" gnus-score-edit-insert-date t] + ["Format" gnus-score-pretty-print t])) + (run-hooks 'gnus-score-menu-hook))) + +(defun gnus-score-edit-insert-date () + "Insert date in numerical format." + (interactive) + (princ (gnus-score-day-number (current-time)) (current-buffer))) + +(defun gnus-score-pretty-print () + "Format the current score file." + (interactive) + (goto-char (point-min)) + (let ((form (read (current-buffer)))) + (erase-buffer) + (pp form (current-buffer))) + (goto-char (point-min))) + +(defun gnus-score-edit-exit () + "Stop editing the score file." + (interactive) + (unless (file-exists-p (file-name-directory (buffer-file-name))) + (make-directory (file-name-directory (buffer-file-name)) t)) + (save-buffer) + (bury-buffer (current-buffer)) + (let ((buf (current-buffer))) + (when gnus-score-edit-exit-function + (funcall gnus-score-edit-exit-function)) + (when (eq buf (current-buffer)) + (switch-to-buffer (other-buffer (current-buffer)))))) + +(defun gnus-score-day-number (time) + (let ((dat (decode-time time))) + (timezone-absolute-from-gregorian + (nth 4 dat) (nth 3 dat) (nth 5 dat)))) + +(provide 'gnus-scomo) + +;;; gnus-scomo.el ends here
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/nnheaderems.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,201 @@ +;;; nnheaderems.el --- making Gnus backends work under different Emacsen +;; Copyright (C) 1996 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> +;; Keywords: news + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;;; Code: + +(defun nnheader-xmas-run-at-time (time repeat function &rest args) + (start-itimer + "nnheader-run-at-time" + `(lambda () + (,function ,@args)) + time repeat)) + +(defun nnheader-xmas-cancel-timer (timer) + (delete-itimer timer)) + +;; Written by Erik Naggum <erik@naggum.no>. +;; Saved by Steve Baur <steve@miranova.com>. +(defun nnheader-xmas-insert-file-contents-literally (filename &optional visit beg end replace) + "Like `insert-file-contents', q.v., but only reads in the file. +A buffer may be modified in several ways after reading into the buffer due +to advanced Emacs features, such as file-name-handlers, format decoding, +find-file-hooks, etc. + This function ensures that none of these modifications will take place." + (let ( ; (file-name-handler-alist nil) + (format-alist nil) + (after-insert-file-functions nil) + (find-buffer-file-type-function + (if (fboundp 'find-buffer-file-type) + (symbol-function 'find-buffer-file-type) + nil))) + (unwind-protect + (progn + (fset 'find-buffer-file-type (lambda (filename) t)) + (insert-file-contents filename visit beg end replace)) + (if find-buffer-file-type-function + (fset 'find-buffer-file-type find-buffer-file-type-function) + (fmakunbound 'find-buffer-file-type))))) + +(defun nnheader-xmas-find-file-noselect (filename &optional nowarn rawfile) + "Read file FILENAME into a buffer and return the buffer. +If a buffer exists visiting FILENAME, return that one, but +verify that the file has not changed since visited or saved. +The buffer is not selected, just returned to the caller." + (setq filename + (abbreviate-file-name + (expand-file-name filename))) + (if (file-directory-p filename) + (if find-file-run-dired + (dired-noselect filename) + (error "%s is a directory." filename)) + (let* ((buf (get-file-buffer filename)) + (truename (abbreviate-file-name (file-truename filename))) + (number (nthcdr 10 (file-attributes truename))) + ;; Find any buffer for a file which has same truename. + (other (and (not buf) + (if (fboundp 'find-buffer-visiting) + (find-buffer-visiting filename) + (get-file-buffer filename)))) + error) + ;; Let user know if there is a buffer with the same truename. + (if other + (progn + (or nowarn + (string-equal filename (buffer-file-name other)) + (message "%s and %s are the same file" + filename (buffer-file-name other))) + ;; Optionally also find that buffer. + (if (or (and (boundp 'find-file-existing-other-name) + find-file-existing-other-name) + find-file-visit-truename) + (setq buf other)))) + (if buf + (or nowarn + (verify-visited-file-modtime buf) + (cond ((not (file-exists-p filename)) + (error "File %s no longer exists!" filename)) + ((yes-or-no-p + (if (string= (file-name-nondirectory filename) + (buffer-name buf)) + (format + (if (buffer-modified-p buf) + "File %s changed on disk. Discard your edits? " + "File %s changed on disk. Reread from disk? ") + (file-name-nondirectory filename)) + (format + (if (buffer-modified-p buf) + "File %s changed on disk. Discard your edits in %s? " + "File %s changed on disk. Reread from disk into %s? ") + (file-name-nondirectory filename) + (buffer-name buf)))) + (save-excursion + (set-buffer buf) + (revert-buffer t t))))) + (save-excursion +;;; The truename stuff makes this obsolete. +;;; (let* ((link-name (car (file-attributes filename))) +;;; (linked-buf (and (stringp link-name) +;;; (get-file-buffer link-name)))) +;;; (if (bufferp linked-buf) +;;; (message "Symbolic link to file in buffer %s" +;;; (buffer-name linked-buf)))) + (setq buf (create-file-buffer filename)) + ;; (set-buffer-major-mode buf) + (set-buffer buf) + (erase-buffer) + (if rawfile + (condition-case () + (nnheader-insert-file-contents-literally filename t) + (file-error + ;; Unconditionally set error + (setq error t))) + (condition-case () + (insert-file-contents filename t) + (file-error + ;; Run find-file-not-found-hooks until one returns non-nil. + (or t ; (run-hook-with-args-until-success 'find-file-not-found-hooks) + ;; If they fail too, set error. + (setq error t))))) + ;; Find the file's truename, and maybe use that as visited name. + (setq buffer-file-truename truename) + (setq buffer-file-number number) + ;; On VMS, we may want to remember which directory in a search list + ;; the file was found in. + (and (eq system-type 'vax-vms) + (let (logical) + (if (string-match ":" (file-name-directory filename)) + (setq logical (substring (file-name-directory filename) + 0 (match-beginning 0)))) + (not (member logical find-file-not-true-dirname-list))) + (setq buffer-file-name buffer-file-truename)) + (if find-file-visit-truename + (setq buffer-file-name + (setq filename + (expand-file-name buffer-file-truename)))) + ;; Set buffer's default directory to that of the file. + (setq default-directory (file-name-directory filename)) + ;; Turn off backup files for certain file names. Since + ;; this is a permanent local, the major mode won't eliminate it. + (and (not (funcall backup-enable-predicate buffer-file-name)) + (progn + (make-local-variable 'backup-inhibited) + (setq backup-inhibited t))) + (if rawfile + nil + (after-find-file error (not nowarn))))) + buf))) + +(defun nnheader-ms-strip-cr () + "Strip ^M from the end of all lines." + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\r$" nil t) + (delete-backward-char 1)))) + +(eval-and-compile + (cond + ;; Do XEmacs function bindings. + ((string-match "XEmacs\\|Lucid" emacs-version) + (fset 'nnheader-run-at-time 'nnheader-xmas-run-at-time) + (fset 'nnheader-cancel-timer 'nnheader-xmas-cancel-timer) + (fset 'nnheader-find-file-noselect 'nnheader-xmas-find-file-noselect) + (fset 'nnheader-insert-file-contents-literally + (if (fboundp 'insert-file-contents-literally) + 'insert-file-contents-literally + 'nnheader-xmas-insert-file-contents-literally))) + ;; Do Emacs function bindings. + (t + (fset 'nnheader-run-at-time 'run-at-time) + (fset 'nnheader-cancel-timer 'cancel-timer) + (fset 'nnheader-find-file-noselect 'find-file-noselect) + (fset 'nnheader-insert-file-contents-literally + 'insert-file-contents-literally) + )) + (when (memq system-type '(windows-nt)) + (add-hook 'nnmail-prepare-incoming-hook 'nnheader-ms-strip-cr))) + +(provide 'nnheaderems) + +;;; nnheaderems.el ends here.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/hm--html-menus/html-mode.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,957 @@ +;;; html-mode --- Major mode for editing HTML hypertext documents for the WWW +;; Derived from Marc Andreesen's Revision 2.3. + +;; Keywords: hypermedia languages help docs wp + +;; HTML mode, based on text mode. +;; Copyright (C) 1985 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993 National Center for Supercomputing Applications. +;; NCSA modifications by Marc Andreessen (marca@ncsa.uiuc.edu). +;; +;; Changed by Heiko Münkel, 6 Jan 1994, 10 Jan 1994, 15 Mar 1994, 03 Jan 1995 +;; 12 May 1995, 25 May 1995, 29 Jul 1995, 3 Feb 1996 +;; +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 1, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; +;;; Commentary: +;; -------------------------------- CONTENTS -------------------------------- +;; +;; html-mode: Major mode for editing HTML hypertext documents. +;; Revision: 2.2 +;; +;; Changes from 2.1 (beta) +;; - Changed previewer for the new Mosaic +;; - Changed lemacs to xemacs +;; +;; Changes from 2.0 (beta): +;; - Ripped out numeric anchor name stuff altogether (all names should be +;; meaningful, not just numbers). +;; - Fixed problem with unquoted names. +;; - Fixed font-lock support (yeah! thanks lamour@engin.umich.edu). +;; +;; ------------------------------ INSTRUCTIONS ------------------------------ +;; +;; Put the following code in your .emacs file: +;; +;; (autoload 'html-mode "html-mode" "HTML major mode." t) +;; (or (assoc "\\.html$" auto-mode-alist) +;; (setq auto-mode-alist (cons '("\\.html$" . html-mode) +;; auto-mode-alist))) +;; +;; Emacs will detect the ``.html'' suffix and activate html-mode +;; appropriately. +;; +;; You are assumed to be at least somewhat familiar with the HTML +;; format. If you aren't, read about it first (see below). +;; +;; Here are key sequences and corresponding commands: +;; +;; NORMAL COMMANDS: +;; +;; C-c a html-add-address +;; Open an address element. +;; +;; C-c b html-add-blockquote +;; +;; C-c C-b html-add-bold +;; Open a bold element. +;; +;; C-c c html-add-code +;; Open a 'code' (fixed-font) element. +;; +;; C-c C-c html-add-citation +;; +;; C-c d html-add-description-list +;; Open a definition list. The initial entry is created for you. +;; To create subsequent entries, use 'C-c e'. +;; +;; C-c e html-add-description-entry +;; Add a new definition entry in a definition list. You are +;; assumed to be inside a definition list (specifically, at the end +;; of another definition entry). +;; +;; C-c C-e html-add-emphasized +;; Open an emphasized element. +;; +;; C-c C-f html-add-fixed +;; +;; C-c g html-add-img +;; Add an IMG element (inlined image or graphic). Note that the +;; IMG tag is currently an extension to HTML supported only by the +;; NCSA Mosaic browser (to my knowledge). You will be prompted for +;; the URL of the image you wish to inline into the document. +;; +;; C-c h html-add-header +;; Add a header. You are prompted for size (1 is biggest, 2 is +;; next biggest; bottom limit is 6) and header contents. +;; +;; C-c i html-add-list-or-menu-item +;; Add a new list or menu item in a list or menu. You are assumed +;; to be inside a list or menu (specifically, at the end of another +;; item). +;; +;; C-c C-i html-add-italic +;; Open an italic element. +;; +;; C-c C-k html-add-keyboard +;; +;; C-c l html-add-normal-link +;; Add a link. You will be prompted for the link (any string; +;; e.g., http://foo.bar/argh/blagh). The cursor will be left where +;; you can type the text that will represent the link in the +;; document. +;; +;; C-c C-l html-add-listing +;; +;; C-c m html-add-menu +;; Open a menu. The initial item is created for you. To create +;; additional items, use 'C-c i'. +;; +;; C-c C-m html-add-sample +;; +;; C-c n html-add-numbered-list +;; +;; C-c p html-add-paragraph-separator +;; Use this command at the end of each paragraph. +;; +;; C-c C-p html-add-preformatted +;; +;; C-c r html-add-normal-reference +;; +;; C-c s html-add-list +;; Open a list. The initial item is created for you. To create +;; additional items, use 'C-c i'. +;; +;; C-c C-s html-add-strong +;; +;; C-c t html-add-title +;; Add a title to the document. You will be prompted for the +;; contents of the title. If a title already exists at the very +;; top of the document, the existing contents will be replaced. +;; +;; C-c C-v html-add-variable +;; +;; C-c x html-add-plaintext +;; Add plaintext. The cursor will be positioned where you can type +;; plaintext (or insert another file, or whatever). +;; +;; C-c z html-preview-document +;; Fork off a Mosaic process to preview the current document. +;; After you do this once, subsequent invocations of +;; html-preview-document will cause the same Mosaic process to be +;; used; this magic is accomplished through Mosaic's ability to be +;; remote-controlled via Unix signals. This feature is only +;; available when running XEmacs v19 (it will maybe work with +;; GNU Emacs v19; I'm not sure). +;; +;; COMMANDS THAT OPERATE ON THE CURRENT REGION: +;; +;; C-c C-r l html-add-normal-link-to-region +;; Add a link that will be represented by the current region. You +;; will be prompted for the link (any string, as with +;; html-add-normal-link). +;; +;; C-c C-r r html-add-reference-to-region +;; Add a reference (a link that does not reference anything) that +;; will be represented by the current region. You will be prompted +;; for the name of the link. +;; +;; SPECIAL COMMANDS: +;; +;; <, >, & +;; These are overridden to output <, >, and & +;; respectively. The real characters <, >, and & can be entered +;; into the text either by typing 'C-c' before typing the character +;; or by using the Emacs quoted-insert (C-q) command. +;; +;; C-c <, C-c >, C-c & +;; See '<, >, &' above. +;; +;; ---------------------------- ADDITIONAL NOTES ---------------------------- +;; +;; If you are running Epoch or XEmacs, highlighting will be used +;; to deemphasize HTML message elements as they are created. You can +;; turn this off; see the variables 'html-use-highlighting' and +;; 'html-use-font-lock'. +;; +;; HREF and NAME arguments in anchors should always be quoted. In +;; some existing HTML documents, they are not. html-mode will +;; automatically quotify all such unquoted arguments when it +;; encounters them. The following variables affect this behavior. +;; +;; html-quotify-hrefs-on-find (variable, default t) +;; If this is non-nil, all HREF arguments will be quotified +;; automatically when a HTML document is loaded into Emacs +;; (actually when html-mode is entered). +;; +;; -------------------------------- GOTCHAS --------------------------------- +;; +;; HTML documents can be tricky. html-mode is not smart enough to +;; enforce correctness or sanity, so you have to do that yourself. +;; +;; ------------------------- WHAT HTML-MODE IS NOT -------------------------- +;; +;; html-mode is not a mode for *browsing* HTML documents. In +;; particular, html-mode provides no hypertext or World Wide Web +;; capabilities. +;; +;; The World Wide Web browser we (naturally) recommend is NCSA +;; Mosaic, which can be found at ftp.ncsa.uiuc.edu in /Mosaic. +;; +;; See file://moose.cs.indiana.edu/pub/elisp/w3 for w3.el, which is +;; an Elisp World Wide Web browser written by William Perry. +;; +;; ------------------------------ WHAT HTML IS ------------------------------ +;; +;; HTML (HyperText Markup Language) is a format for hypertext +;; documents, particularly in the World Wide Web system. For more +;; information on HTML, telnet to info.cern.ch or pick up a copy of +;; NCSA Mosaic for the X Window System via ftp to ftp.ncsa.uiuc.edu +;; in /Mosaic; information is available online through the software +;; products distributed at those sites. +;; +;; ---------------------------- ACKNOWLEDGEMENTS ---------------------------- +;; +;; Some code herein provided by: +;; Dan Connolly <connolly@pixel.convex.com> +;; +;; -------------------------------------------------------------------------- +;; LCD Archive Entry: +;; html-mode|Marc Andreessen|marca@ncsa.uiuc.edu| +;; Major mode for editing HTML hypertext files.| +;; Date: sometime in 1993|Revision: 2.1 (beta)|~/modes/html-mode.el.Z| +;; -------------------------------------------------------------------------- +;;; Code: + +;; XEmacs change -- we require hm--html-menu here so that we do not +;; have to manually add an autoload for html-mode. If we didn't do +;; this the autoload for html-mode would have to be changed to load +;; hm--html-menu even though it is defined in this file. +(require 'hm--html-menu) + +;;; ---------------------------- emacs variations ---------------------------- + +(defvar html-running-xemacs (if (or (string-match "XEmacs" emacs-version) + (string-match "Lucid" emacs-version) ) + t nil) + "Non-nil if running XEmacs.") + +(defvar html-running-epoch (boundp 'epoch::version) + "Non-nil if running Epoch.") + +(defvar html-running-emacs-19 (and + (not html-running-xemacs) + (string= (substring emacs-version 0 2) "19")) + "Non-nil if running Emacs 19") + +;;; ------------------------------- variables -------------------------------- + +(defvar html-quotify-hrefs-on-find t + "*If non-nil, all HREF's (and NAME's) in a file will be automatically +quotified when the file is loaded. This is useful for converting ancient +HTML documents to SGML-compatible syntax, which mandates quoted HREF's. +This should always be T.") + +(defvar html-use-highlighting html-running-epoch + "*Flag to use highlighting for HTML directives in Epoch or XEmacs; +if non-NIL, highlighting will be used. Default is T if you are running +Epoch; nil otherwise (for XEmacs, font-lock is better; see +html-use-font-lock instead).") + +(defvar html-use-font-lock (or html-running-xemacs html-running-emacs-19) + "*Flag to use font-lock for HTML directives in XEmacs. If non-NIL, +font-lock will be used. Default is T if you are running with XEmacs; +NIL otherwise. This doesn't currently seem to work. Bummer. Ten points +to the first person who tells me why not.") + +(defvar html-deemphasize-color "grey80" + "*Color for de-highlighting HTML directives in Epoch or XEmacs.") + +(defvar html-emphasize-color "yellow" + "*Color for highlighting HTML something-or-others in Epoch or XEmacs.") + +(defvar html-document-previewer "xmosaic" + "*Program to be used to preview HTML documents. Program is assumed +to accept a single argument, a filename containing a file to view; program +is also assumed to follow the Mosaic convention of handling SIGUSR1 as +a remote-control mechanism.") + +(defvar html-document-previewer-args "-ngh" + "*Arguments to be given to the program named by html-document-previewer; +NIL if none should be given.") + +(defvar html-sigusr1-signal-value 16 + "*Value for the SIGUSR1 signal on your system. See, usually, +/usr/include/sys/signal.h.") + +;;; --------------------------------- setup ---------------------------------- + +(defvar html-mode-syntax-table nil + "Syntax table used while in html mode.") + +(defvar html-mode-abbrev-table nil + "Abbrev table used while in html mode.") +(define-abbrev-table 'html-mode-abbrev-table ()) + +(if html-mode-syntax-table + () + (setq html-mode-syntax-table (make-syntax-table)) + (modify-syntax-entry ?\" ". " html-mode-syntax-table) + (modify-syntax-entry ?\\ ". " html-mode-syntax-table) + (modify-syntax-entry ?' "w " html-mode-syntax-table)) + +(defvar html-mode-map nil "") +(if html-mode-map + () + (setq html-mode-map (make-sparse-keymap)) + (define-key html-mode-map "\t" 'tab-to-tab-stop) + (define-key html-mode-map "\C-ca" 'html-add-address) + (define-key html-mode-map "\C-cb" 'html-add-blockquote) + (define-key html-mode-map "\C-cc" 'html-add-code) + (define-key html-mode-map "\C-cd" 'html-add-description-list) + (define-key html-mode-map "\C-ce" 'html-add-description-entry) + (define-key html-mode-map "\C-cg" 'html-add-img) + (define-key html-mode-map "\C-ch" 'html-add-header) + (define-key html-mode-map "\C-ci" 'html-add-list-or-menu-item) + (define-key html-mode-map "\C-cl" 'html-add-normal-link) + (define-key html-mode-map "\C-cm" 'html-add-menu) + (define-key html-mode-map "\C-cn" 'html-add-numbered-list) + (define-key html-mode-map "\C-cp" 'html-add-paragraph-separator) + (define-key html-mode-map "\C-cr" 'html-add-normal-reference) + (define-key html-mode-map "\C-cs" 'html-add-list) + (define-key html-mode-map "\C-ct" 'html-add-title) + (define-key html-mode-map "\C-cx" 'html-add-plaintext) + ;; html-preview-document currently requires the primitive + ;; signal-process, which is only in v19 (is it in gnu 19? dunno). + (and html-running-xemacs + (define-key html-mode-map "\C-cz" 'html-preview-document)) + (define-key html-mode-map "\C-c\C-b" 'html-add-bold) + (define-key html-mode-map "\C-c\C-c" 'html-add-citation) + (define-key html-mode-map "\C-c\C-e" 'html-add-emphasized) + (define-key html-mode-map "\C-c\C-f" 'html-add-fixed) + (define-key html-mode-map "\C-c\C-i" 'html-add-italic) + (define-key html-mode-map "\C-c\C-k" 'html-add-keyboard) + (define-key html-mode-map "\C-c\C-l" 'html-add-listing) + (define-key html-mode-map "\C-c\C-m" 'html-add-sample) + (define-key html-mode-map "\C-c\C-p" 'html-add-preformatted) + (define-key html-mode-map "\C-c\C-s" 'html-add-strong) + (define-key html-mode-map "\C-c\C-v" 'html-add-variable) + (define-key html-mode-map "<" 'html-less-than) + (define-key html-mode-map ">" 'html-greater-than) + (define-key html-mode-map "&" 'html-ampersand) + (define-key html-mode-map "\C-c<" 'html-real-less-than) + (define-key html-mode-map "\C-c>" 'html-real-greater-than) + (define-key html-mode-map "\C-c&" 'html-real-ampersand) + (define-key html-mode-map "\C-c\C-rl" 'html-add-normal-link-to-region) + (define-key html-mode-map "\C-c\C-rr" 'html-add-reference-to-region) +) + +;;; ------------------------------ highlighting ------------------------------ + +(if (and html-running-epoch html-use-highlighting) + (progn + (defvar html-deemphasize-style (make-style)) + (set-style-foreground html-deemphasize-style html-deemphasize-color) + (defvar html-emphasize-style (make-style)) + (set-style-foreground html-emphasize-style html-emphasize-color))) + +(if (and html-running-xemacs html-use-highlighting) + (progn + (defvar html-deemphasize-style (make-face 'html-deemphasize-face)) + (set-face-foreground html-deemphasize-style html-deemphasize-color) + (defvar html-emphasize-style (make-face 'html-emphasize-face)) + (set-face-foreground html-emphasize-style html-emphasize-color))) + +(if html-use-highlighting + (progn + (if html-running-xemacs + (defun html-add-zone (start end style) + "Add a XEmacs extent from START to END with STYLE." + (let ((extent (make-extent start end))) + (set-extent-face extent style) + (set-extent-data extent 'html-mode)))) + (if html-running-epoch + (defun html-add-zone (start end style) + "Add an Epoch zone from START to END with STYLE." + (let ((zone (add-zone start end style))) + (epoch::set-zone-data zone 'html-mode)))))) + +(defun html-maybe-deemphasize-region (start end) + "Maybe deemphasize a region of text. Region is from START to END." + (and (or html-running-epoch html-running-xemacs) + html-use-highlighting + (html-add-zone start end html-deemphasize-style))) + +;;; -------------------------------------------------------------------------- +;;; ------------------------ command support routines ------------------------ +;;; -------------------------------------------------------------------------- + +(defun html-add-link (link-object) + "Add a link. Single argument LINK-OBJECT is value of HREF in the +new anchor. Mark is set after anchor." + (let ((start (point))) + (insert "<A") + (insert " HREF=\"" link-object "\">") + (html-maybe-deemphasize-region start (1- (point))) + (insert "</A>") + (push-mark) + (forward-char -4) + (html-maybe-deemphasize-region (1+ (point)) (+ (point) 4)))) + +(defun html-add-reference (ref-object) + "Add a reference. Single argument REF-OBJECT is value of NAME in the +new anchor. Mark is set after anchor." + (let ((start (point))) + (insert "<A") + (insert " NAME=\"" ref-object "\">") + (html-maybe-deemphasize-region start (1- (point))) + (insert "</A>") + (push-mark) + (forward-char -4) + (html-maybe-deemphasize-region (1+ (point)) (+ (point) 4)))) + +(defun html-add-list-internal (type) + "Set up a given type of list by opening the list start/end pair +and creating an initial element. Single argument TYPE is a string, +assumed to be a valid HTML list type (e.g. \"UL\" or \"OL\"). +Mark is set after list." + (let ((start (point))) + (insert "<" type ">\n") + (html-maybe-deemphasize-region start (1- (point))) + (insert "<LI> ") + ;; Point goes right there. + (save-excursion + (insert "\n") + (setq start (point)) + (insert "</" type ">\n") + (html-maybe-deemphasize-region start (1- (point))) + ;; Reuse start to set mark. + (setq start (point))) + (push-mark start t))) + +(defun html-open-area (tag) + "Open an area for entering text such as PRE, XMP, or LISTING." + (let ((start (point))) + (insert "<" tag ">\n") + (html-maybe-deemphasize-region start (1- (point))) + (save-excursion + (insert "\n") + (setq start (point)) + (insert "</" tag ">\n") + (html-maybe-deemphasize-region start (1- (point))) + ;; Reuse start to set mark. + (setq start (point))) + (push-mark start t))) + +(defun html-open-field (tag) + (let ((start (point))) + (insert "<" tag ">") + (html-maybe-deemphasize-region start (1- (point))) + (setq start (point)) + (insert "</" tag ">") + (html-maybe-deemphasize-region (1+ start) (point)) + (push-mark) + (goto-char start))) + +;;; -------------------------------------------------------------------------- +;;; -------------------------------- commands -------------------------------- +;;; -------------------------------------------------------------------------- + +;; C-c a +(defun html-add-address () + "Add an address." + (interactive) + (html-open-field "ADDRESS")) + +;; C-c b +(defun html-add-blockquote () + (interactive) + (html-open-area "BLOCKQUOTE")) + +;; C-c C-b +(defun html-add-bold () + (interactive) + (html-open-field "B")) + +;; C-c c +(defun html-add-code () + (interactive) + (html-open-field "CODE")) + +;; C-c C-c +(defun html-add-citation () + (interactive) + (html-open-field "CITE")) + +;; C-c d +(defun html-add-description-list () + "Add a definition list. Blah blah." + (interactive) + (let ((start (point))) + (insert "<DL>\n") + (html-maybe-deemphasize-region start (1- (point))) + (insert "<DT> ") + ;; Point goes right there. + (save-excursion + (insert "\n<DD> \n") + (setq start (point)) + (insert "</DL>\n") + (html-maybe-deemphasize-region start (1- (point))) + ;; Reuse start to set mark. + (setq start (point))) + (push-mark start t))) + +;; C-c e +(defun html-add-description-entry () + "Add a definition entry. Assume we're at the end of a previous +entry." + (interactive) + (let ((start (point))) + (insert "\n<DT> ") + (save-excursion + (insert "\n<DD> ")))) + +;; C-c C-e +(defun html-add-emphasized () + (interactive) + (html-open-field "EM")) + +;; C-c C-f +(defun html-add-fixed () + (interactive) + (html-open-field "TT")) + +;; C-c g +(defun html-add-img (href) + "Add an img." + (interactive "sImage URL: ") + (let ((start (point))) + (insert "<IMG SRC=\"" href "\">") + (html-maybe-deemphasize-region (1+ start) (1- (point))))) + +;; C-c h +(defun html-add-header (size header) + "Add a header." + (interactive "sSize (1-6; 1 biggest): \nsHeader: ") + (let ((start (point))) + (insert "<H" size ">") + (html-maybe-deemphasize-region start (1- (point))) + (insert header) + (setq start (point)) + (insert "</H" size ">\n") + (html-maybe-deemphasize-region (1+ start) (1- (point))))) + +;; C-c i +(defun html-add-list-or-menu-item () + "Add a list or menu item. Assume we're at the end of the +last item." + (interactive) + (let ((start (point))) + (insert "\n<LI> "))) + +;; C-c C-i +(defun html-add-italic () + (interactive) + (html-open-field "I")) + +;; C-c C-k +(defun html-add-keyboard () + (interactive) + (html-open-field "KBD")) + +;; C-c l +(defun html-add-normal-link (link) + "Make a link" + (interactive "sLink to: ") + (html-add-link link)) + +;; C-c C-l +(defun html-add-listing () + (interactive) + (html-open-area "LISTING")) + +;; C-c m +(defun html-add-menu () + "Add a menu." + (interactive) + (html-add-list-internal "MENU")) + +;; C-c C-m +(defun html-add-sample () + (interactive) + (html-open-field "SAMP")) + +;; C-c n +(defun html-add-numbered-list () + "Add a numbered list." + (interactive) + (html-add-list-internal "OL")) + +;; C-c p +(defun html-add-paragraph-separator () + "Add a paragraph separator." + (interactive) + (let ((start (point))) + (insert " <P>") + (html-maybe-deemphasize-region (+ start 1) (point)))) + +;; C-c C-p +(defun html-add-preformatted () + (interactive) + (html-open-area "PRE")) + +;; C-c r +(defun html-add-normal-reference (reference) + "Add a reference (named anchor)." + (interactive "sReference name: ") + (html-add-reference reference)) + +;; C-c s +(defun html-add-list () + "Add a list." + (interactive) + (html-add-list-internal "UL")) + +;; C-c C-s +(defun html-add-strong () + (interactive) + (html-open-field "STRONG")) + +;; C-c t +(defun html-add-title (title) + "Add or modify a title." + (interactive "sTitle: ") + (save-excursion + (goto-char (point-min)) + (if (and (looking-at "<TITLE>") + (save-excursion + (forward-char 7) + (re-search-forward "[^<]*" + (save-excursion (end-of-line) (point)) + t))) + ;; Plop the new title in its place. + (replace-match title t) + (insert "<TITLE>") + (html-maybe-deemphasize-region (point-min) (1- (point))) + (insert title) + (insert "</TITLE>") + (html-maybe-deemphasize-region (- (point) 7) (point)) + (insert "\n")))) + +;; C-c C-v +(defun html-add-variable () + (interactive) + (html-open-field "VAR")) + +;; C-c x +(defun html-add-plaintext () + "Add plaintext." + (interactive) + (html-open-area "XMP")) + +;;; -------------------------------------------------------------------------- +;;; ---------------------------- region commands ----------------------------- +;;; -------------------------------------------------------------------------- + +;; C-c C-r l +(defun html-add-normal-link-to-region (link start end) + "Make a link that applies to the current region. Again, +no completion." + (interactive "sLink to: \nr") + (save-excursion + (goto-char end) + (save-excursion + (goto-char start) + (insert "<A") + (insert " HREF=\"" link "\">") + (html-maybe-deemphasize-region start (1- (point)))) + (insert "</A>") + (html-maybe-deemphasize-region (- (point) 3) (point)))) + +;; C-c C-r r +(defun html-add-reference-to-region (name start end) + "Add a reference point (a link with no reference of its own) to +the current region." + (interactive "sName: \nr") + (or (string= name "") + (save-excursion + (goto-char end) + (save-excursion + (goto-char start) + (insert "<A NAME=\"" name "\">") + (html-maybe-deemphasize-region start (1- (point)))) + (insert "</A>") + (html-maybe-deemphasize-region (- (point) 3) (point))))) + +;;; -------------------------------------------------------------------------- +;;; ---------------------------- special commands ---------------------------- +;;; -------------------------------------------------------------------------- + +(defun html-less-than () + (interactive) + (insert "<")) + +(defun html-greater-than () + (interactive) + (insert ">")) + +(defun html-ampersand () + (interactive) + (insert "&")) + +(defun html-real-less-than () + (interactive) + (insert "<")) + +(defun html-real-greater-than () + (interactive) + (insert ">")) + +(defun html-real-ampersand () + (interactive) + (insert "&")) + +;;; -------------------------------------------------------------------------- +;;; --------------------------- Mosaic previewing ---------------------------- +;;; -------------------------------------------------------------------------- + +;; OK, we work like this: We have a variable html-previewer-process. +;; When we start, it's nil. First time html-preview-document is +;; called, we write the current document into a tmp file and call +;; Mosaic on it. Second time html-preview-document is called, we +;; write the current document into a tmp file, write out a tmp config +;; file, and send Mosaic SIGUSR1. + +;; This feature REQUIRES the Lisp command signal-process, which seems +;; to be a XEmacs v19 feature. It might be in GNU Emacs v19 too; +;; I dunno. + +(defvar html-previewer-process nil + "Variable used to track live viewer process.") + +(defun html-write-buffer-to-tmp-file () + "Write the current buffer to a temp file and return the name +of the tmp file." + (let ((filename (concat "/tmp/" (make-temp-name "html") ".html"))) + (write-region (point-min) (point-max) filename nil 'foo) + filename)) + +(defun html-preview-document () + "Preview the current buffer's HTML document by spawning off a +previewing process (assumed to be Mosaic, basically) and controlling +it with signals as long as it's alive." + (interactive) + (let ((tmp-file (html-write-buffer-to-tmp-file))) + ;; If html-previewer-process is nil, we start a process. + ;; OR if the process status is not equal to 'run. + (if (or (eq html-previewer-process nil) + (not (eq (process-status html-previewer-process) 'run))) + (progn + (message "Starting previewer...") + (setq html-previewer-process + (if html-document-previewer-args + (start-process "html-previewer" "html-previewer" + html-document-previewer + html-document-previewer-args + tmp-file) + (start-process "html-previewer" "html-previewer" + html-document-previewer + tmp-file)))) + ;; We've got a running previewer; use it via SIGUSR1. + (save-excursion + (let ((config-file (format "/tmp/Mosaic.%d" + (process-id html-previewer-process)))) + (set-buffer (generate-new-buffer "*html-preview-tmp*")) + (insert "goto\nfile:" tmp-file "\n") + (write-region (point-min) (point-max) + config-file nil 'foo) + ;; This is a v19 routine only. + (signal-process (process-id html-previewer-process) + html-sigusr1-signal-value) + (delete-file config-file) + (delete-file tmp-file) + (kill-buffer (current-buffer))))))) + +;;; -------------------------------------------------------------------------- +;;; -------------------------------------------------------------------------- +;;; -------------------------------------------------------------------------- + +(defun html-replace-string-in-buffer (start end newstring) + (save-excursion + (goto-char start) + (delete-char (1+ (- end start))) + (insert newstring))) + +;;; --------------------------- html-quotify-hrefs --------------------------- + +(defun html-quotify-hrefs () + "Insert quotes around all HREF and NAME attribute value literals. + +This remedies the problem with old HTML files that can't be processed +by SGML parsers. That is, changes <A HREF=foo> to <A HREF=\"foo\">." + (interactive) + (save-excursion + (goto-char (point-min)) + (while + (re-search-forward + "<[aA][ \t\n]+\\([nN][aA][mM][eE]=[a-zA-Z0-9]+[ \t\n]+\\)?[hH][rR][eE][fF]=" + (point-max) + t) + (cond + ((null (looking-at "\"")) + (insert "\"") + (re-search-forward "[ \t\n>]" (point-max) t) + (forward-char -1) + (insert "\"")))))) + +;;; ------------------------------- html-mode -------------------------------- + +(defun html-mode () + "Major mode for editing HTML hypertext documents. Special commands:\\{html-mode-map} +Turning on html-mode calls the value of the variable html-mode-hook, +if that value is non-nil. + +More extensive documentation is available in the file 'html-mode.el'. +The latest (possibly unstable) version of this file will always be available +on anonymous FTP server ftp.ncsa.uiuc.edu in /Mosaic/elisp." + (interactive) + (kill-all-local-variables) + (if hm--html-use-old-keymap + (use-local-map html-mode-map) + (use-local-map hm--html-mode-map)) + (setq mode-name "HTML") + (setq major-mode 'html-mode) + (setq local-abbrev-table html-mode-abbrev-table) + (set-syntax-table html-mode-syntax-table) + (run-hooks 'html-mode-hook) + (and html-use-font-lock + (html-fontify))) + +;;; ------------------------------- our hooks -------------------------------- + +(defun html-html-mode-hook () + "Hook called from html-mode-hook. +Run htlm-quotify-hrefs if html-quotify-hrefs-on-find is non-nil." + ;; Quotify existing HREF's if html-quotify-hrefs-on-find is non-nil. + (and html-quotify-hrefs-on-find (html-quotify-hrefs))) + +;;; ------------------------------- hook setup ------------------------------- + +;; Author: Daniel LaLiberte (liberte@cs.uiuc.edu). +(defun html-postpend-unique-hook (hook-var hook-function) + "Postpend HOOK-VAR with HOOK-FUNCTION, if it is not already an element. +hook-var's value may be a single function or a list of functions." + (if (boundp hook-var) + (let ((value (symbol-value hook-var))) + (if (and (listp value) (not (eq (car value) 'lambda))) + (and (not (memq hook-function value)) + (set hook-var (append value (list hook-function)))) + (and (not (eq hook-function value)) + (set hook-var (append value (list hook-function)))))) + (set hook-var (list hook-function)))) + +(html-postpend-unique-hook 'html-mode-hook 'html-html-mode-hook) + +;;; -------------------------- xemacs menubar setup --------------------------- + +(if (or html-running-xemacs html-running-emacs-19) + (progn + (defvar html-menu + '("HTML Mode" + ["Open Address" html-add-address t] + ["Open Blockquote" html-add-blockquote t] + ["Open Header" html-add-header t] + ["Open Hyperlink" html-add-normal-link t] + ["Open Listing" html-add-listing t] + ["Open Plaintext" html-add-plaintext t] + ["Open Preformatted" html-add-preformatted t] + ["Open Reference" html-add-normal-reference t] + ["Open Title" html-add-title t] + "----" + ["Open Bold" html-add-bold t] + ["Open Citation" html-add-citation t] + ["Open Code" html-add-code t] + ["Open Emphasized" html-add-emphasized t] + ["Open Fixed" html-add-fixed t] + ["Open Keyboard" html-add-keyboard t] + ["Open Sample" html-add-sample t] + ["Open Strong" html-add-strong t] + ["Open Variable" html-add-variable t] + "----" + ["Add Inlined Image" html-add-img t] + ["End Paragraph" html-add-paragraph-separator t] + ["Preview Document" html-preview-document t] + "----" + ("Definition List ..." + ["Open Definition List" html-add-description-list t] + ["Add Definition Entry" html-add-description-entry t] + ) + ("Other Lists ..." + ["Open Unnumbered List" html-add-list t] + ["Open Numbered List" html-add-numbered-list t] + ["Open Menu" html-add-menu t] + "----" + ["Add List Or Menu Item" html-add-list-or-menu-item t] + ) + ("Operations On Region ..." + ["Add Hyperlink To Region" html-add-normal-link-to-region t] + ["Add Reference To Region" html-add-reference-to-region t] + ) + ("Reserved Characters ..." + ["Less Than (<)" html-real-less-than t] + ["Greater Than (>)" html-real-greater-than t] + ["Ampersand (&)" html-real-ampersand t] + ) + ) + ) + +; (defun html-menu (e) +; (interactive "e") +; (mouse-set-point e) +; (beginning-of-line) +; (popup-menu html-menu)) + +; (define-key html-mode-map 'button3 'html-menu) + +; (defun html-install-menubar () +; (if (and current-menubar (not (assoc "HTML" current-menubar))) +; (progn +; (set-buffer-menubar (copy-sequence current-menubar)) +; (add-menu nil "HTML" (cdr html-menu))))) +; (html-postpend-unique-hook 'html-mode-hook 'html-install-menubar) + + (defvar html-font-lock-keywords + (list + '("\\(<[^>]*>\\)+" . font-lock-comment-face) + '("[Hh][Rr][Ee][Ff]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t) + '("[Ss][Rr][Cc]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t)) + "Patterns to highlight in HTML buffers.") + + (defun html-fontify () + (font-lock-mode 1) + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords html-font-lock-keywords) +; The following line was needed in older versions of font-lock.el +; (font-lock-hack-keywords (point-min) (point-max)) + (message "Hey boss, we been through html-fontify.")) + ) + ) + +;;; ------------------------------ final setup ------------------------------- + +(or (rassq 'html-mode auto-mode-alist) ;jwz + (setq auto-mode-alist (cons '("\\.html\\'" . html-mode) auto-mode-alist))) + +(provide 'html-mode)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/ilisp/clisp.lisp Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,657 @@ +;;; -*- Mode: Lisp -*- + +;;; clisp.lisp -- + +;;; This file is part of ILISP. +;;; Version: 5.7 +;;; +;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell +;;; 1993, 1994 Ivan Vasquez +;;; 1994, 1995 Marco Antoniotti and Rick Busdiecker +;;; +;;; Other authors' names for which this Copyright notice also holds +;;; may appear later in this file. +;;; +;;; Send mail to 'ilisp-request@lehman.com' to be included in the +;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP +;;; mailing list were bugs and improvements are discussed. +;;; +;;; ILISP is freely redistributable under the terms found in the file +;;; COPYING. + + + +;;; Common Lisp initializations +;;; Author: Chris McConnell, ccm@cs.cmu.edu + +;;; +;;; ange-ftp hack added by ivan Wed Mar 10 12:30:15 1993 +;;; ilisp-errors *gc-verbose* addition ivan Tue Mar 16 03:21:51 1993 +;;; +;;; Rcs_Info: clisp.lisp,v 1.26 1993/09/03 02:05:07 ivan Rel $ +;;; +;;; Revision 1.19 1993/08/24 22:01:52 ivan +;;; Use defpackage instead of just IN-PACKAGE. +;;; Renamed FUNCTION to FUN in ilisp-arglist to get around CMUCL 17b bug. +;;; +;;; Revision 1.16 1993/06/29 05:51:35 ivan +;;; Added Ed Gamble's #'readtable-case fix and Hans Chalupsky's +;;; allegro-4.1 addition. +;;; +;;; Revision 1.8 1993/06/28 00:57:42 ivan +;;; Stopped using 'COMPILED-FUNCTION-P for compiled check. +;;; +;;; Revision 1.3 1993/03/16 23:22:10 ivan +;;; Added breakp arg to ilisp-trace. +;;; +;;; + + +#+(or allegro-v4.0 allegro-v4.1) +(eval-when (compile load eval) + (setq excl:*cltl1-in-package-compatibility-p* t)) + + +;;; The following is really a kludge! The defpackage should be in a +;;; separate file, but it looks like it is really hard to change ILISP +;;; behavior on the subject. +;;; Marco Antoniotti 11/22/94 + +;;; I am commenting it out to see whether I can actually load the +;;; package file with the kludge in the definition of the dialect. +;;; +;;; Result: it works! This will disappear in the next release. + +#| +(eval-when (compile load eval) + (defpackage "ILISP" (:use "LISP" #+:CMU "CONDITIONS") + (:export "ILISP-ERRORS" + "ILISP-SAVE" + "ILISP-RESTORE" + "ILISP-SYMBOL-NAME" + "ILISP-FIND-SYMBOL" + "ILISP-FIND-PACKAGE" + "ILISP-EVAL" + "ILISP-COMPILE" + "ILISP-DESCRIBE" + "ILISP-INSPECT" + "ILISP-ARGLIST" + "ILISP-DOCUMENTATION" + "ILISP-MACROEXPAND" + "ILISP-MACROEXPAND-1" + "ILISP-TRACE" + "ILISP-UNTRACE" + "ILISP-COMPILE-FILE" + "ILISP-CASIFY" + "ILISP-MATCHING-SYMBOLS") + )) +|# + + +(in-package "ILISP") + +;;; +;;; GCL 2.2 doesn't have defpackage (yet) so we need to put the export +;;; here. (toy@rtp.ericsson.se) + +#+gcl +(export '(ilisp-errors + ilisp-save + ilisp-restore + ilisp-symbol-name + ilisp-find-symbol + ilisp-find-package + ilisp-eval + ilisp-compile + ilisp-describe + ilisp-inspect + ilisp-arglist + ilisp-documentation + ilisp-macroexpand + ilisp-macroexpand-1 + ilisp-trace + ilisp-untrace + ilisp-compile-file + ilisp-casify + ilisp-matching-symbols)) + + +;;; +(defvar *ilisp-old-result* nil "Used for save/restore of top level values.") + +#+:ANSI-CL +(defun special-form-p (symbol) + "Backward compatibility for non ANSI CL's." + (special-operator-p symbol)) + +;;; +(defmacro ilisp-handler-case (expression &rest handlers) + "Evaluate EXPRESSION using HANDLERS to handle errors." + handlers + (if (macro-function 'handler-case) + `(handler-case ,expression ,@handlers) + #+allegro `(excl::handler-case ,expression ,@handlers) + #+lucid `(lucid::handler-case ,expression ,@handlers) + #-(or allegro lucid) expression)) + +;;; +(defun ilisp-readtable-case (readtable) + (if (fboundp 'readtable-case) + (funcall #'readtable-case readtable) + #+allegro (case excl:*current-case-mode* + (:case-insensitive-upper :upcase) + (:case-insensitive-lower :downcase) + (otherwise :preserve)) + #-allegro :upcase)) + +;;; +(defmacro ilisp-errors (form) + "Handle errors when evaluating FORM." + `(let ((*standard-output* *terminal-io*) + (*error-output* *terminal-io*) + #+cmu + (ext:*gc-verbose* nil) ; cmulisp outputs "[GC ...]" which + ; doesn't read well... + #+ecl + (sys:*gc-verbose* nil) ; ecolisp also outputs "[GC ...]" + ) + (princ " ") ;Make sure we have output + (ilisp-handler-case + ,form + (error (error) + (with-output-to-string (string) + (format string "ILISP: ~A" error)))))) + + +;;; +(defun ilisp-save () + "Save the current state of the result history." + (declare (special / // /// + ++ +++)) + (unless *ilisp-old-result* + (setq *ilisp-old-result* (list /// // +++ ++ + /)))) + +;;; +(defun ilisp-restore () + "Restore the old result history." + (declare (special / // /// + ++ +++ * ** -)) + (setq // (pop *ilisp-old-result*) + ** (first //) + / (pop *ilisp-old-result*) + * (first /) + ++ (pop *ilisp-old-result*) + + (pop *ilisp-old-result*) + - (pop *ilisp-old-result*)) + (values-list (pop *ilisp-old-result*))) + +;;; ilisp-symbol-name -- +;;; +;;; ':capitalize' case added under suggestion by Rich Mallory. +(defun ilisp-symbol-name (symbol-name) + "Return SYMBOL-NAME with the appropriate case as a symbol." + (case (ilisp-readtable-case *readtable*) + (:upcase (string-upcase symbol-name)) + (:downcase (string-downcase symbol-name)) + (:capitalize (string-capitalize symbol-name)) + (:preserve symbol-name))) + +;;; +(defun ilisp-find-package (package-name) + "Return package PACKAGE-NAME or the current package." + (if (string-equal package-name "nil") + *package* + (or (find-package (ilisp-symbol-name package-name)) + (error "Package ~A not found" package-name)))) + +;;; +(defun ilisp-find-symbol (symbol-name package-name) + "Return the symbol associated with SYMBOL-NAME in PACKAGE-NAME trying to +handle case issues intelligently." + (find-symbol (ilisp-symbol-name symbol-name) + (ilisp-find-package package-name))) + + +;;; The following two functions were in version 5.5. +;;; They disappeared in version 5.6. I am putting them back in the +;;; distribution in order to make use of them later if the need +;;; arises. +;;; Marco Antoniotti: Jan 2 1995 +#| +(defun ilisp-filename-hack (filename) + "Strip `/user@machine:' prefix from filename." + ;; Ivan's hack for getting away with dumb /ivan@bu-conx:/foo/bar/baz + ;; filenames... + (let ((at-location (position #\@ filename)) + (colon-location (position #\: filename))) + (if (and at-location colon-location) + (subseq filename (1+ colon-location)) + filename))) + + +(defun ilisp-read-form (form package) + "Read string FORM in PACKAGE and return the resulting form." + (let ((*package* (ilisp-find-package package))) + (read-from-string form))) +|# + +;;; +(defun ilisp-eval (form package filename) + "Evaluate FORM in PACKAGE recording FILENAME as the source file." + (princ " ") + ;; Ivan's hack for getting away with dumb /ivan@bu-conx:/foo/bar/baz + ;; filenames... + (let* ((at-location (position #\@ filename)) + (colon-location (position #\: filename)) + (filename + (if (and at-location colon-location) + (subseq filename (1+ colon-location)) + filename)) + (*package* (ilisp-find-package package)) + #+allegro (excl::*source-pathname* filename) + #+allegro (excl::*redefinition-warnings* nil) + #+lucid (lucid::*source-pathname* + (if (probe-file filename) + (truename filename) + (merge-pathnames filename))) + #+lucid (lucid::*redefinition-action* nil) + #+lispworks (compiler::*input-pathname* (merge-pathnames filename)) + #+lispworks (compiler::*warn-on-non-top-level-defun* nil) + ;; The LW entries are a mix of Rich Mallory and Jason + ;; Trenouth suggestions + ;; Marco Antoniotti: Jan 2 1995. + ) + filename + (eval (read-from-string form)))) + +;;; +(defun ilisp-compile (form package filename) + "Compile FORM in PACKAGE recording FILENAME as the source file." + (princ " ") + ;; This makes sure that function forms are compiled + ;; NOTE: Rich Mallory proposed a variation of the next piece of + ;; code. for the time being we stick to the following simpler code. + ;; Marco Antoniotti: Jan 2 1995. + #-lucid + (ilisp-eval + (format nil "(funcall (compile nil '(lisp:lambda () ~A)))" + form) + package + filename) + + ;; The following piece of conditional code is left in the + ;; distribution just for historical purposes. + ;; It will disappear in the next release. + ;; Marco Antoniotti: Jan 2 1995. + #+lucid-ilisp-5.6 + (labels ((compiler (form env) + (if (and (consp form) + (eq (first form) 'function) + (consp (second form))) + #-LCL3.0 + (evalhook `(compile nil ,form) nil nil env) + #+LCL3.0 + ;; If we have just compiled a named-lambda, and the + ;; name didn't make it in to the procedure object, + ;; then stuff the appropriate symbol in to the + ;; procedure object. + (let* ((proc (evalhook `(compile nil ,form) + nil nil env)) + (old-name (and proc (sys:procedure-ref proc 1))) + (lambda (second form)) + (name (and (eq (first lambda) + 'lucid::named-lambda) + (second lambda)))) + (when (or (null old-name) + (and (listp old-name) + (eq :internal (car old-name)))) + (setf (sys:procedure-ref proc 1) name)) + proc) + (evalhook form #'compiler nil env)))) + (let ((*evalhook* #'compiler)) + (ilisp-eval form package filename))) + #+lucid + ;; Following form is a patch provided by Christopher Hoover + ;; <ch@lks.csi.com> + (let ((*package* (ilisp-find-package package)) + (lcl:*source-pathname* (if (probe-file filename) + (truename filename) + (merge-pathnames filename))) + (lcl:*redefinition-action* nil)) + (with-input-from-string (s form) + (lucid::compile-in-core-from-stream s) + (values))) + ) + +;;; +(defun ilisp-describe (sexp package) + "Describe SEXP in PACKAGE." + (ilisp-errors + (let ((*package* (ilisp-find-package package))) + (describe (eval (read-from-string sexp)))))) + +;;; +(defun ilisp-inspect (sexp package) + "Inspect SEXP in PACKAGE." + (ilisp-errors + (let ((*package* (ilisp-find-package package))) + (inspect (eval (read-from-string sexp)))))) + +;;; +(defun ilisp-arglist (symbol package) + (ilisp-errors + (let ((fn (ilisp-find-symbol symbol package)) + (*print-length* nil) + (*print-pretty* t) + (*package* (ilisp-find-package package))) + (cond ((null fn) + (format t "Symbol ~s not present in ~s." symbol package)) + ((not (fboundp fn)) + (format t "~s: undefined~%" fn)) + (t + (print-function-arglist fn))))) + (values)) + + +(defun print-function-arglist (fn) + "Pretty arglist printer" + (let* ((a (get-function-arglist fn)) + (arglist (ldiff a (member '&aux a))) + (desc (ilisp-function-short-description fn))) + (format t "~&~s~a" fn (or desc "")) + (write-string ": ") + (if arglist + (write arglist :case :downcase :escape nil) + (write-string "()")) + (terpri))) + + + +(defun ilisp-generic-function-p (symbol) + (let ((generic-p + (find-symbol "GENERIC-FUNCTION-P" + (or (find-package "PCL") + *package*)))) + (and generic-p + (fboundp generic-p) + (funcall generic-p symbol)))) + + + +(defun ilisp-function-short-description (symbol) + (cond ((macro-function symbol) + " (Macro)") + ((special-form-p symbol) + " (Special Form)") + ((ilisp-generic-function-p symbol) + " (Generic)"))) + + + +(defun get-function-arglist (symbol) + (let ((fun (symbol-function symbol))) + (cond ((ilisp-generic-function-p symbol) + (funcall + (find-symbol "GENERIC-FUNCTION-PRETTY-ARGLIST" + (or (find-package "PCL") *package*)) + fun)) + (t + #+allegro + (excl::arglist symbol) + + #+(or ibcl kcl ecl gcl) + (help symbol) + + #+lucid + (lucid::arglist symbol) + + #+lispworks + (system::function-lambda-list symbol) + + #-(or allegro lucid kcl ibcl ecl) + (documentation symbol 'function))))) + +;;; +(defun ilisp-documentation (symbol package type) + "Return the TYPE documentation for SYMBOL in PACKAGE. If TYPE is +\(qualifiers* (class ...)), the appropriate method will be found." + (ilisp-errors + (let* ((real-symbol (ilisp-find-symbol symbol package)) + (type (if (and (not (zerop (length type))) + (eq (elt type 0) #\()) + (let ((*package* (ilisp-find-package package))) + (read-from-string type)) + (ilisp-find-symbol type package)))) + (when (listp type) + (setq real-symbol + (funcall + (find-symbol "FIND-METHOD" (or (find-package "CLOS") + (find-package "PCL") + *package*)) + (symbol-function real-symbol) + (reverse + (let ((quals nil)) + (dolist (entry type quals) + (if (listp entry) + (return quals) + (setq quals (cons entry quals)))))) + (reverse + (let ((types nil)) + (dolist (class (first (last type)) types) + (setq types + (cons (funcall + (find-symbol "FIND-CLASS" + (or (find-package "CLOS") + (find-package "PCL") + *package*)) + class) types)))))))) + (if real-symbol + (if (symbolp real-symbol) + (documentation real-symbol type) + ;; Prevent compiler complaints + (eval `(documentation ,real-symbol))) + (format nil "~A has no ~A documentation" symbol type))))) + +;;; +(defun ilisp-macroexpand (expression package) + "Macroexpand EXPRESSION as long as the top level function is still a +macro." + (ilisp-errors + (let ((*print-length* nil) + (*print-level* nil) + (*package* (ilisp-find-package package))) + (pprint (#-allegro macroexpand #+allegro excl::walk + (read-from-string expression)))))) + +;;; +(defun ilisp-macroexpand-1 (expression package) + "Macroexpand EXPRESSION once." + (ilisp-errors + (let ((*print-length* nil) + (*print-level* nil) + (*package* (ilisp-find-package package))) + (pprint (macroexpand-1 (read-from-string expression)))))) + +;;; +#-lispworks +(defun ilisp-trace (symbol package breakp) + "Trace SYMBOL in PACKAGE." + (declare (ignore breakp)) ; No way to do this in CL. + (ilisp-errors + (let ((real-symbol (ilisp-find-symbol symbol package))) + (when real-symbol (eval `(trace ,real-symbol)))))) + +;;; Jason Trenouth: SEP 6 94 -- LispWorks can trace-break +#+lispworks +(defun ilisp-trace (symbol package breakp) + "Trace SYMBOL in PACKAGE." + (ilisp-errors + (let ((real-symbol (ilisp-find-symbol symbol package))) + breakp ;; idiom for (declare (ignorable breakp)) + (when real-symbol (eval `(trace (,real-symbol :break breakp))))))) + + + +(defun ilisp-untrace (symbol package) + "Untrace SYMBOL in PACKAGE." + (ilisp-errors + (let ((real-symbol (ilisp-find-symbol symbol package))) + (when real-symbol (eval `(untrace ,real-symbol)))))) + +;;; +(defun ilisp-compile-file (file extension) + "Compile FILE putting the result in FILE+EXTENSION." + (ilisp-errors + (compile-file file + :output-file + (merge-pathnames (make-pathname :type extension) file)))) + +;;; +(defun ilisp-casify (pattern string lower-p upper-p) + "Return STRING with its characters converted to the case of PATTERN, +continuing with the last case beyond the end." + (cond (lower-p (string-downcase string)) + (upper-p (string-upcase string)) + (t + (let (case) + (concatenate + 'string + (map 'string + #'(lambda (p s) + (setq case (if (upper-case-p p) + #'char-upcase + #'char-downcase)) + (funcall case s)) + pattern string) + (map 'string case (subseq string (length pattern)))))))) + +;;; +(defun ilisp-words (string) + "Return STRING broken up into words. Each word is (start end +delimiter)." + (do* ((length (length string)) + (start 0) + (end t) + (words nil)) + ((null end) (nreverse words)) + (if (setq end (position-if-not #'alphanumericp string :start start)) + (setq words (cons (list end (1+ end) t) + (if (= start end) + words + (cons (list start end nil) words))) + start (1+ end)) + (setq words (cons (list start length nil) words))))) + +;;; +(defun ilisp-match-words (string pattern words) + "Match STRING to PATTERN using WORDS." + (do* ((strlen (length string)) + (words words (cdr words)) + (word (first words) (first words)) + (start1 (first word) (first word)) + (end1 (second word) (second word)) + (delimiter (third word) (third word)) + (len (- end1 start1) (and word (- end1 start1))) + (start2 0) + (end2 len)) + ((or (null word) (null start2)) start2) + (setq end2 (+ start2 len) + start2 + (if delimiter + (position (elt pattern start1) string :start start2) + (when (and (<= end2 strlen) + (string= pattern string + :start1 start1 :end1 end1 + :start2 start2 :end2 end2)) + (1- end2)))) + (when start2 (incf start2)))) + +;;; +(defun ilisp-matching-symbols (string package &optional (function-p nil) + (external-p nil) + (prefix-p nil)) + "Return a list of the symbols that have STRING as a prefix in +PACKAGE. FUNCTION-P indicates that only symbols with a function value +should be considered. EXTERNAL-P indicates that only external symbols +should be considered. PREFIX-P means that partial matches should not +be considered. The returned strings have the same case as the +original string." + (ilisp-errors + (let* ((lower-p (notany #'upper-case-p string)) + (upper-p (notany #'lower-case-p string)) + (no-casify (eq (ilisp-readtable-case *readtable*) :preserve)) + (symbol-string (ilisp-symbol-name string)) + (length (length string)) + (results nil) + (*print-length* nil) + (*package* (ilisp-find-package package))) + (labels + ( + ;; Check SYMBOL against PATTERN + (check-symbol (symbol pattern) + (let ((name (symbol-name symbol))) + (when (and (or (not function-p) (fboundp symbol)) + (>= (length name) length) + (string= pattern name :end2 length)) + (push (list (if no-casify + name + (ilisp-casify pattern name lower-p upper-p))) + results)))) + ;; Check SYMBOL against PATTERN using WORDS + (check-symbol2 (symbol pattern words) + (let ((name (symbol-name symbol))) + (when (and (or (not function-p) (fboundp symbol)) + (ilisp-match-words name pattern words)) + (push (list (if no-casify + name + (ilisp-casify pattern name lower-p upper-p))) + results))))) + (if external-p + (do-external-symbols (symbol *package*) + (check-symbol symbol symbol-string)) + (progn + ;; KCL does not go over used symbols. + #+(or kcl ibcl ecl) + (dolist (used-package (package-use-list *package*)) + (do-external-symbols (symbol used-package) + (check-symbol symbol symbol-string))) + (do-symbols (symbol *package*) + (check-symbol symbol symbol-string)))) + (unless (or results prefix-p) + (let ((words (ilisp-words symbol-string))) + (if external-p + (do-external-symbols (symbol *package*) + (check-symbol2 symbol symbol-string words)) + (progn + ;; KCL does not go over used symbols. + #+(or kcl ibcl ecl) + (dolist (used-package (package-use-list *package*)) + (do-external-symbols (symbol used-package) + (check-symbol2 symbol symbol-string words))) + (do-symbols (symbol *package*) + (check-symbol2 symbol symbol-string words)))))) + (prin1 results) + nil)))) + + +;;; Make sure that functions are exported +;;; Now this could go away. I just leave commented it for backup reasons. + +#| +(dolist (symbol '(ilisp-errors ilisp-save ilisp-restore + ilisp-symbol-name ilisp-find-symbol ilisp-find-package + ilisp-eval ilisp-compile + ilisp-describe ilisp-inspect + ilisp-arglist ilisp-documentation + ilisp-macroexpand ilisp-macroexpand-1 + ilisp-trace ilisp-untrace + ilisp-compile-file ilisp-casify + ilisp-matching-symbols)) + (export symbol)) +|# + + +(when + #+cmu (eval:interpreted-function-p #'ilisp-matching-symbols) + #-cmu (not (compiled-function-p #'ilisp-matching-symbols)) + (format t "\"ILISP: File is not compiled, use M-x ilisp-compile-inits\"")) + +;;; end of file -- clisp.lisp --
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/ilisp/completer.lcd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,2 @@ +completer|Chris McConnell|ccm@cs.cmu.edu|Partial completion for commands +and pathname components.|92-03-17|3.03|katmandu.mt.cs.cmu.edu:/pub/ilisp/completer.el
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/ilisp/ilisp.lcd Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,4 @@ +;;; LCD Archive Entry: +;;; ilisp|Chris McConnell| ilisp-request@lehman.com| +;;; Fancy LISP interface that supports multiple dialects.| +;;; 94-12-??|Version 5.7|ftp.cs.cmu.edu:/user/ai/lang/lisp/util/emacs/ilisp/v57/ilisp.tgz|
--- a/lisp/mel/mel-b.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mel/mel-b.el Mon Aug 13 08:47:35 2007 +0200 @@ -10,7 +10,7 @@ ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;;; Created: 1995/6/24 ;;; Version: -;;; $Id: mel-b.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;;; $Id: mel-b.el,v 1.2 1996/12/22 00:29:15 steve Exp $ ;;; Keywords: MIME, Base64 ;;; ;;; This file is part of MEL (MIME Encoding Library).
--- a/lisp/mel/mel-g.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mel/mel-g.el Mon Aug 13 08:47:35 2007 +0200 @@ -9,7 +9,7 @@ ;;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> ;;; Created: 1995/10/25 ;;; Version: -;;; $Id: mel-g.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;;; $Id: mel-g.el,v 1.2 1996/12/22 00:29:15 steve Exp $ ;;; Keywords: MIME, base64, gzip ;;; ;;; This file is not part of MEL (MIME Encoding Library) yet.
--- a/lisp/mel/mel-q.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mel/mel-q.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1995/6/25 -;; Version: $Id: mel-q.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;; Version: $Id: mel-q.el,v 1.2 1996/12/22 00:29:16 steve Exp $ ;; Keywords: MIME, Quoted-Printable, Q-encoding ;; This file is part of MEL (MIME Encoding Library).
--- a/lisp/mel/mel-u.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mel/mel-u.el Mon Aug 13 08:47:35 2007 +0200 @@ -8,7 +8,7 @@ ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;;; Created: 1995/10/25 ;;; Version: -;;; $Id: mel-u.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;;; $Id: mel-u.el,v 1.2 1996/12/22 00:29:16 steve Exp $ ;;; Keywords: uuencode ;;; ;;; This file is part of MEL (MIME Encoding Library).
--- a/lisp/mel/mel.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mel/mel.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; modified by Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> ;; Created: 1995/6/25 -;; Version: $Id: mel.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;; Version: $Id: mel.el,v 1.2 1996/12/22 00:29:16 steve Exp $ ;; Keywords: MIME, Base64, Quoted-Printable, uuencode, gzip64 ;; This file is part of MEL (MIME Encoding Library).
--- a/lisp/modes/outl-mouse.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/modes/outl-mouse.el Mon Aug 13 08:47:35 2007 +0200 @@ -263,9 +263,10 @@ '("Outline Commands" ["Hide all" hide-body t] ["Hide all subtrees" hide-subtrees-same-level t] + ["Hide subtree" hide-subtree t] +; ["Hide body" hide-body t] "---" - ["Hide subtree" hide-subtree t] - ["Hide body" hide-body t] + ["Show all" show-all t] ["Show subtree" show-subtree t] ["Show body" show-entry t] "---"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/mu/latex-math-symbol.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,94 @@ +;;; latex-math-symbol.el --- LaTeX math symbol decoder + +;; Copyright (C) 1996 MORIOKA Tomohiko + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; Created: 1996/7/1 +;; Version: +;; $Id: latex-math-symbol.el,v 1.1 1996/12/22 00:35:05 steve Exp $ +;; Keywords: LaTeX, math, mule + +;; This file is part of MU (Message Utilities). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; - How to install +;; bytecompile this file and copy it to the apropriate directory. +;; - How to use +;; If you use tm, please put following to your ~/.emacs: +;; (autoload 'latex-math-decode-buffer "latex-math-symbol" nil t) +;; (add-hook 'mime-viewer/plain-text-preview-hook +;; 'latex-math-decode-buffer) +;; Of course, it may be available for other hooks to filter messages. + +;;; Code: + +(defvar latex-math-symbol-table-alist + '(("\\pi" . "$B&P(B") + + ("\\{" . "$B!P(B")("\\}" . "$B!Q(B") + + ("\\cdot" . "$B!&(B") + ("\\times" . "$B!_(B") + ("\\cap" . "$B"A(B")("\\cup" . "$B"@(B") + + ("\\leq" . "$(C!B(B")("\\geq" . "$(C!C(B") + ("\\le" . "$(C!B(B")("\\ge" . "$(C!C(B") + ("\\subseteq" . "$B"<(B")("\\supseteq" . "$B"=(B") + ("\\subset" . "$B">(B")("\\supset" . "$B"?(B") + ("\\in" . "$B":(B")("\\ni" . "$B";(B") + ("\\mid" . "$B!C(B") + ("\\neq" . "$B!b(B")("\\ne" . "$B!b(B") + + ("\\forall" . "$B"O(B") + + ("\\leftarrow" . "$B"+(B")("\\rightarrow" . "$B"*(B") + ("\\gets" . "$B"+(B")("\\to" . "$B"*(B") + + ("^1" . ",A9(B") + ("^2" . ",A2(B") + ("^3" . ",A3(B") + )) + +(defun latex-math-decode-region (beg end) + (interactive "r") + (save-restriction + (narrow-to-region beg end) + (let ((rest latex-math-symbol-table-alist) + cell) + (while rest + (setq cell (car rest)) + (goto-char beg) + (while (search-forward (car cell) nil t) + (replace-match (cdr cell)) + ) + (setq rest (cdr rest)) + )))) + +(defun latex-math-decode-buffer () + (interactive) + (latex-math-decode-region (point-min)(point-max)) + ) + + +;;; @ end +;;; + +(provide 'latex-math-symbol) + +;;; latex-math-symbol.el ends here
--- a/lisp/mu/mu-bbdb.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mu/mu-bbdb.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 Shuhei KOBAYASHI ;; Author: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> -;; Version: $Id: mu-bbdb.el,v 1.1.1.1 1996/12/18 03:55:30 steve Exp $ +;; Version: $Id: mu-bbdb.el,v 1.2 1996/12/22 00:29:20 steve Exp $ ;; This file is part of tl (Tiny Library). @@ -38,14 +38,8 @@ ;;; Code: (require 'mu-cite) -(if (not (fboundp 'eval-when)) - (require 'bbdb) - (eval-when (compile) - (ignore-errors - (require 'bbdb))) - (eval-when (load eval) +(if (module-installed-p 'bbdb) (require 'bbdb)) - ) (defvar mu-bbdb-load-hook nil "*List of functions called after mu-bbdb is loaded.") @@ -68,9 +62,9 @@ (defun mu-cite/set-bbdb-attr (attr addr) "Add attribute information to BBDB." (let* ((bbdb-notice-hook nil) - (record (bbdb-annotate-message-sender + (record (bbdb-annotate-message-sender addr t - (bbdb-invoke-hook-for-value + (bbdb-invoke-hook-for-value bbdb/mail-auto-create-p) t))) (if record
--- a/lisp/mu/mu-cite.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mu/mu-cite.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; MINOURA Makoto <minoura@netlaputa.or.jp> ;; Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> ;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: mail, news, citation ;; This file is part of tl (Tiny Library). @@ -54,7 +54,7 @@ ;;; (defconst mu-cite/RCS-ID - "$Id: mu-cite.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: mu-cite.el,v 1.2 1996/12/22 00:29:20 steve Exp $") (defconst mu-cite/version (get-version-string mu-cite/RCS-ID))
--- a/lisp/mu/std11-parse.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mu/std11-parse.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Keywords: mail, news, RFC 822, STD 11 ;; Version: -;; $Id: std11-parse.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: std11-parse.el,v 1.2 1996/12/22 00:29:20 steve Exp $ ;; This file is part of MU (Message Utilities).
--- a/lisp/mu/std11.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mu/std11.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: std11.el,v 1.2 1996/12/22 00:29:20 steve Exp $ ;; This file is part of MU (Message Utilities). @@ -200,37 +200,48 @@ ;;; @ quoted-string ;;; +(defun std11-wrap-as-quoted-pairs (string specials) + (let (dest + (i 0) + (b 0) + (len (length string)) + ) + (while (< i len) + (let ((chr (aref string i))) + (if (memq chr specials) + (setq dest (concat dest (substring string b i) "\\") + b i) + )) + (setq i (1+ i)) + ) + (concat dest (substring string b)) + )) + (defconst std11-non-qtext-char-list '(?\" ?\\ ?\r ?\n)) (defun std11-wrap-as-quoted-string (string) "Wrap STRING as RFC 822 quoted-string. [std11.el]" (concat "\"" - (mapconcat (function - (lambda (chr) - (if (memq chr std11-non-qtext-char-list) - (concat "\\" (char-to-string chr)) - (char-to-string chr) - ) - )) string "") + (std11-wrap-as-quoted-pairs string std11-non-qtext-char-list) "\"")) -(defun std11-strip-quoted-pair (str) - (let ((dest "") +(defun std11-strip-quoted-pair (string) + "Strip quoted-pairs in STRING. [std11.el]" + (let (dest + (b 0) (i 0) - (len (length str)) - chr flag) + (len (length string)) + ) (while (< i len) - (setq chr (aref str i)) - (if (or flag (not (eq chr ?\\))) - (progn - (setq dest (concat dest (char-to-string chr))) - (setq flag nil) - ) - (setq flag t) - ) - (setq i (+ i 1)) - ) - dest)) + (let ((chr (aref string i))) + (if (eq chr ?\\) + (setq dest (concat dest (substring string b i)) + b (1+ i) + i (+ i 2)) + (setq i (1+ i)) + ))) + (concat dest (substring string b)) + )) (defun std11-strip-quoted-string (string) "Strip quoted-string STRING. [std11.el]" @@ -294,13 +305,28 @@ (comment (nth 2 address)) phrase) (if (eq (car addr) 'phrase-route-addr) - (setq phrase (mapconcat (function - (lambda (token) - (cdr token) - )) - (nth 1 addr) "")) + (setq phrase + (mapconcat + (function + (lambda (token) + (let ((type (car token))) + (cond ((eq type 'quoted-string) + (std11-strip-quoted-pair (cdr token)) + ) + ((eq type 'comment) + (concat + "(" + (std11-strip-quoted-pair (cdr token)) + ")") + ) + (t + (cdr token) + ))))) + (nth 1 addr) "")) ) - (or phrase comment) + (cond ((> (length phrase) 0) phrase) + (comment (std11-strip-quoted-pair comment)) + ) ))))
--- a/lisp/mu/tl-822.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/mu/tl-822.el Mon Aug 13 08:47:35 2007 +0200 @@ -30,7 +30,7 @@ (defconst rfc822/RCS-ID - "$Id: tl-822.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: tl-822.el,v 1.2 1996/12/22 00:29:21 steve Exp $") (defconst rfc822/version (get-version-string rfc822/RCS-ID))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/packages/jwz-man.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,529 @@ +;;; man.el --- browse UNIX manual pages +;; Keywords: help + +;; Copyright (C) 1985, 1993, 1994, 1996 Free Software Foundation, Inc. +;; +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;; This file defines "manual-entry", and the remaining definitions all +;; begin with "Manual-". This makes the autocompletion on "M-x man" work. +;; +;; Eviscerated 26-Jun-96 by Jamie Zawinski <jwz@netscape.com>. +;; All that stuff about looking at $MANPATH and building up lists of +;; directories was bullshit. Now we just invoke "man" and format the +;; output, end of story. +;; +;; [ older changelog entries removed, since they're all about code that +;; I've deleted. ] + +(defvar Manual-program "man" "\ +*Name of the program to invoke in order to format the source man pages.") + +(defvar Manual-buffer-view-mode t "\ +*Whether manual buffers should be placed in view-mode. +nil means leave the buffer in fundamental-mode in another window. +t means use `view-buffer' to display the man page in the current window. +Any other value means use `view-buffer-other-window'.") + +(defvar Manual-mode-hook nil + "Function or functions run on entry to Manual-mode.") + +(defvar Manual-page-history nil "\ +A list of names of previously visited man page buffers.") + + +;; New variables. + +(make-face 'man-italic) +(or (face-differs-from-default-p 'man-italic) + (copy-face 'italic 'man-italic)) +;; XEmacs (from Darrell Kindred): underlining is annoying due to +;; large blank spaces in this face. +;; (or (face-differs-from-default-p 'man-italic) +;; (set-face-underline-p 'man-italic t)) + +(make-face 'man-bold) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'bold 'man-bold)) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'man-italic 'man-bold)) + +(make-face 'man-heading) +(or (face-differs-from-default-p 'man-heading) + (copy-face 'man-bold 'man-heading)) + +(make-face 'man-xref) +(or (face-differs-from-default-p 'man-xref) + (set-face-underline-p 'man-xref t)) + +(defvar Manual-mode-map + (let ((m (make-sparse-keymap))) + (set-keymap-name m 'Manual-mode-map) + (define-key m "l" 'Manual-last-page) + (define-key m 'button2 'Manual-follow-xref) + (define-key m 'button3 'Manual-popup-menu) + m)) + +;;;###autoload +(defun manual-entry (topic &optional arg silent) + "Display the Unix manual entry (or entries) for TOPIC." + (interactive + (list (let* ((fmh "-A-Za-z0-9_.") + (default (save-excursion + (buffer-substring + (progn + (re-search-backward "\\sw" nil t) + (skip-chars-backward fmh) (point)) + (progn (skip-chars-forward fmh) (point))))) + (thing (read-string + (if (equal default "") "Manual entry: " + (concat "Manual entry: (default " default ") "))))) + (if (equal thing "") default thing)) + (prefix-numeric-value current-prefix-arg))) + ;;(interactive "sManual entry (topic): \np") + (or arg (setq arg 1)) + (let (section apropos-mode) + (let ((case-fold-search nil)) + (if (and (null section) + (string-match "\\`[ \t]*\\([^( \t]+\\)[ \t]*(\\(.+\\))[ \t]*\\'" + topic)) + (setq section (substring topic (match-beginning 2) + (match-end 2)) + topic (substring topic (match-beginning 1) + (match-end 1))) + (if (string-match "\\`[ \t]*-k[ \t]+\\([^ \t]+\\)\\'" topic) + (setq section "-k" + topic (substring topic (match-beginning 1)))))) + + ;; jwz: turn section "3x11" and "3n" into "3". + (if (and section (string-match "\\`\\([0-9]+\\)[^0-9]" section)) + (setq section (substring section 0 (match-end 1)))) + (if (equal section "-k") + (setq apropos-mode t)) + + (let ((bufname (cond (apropos-mode + (concat "*man apropos " topic "*")) + (t + (concat "*man " topic + (if section (concat "." section) "") + "*")))) + (temp-buffer-show-function + (cond ((eq 't Manual-buffer-view-mode) + 'view-buffer) + ((eq 'nil Manual-buffer-view-mode) + temp-buffer-show-function) + (t + 'view-buffer-other-window)))) + + (cond ((get-buffer bufname) + ;; reselect an old man page buffer if it exists already. + (save-excursion + (set-buffer (get-buffer bufname)) + (Manual-mode)) + (if temp-buffer-show-function + (funcall temp-buffer-show-function (get-buffer bufname)) + (display-buffer bufname))) + (t + (with-output-to-temp-buffer bufname + (buffer-disable-undo standard-output) + (save-excursion + (set-buffer standard-output) + (setq buffer-read-only nil) + (erase-buffer) + + (let ((args (list topic)) + args-string) + (if section + (setq args + (if (eq system-type 'usg-unix-v) + (cons "-s" (cons section args)) + (cons section args)))) + (setq args-string + (mapconcat 'identity (cons Manual-program args) " ")) + (if (string-match "\\`\\([^ \t/]*/\\)+" args-string) + (setq args-string + (substring args-string (match-end 0)))) + + (message "%s (running...)" args-string) + (apply 'call-process Manual-program nil t nil args) + + (if (< (buffer-size) 200) + (progn + (goto-char (point-min)) + (error (buffer-substring (point) + (progn (end-of-line) + (point)))))) + + (message "%s (cleaning...)" args-string) + (Manual-nuke-nroff-bs apropos-mode) + (message "%s (done.)" args-string) + ) + + (set-buffer-modified-p nil) + (Manual-mode) + )))) + (setq Manual-page-history + (cons (buffer-name) + (delete (buffer-name) Manual-page-history))))) + (message nil) + t) + +(defun Manual-mode () + (kill-all-local-variables) + (setq buffer-read-only t) + (use-local-map Manual-mode-map) + (setq major-mode 'Manual-mode + mode-name "Manual") + ;; man pages with long lines are buggy! + ;; This looks slightly better if they only + ;; overran by a couple of chars. + (setq truncate-lines t) + ;; turn off horizontal scrollbars in this buffer + (set-specifier scrollbar-height (cons (current-buffer) 0)) + (run-hooks 'Manual-mode-hook)) + +(defun Manual-last-page () + (interactive) + (while (or (not (get-buffer (car (or Manual-page-history + (error "No more history."))))) + (eq (get-buffer (car Manual-page-history)) (current-buffer))) + (setq Manual-page-history (cdr Manual-page-history))) + (switch-to-buffer (car Manual-page-history))) + + +(defmacro Manual-delete-char (n) + ;; in v19, delete-char is compiled as a function call, but delete-region + ;; is byte-coded, so it's much faster. (We were spending 40% of our time + ;; in delete-char alone.) + (list 'delete-region '(point) (list '+ '(point) n))) + +;; Hint: BS stands form more things than "back space" +(defun Manual-nuke-nroff-bs (&optional apropos-mode) + (interactive "*") + ;; + ;; turn underlining into italics + ;; + (goto-char (point-min)) + (while (search-forward "_\b" nil t) + ;; searching for underscore-backspace and then comparing the following + ;; chars until the sequence ends turns out to be much faster than searching + ;; for a regexp which matches the whole sequence. + (let ((s (match-beginning 0))) + (goto-char s) + (while (and (= (following-char) ?_) + (= (char-after (1+ (point))) ?\b)) + (Manual-delete-char 2) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-italic))) + ;; + ;; turn overstriking into bold + ;; + (goto-char (point-min)) + (while (re-search-forward "\\([^\n]\\)\\(\b\\1\\)" nil t) + ;; Surprisingly, searching for the above regexp is faster than searching + ;; for a backspace and then comparing the preceding and following chars, + ;; I presume because there are many false matches, meaning more funcalls + ;; to re-search-forward. + (let ((s (match-beginning 0))) + (goto-char s) + ;; Some systems (SGI) overstrike multiple times, eg, "M\bM\bM\bM". + (while (looking-at "\\([^\n]\\)\\(\b\\1\\)+") + (delete-region (+ (point) 1) (match-end 0)) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-bold))) + ;; + ;; hack bullets: o^H+ --> + + (goto-char (point-min)) + (while (search-forward "\b" nil t) + (Manual-delete-char -2)) + + (if (> (buffer-size) 100) ; minor kludge + (Manual-nuke-nroff-bs-footers)) + ;; + ;; turn subsection header lines into bold + ;; + (goto-char (point-min)) + (if apropos-mode + (while (re-search-forward "[a-zA-Z0-9] ([0-9]" nil t) + (forward-char -2) + (delete-backward-char 1)) + + ;; (while (re-search-forward "^[^ \t\n]" nil t) + ;; (set-extent-face (make-extent (match-beginning 0) + ;; (progn (end-of-line) (point))) + ;; 'man-heading)) + + ;; boldface the first line + (if (looking-at "[^ \t\n].*$") + (set-extent-face (make-extent (match-beginning 0) (match-end 0)) + 'man-bold)) + + ;; boldface subsequent title lines + ;; Regexp to match section headers changed to match a non-indented + ;; line preceded by a blank line and followed by an indented line. + ;; This seems to work ok for manual pages but gives better results + ;; with other nroff'd files + (while (re-search-forward "\n\n\\([^ \t\n].*\\)\n[ \t]+[^ \t\n]" nil t) + (goto-char (match-end 1)) + (set-extent-face (make-extent (match-beginning 1) (match-end 1)) + 'man-heading) + (forward-line 1)) + ) + + ;; Zap ESC7, ESC8, and ESC9 + ;; This is for Sun man pages like "man 1 csh" + (goto-char (point-min)) + (while (re-search-forward "\e[789]" nil t) + (replace-match "")) + + ;; Nuke blanks lines at start. + ;; (goto-char (point-min)) + ;; (skip-chars-forward "\n") + ;; (delete-region (point-min) (point)) + + (Manual-mouseify-xrefs) + ) + +(fset 'nuke-nroff-bs 'Manual-nuke-nroff-bs) ; use old name + + +(defun Manual-nuke-nroff-bs-footers () + ;; Nuke headers and footers. + ;; + ;; nroff assumes pages are 66 lines high. We assume that, and that the + ;; first and last line on each page is expendible. There is no way to + ;; tell the difference between a page break in the middle of a paragraph + ;; and a page break between paragraphs (the amount of extra whitespace + ;; that nroff inserts is the same in both cases) so this might strip out + ;; a blank line were one should remain. I think that's better than + ;; leaving in a blank line where there shouldn't be one. (Need I say + ;; it: FMH.) + ;; + ;; Note that if nroff spits out error messages, pages will be more than + ;; 66 lines high, and we'll lose badly. That's ok because standard + ;; nroff doesn't do any diagnostics, and the "gnroff" wrapper for groff + ;; turns off error messages for compatibility. (At least, it's supposed + ;; to.) + ;; + (goto-char (point-min)) + ;; first lose the status output + (let ((case-fold-search t)) + (if (and (not (looking-at "[^\n]*warning")) + (looking-at "Reformatting.*\n")) + (delete-region (match-beginning 0) (match-end 0)))) + + ;; kludge around a groff bug where it won't keep quiet about some + ;; warnings even with -Wall or -Ww. + (cond ((looking-at "grotty:") + (while (looking-at "grotty:") + (delete-region (point) (progn (forward-line 1) (point)))) + (if (looking-at " *done\n") + (delete-region (point) (match-end 0))))) + + (let ((pages '()) + p) + ;; collect the page boundary markers before we start deleting, to make + ;; it easier to strip things out without changing the page sizes. + (while (not (eobp)) + (forward-line 66) + (setq pages (cons (point-marker) pages))) + (setq pages (nreverse pages)) + (while pages + (goto-char (car pages)) + (set-marker (car pages) nil) + ;; + ;; The lines are: 3 blank; footer; 6 blank; header; 3 blank. + ;; We're in between the previous footer and the following header, + ;; + ;; First lose 3 blank lines, the header, and then 3 more. + ;; + (setq p (point)) + (skip-chars-forward "\n") + (delete-region p (point)) + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0))) + ;; + ;; Next lose the footer, and the 3 blank lines after, and before it. + ;; But don't lose the last footer of the manual entry; that contains + ;; the "last change" date, so it's not completely uninteresting. + ;; (Actually lose all blank lines before it; sh(1) needs this.) + ;; + (skip-chars-backward "\n") + (beginning-of-line) + (if (null (cdr pages)) + nil + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0)))) + (setq p (point)) + (skip-chars-backward "\n") + (if (> (- p (point)) 4) + (delete-region (+ 2 (point)) p) + (delete-region (1+ (point)) p)) +; (and (looking-at "\n\n?\n?") +; (delete-region (match-beginning 0) (match-end 0))) + + (setq pages (cdr pages))) + ;; + ;; Now nuke the extra blank lines at the beginning and end. + (goto-char (point-min)) + (if (looking-at "\n+") + (delete-region (match-beginning 0) (match-end 0))) + (forward-line 1) + (if (looking-at "\n\n+") + (delete-region (1+ (match-beginning 0)) (match-end 0))) + (goto-char (point-max)) + (skip-chars-backward "\n") + (delete-region (point) (point-max)) + (beginning-of-line) + (forward-char -1) + (setq p (point)) + (skip-chars-backward "\n") + (if (= ?\n (following-char)) (forward-char 1)) + (if (> (point) (1+ p)) + (delete-region (point) p)) + )) + +(defun Manual-mouseify-xrefs () + (goto-char (point-min)) + (forward-line 1) + (let ((case-fold-search nil) + s e name extent) + ;; possibly it would be faster to rewrite this expression to search for + ;; a less common sequence first (like "([0-9]") and then back up to see + ;; if it's really a match. This function is 15% of the total time, 13% + ;; of which is this call to re-search-forward. + (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.]*([0-9][a-zA-Z0-9]*)" + nil t) + (setq s (match-beginning 0) + e (match-end 0) + name (buffer-substring s e)) + (goto-char s) + (skip-chars-backward " \t") + (if (and (bolp) + (progn (backward-char 1) (= (preceding-char) ?-))) + (progn + (setq s (point)) + (skip-chars-backward "-a-zA-Z0-9_.") + (setq name (concat (buffer-substring (point) (1- s)) name)) + (setq s (point)))) + ;; if there are upper case letters in the section, downcase them. + (if (string-match "(.*[A-Z]+.*)$" name) + (setq name (concat (substring name 0 (match-beginning 0)) + (downcase (substring name (match-beginning 0)))))) + ;; (setq already-fontified (extent-at s)) + (setq extent (make-extent s e)) + (set-extent-property extent 'man (list 'Manual-follow-xref name)) + (set-extent-property extent 'highlight t) + ;; (if (not already-fontified)... + (set-extent-face extent 'man-xref) + (goto-char e)))) + +(defun Manual-follow-xref (&optional name-or-event) + "Invoke `manual-entry' on the cross-reference under the mouse. +When invoked noninteractively, the arg may be an xref string to parse instead." + (interactive "e") + (if (eventp name-or-event) + (let* ((p (event-point name-or-event)) + (extent (and p (extent-at p + (event-buffer name-or-event) + 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (eval data) + (error "no manual cross-reference there."))) + (or (manual-entry name-or-event) + ;; If that didn't work, maybe it's in a different section than the + ;; man page writer expected. For example, man pages tend assume + ;; that all user programs are in section 1, but X tends to generate + ;; makefiles that put things in section "n" instead... + (and (string-match "[ \t]*([^)]+)\\'" name-or-event) + (progn + (message "No entries found for %s; checking other sections..." + name-or-event) + (manual-entry + (substring name-or-event 0 (match-beginning 0)) + nil t)))))) + +(defun Manual-popup-menu (&optional event) + "Pops up a menu of cross-references in this manual page. +If there is a cross-reference under the mouse button which invoked this +command, it will be the first item on the menu. Otherwise, they are +on the menu in the order in which they appear in the buffer." + (interactive "e") + (let ((buffer (current-buffer)) + (sep "---") + (prefix "Show Manual Page for ") + xref items) + (cond (event + (setq buffer (event-buffer event)) + (let* ((p (event-point event)) + (extent (and p (extent-at p buffer 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (setq xref (nth 1 data)))))) + (if xref (setq items (list sep xref))) + (map-extents #'(lambda (extent ignore) + (let ((data (extent-property extent 'man))) + (if (and (eq (car-safe data) 'Manual-follow-xref) + (not (member (nth 1 data) items))) + (setq items (cons (nth 1 data) items))) + nil)) + buffer) + (if (eq sep (car items)) (setq items (cdr items))) + (let ((popup-menu-titles nil)) + (popup-menu + (cons "Manual Entry" + (mapcar #'(lambda (item) + (if (eq item sep) + item + (vector (concat prefix item) + (list 'Manual-follow-xref item) t))) + (nreverse items))))))) + +(defun pager-cleanup-hook () + "cleanup man page if called via $PAGER" + (let ((buf-name (or buffer-file-name (buffer-name)))) + (if (or (string-match "^/tmp/man[0-9]+" buf-name) + (string-match ".*/man/\\(man\\|cat\\)[1-9a-z]/" buf-name)) + (let (buffer manpage) + (require 'man) + (goto-char (point-min)) + (setq buffer-read-only nil) + (Manual-nuke-nroff-bs) + (goto-char (point-min)) + (if (re-search-forward "[^ \t]") + (goto-char (- (point) 1))) + (if (looking-at "\\([a-zA-Z0-9]+\\)[ \t]*(") + (setq manpage (buffer-substring (match-beginning 1) + (match-end 1))) + (setq manpage "???")) + (setq buffer + (rename-buffer + (generate-new-buffer-name (concat "*man " manpage "*")))) + (setq buffer-file-name nil) + (goto-char (point-min)) + (insert (format "%s\n" buf-name)) + (goto-char (point-min)) + (buffer-disable-undo buffer) + (set-buffer-modified-p nil) + (Manual-mode) + )))) + +(add-hook 'server-visit-hook 'pager-cleanup-hook) +(provide 'man) + +;;; man.el ends here
--- a/lisp/packages/man-xref.el Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -;;; man-xref.el --- cross reference selection functions for man mode - -;; Author: Mark Hood <hood@eng.sun.com> -;; @(#)man-xref.el 1.15 - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: FSF 19.35. - -;;; Commentary: - -;; This package is an add-on to the man.el that comes with Emacs -;; 19.34. It renders manpage cross references in bold, sets them up -;; for mouse highlighting, and allows selection via keystrokes or -;; mouse. All strings matching Man-reference-regexp in the text of -;; the man page are set up, in addition to the ones in the See Also -;; section. - -;; To use this package, put something like the following in your Emacs -;; initialization file. This example causes tab and M-tab to go to -;; the next and previous manual cross references, causes carriage -;; return to display a man page for the reference under point, and -;; allows mouse button 2 to invoke a man page display. - -;; (add-hook 'Man-mode-hook -;; '(lambda () -;; (Man-mouseify-xrefs) -;; (define-key Man-mode-map "\r" 'Man-do-manual-reference) -;; (define-key Man-mode-map "\t" 'Man-next-manual-reference) -;; (define-key Man-mode-map "\e\t" 'Man-prev-manual-reference) -;; (define-key Man-mode-map [mouse-2] 'Man-mouse-manual-reference) -;; )) -;; -;; (autoload 'Man-mouseify-xrefs "~/emacs/man-xref") - -(eval-when-compile (require 'cl)) - -(defvar Man-word-syntax "w_()" "Syntax for words in a man buffer.") - -(defun Man-current-word () - "Return word under point, using `Man-word-syntax' for word syntax." - (save-excursion - (let ((s (+ (point) (skip-syntax-backward Man-word-syntax)))) - (skip-syntax-forward Man-word-syntax) - (buffer-substring s (point))))) - -(defun Man-prev-word-hyphen-p () - "Return nil if previous word is not hyphenated. -Non-nil value is the buffer position of the beginning of the hyphenated word." - (save-excursion - (skip-syntax-backward Man-word-syntax) - (skip-chars-backward " \t") - (cond ((and (> (point) (1+ (point-min))) - (string-equal "-\n" (buffer-substring (- (point) 2) (point)))) - (backward-char) - (skip-syntax-backward Man-word-syntax) - (point))))) - -(defun Man-next-manual-reference () - "Move point to the beginning of the next manual reference." - (interactive) - (let ((current (point)) - (end (re-search-forward (concat "[ \t]" Man-reference-regexp) nil t)) - (start (or (Man-prev-word-hyphen-p) (1+ (match-beginning 0))))) - (cond ((eq end nil)) - ((> start current) - (goto-char start)) - ;; current is in the pre-hyphen portion of a hyphenated reference - ((re-search-forward Man-reference-regexp nil t) - (goto-char (or (Man-prev-word-hyphen-p) (match-beginning 0)))) - ((goto-char current))))) - -(defun Man-prev-manual-reference () - "Move point to the beginning of the previous manual reference." - (interactive) - (if (re-search-backward (concat "[ \t]" Man-reference-regexp) nil t) - (goto-char (or (Man-prev-word-hyphen-p) (1+ (match-beginning 0)))))) - -(defun Man-mouseify-xrefs () - "Render man cross references in bold font and set up mouse highlighting. -Add these cross references to `Man-refpages-alist'." - (let (start end xref hyphen alist) - (goto-char (point-min)) - (forward-line 1) - (while (re-search-forward Man-reference-regexp nil t) - (setq start (match-beginning 0)) - (setq end (match-end 0)) - (setq xref (buffer-substring start end)) - (cond ((setq hyphen (Man-prev-word-hyphen-p)) - (setq start hyphen) - (goto-char hyphen) - (setq xref (concat (substring (Man-current-word) 0 -1) xref)) - (goto-char end))) - (setq Man-refpages-alist (cons (list xref) Man-refpages-alist)) - (Man-boldify-mouse-region start end)) - (setq Man-refpages-alist - (sort Man-refpages-alist - (function (lambda (a b) (string< (car a) (car b)))))) - ;; delete duplicate entries in the alist - (setq alist Man-refpages-alist) - (while alist - (cond ((string= (car (car alist)) (car (car (cdr alist)))) - (setcdr alist (cdr (cdr alist)))) - ((setq alist (cdr alist))))) - (goto-char (point-min)) - (forward-line 1))) - -(defun Man-mouse-manual-reference (mouse) - "Move point to mouse position and run `Man-getpage-in-background' there." - (interactive "e") - (select-window (car (car (cdr mouse)))) - (goto-char (car (cdr (car (cdr mouse))))) - (Man-do-manual-reference)) - -(defun Man-do-manual-reference () - "Run `Man-getpage-in-background' on cross reference under point. -Word under point is checked for a match with `Man-reference-regexp'. -If point is not over a word, try to use previous word for a match." - (interactive) - (save-excursion - (let ((xref (Man-current-word)) (hyphen (Man-prev-word-hyphen-p))) - (if (and (zerop (length xref)) - (setq xref " ") - (skip-syntax-backward " ") - (not (eq (point) (point-min)))) - (Man-do-manual-reference) - (cond ((string-equal "-" (substring xref -1)) - (skip-syntax-forward Man-word-syntax) - (skip-syntax-forward " ") - (setq xref (concat (substring xref 0 -1) (Man-current-word)))) - (hyphen - (goto-char hyphen) - (setq xref (concat (substring (Man-current-word) 0 -1) xref)))) - (if (string-match Man-reference-regexp xref) - (Man-getpage-in-background - (Man-translate-references - (substring xref (match-beginning 0) (match-end 0)))) - (message "No cross reference found under point.")))))) - -(eval-and-compile - (when (string-match "XEmacs\\|Lucid" emacs-version) - (fset 'make-overlay 'make-extent) - (fset 'overlay-put 'set-extent-property))) - -(defun Man-boldify-mouse-region (beg end) - "Render region text in bold with mouse highlighting." - (let ((overlay (make-overlay beg end))) - (overlay-put overlay 'face 'bold) - (overlay-put overlay 'mouse-face 'highlight) - (overlay-put overlay 'hilit t))) -
--- a/lisp/packages/man.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/packages/man.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,11 +1,8 @@ ;;; man.el --- browse UNIX manual pages - -;; Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc. +;; Keywords: help -;; Author: Barry A. Warsaw <bwarsaw@cen.com> -;; Keywords: help -;; Adapted-By: ESR, pot - +;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. +;; ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it @@ -20,1045 +17,1126 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: FSF 19.34. - -;;; Commentary: - -;; This code provides a function, `man', with which you can browse -;; UNIX manual pages. Formatting is done in background so that you -;; can continue to use your Emacs while processing is going on. -;; -;; The mode also supports hypertext-like following of manual page SEE -;; ALSO references, and other features. See below or do `?' in a -;; manual page buffer for details. - -;; ========== Credits and History ========== -;; In mid 1991, several people posted some interesting improvements to -;; man.el from the standard emacs 18.57 distribution. I liked many of -;; these, but wanted everything in one single package, so I decided -;; to incorporate them into a single manual browsing mode. While -;; much of the code here has been rewritten, and some features added, -;; these folks deserve lots of credit for providing the initial -;; excellent packages on which this one is based. - -;; Nick Duffek <duffek@chaos.cs.brandeis.edu>, posted a very nice -;; improvement which retrieved and cleaned the manpages in a -;; background process, and which correctly deciphered such options as -;; man -k. - -;; Eric Rose <erose@jessica.stanford.edu>, submitted manual.el which -;; provided a very nice manual browsing mode. - -;; This package was available as `superman.el' from the LCD package -;; for some time before it was accepted into Emacs 19. The entry -;; point and some other names have been changed to make it a drop-in -;; replacement for the old man.el package. - -;; Francesco Potorti` <pot@cnuce.cnr.it> cleaned it up thoroughly, -;; making it faster, more robust and more tolerant of different -;; systems' man idiosyncrasies. - -;; ========== Features ========== -;; + Runs "man" in the background and pipes the results through a -;; series of sed and awk scripts so that all retrieving and cleaning -;; is done in the background. The cleaning commands are configurable. -;; + Syntax is the same as Un*x man -;; + Functionality is the same as Un*x man, including "man -k" and -;; "man <section>", etc. -;; + Provides a manual browsing mode with keybindings for traversing -;; the sections of a manpage, following references in the SEE ALSO -;; section, and more. -;; + Multiple manpages created with the same man command are put into -;; a narrowed buffer circular list. +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;; ============= TODO =========== -;; - Add a command for printing. -;; - The awk script deletes multiple blank lines. This behaviour does -;; not allow to understand if there was indeed a blank line at the -;; end or beginning of a page (after the header, or before the -;; footer). A different algorithm should be used. It is easy to -;; compute how many blank lines there are before and after the page -;; headers, and after the page footer. But it is possible to compute -;; the number of blank lines before the page footer by euristhics -;; only. Is it worth doing? -;; - Allow a user option to mean that all the manpages should go in -;; the same buffer, where they can be browsed with M-n and M-p. -;; - Allow completion on the manpage name when calling man. This -;; requires a reliable list of places where manpages can be found. The -;; drawback would be that if the list is not complete, the user might -;; be led to believe that the manpages in the missing directories do -;; not exist. - - -;;; Code: - -(require 'assoc) - -;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -;; empty defvars (keep the compiler quiet) +;; Mostly rewritten by Alan K. Stebbens <aks@hub.ucsb.edu> 11-apr-90. +;; +;; o Match multiple man pages using TOPIC as a simple pattern +;; o Search unformatted pages, even when formatted matches are found +;; o Query the user as to which pages are desired +;; o Use of the prefix arg to toggle/bypass the above features +;; o Buffers named by the first topic in the buffer +;; o Automatic uncompress for compressed man pages (.Z, .z, and .gz) +;; o View the resulting buffer using M-x view mode +;; +;; Modified 16-mar-91 by Jamie Zawinski <jwz@lucid.com> to default the +;; manual topic to the symbol at point, just like find-tag does. +;; +;; Modified 22-mar-93 by jwz to use multiple fonts and follow xrefs with mouse. +;; +;; Modified 16-apr-93 by Dave Gillespie <daveg@synaptics.com> to make +;; apropos work nicely; work correctly when bold or italic is unavailable; +;; reuse old buffer if topic is re-selected (in Manual-topic-buffer mode). +;; +;; Modified 4-apr-94 by jwz: merged in Tibor Polgar's code for manpath.conf. +;; +;; Modified 19-apr-94 by Tibor Polgar <tlp00@spg.amdahl.com> to add support for +;; $PAGER variable to be emacsclient and properly process man pages (assuming +;; the man pages were built by man in /tmp. also fixed bug with man list being +;; backwards. +;; +;; Modified 23-aug-94 by Tibor Polgar <tlp00@spg.amdahl.com> to add support for +;; displaying only one instance of a man page (Manual-unique-man-sections-only) +;; Fixed some more man page ordering bugs, bug with Manual-query-multiple-pages. +;; +;; Modified 29-nov-94 by Ben Wing <wing@spg.amdahl.com>: small fixes +;; that should hopefully make things work under HPUX and IRIX.; +;; +;; Modified 15-jul-95 by Dale Atems <atems@physics.wayne.edu>: +;; some extensive rewriting to make things work right (more or less) +;; under IRIX. +;; +;; This file defines "manual-entry", and the remaining definitions all +;; begin with "Manual-". This makes the autocompletion on "M-x man" work. +;; +;; Variables of interest: +;; +;; Manual-program +;; Manual-topic-buffer +;; Manual-buffer-view-mode +;; Manual-directory-list +;; Manual-formatted-directory-list +;; Manual-match-topic-exactly +;; Manual-query-multiple-pages +;; Manual-page-history +;; Manual-subdirectory-list +;; Manual-man-page-section-ids +;; Manual-formatted-page-prefix +;; Manual-unformatted-page-prefix +;; Manual-use-full-section-ids -(defvar Man-notify) -(defvar Man-current-page) -(defvar Man-page-list) -(defvar Man-filter-list nil - "*Manpage cleaning filter command phrases. -This variable contains a list of the following form: - -'((command-string phrase-string*)*) - -Each phrase-string is concatenated onto the command-string to form a -command filter. The (standard) output (and standard error) of the Un*x -man command is piped through each command filter in the order the -commands appear in the association list. The final output is placed in -the manpage buffer.") - -(defvar Man-original-frame) -(defvar Man-arguments) -(defvar Man-sections-alist) -(defvar Man-refpages-alist) -(defvar Man-uses-untabify-flag t - "When non-nil use `untabify' instead of Man-untabify-command.") -(defvar Man-page-mode-string) -(defvar Man-sed-script nil - "Script for sed to nuke backspaces and ANSI codes from manpages.") - -;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -;; user variables - -(defvar Man-fontify-manpage-flag t - "*Make up the manpage with fonts.") - -(defvar Man-overstrike-face 'bold - "*Face to use when fontifying overstrike.") +(defvar Manual-program "man" "\ +*Name of the program to invoke in order to format the source man pages.") -(defvar Man-underline-face 'underline - "*Face to use when fontifying underlining.") - -;; Use the value of the obsolete user option Man-notify, if set. -(defvar Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly) - "*Selects the behavior when manpage is ready. -This variable may have one of the following values, where (sf) means -that the frames are switched, so the manpage is displayed in the frame -where the man command was called from: +(defvar Manual-section-switch (if (eq system-type 'usg-unix-v) "-s" nil) + "SysV needs this to work right.") -newframe -- put the manpage in its own frame (see `Man-frame-parameters') -pushy -- make the manpage the current buffer in the current window -bully -- make the manpage the current buffer and only window (sf) -aggressive -- make the manpage the current buffer in the other window (sf) -friendly -- display manpage in the other window but don't make current (sf) -polite -- don't display manpage, but prints message and beep when ready -quiet -- like `polite', but don't beep -meek -- make no indication that the manpage is ready +(defvar Manual-topic-buffer t "\ +*Non-nil means \\[Manual-entry] should output the manual entry for TOPIC into +a buffer named *man TOPIC*, otherwise, it should name the buffer +*Manual Entry*.") -Any other value of `Man-notify-method' is equivalent to `meek'.") - -(defvar Man-frame-parameters nil - "*Frame parameter list for creating a new frame for a manual page.") +(defvar Manual-buffer-view-mode t "\ +*Whether manual buffers should be placed in view-mode. +nil means leave the buffer in fundamental-mode in another window. +t means use `view-buffer' to display the man page in the current window. +Any other value means use `view-buffer-other-window'.") -(defvar Man-downcase-section-letters-flag t - "*Letters in sections are converted to lower case. -Some Un*x man commands can't handle uppercase letters in sections, for -example \"man 2V chmod\", but they are often displayed in the manpage -with the upper case letter. When this variable is t, the section -letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before -being sent to the man background process.") - -(defvar Man-circular-pages-flag t - "*If t, the manpage list is treated as circular for traversal.") +(defvar Manual-match-topic-exactly t "\ +*Non-nil means that \\[manual-entry] will match the given TOPIC exactly, rather +apply it as a pattern. When this is nil, and \"Manual-query-multiple-pages\" +is non-nil, then \\[manual-entry] will query you for all matching TOPICs. +This variable only has affect on the preformatted man pages (the \"cat\" files), +since the \"man\" command always does exact topic matches.") -(defvar Man-section-translations-alist - (list - '("3C++" . "3") - ;; Some systems have a real 3x man section, so let's comment this. - ;; '("3X" . "3") ; Xlib man pages - '("3X11" . "3") - '("1-UCB" . "")) - "*Association list of bogus sections to real section numbers. -Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in -their references which Un*x `man' does not recognize. This -association list is used to translate those sections, when found, to -the associated section number.") - -(defvar manual-program "man" - "The name of the program that produces man pages.") - -(defvar Man-untabify-command "pr" - "Command used for untabifying.") - -(defvar Man-untabify-command-args (list "-t" "-e") - "List of arguments to be passed to Man-untabify-command (which see).") +(defvar Manual-query-multiple-pages nil "\ +*Non-nil means that \\[manual-entry] will query the user about multiple man +pages which match the given topic. The query is done using the function +\"y-or-n-p\". If this variable is nil, all man pages with topics matching the +topic given to \\[manual-entry] will be inserted into the temporary buffer. +See the variable \"Manual-match-topic-exactly\" to control the matching.") -(defvar Man-sed-command "sed" - "Command used for processing sed scripts.") - -(defvar Man-awk-command "awk" - "Command used for processing awk scripts.") +(defvar Manual-unique-man-sections-only nil + "*Only present one man page per section. This variable is useful if the same or +up/down level man pages for the same entry are present in mulitple man paths. +When set to t, only the first entry found in a section is displayed, the others +are ignored without any messages or warnings. Note that duplicates can occur if +the system has both formatted and unformatted version of the same page.") -(defvar Man-mode-line-format - '("" mode-line-modified - mode-line-buffer-identification " " - global-mode-string - " " Man-page-mode-string - " %[(" mode-name mode-line-process minor-mode-alist ")%]----" - (-3 . "%p") "-%-") - "Mode line format for manual mode buffer.") +(defvar Manual-mode-hook nil + "Function or functions run on entry to Manual-mode.") -(defvar Man-mode-map nil - "Keymap for Man mode.") - -(defvar Man-mode-hook nil - "Hook run when Man mode is enabled.") +(defvar Manual-directory-list nil "\ +*A list of directories used with the \"man\" command, where each directory +contains a set of \"man?\" and \"cat?\" subdirectories. If this variable is nil, +it is initialized by \\[Manual-directory-list-init].") -(defvar Man-cooked-hook nil - "Hook run after removing backspaces but before Man-mode processing.") - -(defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" - "Regular expression describing the name of a manpage (without section).") +(defvar Manual-formatted-directory-list nil "\ +A list of directories containing formatted man pages. Initialized by +\\[Manual-directory-list-init].") -(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" - "Regular expression describing a manpage section within parentheses.") +(defvar Manual-unformatted-directory-list nil "\ +A list of directories containing the unformatted (source) man pages. +Initialized by \\[Manual-directory-list-init].") -(defvar Man-page-header-regexp - (concat "^[ \t]*\\(" Man-name-regexp - "(\\(" Man-section-regexp "\\))\\).*\\1") - "Regular expression describing the heading of a page.") - -(defvar Man-heading-regexp "^\\([A-Z][A-Z ]+\\)$" - "Regular expression describing a manpage heading entry.") - -(defvar Man-see-also-regexp "SEE ALSO" - "Regular expression for SEE ALSO heading (or your equivalent). -This regexp should not start with a `^' character.") +(defvar Manual-page-history nil "\ +A list of names of previously visited man page buffers.") -(defvar Man-first-heading-regexp "^[ \t]*NAME$\\|^[ \t]*No manual entry fo.*$" - "Regular expression describing first heading on a manpage. -This regular expression should start with a `^' character.") +(defvar Manual-manpath-config-file "/usr/lib/manpath.config" + "*Location of the manpath.config file, if any.") -(defvar Man-reference-regexp - (concat "\\(" Man-name-regexp "\\)(\\(" Man-section-regexp "\\))") - "Regular expression describing a reference in the SEE ALSO section.") +(defvar Manual-apropos-switch "-k" + "*Man apropos switch") -(defvar Man-switches "" - "Switches passed to the man command, as a single string.") +;; New variables. -(defvar Man-specified-section-option - (if (string-match "-solaris[0-9.]*$" system-configuration) - "-s" - "") - "Option that indicates a specified a manual section name.") +(defvar Manual-subdirectory-list nil "\ +A list of all the subdirectories in which man pages may be found. +Iniialized by Manual-directory-list-init.") -;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -;; end user variables - -;; other variables and keymap initializations -(make-variable-buffer-local 'Man-sections-alist) -(make-variable-buffer-local 'Man-refpages-alist) -(make-variable-buffer-local 'Man-page-list) -(make-variable-buffer-local 'Man-current-page) -(make-variable-buffer-local 'Man-page-mode-string) -(make-variable-buffer-local 'Man-original-frame) -(make-variable-buffer-local 'Man-arguments) +;; This is for SGI systems; don't know what it should be otherwise. +(defvar Manual-man-page-section-ids "1nl6823457poD" "\ +String containing all suffix characters for \"cat\" and \"man\" +that identify valid sections of the Un*x manual.") -(setq-default Man-sections-alist nil) -(setq-default Man-refpages-alist nil) -(setq-default Man-page-list nil) -(setq-default Man-current-page 0) -(setq-default Man-page-mode-string "1 of 1") +(defvar Manual-formatted-page-prefix "cat" "\ +Prefix for directories where formatted man pages are to be found. +Defaults to \"cat\".") -(defconst Man-sysv-sed-script "\ -/\b/ { s/_\b//g - s/\b_//g - s/o\b+/o/g - s/+\bo/o/g - :ovstrk - s/\\(.\\)\b\\1/\\1/g - t ovstrk - } -/\e\\[[0-9][0-9]*m/ s///g" - "Script for sysV-like sed to nuke backspaces and ANSI codes from manpages.") +(defvar Manual-unformatted-page-prefix "man" "\ +Prefix for directories where unformatted man pages are to be found. +Defaults to \"man\".") -(defconst Man-berkeley-sed-script "\ -/\b/ { s/_\b//g\\ - s/\b_//g\\ - s/o\b+/o/g\\ - s/+\bo/o/g\\ - :ovstrk\\ - s/\\(.\\)\b\\1/\\1/g\\ - t ovstrk\\ - }\\ -/\e\\[[0-9][0-9]*m/ s///g" - "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") +(defvar Manual-leaf-signature "" "\ +Regexp for identifying \"leaf\" subdirectories in the search path. +If empty, initialized by Manual-directory-list-init.") + +(defvar Manual-use-full-section-ids t "\ +If non-nil, pass full section ids to Manual-program, otherwise pass +only the first character. Defaults to 't'.") -(if Man-mode-map - nil - (setq Man-mode-map (make-keymap)) - (suppress-keymap Man-mode-map) - (define-key Man-mode-map " " 'scroll-up) - (define-key Man-mode-map "\177" 'scroll-down) - (define-key Man-mode-map "n" 'Man-next-section) - (define-key Man-mode-map "p" 'Man-previous-section) - (define-key Man-mode-map "\en" 'Man-next-manpage) - (define-key Man-mode-map "\ep" 'Man-previous-manpage) - (define-key Man-mode-map ">" 'end-of-buffer) - (define-key Man-mode-map "<" 'beginning-of-buffer) - (define-key Man-mode-map "." 'beginning-of-buffer) - (define-key Man-mode-map "r" 'Man-follow-manual-reference) - (define-key Man-mode-map "g" 'Man-goto-section) - (define-key Man-mode-map "s" 'Man-goto-see-also-section) - (define-key Man-mode-map "k" 'Man-kill) - (define-key Man-mode-map "q" 'Man-quit) - (define-key Man-mode-map "m" 'man) - (define-key Man-mode-map "?" 'describe-mode) - ) +(defvar Manual-use-subdirectory-list (eq system-type 'irix) "\ +This makes manual-entry work correctly on SGI machines but it +imposes a large startup cost which is why it is not simply on by +default on all systems.") + +(make-face 'man-italic) +(or (face-differs-from-default-p 'man-italic) + (copy-face 'italic 'man-italic)) +;; XEmacs (from Darrell Kindred): underlining is annoying due to +;; large blank spaces in this face. +;; (or (face-differs-from-default-p 'man-italic) +;; (set-face-underline-p 'man-italic t)) - -;; ====================================================================== -;; utilities - -(defun Man-init-defvars () - "Used for initialising variables based on the value of window-system. -This is necessary if one wants to dump man.el with emacs." +(make-face 'man-bold) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'bold 'man-bold)) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'man-italic 'man-bold)) - ;; The following is necessary until fonts are implemented on - ;; terminals. - (setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag - window-system)) +(make-face 'man-heading) +(or (face-differs-from-default-p 'man-heading) + (copy-face 'man-bold 'man-heading)) - (setq Man-sed-script - (cond - (Man-fontify-manpage-flag - nil) - ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script)) - Man-sysv-sed-script) - ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script)) - Man-berkeley-sed-script) - (t - nil))) +(make-face 'man-xref) +(or (face-differs-from-default-p 'man-xref) + (set-face-underline-p 'man-xref t)) + +;; Manual-directory-list-init +;; Initialize the directory lists. - (setq Man-filter-list - (list - (cons - Man-sed-command - (list - (if Man-sed-script - (concat "-e '" Man-sed-script "'") - "") - "-e '/^[\001-\032][\001-\032]*$/d'" - "-e '/\e[789]/s///g'" - "-e '/Reformatting page. Wait/d'" - "-e '/Reformatting entry. Wait/d'" - "-e '/^[ \t]*Hewlett-Packard[ \t]Company[ \t]*-[ \t][0-9]*[ \t]-/d'" - "-e '/^[ \t]*Hewlett-Packard[ \t]*-[ \t][0-9]*[ \t]-.*$/d'" - "-e '/^[ \t][ \t]*-[ \t][0-9]*[ \t]-[ \t]*Formatted:.*[0-9]$/d'" - "-e '/^[ \t]*Page[ \t][0-9]*.*(printed[ \t][0-9\\/]*)$/d'" - "-e '/^Printed[ \t][0-9].*[0-9]$/d'" - "-e '/^[ \t]*X[ \t]Version[ \t]1[01].*Release[ \t][0-9]/d'" - "-e '/^[A-za-z].*Last[ \t]change:/d'" - "-e '/^Sun[ \t]Release[ \t][0-9].*[0-9]$/d'" - "-e '/[ \t]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d'" - "-e '/^[ \t]*Rev\\..*Page [0-9][0-9]*$/d'" - )) - (cons - Man-awk-command - (list - "'\n" - "BEGIN { blankline=0; anonblank=0; }\n" - "/^$/ { if (anonblank==0) next; }\n" - "{ anonblank=1; }\n" - "/^$/ { blankline++; next; }\n" - "{ if (blankline>0) { print \"\"; blankline=0; } print $0; }\n" - "'" - )) - (if (not Man-uses-untabify-flag) - (cons - Man-untabify-command - Man-untabify-command-args) - ))) -) - -(defsubst Man-match-substring (&optional n string) - "Return the substring matched by the last search. -Optional arg N means return the substring matched by the Nth paren -grouping. Optional second arg STRING means return a substring from -that string instead of from the current buffer." - (if (null n) (setq n 0)) - (if string - (substring string (match-beginning n) (match-end n)) - (buffer-substring (match-beginning n) (match-end n)))) - -(defsubst Man-make-page-mode-string () - "Formats part of the mode line for Man mode." - (format "%s page %d of %d" - (or (nth 2 (nth (1- Man-current-page) Man-page-list)) - "") - Man-current-page - (length Man-page-list))) - -(defsubst Man-build-man-command () - "Builds the entire background manpage and cleaning command." - (let ((command (concat manual-program " " Man-switches " %s 2>/dev/null")) - (flist Man-filter-list)) - (while (and flist (car flist)) - (let ((pcom (car (car flist))) - (pargs (cdr (car flist)))) - (setq command - (concat command " | " pcom " " - (mapconcat '(lambda (phrase) - (if (not (stringp phrase)) - (error "Malformed Man-filter-list")) - phrase) - pargs " "))) - (setq flist (cdr flist)))) - command)) +(defun Manual-directory-list-init (&optional arg) + "Initialize the Manual-directory-list variable from $MANPATH +if it is not already set, or if a prefix argument is provided." + (interactive "P") + (if arg (setq Manual-directory-list nil)) + (if (null Manual-directory-list) + (let ((manpath (getenv "MANPATH")) + (global (Manual-manpath-config-contents)) + (dirlist nil) + dir) + (cond ((and manpath global) + (setq manpath (concat manpath ":" global))) + (global + (setq manpath global)) + ((not manpath) + ;; XEmacs - (bpw/stig) Unix-specifix hack for lusers w/ no manpath + (setq manpath "/usr/local/man:/usr/share/man:/usr/contrib/man:/usr/X11/man:/usr/man:/usr/catman"))) + ;; Make sure that any changes we've made internally are seen by man. + (setenv "MANPATH" manpath) + (while (string-match "\\`:*\\([^:]+\\)" manpath) + (setq dir (substring manpath (match-beginning 1) (match-end 1))) + (and (not (member dir dirlist)) + (setq dirlist (cons dir dirlist))) + (setq manpath (substring manpath (match-end 0)))) + (setq dirlist (nreverse dirlist)) + (setq Manual-directory-list dirlist) + (setq Manual-subdirectory-list nil) + (setq Manual-formatted-directory-list nil) + (setq Manual-unformatted-directory-list nil))) + (if (string-equal Manual-leaf-signature "") + (setq Manual-leaf-signature + (concat "/\\(" + Manual-formatted-page-prefix + "\\|" Manual-unformatted-page-prefix + "\\)" + "[" Manual-man-page-section-ids + "].?/."))) + (if Manual-use-subdirectory-list + (progn + (if (null Manual-subdirectory-list) + (setq Manual-subdirectory-list + (Manual-all-subdirectories Manual-directory-list + Manual-leaf-signature nil))) + (if (null Manual-formatted-directory-list) + (setq Manual-formatted-directory-list + (Manual-filter-subdirectories Manual-subdirectory-list + Manual-formatted-page-prefix))) + (if (null Manual-unformatted-directory-list) + (setq Manual-unformatted-directory-list + (Manual-filter-subdirectories Manual-subdirectory-list + Manual-unformatted-page-prefix)))) + (if (null Manual-formatted-directory-list) + (setq Manual-formatted-directory-list + (Manual-select-subdirectories Manual-directory-list + Manual-formatted-page-prefix))) + (if (null Manual-unformatted-directory-list) + (setq Manual-unformatted-directory-list + (Manual-select-subdirectories Manual-directory-list + Manual-unformatted-page-prefix))))) -(defun Man-translate-references (ref) - "Translates REF from \"chmod(2V)\" to \"2v chmod\" style. -Leave it as is if already in that style. Possibly downcase and -translate the section (see the Man-downcase-section-letters-flag -and the Man-section-translations-alist variables)." - (let ((name "") - (section "") - (slist Man-section-translations-alist)) - (cond - ;; "chmod(2V)" case ? - ((string-match (concat "^" Man-reference-regexp "$") ref) - (setq name (Man-match-substring 1 ref) - section (Man-match-substring 2 ref))) - ;; "2v chmod" case ? - ((string-match (concat "^\\(" Man-section-regexp - "\\) +\\(" Man-name-regexp "\\)$") ref) - (setq name (Man-match-substring 2 ref) - section (Man-match-substring 1 ref)))) - (if (string= name "") - ref ; Return the reference as is - (if Man-downcase-section-letters-flag - (setq section (downcase section))) - (while slist - (let ((s1 (car (car slist))) - (s2 (cdr (car slist)))) - (setq slist (cdr slist)) - (if Man-downcase-section-letters-flag - (setq s1 (downcase s1))) - (if (not (string= s1 section)) nil - (setq section (if Man-downcase-section-letters-flag - (downcase s2) - s2) - slist nil)))) - (concat Man-specified-section-option section " " name)))) - -;; ====================================================================== -;; default man entry: get word under point - -(defsubst Man-default-man-entry () - "Make a guess at a default manual entry. -This guess is based on the text surrounding the cursor, and the -default section number is selected from `Man-auto-section-alist'." - (let (default-title) - (save-excursion - - ;; Default man entry title is any word the cursor is on, or if - ;; cursor not on a word, then nearest preceding word. Cannot - ;; use the current-word function because it skips the dots. - (if (not (looking-at "[-a-zA-Z_.]")) - (skip-chars-backward "^a-zA-Z")) - (skip-chars-backward "-(a-zA-Z_0-9_.") - (if (looking-at "(") (forward-char 1)) - (setq default-title - (buffer-substring - (point) - (progn (skip-chars-forward "-a-zA-Z0-9_.") (point)))) - - ;; If looking at something like ioctl(2) or brc(1M), include the - ;; section number in the returned value. Remove text properties. - (let ((result (concat - default-title - (if (looking-at - (concat "[ \t]*([ \t]*\\(" - Man-section-regexp "\\)[ \t]*)")) - (format "(%s)" (Man-match-substring 1)))))) - (set-text-properties 0 (length result) nil result) - result)))) - - -;; ====================================================================== -;; Top level command and background process sentinel - -;; For compatibility with older versions. -;;;###autoload -(defalias 'manual-entry 'man) +(defun Manual-manpath-config-contents () + "Parse the `Manual-manpath-config-file' file, if any. +Returns a string like in $MANPATH." + (if (and Manual-manpath-config-file + (file-readable-p Manual-manpath-config-file)) + (let ((buf (get-buffer-create " *Manual-config*")) + path) + (set-buffer buf) + (buffer-disable-undo buf) + (erase-buffer) + (insert-file-contents Manual-manpath-config-file) + (while (re-search-forward "^\\(MANDATORY_MANPATH\\|MANPATH_MAP\\)" + nil t) + (and (re-search-forward "\\(/[^ \t\n]+\\)[ \t]*$") + (setq path (concat path (buffer-substring (match-beginning 1) + (match-end 1)) + ":")))) + (kill-buffer buf) + path))) +;; +;; manual-entry -- The "main" user function +;; ;;;###autoload -(defun man (man-args) - "Get a Un*x manual page and put it in a buffer. -This command is the top-level command in the man package. It runs a Un*x -command to retrieve and clean a manpage in the background and places the -results in a Man mode (manpage browsing) buffer. See variable -`Man-notify-method' for what happens when the buffer is ready. -If a buffer already exists for this man page, it will display immediately." +(defun manual-entry (topic &optional arg silent) + "Display the Unix manual entry (or entries) for TOPIC. +If prefix arg is given, modify the search according to the value: + 2 = complement default exact matching of the TOPIC name; + exact matching default is specified by `Manual-match-topic-exactly' + 3 = force a search of the unformatted man directories + 4 = both 2 and 3 +The manual entries are searched according to the variable +Manual-directory-list, which should be a list of directories. If +Manual-directory-list is nil, \\[Manual-directory-list-init] is +invoked to create this list from the MANPATH environment variable. +See the variable Manual-topic-buffer which controls how the buffer +is named. See also the variables Manual-match-topic-exactly, +Manual-query-multiple-pages, and Manual-buffer-view-mode." + (interactive + (list (let* ((fmh "-A-Za-z0-9_.") + (default (save-excursion + (buffer-substring + (progn + (re-search-backward "\\sw" nil t) + (skip-chars-backward fmh) (point)) + (progn (skip-chars-forward fmh) (point))))) + (thing (read-string + (if (equal default "") "Manual entry: " + (concat "Manual entry: (default " default ") "))))) + (if (equal thing "") default thing)) + (prefix-numeric-value current-prefix-arg))) + ;;(interactive "sManual entry (topic): \np") + (or arg (setq arg 1)) + (Manual-directory-list-init nil) + (let ((exact (if (or (= arg 2) (= arg 4)) + (not Manual-match-topic-exactly) + Manual-match-topic-exactly)) + (force (if (>= arg 3) + t + nil)) + section fmtlist manlist apropos-mode) + (let ((case-fold-search nil)) + (if (and (null section) + (string-match + "\\`[ \t]*\\([^( \t]+\\)[ \t]*(\\(.+\\))[ \t]*\\'" topic)) + (setq section (substring topic (match-beginning 2) + (match-end 2)) + topic (substring topic (match-beginning 1) + (match-end 1))) + (if (string-match "\\`[ \t]*-k[ \t]+\\([^ \t]+\\)\\'" topic) + (setq section "-k" + topic (substring topic (match-beginning 1)))))) + (if (equal section "-k") + (setq apropos-mode t) + (or silent + (message "Looking for formatted entry for %s%s..." + topic (if section (concat "(" section ")") ""))) + (setq fmtlist (Manual-select-man-pages + Manual-formatted-directory-list + topic section exact '())) + (if (or force (not section) (null fmtlist)) + (progn + (or silent + (message "%sooking for unformatted entry for %s%s..." + (if fmtlist "L" "No formatted entry, l") + topic (if section (concat "(" section ")") ""))) + (setq manlist (Manual-select-man-pages + Manual-unformatted-directory-list + topic section exact (if force '() fmtlist)))))) + + ;; Delete duplicate man pages (a file of the same name in multiple + ;; directories.) + (or nil ;force + (let ((rest (append fmtlist manlist))) + (while rest + (let ((rest2 (cdr rest))) + (while rest2 + (if (equal (file-name-nondirectory (car rest)) + (file-name-nondirectory (car rest2))) + (setq fmtlist (delq (car rest2) fmtlist) + manlist (delq (car rest2) manlist))) + (setq rest2 (cdr rest2)))) + (setq rest (cdr rest))))) + + (if (not (or fmtlist manlist apropos-mode)) + (progn + (message "No entries found for %s%s" topic + (if section (concat "(" section ")") "")) + nil) + (let ((bufname (cond ((not Manual-topic-buffer) + ;; What's the point of retaining this? + (if apropos-mode + "*Manual Apropos*" + "*Manual Entry*")) + (apropos-mode + (concat "*man apropos " topic "*")) + (t + (concat "*man " + (cond (exact + (if section + (concat topic "." section) + topic)) + ((or (cdr fmtlist) (cdr manlist) + (and fmtlist manlist)) + ;; more than one entry found + (concat topic "...")) + (t + (file-name-nondirectory + (car (or fmtlist manlist))))) + "*")))) + (temp-buffer-show-function + (cond ((eq 't Manual-buffer-view-mode) 'view-buffer) + ((eq 'nil Manual-buffer-view-mode) + temp-buffer-show-function) + (t 'view-buffer-other-window)))) + + (if apropos-mode + (setq manlist (list (format "%s.%s" topic section)))) + + (cond + ((and Manual-topic-buffer (get-buffer bufname)) + ;; reselect an old man page buffer if it exists already. + (save-excursion + (set-buffer (get-buffer bufname)) + (Manual-mode)) + (if temp-buffer-show-function + (funcall temp-buffer-show-function (get-buffer bufname)) + (display-buffer bufname))) + (t + (with-output-to-temp-buffer bufname + (buffer-disable-undo standard-output) + (save-excursion + (set-buffer standard-output) + (setq buffer-read-only nil) + (erase-buffer) + (Manual-insert-pages fmtlist manlist apropos-mode) + (set-buffer-modified-p nil) + (Manual-mode) + )))) + (setq Manual-page-history + (cons (buffer-name) + (delete (buffer-name) Manual-page-history))) + (message nil) + t)))) + +(defun Manpage-apropos (topic &optional arg silent) + "Apropos on Unix manual pages for TOPIC. +It calls the function `manual-entry'. Look at this function for +further description. Look also at the variable `Manual-apropos-switch', +if this function doesn't work on your system." (interactive - (list (let* ((default-entry (Man-default-man-entry)) - (input (read-string - (format "Manual entry%s: " - (if (string= default-entry "") - "" - (format " (default %s)" default-entry)))))) - (if (string= input "") - (if (string= default-entry "") - (error "No man args given") - default-entry) - input)))) + (list (let* ((fmh "-A-Za-z0-9_.") + (default (save-excursion + (buffer-substring + (progn + (re-search-backward "\\sw" nil t) + (skip-chars-backward fmh) (point)) + (progn (skip-chars-forward fmh) (point))))) + (thing (read-string + (if (equal default "") "Manual entry: " + (concat "Manual entry: (default " default ") "))))) + (if (equal thing "") default thing)) + (prefix-numeric-value current-prefix-arg))) + (manual-entry (concat Manual-apropos-switch " " topic) arg silent)) + +(defun Manual-insert-pages (fmtlist manlist apropos-mode) + (let ((sep (make-string 65 ?-)) + name start end topic section) + (while fmtlist ; insert any formatted files + (setq name (car fmtlist)) + (goto-char (point-max)) + (setq start (point)) + ;; In case the file can't be read or uncompressed or + ;; something like that. + (condition-case () + (Manual-insert-man-file name) + (file-error nil)) + (goto-char (point-max)) + (setq end (point)) + (save-excursion + (save-restriction + (message "Cleaning manual entry for %s..." + (file-name-nondirectory name)) + (narrow-to-region start end) + (Manual-nuke-nroff-bs) + (goto-char (point-min)) + (insert "File: " name "\n") + (goto-char (point-max)) + )) + (if (or (cdr fmtlist) manlist) + (insert "\n\n" sep "\n")) + (setq fmtlist (cdr fmtlist))) - ;; Possibly translate the "subject(section)" syntax into the - ;; "section subject" syntax and possibly downcase the section. - (setq man-args (Man-translate-references man-args)) + (while manlist ; process any unformatted files + (setq name (car manlist)) + (or (string-match "\\([^/]+\\)\\.\\([^./]+\\)\\(\\.gz\\'\\)" name) + (string-match "\\([^/]+\\)\\.\\([^./]+\\)\\'" name)) + (setq topic (substring name (match-beginning 1) (match-end 1))) + (setq section (substring name (match-beginning 2) (match-end 2))) + ;; This won't work under IRIX, because SGI man accepts only the + ;; "main" (one-character) section id, not full section ids + ;; like 1M, 3X, etc. Put (setq Manual-use-full-section-ids nil) + ;; in your .emacs to work around this problem. + (if (not (or Manual-use-full-section-ids (string-equal section ""))) + (setq section (substring section 0 1))) + (message "Invoking man %s%s %s..." + (if Manual-section-switch + (concat Manual-section-switch " ") + "") + section topic) + (setq start (point)) + (Manual-run-formatter name topic section) + (setq end (point)) + (save-excursion + (save-restriction + (message "Cleaning manual entry for %s(%s)..." topic section) + (narrow-to-region start end) + (Manual-nuke-nroff-bs apropos-mode) + (goto-char (point-min)) + (insert "File: " name "\n") + (goto-char (point-max)) + )) + (if (cdr manlist) + (insert "\n\n" sep "\n")) + (setq manlist (cdr manlist)))) + (if (< (buffer-size) 200) + (progn + (goto-char (point-min)) + (if (looking-at "^File: ") + (forward-line 1)) + (error (buffer-substring (point) (progn (end-of-line) (point)))))) + nil) + + +(defun Manual-run-formatter (name topic section) + (cond ((string-match "roff\\'" Manual-program) + ;; kludge kludge + (call-process Manual-program nil t nil "-Tman" "-man" name)) + (Manual-section-switch + (call-process Manual-program nil t nil Manual-section-switch + section topic)) + (t + (call-process Manual-program nil t nil section topic)))) + - (Man-getpage-in-background man-args)) +(defvar Manual-mode-map + (let ((m (make-sparse-keymap))) + (set-keymap-name m 'Manual-mode-map) + (define-key m "l" 'Manual-last-page) + (define-key m 'button2 'Manual-follow-xref) + (define-key m 'button3 'Manual-popup-menu) + m)) + +(defun Manual-mode () + (kill-all-local-variables) + (setq buffer-read-only t) + (use-local-map Manual-mode-map) + (setq major-mode 'Manual-mode + mode-name "Manual") + ;; man pages with long lines are buggy! + ;; This looks slightly better if they only + ;; overran by a couple of chars. + (setq truncate-lines t) + ;; turn off horizontal scrollbars in this buffer + (set-specifier scrollbar-height (cons (current-buffer) 0)) + (run-hooks 'Manual-mode-hook)) + +(defun Manual-last-page () + (interactive) + (while (or (not (get-buffer (car (or Manual-page-history + (error "No more history."))))) + (eq (get-buffer (car Manual-page-history)) (current-buffer))) + (setq Manual-page-history (cdr Manual-page-history))) + (switch-to-buffer (car Manual-page-history))) + + +;; Manual-select-subdirectories +;; Given a DIRLIST and a SUBDIR name, return all subdirectories of the former which +;; match the latter. + +(defun Manual-select-subdirectories (dirlist subdir) + (let ((dirs '()) + (case-fold-search nil) + (match (concat "\\`" (regexp-quote subdir))) + d) + (while dirlist + (setq d (car dirlist) dirlist (cdr dirlist)) + (if (file-directory-p d) + (let ((files (directory-files d t match nil 'dirs-only)) + (dir-temp '())) + (while files + (if (file-executable-p (car files)) + (setq dir-temp (cons (file-name-as-directory (car files)) + dir-temp))) + (setq files (cdr files))) + (and dir-temp + (setq dirs (append dirs (nreverse dir-temp))))))) + dirs)) -(defun Man-getpage-in-background (topic) - "Uses TOPIC to build and fire off the manpage and cleaning command." - (let* ((man-args topic) - (bufname (concat "*Man " man-args "*")) - (buffer (get-buffer bufname))) - (if buffer - (Man-notify-when-ready buffer) - (require 'env) - (message "Invoking %s %s in the background" manual-program man-args) - (setq buffer (generate-new-buffer bufname)) - (save-excursion - (set-buffer buffer) - (setq Man-original-frame (selected-frame)) - (setq Man-arguments man-args)) - (let ((process-environment (copy-sequence process-environment))) - ;; Prevent any attempt to use display terminal fanciness. - (setenv "TERM" "dumb") - (set-process-sentinel - (start-process manual-program buffer "sh" "-c" - (format (Man-build-man-command) man-args)) - 'Man-bgproc-sentinel))))) +;; Manual-filter-subdirectories +;; Given a DIRLIST and a SUBDIR name, return all members of the former +;; which match the latter. + +(defun Manual-filter-subdirectories (dirlist subdir) + (let ((match (concat + "/" + (regexp-quote subdir) + "[" Manual-man-page-section-ids "]")) + slist dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (and (file-executable-p dir) (string-match match dir)) + (setq slist (cons dir slist)))) + (nreverse slist))) + + +(defun Manual-all-subdirectories (dirlist leaf-signature dirs &optional silent) "\ +Given a DIRLIST, return a backward-sorted list of all subdirectories +thereof, prepended to DIRS if non-nil. This function calls itself +recursively until subdirectories matching LEAF-SIGNATURE are reached, +or the hierarchy has been thoroughly searched. This code is a modified +version of a function written by Tim Bradshaw (tfb@ed.ac.uk)." + (Manual-all-subdirectories-noloop dirlist leaf-signature dirs nil silent)) + +(defun Manual-all-subdirectories-noloop (dirlist leaf-signature dirs been &optional silent) "\ +Does the job of manual-all-subdirectories and keeps track of where it +has been to avoid loops." + (let (dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (file-directory-p dir) + (let ((dir-temp (cons (file-name-as-directory dir) dirs))) + ;; Without feedback the user might wonder about the delay! + (or silent (message + "Building list of search directories... %s" + (car dir-temp))) + (if (member (file-truename dir) been) + () ; Ignore. We have been here before + (setq been (cons (file-truename dir) been)) + (setq dirs + (if (string-match leaf-signature dir) + dir-temp + (Manual-all-subdirectories-noloop + (directory-files dir t "[^.]$" nil 'dirs-only) + leaf-signature dir-temp been silent)))))))) + dirs) + + +(defvar Manual-bogus-file-pattern "\\.\\(lpr\\|ps\\|PS\\)\\'" + "Some systems have files in the man/man*/ directories which aren't man pages. +This pattern is used to prune those files.") + +;; Manual-select-man-pages +;; +;; Given a DIRLIST, discover all filenames which complete given the TOPIC +;; and SECTION. + +;; ## Note: BSD man looks for .../man1/foo.1 and .../man1/$MACHINE/foo.1 + +;; ## Fixed for SGI IRIX 5.x on Sat Jul 15 1995 by Dale Atems +;; (atems@physics.wayne.edu). + +(defun Manual-select-man-pages (dirlist topic section exact shadow) + (let ((case-fold-search nil)) + (and section + (let ((l '()) + ;;(match (concat (substring section 0 1) "/?\\'")) + ;; ^^^ + ;; We'll lose any pages inside subdirectories of the "standard" + ;; ones if we insist on this! The following regexp should + ;; match any directory ending with the full section id or + ;; its first character, or any direct subdirectory thereof: + (match (concat "\\(" + (regexp-quote section) + "\\|" + (substring section 0 1) + "\\)/?")) + d) + (while dirlist + (setq d (car dirlist) dirlist (cdr dirlist)) + (if (string-match match d) + (setq l (cons d l)))) + (setq dirlist l))) + (if shadow + (setq shadow (concat "/\\(" + (mapconcat #'(lambda (n) + (regexp-quote + (file-name-nondirectory n))) + shadow + "\\|") + "\\)\\'"))) + (let ((manlist '()) + (match (concat "\\`" + (regexp-quote topic) + ;; **Note: on IRIX the preformatted pages + ;; are packed, so they end with ".z". This + ;; way you miss them if you specify a + ;; section. I don't see any point to it here + ;; even on BSD systems since we're looking + ;; one level down already, but I can't test + ;; this. More thought needed (???) -(defun Man-notify-when-ready (man-buffer) - "Notify the user when MAN-BUFFER is ready. -See the variable `Man-notify-method' for the different notification behaviors." - (let ((saved-frame (save-excursion - (set-buffer man-buffer) - Man-original-frame))) - (cond - ((eq Man-notify-method 'newframe) - ;; Since we run asynchronously, perhaps while Emacs is waiting - ;; for input, we must not leave a different buffer current. We - ;; can't rely on the editor command loop to reselect the - ;; selected window's buffer. - (save-excursion - (set-buffer man-buffer) - (make-frame Man-frame-parameters))) - ((eq Man-notify-method 'pushy) - (switch-to-buffer man-buffer)) - ((eq Man-notify-method 'bully) - (and window-system - (frame-live-p saved-frame) - (select-frame saved-frame)) - (pop-to-buffer man-buffer) - (delete-other-windows)) - ((eq Man-notify-method 'aggressive) - (and window-system - (frame-live-p saved-frame) - (select-frame saved-frame)) - (pop-to-buffer man-buffer)) - ((eq Man-notify-method 'friendly) - (and window-system - (frame-live-p saved-frame) - (select-frame saved-frame)) - (display-buffer man-buffer 'not-this-window)) - ((eq Man-notify-method 'polite) - (beep) - (message "Manual buffer %s is ready" (buffer-name man-buffer))) - ((eq Man-notify-method 'quiet) - (message "Manual buffer %s is ready" (buffer-name man-buffer))) - ((or (eq Man-notify-method 'meek) - t) - (message "")) - ))) + (cond ((and section + (not Manual-use-subdirectory-list)) + (concat "\\." (regexp-quote section))) + (exact + ;; If Manual-match-topic-exactly is + ;; set, then we must make sure the + ;; completions are exact, except for + ;; trailing weird characters after + ;; the section. + "\\.") + (t + "")))) + dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (not (file-directory-p dir)) + (progn + (message "warning: %s is not a directory" dir) + ;;(sit-for 1) + ) + (let ((files (directory-files dir t match nil t)) + f) + (while files + (setq f (car files) files (cdr files)) + (cond ((string-match Manual-bogus-file-pattern f) + ;(message "Bogus fule %s" f) (sit-for 2) + ) + ((and shadow (string-match shadow f)) + ;(message "Shadowed %s" f) (sit-for 2) + ) + ((not (file-readable-p f)) + ;(message "Losing with %s" f) (sit-for 2) + ) + (t + (setq manlist (cons f manlist)))))))) + (setq manlist (nreverse manlist)) + (and Manual-unique-man-sections-only + (setq manlist (Manual-clean-to-unique-pages-only manlist))) + (if (and manlist Manual-query-multiple-pages) + (apply #'append + (mapcar #'(lambda (page) + (and page + (y-or-n-p (format "Read %s? " page)) + (list page))) + manlist)) + manlist)))) -(defun Man-fontify-manpage () - "Convert overstriking and underlining to the correct fonts. -Same for the ANSI bold and normal escape sequences." - (interactive) - (message "Please wait: making up the %s man page..." Man-arguments) - (goto-char (point-min)) - (while (search-forward "\e[1m" nil t) - (delete-backward-char 4) - (put-text-property (point) - (progn (if (search-forward "\e[0m" nil 'move) - (delete-backward-char 4)) - (point)) - 'face Man-overstrike-face)) +(defun Manual-clean-to-unique-pages-only (manlist) + "Prune the current list of pages down to a unique set." + (let (page-name unique-pages) + (apply 'append + (mapcar '(lambda (page) + (cond (page + (and (string-match ".*/\\(.*\\)" page) + (setq page-name (substring page (match-beginning 1) + (match-end 1))) + ;; try to clip off .Z, .gz suffixes + (and (string-match "\\(.*\\)\\.\\(.+\\)\\.\\(.+\\)" + page-name) + (setq page-name + (substring page-name (match-beginning 1) + (match-end 2))))) + ;; add Manual-unique-pages if it isn't there + ;; and return file + (if (and unique-pages + page-name + (string-match (concat "\\b" page-name "\\b") + unique-pages)) + nil + (setq unique-pages (concat unique-pages + page-name + " ")) + (list page))))) + manlist)))) + + + +(defun Manual-insert-man-file (name) + ;; Insert manual file (unpacked as necessary) into buffer + (cond ((equal (substring name -3) ".gz") + (call-process "gunzip" nil t nil "--stdout" name)) + ((or (equal (substring name -2) ".Z") + ;; HPUX uses directory names that end in .Z and compressed + ;; files that don't. How gratuitously random. + (let ((case-fold-search nil)) + (string-match "\\.Z/" name))) + (call-process "zcat" name t nil)) ;; XEmacs change for HPUX + ((equal (substring name -2) ".z") + (call-process "pcat" nil t nil name)) + (t + (insert-file-contents name)))) + +(defmacro Manual-delete-char (n) + ;; in v19, delete-char is compiled as a function call, but delete-region + ;; is byte-coded, so it's much faster. (We were spending 40% of our time + ;; in delete-char alone.) + (list 'delete-region '(point) (list '+ '(point) n))) + +;; Hint: BS stands form more things than "back space" +(defun Manual-nuke-nroff-bs (&optional apropos-mode) + (interactive "*") + ;; + ;; turn underlining into italics + ;; (goto-char (point-min)) (while (search-forward "_\b" nil t) - (backward-delete-char 2) - (put-text-property (point) (1+ (point)) 'face Man-underline-face)) - (goto-char (point-min)) - (while (search-forward "\b_" nil t) - (backward-delete-char 2) - (put-text-property (1- (point)) (point) 'face Man-underline-face)) - (goto-char (point-min)) - (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) - (replace-match "\\1") - (put-text-property (1- (point)) (point) 'face Man-overstrike-face)) - (goto-char (point-min)) - (while (re-search-forward "o\b\\+\\|\\+\bo" nil t) - (replace-match "o") - (put-text-property (1- (point)) (point) 'face 'bold)) - (goto-char (point-min)) - (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) - (replace-match "+") - (put-text-property (1- (point)) (point) 'face 'bold)) - ;; \255 is some kind of dash in Latin-1. + ;; searching for underscore-backspace and then comparing the following + ;; chars until the sequence ends turns out to be much faster than searching + ;; for a regexp which matches the whole sequence. + (let ((s (match-beginning 0))) + (goto-char s) + (while (and (= (following-char) ?_) + (= (char-after (1+ (point))) ?\b)) + (Manual-delete-char 2) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-italic))) + ;; + ;; turn overstriking into bold + ;; (goto-char (point-min)) - (while (search-forward "\255" nil t) (replace-match "-")) - (message "%s man page made up" Man-arguments)) - -(defun Man-cleanup-manpage () - "Remove overstriking and underlining from the current buffer." - (interactive) - (message "Please wait: cleaning up the %s man page..." - Man-arguments) - (if (or (interactive-p) (not Man-sed-script)) - (progn - (goto-char (point-min)) - (while (search-forward "_\b" nil t) (backward-delete-char 2)) - (goto-char (point-min)) - (while (search-forward "\b_" nil t) (backward-delete-char 2)) - (goto-char (point-min)) - (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t) - (replace-match "\\1")) - (goto-char (point-min)) - (while (re-search-forward "\e\\[[0-9]+m" nil t) (replace-match "")) - (goto-char (point-min)) - (while (re-search-forward "o\b\\+\\|\\+\bo" nil t) (replace-match "o")) - )) + (while (re-search-forward "\\([^\n]\\)\\(\b\\1\\)" nil t) + ;; Surprisingly, searching for the above regexp is faster than searching + ;; for a backspace and then comparing the preceding and following chars, + ;; I presume because there are many false matches, meaning more funcalls + ;; to re-search-forward. + (let ((s (match-beginning 0))) + (goto-char s) + ;; Some systems (SGI) overstrike multiple times, eg, "M\bM\bM\bM". + (while (looking-at "\\([^\n]\\)\\(\b\\1\\)+") + (delete-region (+ (point) 1) (match-end 0)) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-bold))) + ;; + ;; hack bullets: o^H+ --> + (goto-char (point-min)) - (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+")) - ;; \255 is some kind of dash in Latin-1. - (goto-char (point-min)) - (while (search-forward "\255" nil t) (replace-match "-")) - (message "%s man page cleaned up" Man-arguments)) - -(defun Man-bgproc-sentinel (process msg) - "Manpage background process sentinel." - (let ((Man-buffer (process-buffer process)) - (delete-buff nil) - (err-mess nil)) - - (if (null (buffer-name Man-buffer)) ;; deleted buffer - (set-process-buffer process nil) + (while (search-forward "\b" nil t) + (Manual-delete-char -2)) - (save-excursion - (set-buffer Man-buffer) - (let ((case-fold-search nil)) - (goto-char (point-min)) - (cond ((or (looking-at "No \\(manual \\)*entry for") - (looking-at "[^\n]*: nothing appropriate$")) - (setq err-mess (buffer-substring (point) - (progn - (end-of-line) (point))) - delete-buff t)) - ((not (and (eq (process-status process) 'exit) - (= (process-exit-status process) 0))) - (setq err-mess - (concat (buffer-name Man-buffer) - ": process " - (let ((eos (1- (length msg)))) - (if (= (aref msg eos) ?\n) - (substring msg 0 eos) msg)))) - (goto-char (point-max)) - (insert (format "\nprocess %s" msg)) - )) - (if delete-buff - (kill-buffer Man-buffer) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage)) - (run-hooks 'Man-cooked-hook) - (Man-mode) - (set-buffer-modified-p nil) - )) - ;; Restore case-fold-search before calling - ;; Man-notify-when-ready because it may switch buffers. + (if (> (buffer-size) 100) ; minor kludge + (Manual-nuke-nroff-bs-footers)) + ;; + ;; turn subsection header lines into bold + ;; + (goto-char (point-min)) + (if apropos-mode + (while (re-search-forward "[a-zA-Z0-9] ([0-9]" nil t) + (forward-char -2) + (delete-backward-char 1)) - (if (not delete-buff) - (Man-notify-when-ready Man-buffer)) - - (if err-mess - (error err-mess)) - )))) - - -;; ====================================================================== -;; set up manual mode in buffer and build alists - -(defun Man-mode () - "A mode for browsing Un*x manual pages. - -The following man commands are available in the buffer. Try -\"\\[describe-key] <key> RET\" for more information: + ;; (while (re-search-forward "^[^ \t\n]" nil t) + ;; (set-extent-face (make-extent (match-beginning 0) + ;; (progn (end-of-line) (point))) + ;; 'man-heading)) -\\[man] Prompt to retrieve a new manpage. -\\[Man-follow-manual-reference] Retrieve reference in SEE ALSO section. -\\[Man-next-manpage] Jump to next manpage in circular list. -\\[Man-previous-manpage] Jump to previous manpage in circular list. -\\[Man-next-section] Jump to next manpage section. -\\[Man-previous-section] Jump to previous manpage section. -\\[Man-goto-section] Go to a manpage section. -\\[Man-goto-see-also-section] Jumps to the SEE ALSO manpage section. -\\[Man-quit] Deletes the manpage window, bury its buffer. -\\[Man-kill] Deletes the manpage window, kill its buffer. -\\[describe-mode] Prints this help text. - -The following variables may be of some use. Try -\"\\[describe-variable] <variable-name> RET\" for more information: + ;; boldface the first line + (if (looking-at "[^ \t\n].*$") + (set-extent-face (make-extent (match-beginning 0) (match-end 0)) + 'man-bold)) -Man-notify-method What happens when manpage formatting is done. -Man-downcase-section-letters-flag Force section letters to lower case. -Man-circular-pages-flag Treat multiple manpage list as circular. -Man-auto-section-alist List of major modes and their section numbers. -Man-section-translations-alist List of section numbers and their Un*x equiv. -Man-filter-list Background manpage filter command. -Man-mode-line-format Mode line format for Man mode buffers. -Man-mode-map Keymap bindings for Man mode buffers. -Man-mode-hook Normal hook run on entry to Man mode. -Man-section-regexp Regexp describing manpage section letters. -Man-heading-regexp Regexp describing section headers. -Man-see-also-regexp Regexp for SEE ALSO section (or your equiv). -Man-first-heading-regexp Regexp for first heading on a manpage. -Man-reference-regexp Regexp matching a references in SEE ALSO. -Man-switches Background `man' command switches. + ;; boldface subsequent title lines + ;; Regexp to match section headers changed to match a non-indented + ;; line preceded by a blank line and followed by an indented line. + ;; This seems to work ok for manual pages but gives better results + ;; with other nroff'd files + (while (re-search-forward "\n\n\\([^ \t\n].*\\)\n[ \t]+[^ \t\n]" nil t) + (goto-char (match-end 1)) + (set-extent-face (make-extent (match-beginning 1) (match-end 1)) + 'man-heading) + (forward-line 1)) + ) -The following key bindings are currently in effect in the buffer: -\\{Man-mode-map}" - (interactive) - (setq major-mode 'Man-mode - mode-name "Man" - buffer-auto-save-file-name nil - mode-line-format Man-mode-line-format - truncate-lines t - buffer-read-only t) - (buffer-disable-undo (current-buffer)) - (auto-fill-mode -1) - (use-local-map Man-mode-map) - (Man-build-page-list) - (Man-strip-page-headers) - (Man-unindent) - (Man-goto-page 1) - (run-hooks 'Man-mode-hook)) - -(defsubst Man-build-section-alist () - "Build the association list of manpage sections." - (setq Man-sections-alist nil) + ;; Zap ESC7, ESC8, and ESC9 + ;; This is for Sun man pages like "man 1 csh" (goto-char (point-min)) - (let ((case-fold-search nil)) - (while (re-search-forward Man-heading-regexp (point-max) t) - (aput 'Man-sections-alist (Man-match-substring 1)) - (forward-line 1)))) + (while (re-search-forward "\e[789]" nil t) + (replace-match "")) + + ;; Nuke blanks lines at start. + ;; (goto-char (point-min)) + ;; (skip-chars-forward "\n") + ;; (delete-region (point-min) (point)) + + (Manual-mouseify-xrefs) + ) + +(fset 'nuke-nroff-bs 'Manual-nuke-nroff-bs) ; use old name + -(defsubst Man-build-references-alist () - "Build the association list of references (in the SEE ALSO section)." - (setq Man-refpages-alist nil) - (save-excursion - (if (Man-find-section Man-see-also-regexp) - (let ((start (progn (forward-line 1) (point))) - (end (progn - (Man-next-section 1) - (point))) - hyphenated - (runningpoint -1)) - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (back-to-indentation) - (while (and (not (eobp)) (/= (point) runningpoint)) - (setq runningpoint (point)) - (if (re-search-forward Man-reference-regexp end t) - (let* ((word (Man-match-substring 0)) - (len (1- (length word)))) - (if hyphenated - (setq word (concat hyphenated word) - hyphenated nil)) - (if (= (aref word len) ?-) - (setq hyphenated (substring word 0 len)) - (aput 'Man-refpages-alist word)))) - (skip-chars-forward " \t\n,"))))))) +(defun Manual-nuke-nroff-bs-footers () + ;; Nuke headers and footers. + ;; + ;; nroff assumes pages are 66 lines high. We assume that, and that the + ;; first and last line on each page is expendible. There is no way to + ;; tell the difference between a page break in the middle of a paragraph + ;; and a page break between paragraphs (the amount of extra whitespace + ;; that nroff inserts is the same in both cases) so this might strip out + ;; a blank line were one should remain. I think that's better than + ;; leaving in a blank line where there shouldn't be one. (Need I say + ;; it: FMH.) + ;; + ;; Note that if nroff spits out error messages, pages will be more than + ;; 66 lines high, and we'll lose badly. That's ok because standard + ;; nroff doesn't do any diagnostics, and the "gnroff" wrapper for groff + ;; turns off error messages for compatibility. (At least, it's supposed + ;; to.) + ;; + (goto-char (point-min)) + ;; first lose the status output + (let ((case-fold-search t)) + (if (and (not (looking-at "[^\n]*warning")) + (looking-at "Reformatting.*\n")) + (delete-region (match-beginning 0) (match-end 0)))) -(defun Man-build-page-list () - "Build the list of separate manpages in the buffer." - (setq Man-page-list nil) - (let ((page-start (point-min)) - (page-end (point-max)) - (header "")) - (goto-char page-start) - ;; (switch-to-buffer (current-buffer))(debug) - (while (not (eobp)) - (setq header - (if (looking-at Man-page-header-regexp) - (Man-match-substring 1) - nil)) - ;; Go past both the current and the next Man-first-heading-regexp - (if (re-search-forward Man-first-heading-regexp nil 'move 2) - (let ((p (progn (beginning-of-line) (point)))) - ;; We assume that the page header is delimited by blank - ;; lines and that it contains at most one blank line. So - ;; if we back by three blank lines we will be sure to be - ;; before the page header but not before the possible - ;; previous page header. - (search-backward "\n\n" nil t 3) - (if (re-search-forward Man-page-header-regexp p 'move) - (beginning-of-line)))) - (setq page-end (point)) - (setq Man-page-list (append Man-page-list - (list (list (copy-marker page-start) - (copy-marker page-end) - header)))) - (setq page-start page-end) - ))) + ;; kludge around a groff bug where it won't keep quiet about some + ;; warnings even with -Wall or -Ww. + (cond ((looking-at "grotty:") + (while (looking-at "grotty:") + (delete-region (point) (progn (forward-line 1) (point)))) + (if (looking-at " *done\n") + (delete-region (point) (match-end 0))))) -(defun Man-strip-page-headers () - "Strip all the page headers but the first from the manpage." - (let ((buffer-read-only nil) - (case-fold-search nil) - (page-list Man-page-list) - (page ()) - (header "")) - (while page-list - (setq page (car page-list)) - (and (nth 2 page) - (goto-char (car page)) - (re-search-forward Man-first-heading-regexp nil t) - (setq header (buffer-substring (car page) (match-beginning 0))) - ;; Since the awk script collapses all successive blank - ;; lines into one, and since we don't want to get rid of - ;; the fast awk script, one must choose between adding - ;; spare blank lines between pages when there were none and - ;; deleting blank lines at page boundaries when there were - ;; some. We choose the first, so we comment the following - ;; line. - ;; (setq header (concat "\n" header))) - (while (search-forward header (nth 1 page) t) - (replace-match ""))) - (setq page-list (cdr page-list))))) + (let ((pages '()) + p) + ;; collect the page boundary markers before we start deleting, to make + ;; it easier to strip things out without changing the page sizes. + (while (not (eobp)) + (forward-line 66) + (setq pages (cons (point-marker) pages))) + (setq pages (nreverse pages)) + (while pages + (goto-char (car pages)) + (set-marker (car pages) nil) + ;; + ;; The lines are: 3 blank; footer; 6 blank; header; 3 blank. + ;; We're in between the previous footer and the following header, + ;; + ;; First lose 3 blank lines, the header, and then 3 more. + ;; + (setq p (point)) + (skip-chars-forward "\n") + (delete-region p (point)) + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0))) + ;; + ;; Next lose the footer, and the 3 blank lines after, and before it. + ;; But don't lose the last footer of the manual entry; that contains + ;; the "last change" date, so it's not completely uninteresting. + ;; (Actually lose all blank lines before it; sh(1) needs this.) + ;; + (skip-chars-backward "\n") + (beginning-of-line) + (if (null (cdr pages)) + nil + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0)))) + (setq p (point)) + (skip-chars-backward "\n") + (if (> (- p (point)) 4) + (delete-region (+ 2 (point)) p) + (delete-region (1+ (point)) p)) +; (and (looking-at "\n\n?\n?") +; (delete-region (match-beginning 0) (match-end 0))) -(defun Man-unindent () - "Delete the leading spaces that indent the manpage." - (let ((buffer-read-only nil) - (case-fold-search nil) - (page-list Man-page-list)) - (while page-list - (let ((page (car page-list)) - (indent "") - (nindent 0)) - (narrow-to-region (car page) (car (cdr page))) - (if Man-uses-untabify-flag - (untabify (point-min) (point-max))) - (if (catch 'unindent - (goto-char (point-min)) - (if (not (re-search-forward Man-first-heading-regexp nil t)) - (throw 'unindent nil)) - (beginning-of-line) - (setq indent (buffer-substring (point) - (progn - (skip-chars-forward " ") - (point)))) - (setq nindent (length indent)) - (if (zerop nindent) - (throw 'unindent nil)) - (setq indent (concat indent "\\|$")) - (goto-char (point-min)) - (while (not (eobp)) - (if (looking-at indent) - (forward-line 1) - (throw 'unindent nil))) - (goto-char (point-min))) - (while (not (eobp)) - (or (eolp) - (delete-char nindent)) - (forward-line 1))) - (setq page-list (cdr page-list)) - )))) - - -;; ====================================================================== -;; Man mode commands - -(defun Man-next-section (n) - "Move point to Nth next section (default 1)." - (interactive "p") - (let ((case-fold-search nil)) - (if (looking-at Man-heading-regexp) - (forward-line 1)) - (if (re-search-forward Man-heading-regexp (point-max) t n) - (beginning-of-line) - (goto-char (point-max))))) - -(defun Man-previous-section (n) - "Move point to Nth previous section (default 1)." - (interactive "p") - (let ((case-fold-search nil)) - (if (looking-at Man-heading-regexp) - (forward-line -1)) - (if (re-search-backward Man-heading-regexp (point-min) t n) - (beginning-of-line) - (goto-char (point-min))))) - -(defun Man-find-section (section) - "Move point to SECTION if it exists, otherwise don't move point. -Returns t if section is found, nil otherwise." - (let ((curpos (point)) - (case-fold-search nil)) + (setq pages (cdr pages))) + ;; + ;; Now nuke the extra blank lines at the beginning and end. (goto-char (point-min)) - (if (re-search-forward (concat "^" section) (point-max) t) - (progn (beginning-of-line) t) - (goto-char curpos) - nil) + (if (looking-at "\n+") + (delete-region (match-beginning 0) (match-end 0))) + (forward-line 1) + (if (looking-at "\n\n+") + (delete-region (1+ (match-beginning 0)) (match-end 0))) + (goto-char (point-max)) + (skip-chars-backward "\n") + (delete-region (point) (point-max)) + (beginning-of-line) + (forward-char -1) + (setq p (point)) + (skip-chars-backward "\n") + (if (= ?\n (following-char)) (forward-char 1)) + (if (> (point) (1+ p)) + (delete-region (point) p)) )) -(defun Man-goto-section () - "Query for section to move point to." - (interactive) - (aput 'Man-sections-alist - (let* ((default (aheadsym Man-sections-alist)) - (completion-ignore-case t) - chosen - (prompt (concat "Go to section: (default " default ") "))) - (setq chosen (completing-read prompt Man-sections-alist)) - (if (or (not chosen) - (string= chosen "")) - default - chosen))) - (Man-find-section (aheadsym Man-sections-alist))) - -(defun Man-goto-see-also-section () - "Move point the the \"SEE ALSO\" section. -Actually the section moved to is described by `Man-see-also-regexp'." - (interactive) - (if (not (Man-find-section Man-see-also-regexp)) - (error (concat "No " Man-see-also-regexp - " section found in the current manpage")))) +;(defun Manual-nuke-nroff-bs-footers () +; ;; Nuke headers: "MORE(1) UNIX Programmer's Manual MORE(1)" +; (goto-char (point-min)) +; (while (re-search-forward "^ *\\([A-Za-z][-_A-Za-z0-9]*([0-9A-Za-z]+)\\).*\\1$" nil t) +; (replace-match "")) +; +; ;; +; ;; it would appear that we have a choice between sometimes introducing +; ;; an extra blank line when a paragraph was broken by a footer, and +; ;; sometimes not putting in a blank line between two paragraphs when +; ;; a footer appeared right between them. FMH; I choose the latter. +; ;; +; +; ;; Nuke footers: "Printed 12/3/85 27 April 1981 1" +; ;; Sun appear to be on drugz: +; ;; "Sun Release 3.0B Last change: 1 February 1985 1" +; ;; HP are even worse! +; ;; " Hewlett-Packard -1- (printed 12/31/99)" FMHWA12ID!! +; ;; System V (well WICATs anyway): +; ;; "Page 1 (printed 7/24/85)" +; ;; Who is administering PCP to these corporate bozos? +; (goto-char (point-min)) +; (while (re-search-forward +; (cond +; ((eq system-type 'hpux) +; "\n\n?[ \t]*Hewlett-Packard\\(\\| Company\\)[ \t]*- [0-9]* -.*\n") +; ((eq system-type 'dgux-unix) +; "\n\n?[ \t]*Licensed material--.*Page [0-9]*\n") +; ((eq system-type 'usg-unix-v) +; "\n\n? *Page [0-9]*.*(printed [0-9/]*)\n") +; (t +; "\n\n?\\(Printed\\|Sun Release\\) [0-9].*[0-9]\n")) +; nil t) +; (replace-match "")) +; +; ;; Also, hack X footers: +; ;; "X Version 11 Last change: Release 5 1" +; (goto-char (point-min)) +; (while (re-search-forward "\n\n?X Version [^\n]+\n" nil t) +; (replace-match "")) +; +; ;; Crunch blank lines +; (goto-char (point-min)) +; (while (re-search-forward "\n\n\n\n*" nil t) +; (replace-match "\n\n")) +; ) -(defun Man-follow-manual-reference (reference) - "Get one of the manpages referred to in the \"SEE ALSO\" section. -Specify which reference to use; default is based on word at point." - (interactive - (if (not Man-refpages-alist) - (error "There are no references in the current man page") - (list (let* ((default (or - (car (all-completions - (save-excursion - (skip-syntax-backward "w()") - (skip-chars-forward " \t") - (let ((word (current-word))) - ;; strip a trailing '-': - (if (string-match "-$" word) - (substring word 0 - (match-beginning 0)) - word))) - Man-refpages-alist)) - (aheadsym Man-refpages-alist))) - chosen - (prompt (concat "Refer to: (default " default ") "))) - (setq chosen (completing-read prompt Man-refpages-alist nil t)) - (if (or (not chosen) - (string= chosen "")) - default - chosen))))) - (if (not Man-refpages-alist) - (error "Can't find any references in the current manpage") - (aput 'Man-refpages-alist reference) - (Man-getpage-in-background - (Man-translate-references (aheadsym Man-refpages-alist))))) - -(defun Man-kill () - "Kill the buffer containing the manpage." - (interactive) - (let ((buff (current-buffer))) - (delete-windows-on buff) - (kill-buffer buff)) - (if (and window-system - (or (eq Man-notify-method 'newframe) - (and pop-up-frames - (eq Man-notify-method 'bully)))) - (delete-frame))) +(defun Manual-mouseify-xrefs () + (goto-char (point-min)) + (forward-line 1) + (let ((case-fold-search nil) + s e name extent) + ;; possibly it would be faster to rewrite this expression to search for + ;; a less common sequence first (like "([0-9]") and then back up to see + ;; if it's really a match. This function is 15% of the total time, 13% + ;; of which is this call to re-search-forward. + (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.]*([0-9][a-zA-Z0-9]*)" + nil t) + (setq s (match-beginning 0) + e (match-end 0) + name (buffer-substring s e)) + (goto-char s) + (skip-chars-backward " \t") + (if (and (bolp) + (progn (backward-char 1) (= (preceding-char) ?-))) + (progn + (setq s (point)) + (skip-chars-backward "-a-zA-Z0-9_.") + (setq name (concat (buffer-substring (point) (1- s)) name)) + (setq s (point)))) + ;; if there are upper case letters in the section, downcase them. + (if (string-match "(.*[A-Z]+.*)$" name) + (setq name (concat (substring name 0 (match-beginning 0)) + (downcase (substring name (match-beginning 0)))))) + ;; (setq already-fontified (extent-at s)) + (setq extent (make-extent s e)) + (set-extent-property extent 'man (list 'Manual-follow-xref name)) + (set-extent-property extent 'highlight t) + ;; (if (not already-fontified)... + (set-extent-face extent 'man-xref) + (goto-char e)))) -(defun Man-quit () - "Bury the buffer containing the manpage." - (interactive) - (let ((buff (current-buffer))) - (delete-windows-on buff) - (bury-buffer buff)) - (if (and window-system - (or (eq Man-notify-method 'newframe) - (and pop-up-frames - (eq Man-notify-method 'bully)))) - (delete-frame))) +(defun Manual-follow-xref (&optional name-or-event) + "Invoke `manual-entry' on the cross-reference under the mouse. +When invoked noninteractively, the arg may be an xref string to parse instead." + (interactive "e") + (if (eventp name-or-event) + (let* ((p (event-point name-or-event)) + (extent (and p (extent-at p + (event-buffer name-or-event) + 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (eval data) + (error "no manual cross-reference there."))) + (let ((Manual-match-topic-exactly t) + (Manual-query-multiple-pages nil)) + (or (manual-entry name-or-event) + ;; If that didn't work, maybe it's in a different section than the + ;; man page writer expected. For example, man pages tend assume + ;; that all user programs are in section 1, but X tends to generate + ;; makefiles that put things in section "n" instead... + (and (string-match "[ \t]*([^)]+)\\'" name-or-event) + (progn + (message "No entries found for %s; checking other sections..." + name-or-event) + (manual-entry + (substring name-or-event 0 (match-beginning 0)) + nil t))))))) -(defun Man-goto-page (page) - "Go to the manual page on page PAGE." - (interactive - (if (not Man-page-list) - (let ((args Man-arguments)) - (kill-buffer (current-buffer)) - (error "Can't find the %s manpage" args)) - (if (= (length Man-page-list) 1) - (error "You're looking at the only manpage in the buffer") - (list (read-minibuffer (format "Go to manpage [1-%d]: " - (length Man-page-list))))))) - (if (not Man-page-list) - (let ((args Man-arguments)) - (kill-buffer (current-buffer)) - (error "Can't find the %s manpage" args))) - (if (or (< page 1) - (> page (length Man-page-list))) - (error "No manpage %d found" page)) - (let* ((page-range (nth (1- page) Man-page-list)) - (page-start (car page-range)) - (page-end (car (cdr page-range)))) - (setq Man-current-page page - Man-page-mode-string (Man-make-page-mode-string)) - (widen) - (goto-char page-start) - (narrow-to-region page-start page-end) - (Man-build-section-alist) - (Man-build-references-alist) - (goto-char (point-min)))) +(defun Manual-popup-menu (&optional event) + "Pops up a menu of cross-references in this manual page. +If there is a cross-reference under the mouse button which invoked this +command, it will be the first item on the menu. Otherwise, they are +on the menu in the order in which they appear in the buffer." + (interactive "e") + (let ((buffer (current-buffer)) + (sep "---") + (prefix "Show Manual Page for ") + xref items) + (cond (event + (setq buffer (event-buffer event)) + (let* ((p (event-point event)) + (extent (and p (extent-at p buffer 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (setq xref (nth 1 data)))))) + (if xref (setq items (list sep xref))) + (map-extents #'(lambda (extent ignore) + (let ((data (extent-property extent 'man))) + (if (and (eq (car-safe data) 'Manual-follow-xref) + (not (member (nth 1 data) items))) + (setq items (cons (nth 1 data) items))) + nil)) + buffer) + (if (eq sep (car items)) (setq items (cdr items))) + (let ((popup-menu-titles nil)) + (popup-menu + (cons "Manual Entry" + (mapcar #'(lambda (item) + (if (eq item sep) + item + (vector (concat prefix item) + (list 'Manual-follow-xref item) t))) + (nreverse items))))))) - -(defun Man-next-manpage () - "Find the next manpage entry in the buffer." - (interactive) - (if (= (length Man-page-list) 1) - (error "This is the only manpage in the buffer")) - (if (< Man-current-page (length Man-page-list)) - (Man-goto-page (1+ Man-current-page)) - (if Man-circular-pages-flag - (Man-goto-page 1) - (error "You're looking at the last manpage in the buffer")))) +(defun pager-cleanup-hook () + "cleanup man page if called via $PAGER" + (let ((buf-name (or buffer-file-name (buffer-name)))) + (if (and (or (string-match "^/tmp/man[0-9]+" buf-name) + (string-match ".*/man/\\(man\\|cat\\)[1-9a-z]/" buf-name)) + (not (string-match Manual-bogus-file-pattern buf-name))) + (let (buffer manpage) + (require 'man) + (goto-char (point-min)) + (setq buffer-read-only nil) + (Manual-nuke-nroff-bs) + (goto-char (point-min)) + (if (re-search-forward "[^ \t]") + (goto-char (- (point) 1))) + (if (looking-at "\\([a-zA-Z0-9]+\\)[ \t]*(") + (setq manpage (buffer-substring (match-beginning 1) (match-end 1))) + (setq manpage "???")) + (setq buffer + (rename-buffer + (generate-new-buffer-name (concat "*man " manpage "*")))) + (setq buffer-file-name nil) + (goto-char (point-min)) + (insert (format "%s\n" buf-name)) + (goto-char (point-min)) + (buffer-disable-undo buffer) + (set-buffer-modified-p nil) + (Manual-mode) + )))) -(defun Man-previous-manpage () - "Find the previous manpage entry in the buffer." - (interactive) - (if (= (length Man-page-list) 1) - (error "This is the only manpage in the buffer")) - (if (> Man-current-page 1) - (Man-goto-page (1- Man-current-page)) - (if Man-circular-pages-flag - (Man-goto-page (length Man-page-list)) - (error "You're looking at the first manpage in the buffer")))) - -;; Init the man package variables, if not already done. -(Man-init-defvars) - +(add-hook 'server-visit-hook 'pager-cleanup-hook) (provide 'man) - -;;; man.el ends here
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/packages/old-man.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1225 @@ +;;; man.el --- browse UNIX manual pages +;; Keywords: help + +;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. +;; +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Synched up with: Not synched with FSF. +;;; ICK! This file is almost completely different from FSF. +;;; Someone clarify please. + +;; Mostly rewritten by Alan K. Stebbens <aks@hub.ucsb.edu> 11-apr-90. +;; +;; o Match multiple man pages using TOPIC as a simple pattern +;; o Search unformatted pages, even when formatted matches are found +;; o Query the user as to which pages are desired +;; o Use of the prefix arg to toggle/bypass the above features +;; o Buffers named by the first topic in the buffer +;; o Automatic uncompress for compressed man pages (.Z, .z, and .gz) +;; o View the resulting buffer using M-x view mode +;; +;; Modified 16-mar-91 by Jamie Zawinski <jwz@lucid.com> to default the +;; manual topic to the symbol at point, just like find-tag does. +;; +;; Modified 22-mar-93 by jwz to use multiple fonts and follow xrefs with mouse. +;; +;; Modified 16-apr-93 by Dave Gillespie <daveg@synaptics.com> to make +;; apropos work nicely; work correctly when bold or italic is unavailable; +;; reuse old buffer if topic is re-selected (in Manual-topic-buffer mode). +;; +;; Modified 4-apr-94 by jwz: merged in Tibor Polgar's code for manpath.conf. +;; +;; Modified 19-apr-94 by Tibor Polgar <tlp00@spg.amdahl.com> to add support for +;; $PAGER variable to be emacsclient and properly process man pages (assuming +;; the man pages were built by man in /tmp. also fixed bug with man list being +;; backwards. +;; +;; Modified 23-aug-94 by Tibor Polgar <tlp00@spg.amdahl.com> to add support for +;; displaying only one instance of a man page (Manual-unique-man-sections-only) +;; Fixed some more man page ordering bugs, bug with Manual-query-multiple-pages. +;; +;; Modified 29-nov-94 by Ben Wing <wing@spg.amdahl.com>: small fixes +;; that should hopefully make things work under HPUX and IRIX.; +;; +;; Modified 15-jul-95 by Dale Atems <atems@physics.wayne.edu>: +;; some extensive rewriting to make things work right (more or less) +;; under IRIX. +;; +;; Modified 08-mar-96 by Hubert Palme <palme@wrcs3.urz.uni-wuppertal.de>: +;; added /usr/share/catman to the manual directory list for IRIX (5.3) +;; +;; This file defines "manual-entry", and the remaining definitions all +;; begin with "Manual-". This makes the autocompletion on "M-x man" work. +;; +;; Variables of interest: +;; +;; Manual-program +;; Manual-topic-buffer +;; Manual-buffer-view-mode +;; Manual-directory-list +;; Manual-formatted-directory-list +;; Manual-match-topic-exactly +;; Manual-query-multiple-pages +;; Manual-page-history +;; Manual-subdirectory-list +;; Manual-man-page-section-ids +;; Manual-formatted-page-prefix +;; Manual-unformatted-page-prefix +;; Manual-use-full-section-ids + +(defvar Manual-program "man" "\ +*Name of the program to invoke in order to format the source man pages.") + +(defvar Manual-section-switch (if (eq system-type 'usg-unix-v) "-s" nil) + "SysV needs this to work right.") + +(defvar Manual-topic-buffer t "\ +*Non-nil means \\[Manual-entry] should output the manual entry for TOPIC into +a buffer named *man TOPIC*, otherwise, it should name the buffer +*Manual Entry*.") + +(defvar Manual-buffer-view-mode t "\ +*Whether manual buffers should be placed in view-mode. +nil means leave the buffer in fundamental-mode in another window. +t means use `view-buffer' to display the man page in the current window. +Any other value means use `view-buffer-other-window'.") + +(defvar Manual-match-topic-exactly t "\ +*Non-nil means that \\[manual-entry] will match the given TOPIC exactly, rather +apply it as a pattern. When this is nil, and \"Manual-query-multiple-pages\" +is non-nil, then \\[manual-entry] will query you for all matching TOPICs. +This variable only has affect on the preformatted man pages (the \"cat\" files), +since the \"man\" command always does exact topic matches.") + +(defvar Manual-query-multiple-pages nil "\ +*Non-nil means that \\[manual-entry] will query the user about multiple man +pages which match the given topic. The query is done using the function +\"y-or-n-p\". If this variable is nil, all man pages with topics matching the +topic given to \\[manual-entry] will be inserted into the temporary buffer. +See the variable \"Manual-match-topic-exactly\" to control the matching.") + +(defvar Manual-unique-man-sections-only nil + "*Only present one man page per section. This variable is useful if the same or +up/down level man pages for the same entry are present in mulitple man paths. +When set to t, only the first entry found in a section is displayed, the others +are ignored without any messages or warnings. Note that duplicates can occur if +the system has both formatted and unformatted version of the same page.") + +(defvar Manual-mode-hook nil + "Function or functions run on entry to Manual-mode.") + +(defvar Manual-directory-list nil "\ +*A list of directories used with the \"man\" command, where each directory +contains a set of \"man?\" and \"cat?\" subdirectories. If this variable is nil, +it is initialized by \\[Manual-directory-list-init].") + +(defvar Manual-formatted-directory-list nil "\ +A list of directories containing formatted man pages. Initialized by +\\[Manual-directory-list-init].") + +(defvar Manual-unformatted-directory-list nil "\ +A list of directories containing the unformatted (source) man pages. +Initialized by \\[Manual-directory-list-init].") + +(defvar Manual-page-history nil "\ +A list of names of previously visited man page buffers.") + +(defvar Manual-manpath-config-file "/usr/lib/manpath.config" + "*Location of the manpath.config file, if any.") + +(defvar Manual-apropos-switch "-k" + "*Man apropos switch") + +;; New variables. + +(defvar Manual-subdirectory-list nil "\ +A list of all the subdirectories in which man pages may be found. +Iniialized by Manual-directory-list-init.") + +;; This is for SGI systems; don't know what it should be otherwise. +(defvar Manual-man-page-section-ids "1nl6823457poD" "\ +String containing all suffix characters for \"cat\" and \"man\" +that identify valid sections of the Un*x manual.") + +(defvar Manual-formatted-page-prefix "cat" "\ +Prefix for directories where formatted man pages are to be found. +Defaults to \"cat\".") + +(defvar Manual-unformatted-page-prefix "man" "\ +Prefix for directories where unformatted man pages are to be found. +Defaults to \"man\".") + +(defvar Manual-leaf-signature "" "\ +Regexp for identifying \"leaf\" subdirectories in the search path. +If empty, initialized by Manual-directory-list-init.") + +(defvar Manual-use-full-section-ids t "\ +If non-nil, pass full section ids to Manual-program, otherwise pass +only the first character. Defaults to 't'.") + +(defvar Manual-use-subdirectory-list (eq system-type 'irix) "\ +This makes manual-entry work correctly on SGI machines but it +imposes a large startup cost which is why it is not simply on by +default on all systems.") + +(defvar Manual-use-rosetta-man (not (null (locate-file "rman" exec-path))) "\ +If non-nil, use RosettaMan (rman) to filter man pages. +This makes man-page cleanup virtually instantaneous, instead of +potentially taking a long time. + +Here is information on RosettaMan, from Neal.Becker@comsat.com (Neal Becker): + +RosettaMan is a filter for UNIX manual pages. It takes as input man +pages formatted for a variety of UNIX flavors (not [tn]roff source) +and produces as output a variety of file formats. Currently +RosettaMan accepts man pages as formatted by the following flavors of +UNIX: Hewlett-Packard HP-UX, AT&T System V, SunOS, Sun Solaris, OSF/1, +DEC Ultrix, SGI IRIX, Linux, SCO; and produces output for the following +formats: printable ASCII only (stripping page headers and footers), +section and subsection headers only, TkMan, [tn]roff, Ensemble, RTF, +SGML (soon--I finally found a DTD), HTML, MIME, LaTeX, LaTeX 2e, Perl 5's pod. + +RosettaMan improves on other man page filters in several ways: (1) its +analysis recognizes the structural pieces of man pages, enabling high +quality output, (2) its modular structure permits easy augmentation of +output formats, (3) it accepts man pages formatted with the varient +macros of many different flavors of UNIX, and (4) it doesn't require +modification or cooperation with any other program. + +RosettaMan is a rewrite of TkMan's man page filter, called bs2tk. (If +you haven't heard about TkMan, a hypertext man page browser, you +should grab it via anonymous ftp from ftp.cs.berkeley.edu: +/ucb/people/phelps/tkman.tar.Z.) Whereas bs2tk generated output only for +TkMan, RosettaMan generalizes the process so that the analysis can be +leveraged to new output formats. A single analysis engine recognizes +section heads, subsection heads, body text, lists, references to other +man pages, boldface, italics, bold italics, special characters (like +bullets), tables (to a degree) and strips out page headers and +footers. The engine sends signals to the selected output functions so +that an enhancement in the engine improves the quality of output of +all of them. Output format functions are easy to add, and thus far +average about about 75 lines of C code each. + + + +*** NOTES ON CURRENT VERSION *** + +Help! I'm looking for people to help with the following projects. +\(1) Better RTF output format. The current one works, but could be +made better. (2) Roff macros that produce text that is easily +parsable. RosettaMan handles a great variety, but some things, like +H-P's tables, are intractable. If you write an output format or +otherwise improve RosettaMan, please send in your code so that I may +share the wealth in future releases. + +This version can try to identify tables (turn this on with the -T +switch) by looking for lines with a large amount of interword spacing, +reasoning that this is space between columns of a table. This +heuristic doesn't always work and sometimes misidentifies ordinary +text as tables. In general I think it is impossible to perfectly +identify tables from nroff formatted text. However, I do think the +heuristics can be tuned, so if you have a collection of manual pages +with unrecognized tables, send me the lot, in formatted form (i.e., +after formatting with nroff -man), and uuencode them to preserve the +control characters. Better, if you can think of heuristics that +distinguish tables from ordinary text, I'd like to hear them. + + +Notes for HTML consumers: This filter does real (heuristic) +parsing--no <PRE>! Man page references are turned into hypertext links.") + +(make-face 'man-italic) +(or (face-differs-from-default-p 'man-italic) + (copy-face 'italic 'man-italic)) +;; XEmacs (from Darrell Kindred): underlining is annoying due to +;; large blank spaces in this face. +;; (or (face-differs-from-default-p 'man-italic) +;; (set-face-underline-p 'man-italic t)) + +(make-face 'man-bold) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'bold 'man-bold)) +(or (face-differs-from-default-p 'man-bold) + (copy-face 'man-italic 'man-bold)) + +(make-face 'man-heading) +(or (face-differs-from-default-p 'man-heading) + (copy-face 'man-bold 'man-heading)) + +(make-face 'man-xref) +(or (face-differs-from-default-p 'man-xref) + (set-face-underline-p 'man-xref t)) + +;; Manual-directory-list-init +;; Initialize the directory lists. + +(defun Manual-directory-list-init (&optional arg) + "Initialize the Manual-directory-list variable from $MANPATH +if it is not already set, or if a prefix argument is provided." + (interactive "P") + (if arg (setq Manual-directory-list nil)) + (if (null Manual-directory-list) + (let ((manpath (getenv "MANPATH")) + (global (Manual-manpath-config-contents)) + (dirlist nil) + dir) + (cond ((and manpath global) + (setq manpath (concat manpath ":" global))) + (global + (setq manpath global)) + ((not manpath) + ;; XEmacs - (bpw/stig) Unix-specifix hack for lusers w/ no manpath + (setq manpath "/usr/local/man:/usr/share/man:/usr/share/catman:/usr/contrib/man:/usr/X11/man:/usr/man:/usr/catman"))) + ;; Make sure that any changes we've made internally are seen by man. + (setenv "MANPATH" manpath) + (while (string-match "\\`:*\\([^:]+\\)" manpath) + (setq dir (substring manpath (match-beginning 1) (match-end 1))) + (and (not (member dir dirlist)) + (setq dirlist (cons dir dirlist))) + (setq manpath (substring manpath (match-end 0)))) + (setq dirlist (nreverse dirlist)) + (setq Manual-directory-list dirlist) + (setq Manual-subdirectory-list nil) + (setq Manual-formatted-directory-list nil) + (setq Manual-unformatted-directory-list nil))) + (if (string-equal Manual-leaf-signature "") + (setq Manual-leaf-signature + (concat "/\\(" + Manual-formatted-page-prefix + "\\|" Manual-unformatted-page-prefix + "\\)" + "[" Manual-man-page-section-ids + "].?/."))) + (if Manual-use-subdirectory-list + (progn + (if (null Manual-subdirectory-list) + (setq Manual-subdirectory-list + (Manual-all-subdirectories Manual-directory-list + Manual-leaf-signature nil))) + (if (null Manual-formatted-directory-list) + (setq Manual-formatted-directory-list + (Manual-filter-subdirectories Manual-subdirectory-list + Manual-formatted-page-prefix))) + (if (null Manual-unformatted-directory-list) + (setq Manual-unformatted-directory-list + (Manual-filter-subdirectories Manual-subdirectory-list + Manual-unformatted-page-prefix)))) + (if (null Manual-formatted-directory-list) + (setq Manual-formatted-directory-list + (Manual-select-subdirectories Manual-directory-list + Manual-formatted-page-prefix))) + (if (null Manual-unformatted-directory-list) + (setq Manual-unformatted-directory-list + (Manual-select-subdirectories Manual-directory-list + Manual-unformatted-page-prefix))))) + + +(defun Manual-manpath-config-contents () + "Parse the `Manual-manpath-config-file' file, if any. +Returns a string like in $MANPATH." + (if (and Manual-manpath-config-file + (file-readable-p Manual-manpath-config-file)) + (let ((buf (get-buffer-create " *Manual-config*")) + path) + (set-buffer buf) + (buffer-disable-undo buf) + (erase-buffer) + (insert-file-contents Manual-manpath-config-file) + (while (re-search-forward "^\\(MANDATORY_MANPATH\\|MANPATH_MAP\\)" + nil t) + (and (re-search-forward "\\(/[^ \t\n]+\\)[ \t]*$") + (setq path (concat path (buffer-substring (match-beginning 1) + (match-end 1)) + ":")))) + (kill-buffer buf) + path))) +;; +;; manual-entry -- The "main" user function +;; + +;;;###autoload +(defun manual-entry (topic &optional arg silent) + "Display the Unix manual entry (or entries) for TOPIC. +If prefix arg is given, modify the search according to the value: + 2 = complement default exact matching of the TOPIC name; + exact matching default is specified by `Manual-match-topic-exactly' + 3 = force a search of the unformatted man directories + 4 = both 2 and 3 +The manual entries are searched according to the variable +Manual-directory-list, which should be a list of directories. If +Manual-directory-list is nil, \\[Manual-directory-list-init] is +invoked to create this list from the MANPATH environment variable. +See the variable Manual-topic-buffer which controls how the buffer +is named. See also the variables Manual-match-topic-exactly, +Manual-query-multiple-pages, and Manual-buffer-view-mode." + (interactive + (list (let* ((fmh "-A-Za-z0-9_.") + (default (save-excursion + (buffer-substring + (progn + (re-search-backward "\\sw" nil t) + (skip-chars-backward fmh) (point)) + (progn (skip-chars-forward fmh) (point))))) + (thing (read-string + (if (equal default "") "Manual entry: " + (concat "Manual entry: (default " default ") "))))) + (if (equal thing "") default thing)) + (prefix-numeric-value current-prefix-arg))) + ;;(interactive "sManual entry (topic): \np") + (or arg (setq arg 1)) + (Manual-directory-list-init nil) + (let ((exact (if (or (= arg 2) (= arg 4)) + (not Manual-match-topic-exactly) + Manual-match-topic-exactly)) + (force (if (>= arg 3) + t + nil)) + section fmtlist manlist apropos-mode) + (let ((case-fold-search nil)) + (if (and (null section) + (string-match + "\\`[ \t]*\\([^( \t]+\\)[ \t]*(\\(.+\\))[ \t]*\\'" topic)) + (setq section (substring topic (match-beginning 2) + (match-end 2)) + topic (substring topic (match-beginning 1) + (match-end 1))) + (if (string-match "\\`[ \t]*-k[ \t]+\\([^ \t]+\\)\\'" topic) + (setq section "-k" + topic (substring topic (match-beginning 1)))))) + (if (equal section "-k") + (setq apropos-mode t) + (or silent + (message "Looking for formatted entry for %s%s..." + topic (if section (concat "(" section ")") ""))) + (setq fmtlist (Manual-select-man-pages + Manual-formatted-directory-list + topic section exact '())) + (if (or force (not section) (null fmtlist)) + (progn + (or silent + (message "%sooking for unformatted entry for %s%s..." + (if fmtlist "L" "No formatted entry, l") + topic (if section (concat "(" section ")") ""))) + (setq manlist (Manual-select-man-pages + Manual-unformatted-directory-list + topic section exact (if force '() fmtlist)))))) + + ;; Delete duplicate man pages (a file of the same name in multiple + ;; directories.) + (or nil ;force + (let ((rest (append fmtlist manlist))) + (while rest + (let ((rest2 (cdr rest))) + (while rest2 + (if (equal (file-name-nondirectory (car rest)) + (file-name-nondirectory (car rest2))) + (setq fmtlist (delq (car rest2) fmtlist) + manlist (delq (car rest2) manlist))) + (setq rest2 (cdr rest2)))) + (setq rest (cdr rest))))) + + (if (not (or fmtlist manlist apropos-mode)) + (progn + (message "No entries found for %s%s" topic + (if section (concat "(" section ")") "")) + nil) + (let ((bufname (cond ((not Manual-topic-buffer) + ;; What's the point of retaining this? + (if apropos-mode + "*Manual Apropos*" + "*Manual Entry*")) + (apropos-mode + (concat "*man apropos " topic "*")) + (t + (concat "*man " + (cond (exact + (if section + (concat topic "." section) + topic)) + ((or (cdr fmtlist) (cdr manlist) + (and fmtlist manlist)) + ;; more than one entry found + (concat topic "...")) + (t + (file-name-nondirectory + (car (or fmtlist manlist))))) + "*")))) + (temp-buffer-show-function + (cond ((eq 't Manual-buffer-view-mode) 'view-buffer) + ((eq 'nil Manual-buffer-view-mode) + temp-buffer-show-function) + (t 'view-buffer-other-window)))) + + (if apropos-mode + (setq manlist (list (format "%s.%s" topic section)))) + + (cond + ((and Manual-topic-buffer (get-buffer bufname)) + ;; reselect an old man page buffer if it exists already. + (save-excursion + (set-buffer (get-buffer bufname)) + (Manual-mode)) + (if temp-buffer-show-function + (funcall temp-buffer-show-function (get-buffer bufname)) + (display-buffer bufname))) + (t + (with-output-to-temp-buffer bufname + (buffer-disable-undo standard-output) + (save-excursion + (set-buffer standard-output) + (setq buffer-read-only nil) + (erase-buffer) + (Manual-insert-pages fmtlist manlist apropos-mode) + (set-buffer-modified-p nil) + (Manual-mode) + )))) + (setq Manual-page-history + (cons (buffer-name) + (delete (buffer-name) Manual-page-history))) + (message nil) + t)))) + +(defun Manpage-apropos (topic &optional arg silent) + "Apropos on Unix manual pages for TOPIC. +It calls the function `manual-entry'. Look at this function for +further description. Look also at the variable `Manual-apropos-switch', +if this function doesn't work on your system." + (interactive + (list (let* ((fmh "-A-Za-z0-9_.") + (default (save-excursion + (buffer-substring + (progn + (re-search-backward "\\sw" nil t) + (skip-chars-backward fmh) (point)) + (progn (skip-chars-forward fmh) (point))))) + (thing (read-string + (if (equal default "") "Manual entry: " + (concat "Manual entry: (default " default ") "))))) + (if (equal thing "") default thing)) + (prefix-numeric-value current-prefix-arg))) + (manual-entry (concat Manual-apropos-switch " " topic) arg silent)) + +(defun Manual-insert-pages (fmtlist manlist apropos-mode) + (let ((sep (make-string 65 ?-)) + name start end topic section) + (while fmtlist ; insert any formatted files + (setq name (car fmtlist)) + (goto-char (point-max)) + (setq start (point)) + ;; In case the file can't be read or uncompressed or + ;; something like that. + (condition-case () + (Manual-insert-man-file name) + (file-error nil)) + (goto-char (point-max)) + (setq end (point)) + (save-excursion + (save-restriction + (message "Cleaning manual entry for %s..." + (file-name-nondirectory name)) + (narrow-to-region start end) + (Manual-nuke-nroff-bs) + (goto-char (point-min)) + (insert "File: " name "\n") + (goto-char (point-max)) + )) + (if (or (cdr fmtlist) manlist) + (insert "\n\n" sep "\n")) + (setq fmtlist (cdr fmtlist))) + + (while manlist ; process any unformatted files + (setq name (car manlist)) + (or (string-match "\\([^/]+\\)\\.\\([^./]+\\)\\(\\.gz\\'\\)" name) + (string-match "\\([^/]+\\)\\.\\([^./]+\\)\\'" name)) + (setq topic (substring name (match-beginning 1) (match-end 1))) + (setq section (substring name (match-beginning 2) (match-end 2))) + ;; This won't work under IRIX, because SGI man accepts only the + ;; "main" (one-character) section id, not full section ids + ;; like 1M, 3X, etc. Put (setq Manual-use-full-section-ids nil) + ;; in your .emacs to work around this problem. + (if (not (or Manual-use-full-section-ids (string-equal section ""))) + (setq section (substring section 0 1))) + (message "Invoking man %s%s %s..." + (if Manual-section-switch + (concat Manual-section-switch " ") + "") + section topic) + (setq start (point)) + (Manual-run-formatter name topic section) + (setq end (point)) + (save-excursion + (save-restriction + (message "Cleaning manual entry for %s(%s)..." topic section) + (narrow-to-region start end) + (Manual-nuke-nroff-bs apropos-mode) + (goto-char (point-min)) + (insert "File: " name "\n") + (goto-char (point-max)) + )) + (if (cdr manlist) + (insert "\n\n" sep "\n")) + (setq manlist (cdr manlist)))) + (if (< (buffer-size) 200) + (progn + (goto-char (point-min)) + (if (looking-at "^File: ") + (forward-line 1)) + (error (buffer-substring (point) (progn (end-of-line) (point)))))) + nil) + + +(defun Manual-run-formatter (name topic section) + (cond + ((string-match "roff\\'" Manual-program) + ;; kludge kludge + (call-process Manual-program nil t nil "-Tman" "-man" name)) + + (t + (call-process Manual-program nil t nil + (concat Manual-section-switch section) topic)))) + + ;(Manual-use-rosetta-man + ; (call-process "/bin/sh" nil t nil "-c" + ; (format "man %s %s | rman" section topic))) + + +(defvar Manual-mode-map + (let ((m (make-sparse-keymap))) + (set-keymap-name m 'Manual-mode-map) + (define-key m "l" 'Manual-last-page) + (define-key m 'button2 'Manual-follow-xref) + (define-key m 'button3 'Manual-popup-menu) + m)) + +(defun Manual-mode () + (kill-all-local-variables) + (setq buffer-read-only t) + (use-local-map Manual-mode-map) + (setq major-mode 'Manual-mode + mode-name "Manual") + ;; man pages with long lines are buggy! + ;; This looks slightly better if they only + ;; overran by a couple of chars. + (setq truncate-lines t) + (if (featurep 'scrollbar) + ;; turn off horizontal scrollbars in this buffer + (set-specifier scrollbar-height (cons (current-buffer) 0))) + (run-hooks 'Manual-mode-hook)) + +(defun Manual-last-page () + (interactive) + (while (or (not (get-buffer (car (or Manual-page-history + (error "No more history."))))) + (eq (get-buffer (car Manual-page-history)) (current-buffer))) + (setq Manual-page-history (cdr Manual-page-history))) + (switch-to-buffer (car Manual-page-history))) + + +;; Manual-select-subdirectories +;; Given a DIRLIST and a SUBDIR name, return all subdirectories of the former which +;; match the latter. + +(defun Manual-select-subdirectories (dirlist subdir) + (let ((dirs '()) + (case-fold-search nil) + (match (concat "\\`" (regexp-quote subdir))) + d) + (while dirlist + (setq d (car dirlist) dirlist (cdr dirlist)) + (if (file-directory-p d) + (let ((files (directory-files d t match nil 'dirs-only)) + (dir-temp '())) + (while files + (if (file-executable-p (car files)) + (setq dir-temp (cons (file-name-as-directory (car files)) + dir-temp))) + (setq files (cdr files))) + (and dir-temp + (setq dirs (append dirs (nreverse dir-temp))))))) + dirs)) + + +;; Manual-filter-subdirectories +;; Given a DIRLIST and a SUBDIR name, return all members of the former +;; which match the latter. + +(defun Manual-filter-subdirectories (dirlist subdir) + (let ((match (concat + "/" + (regexp-quote subdir) + "[" Manual-man-page-section-ids "]")) + slist dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (and (file-executable-p dir) (string-match match dir)) + (setq slist (cons dir slist)))) + (nreverse slist))) + + +(defun Manual-all-subdirectories (dirlist leaf-signature dirs &optional silent) "\ +Given a DIRLIST, return a backward-sorted list of all subdirectories +thereof, prepended to DIRS if non-nil. This function calls itself +recursively until subdirectories matching LEAF-SIGNATURE are reached, +or the hierarchy has been thoroughly searched. This code is a modified +version of a function written by Tim Bradshaw (tfb@ed.ac.uk)." + (Manual-all-subdirectories-noloop dirlist leaf-signature dirs nil silent)) + +(defun Manual-all-subdirectories-noloop (dirlist leaf-signature dirs been &optional silent) "\ +Does the job of manual-all-subdirectories and keeps track of where it +has been to avoid loops." + (let (dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (file-directory-p dir) + (let ((dir-temp (cons (file-name-as-directory dir) dirs))) + ;; Without feedback the user might wonder about the delay! + (or silent (message + "Building list of search directories... %s" + (car dir-temp))) + (if (member (file-truename dir) been) + () ; Ignore. We have been here before + (setq been (cons (file-truename dir) been)) + (setq dirs + (if (string-match leaf-signature dir) + dir-temp + (Manual-all-subdirectories-noloop + (directory-files dir t "[^.]$" nil 'dirs-only) + leaf-signature dir-temp been silent)))))))) + dirs) + + +(defvar Manual-bogus-file-pattern "\\.\\(lpr\\|ps\\|PS\\)\\'" + "Some systems have files in the man/man*/ directories which aren't man pages. +This pattern is used to prune those files.") + +;; Manual-select-man-pages +;; +;; Given a DIRLIST, discover all filenames which complete given the TOPIC +;; and SECTION. + +;; ## Note: BSD man looks for .../man1/foo.1 and .../man1/$MACHINE/foo.1 + +;; ## Fixed for SGI IRIX 5.x on Sat Jul 15 1995 by Dale Atems +;; (atems@physics.wayne.edu). + +(defun Manual-select-man-pages (dirlist topic section exact shadow) + (let ((case-fold-search nil)) + (and section + (let ((l '()) + ;;(match (concat (substring section 0 1) "/?\\'")) + ;; ^^^ + ;; We'll lose any pages inside subdirectories of the "standard" + ;; ones if we insist on this! The following regexp should + ;; match any directory ending with the full section id or + ;; its first character, or any direct subdirectory thereof: + (match (concat "\\(" + (regexp-quote section) + "\\|" + (substring section 0 1) + "\\)/?")) + d) + (while dirlist + (setq d (car dirlist) dirlist (cdr dirlist)) + (if (string-match match d) + (setq l (cons d l)))) + (setq dirlist l))) + (if shadow + (setq shadow (concat "/\\(" + (mapconcat #'(lambda (n) + (regexp-quote + (file-name-nondirectory n))) + shadow + "\\|") + "\\)\\'"))) + (let ((manlist '()) + (match (concat "\\`" + (regexp-quote topic) + ;; **Note: on IRIX the preformatted pages + ;; are packed, so they end with ".z". This + ;; way you miss them if you specify a + ;; section. I don't see any point to it here + ;; even on BSD systems since we're looking + ;; one level down already, but I can't test + ;; this. More thought needed (???) + + (cond ((and section + (not Manual-use-subdirectory-list)) + (concat "\\." (regexp-quote section))) + (exact + ;; If Manual-match-topic-exactly is + ;; set, then we must make sure the + ;; completions are exact, except for + ;; trailing weird characters after + ;; the section. + "\\.") + (t + "")))) + dir) + (while dirlist + (setq dir (car dirlist) dirlist (cdr dirlist)) + (if (not (file-directory-p dir)) + (progn + (message "warning: %s is not a directory" dir) + ;;(sit-for 1) + ) + (let ((files (directory-files dir t match nil t)) + f) + (while files + (setq f (car files) files (cdr files)) + (cond ((string-match Manual-bogus-file-pattern f) + ;(message "Bogus fule %s" f) (sit-for 2) + ) + ((and shadow (string-match shadow f)) + ;(message "Shadowed %s" f) (sit-for 2) + ) + ((not (file-readable-p f)) + ;(message "Losing with %s" f) (sit-for 2) + ) + (t + (setq manlist (cons f manlist)))))))) + (setq manlist (nreverse manlist)) + (and Manual-unique-man-sections-only + (setq manlist (Manual-clean-to-unique-pages-only manlist))) + (if (and manlist Manual-query-multiple-pages) + (apply #'append + (mapcar #'(lambda (page) + (and page + (y-or-n-p (format "Read %s? " page)) + (list page))) + manlist)) + manlist)))) + +(defun Manual-clean-to-unique-pages-only (manlist) + "Prune the current list of pages down to a unique set." + (let (page-name unique-pages) + (apply 'append + (mapcar '(lambda (page) + (cond (page + (and (string-match ".*/\\(.*\\)" page) + (setq page-name (substring page (match-beginning 1) + (match-end 1))) + ;; try to clip off .Z, .gz suffixes + (and (string-match "\\(.*\\)\\.\\(.+\\)\\.\\(.+\\)" + page-name) + (setq page-name + (substring page-name (match-beginning 1) + (match-end 2))))) + ;; add Manual-unique-pages if it isn't there + ;; and return file + (if (and unique-pages + page-name + (string-match (concat "\\b" page-name "\\b") + unique-pages)) + nil + (setq unique-pages (concat unique-pages + page-name + " ")) + (list page))))) + manlist)))) + + + +(defun Manual-insert-man-file (name) + ;; Insert manual file (unpacked as necessary) into buffer + (cond ((equal (substring name -3) ".gz") + (call-process "gunzip" nil t nil "--stdout" name)) + ((or (equal (substring name -2) ".Z") + ;; HPUX uses directory names that end in .Z and compressed + ;; files that don't. How gratuitously random. + (let ((case-fold-search nil)) + (string-match "\\.Z/" name))) + (call-process "zcat" name t nil)) ;; XEmacs change for HPUX + ((equal (substring name -2) ".z") + (call-process "pcat" nil t nil name)) + (t + (insert-file-contents name)))) + +(defmacro Manual-delete-char (n) + ;; in v19, delete-char is compiled as a function call, but delete-region + ;; is byte-coded, so it's much faster. + ;; (We were spending 40% of our time in delete-char alone.) + (list 'delete-region '(point) (list '+ '(point) n))) + +;; Hint: BS stands for more things than "back space" +(defun Manual-nuke-nroff-bs (&optional apropos-mode) + (interactive "*") + (if Manual-use-rosetta-man + (call-process-region (point-min) (point-max) "rman" t t nil) + ;; + ;; turn underlining into italics + ;; + (goto-char (point-min)) + (while (search-forward "_\b" nil t) + ;; searching for underscore-backspace and then comparing the following + ;; chars until the sequence ends turns out to be much faster than searching + ;; for a regexp which matches the whole sequence. + (let ((s (match-beginning 0))) + (goto-char s) + (while (and (= (following-char) ?_) + (= (char-after (1+ (point))) ?\b)) + (Manual-delete-char 2) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-italic))) + ;; + ;; turn overstriking into bold + ;; + (goto-char (point-min)) + (while (re-search-forward "\\([^\n]\\)\\(\b\\1\\)" nil t) + ;; Surprisingly, searching for the above regexp is faster than searching + ;; for a backspace and then comparing the preceding and following chars, + ;; I presume because there are many false matches, meaning more funcalls + ;; to re-search-forward. + (let ((s (match-beginning 0))) + (goto-char s) + ;; Some systems (SGI) overstrike multiple times, eg, "M\bM\bM\bM". + (while (looking-at "\\([^\n]\\)\\(\b\\1\\)+") + (delete-region (+ (point) 1) (match-end 0)) + (forward-char 1)) + (set-extent-face (make-extent s (point)) 'man-bold))) + ;; + ;; hack bullets: o^H+ --> + + (goto-char (point-min)) + (while (search-forward "\b" nil t) + (Manual-delete-char -2)) + + (if (> (buffer-size) 100) ; minor kludge + (Manual-nuke-nroff-bs-footers)) + ) ;; not Manual-use-rosetta-man + ;; + ;; turn subsection header lines into bold + ;; + (goto-char (point-min)) + (if apropos-mode + (while (re-search-forward "[a-zA-Z0-9] ([0-9]" nil t) + (forward-char -2) + (delete-backward-char 1)) + + ;; (while (re-search-forward "^[^ \t\n]" nil t) + ;; (set-extent-face (make-extent (match-beginning 0) + ;; (progn (end-of-line) (point))) + ;; 'man-heading)) + + ;; boldface the first line + (if (looking-at "[^ \t\n].*$") + (set-extent-face (make-extent (match-beginning 0) (match-end 0)) + 'man-bold)) + + ;; boldface subsequent title lines + ;; Regexp to match section headers changed to match a non-indented + ;; line preceded by a blank line and followed by an indented line. + ;; This seems to work ok for manual pages but gives better results + ;; with other nroff'd files + (while (re-search-forward "\n\n\\([^ \t\n].*\\)\n[ \t]+[^ \t\n]" nil t) + (goto-char (match-end 1)) + (set-extent-face (make-extent (match-beginning 1) (match-end 1)) + 'man-heading) + (forward-line 1)) + ) + + (if Manual-use-rosetta-man + nil + ;; Zap ESC7, ESC8, and ESC9 + ;; This is for Sun man pages like "man 1 csh" + (goto-char (point-min)) + (while (re-search-forward "\e[789]" nil t) + (replace-match ""))) + + ;; Nuke blanks lines at start. + ;; (goto-char (point-min)) + ;; (skip-chars-forward "\n") + ;; (delete-region (point-min) (point)) + + (Manual-mouseify-xrefs) + ) + +(fset 'nuke-nroff-bs 'Manual-nuke-nroff-bs) ; use old name + + +(defun Manual-nuke-nroff-bs-footers () + ;; Nuke headers and footers. + ;; + ;; nroff assumes pages are 66 lines high. We assume that, and that the + ;; first and last line on each page is expendible. There is no way to + ;; tell the difference between a page break in the middle of a paragraph + ;; and a page break between paragraphs (the amount of extra whitespace + ;; that nroff inserts is the same in both cases) so this might strip out + ;; a blank line were one should remain. I think that's better than + ;; leaving in a blank line where there shouldn't be one. (Need I say + ;; it: FMH.) + ;; + ;; Note that if nroff spits out error messages, pages will be more than + ;; 66 lines high, and we'll lose badly. That's ok because standard + ;; nroff doesn't do any diagnostics, and the "gnroff" wrapper for groff + ;; turns off error messages for compatibility. (At least, it's supposed + ;; to.) + ;; + (goto-char (point-min)) + ;; first lose the status output + (let ((case-fold-search t)) + (if (and (not (looking-at "[^\n]*warning")) + (looking-at "Reformatting.*\n")) + (delete-region (match-beginning 0) (match-end 0)))) + + ;; kludge around a groff bug where it won't keep quiet about some + ;; warnings even with -Wall or -Ww. + (cond ((looking-at "grotty:") + (while (looking-at "grotty:") + (delete-region (point) (progn (forward-line 1) (point)))) + (if (looking-at " *done\n") + (delete-region (point) (match-end 0))))) + + (let ((pages '()) + p) + ;; collect the page boundary markers before we start deleting, to make + ;; it easier to strip things out without changing the page sizes. + (while (not (eobp)) + (forward-line 66) + (setq pages (cons (point-marker) pages))) + (setq pages (nreverse pages)) + (while pages + (goto-char (car pages)) + (set-marker (car pages) nil) + ;; + ;; The lines are: 3 blank; footer; 6 blank; header; 3 blank. + ;; We're in between the previous footer and the following header, + ;; + ;; First lose 3 blank lines, the header, and then 3 more. + ;; + (setq p (point)) + (skip-chars-forward "\n") + (delete-region p (point)) + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0))) + ;; + ;; Next lose the footer, and the 3 blank lines after, and before it. + ;; But don't lose the last footer of the manual entry; that contains + ;; the "last change" date, so it's not completely uninteresting. + ;; (Actually lose all blank lines before it; sh(1) needs this.) + ;; + (skip-chars-backward "\n") + (beginning-of-line) + (if (null (cdr pages)) + nil + (and (looking-at "[^\n]+\n\n?\n?\n?") + (delete-region (match-beginning 0) (match-end 0)))) + (setq p (point)) + (skip-chars-backward "\n") + (if (> (- p (point)) 4) + (delete-region (+ 2 (point)) p) + (delete-region (1+ (point)) p)) +; (and (looking-at "\n\n?\n?") +; (delete-region (match-beginning 0) (match-end 0))) + + (setq pages (cdr pages))) + ;; + ;; Now nuke the extra blank lines at the beginning and end. + (goto-char (point-min)) + (if (looking-at "\n+") + (delete-region (match-beginning 0) (match-end 0))) + (forward-line 1) + (if (looking-at "\n\n+") + (delete-region (1+ (match-beginning 0)) (match-end 0))) + (goto-char (point-max)) + (skip-chars-backward "\n") + (delete-region (point) (point-max)) + (beginning-of-line) + (forward-char -1) + (setq p (point)) + (skip-chars-backward "\n") + (if (= ?\n (following-char)) (forward-char 1)) + (if (> (point) (1+ p)) + (delete-region (point) p)) + )) + +;(defun Manual-nuke-nroff-bs-footers () +; ;; Nuke headers: "MORE(1) UNIX Programmer's Manual MORE(1)" +; (goto-char (point-min)) +; (while (re-search-forward "^ *\\([A-Za-z][-_A-Za-z0-9]*([0-9A-Za-z]+)\\).*\\1$" nil t) +; (replace-match "")) +; +; ;; +; ;; it would appear that we have a choice between sometimes introducing +; ;; an extra blank line when a paragraph was broken by a footer, and +; ;; sometimes not putting in a blank line between two paragraphs when +; ;; a footer appeared right between them. FMH; I choose the latter. +; ;; +; +; ;; Nuke footers: "Printed 12/3/85 27 April 1981 1" +; ;; Sun appear to be on drugz: +; ;; "Sun Release 3.0B Last change: 1 February 1985 1" +; ;; HP are even worse! +; ;; " Hewlett-Packard -1- (printed 12/31/99)" FMHWA12ID!! +; ;; System V (well WICATs anyway): +; ;; "Page 1 (printed 7/24/85)" +; ;; Who is administering PCP to these corporate bozos? +; (goto-char (point-min)) +; (while (re-search-forward +; (cond +; ((eq system-type 'hpux) +; "\n\n?[ \t]*Hewlett-Packard\\(\\| Company\\)[ \t]*- [0-9]* -.*\n") +; ((eq system-type 'dgux-unix) +; "\n\n?[ \t]*Licensed material--.*Page [0-9]*\n") +; ((eq system-type 'usg-unix-v) +; "\n\n? *Page [0-9]*.*(printed [0-9/]*)\n") +; (t +; "\n\n?\\(Printed\\|Sun Release\\) [0-9].*[0-9]\n")) +; nil t) +; (replace-match "")) +; +; ;; Also, hack X footers: +; ;; "X Version 11 Last change: Release 5 1" +; (goto-char (point-min)) +; (while (re-search-forward "\n\n?X Version [^\n]+\n" nil t) +; (replace-match "")) +; +; ;; Crunch blank lines +; (goto-char (point-min)) +; (while (re-search-forward "\n\n\n\n*" nil t) +; (replace-match "\n\n")) +; ) + +(defun Manual-mouseify-xrefs () + (goto-char (point-min)) + (forward-line 1) + (let ((case-fold-search nil) + s e name extent) + ;; possibly it would be faster to rewrite this expression to search for + ;; a less common sequence first (like "([0-9]") and then back up to see + ;; if it's really a match. This function is 15% of the total time, 13% + ;; of which is this call to re-search-forward. + (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.]*([0-9][a-zA-Z0-9]*)" + nil t) + (setq s (match-beginning 0) + e (match-end 0) + name (buffer-substring s e)) + (goto-char s) + (skip-chars-backward " \t") + (if (and (bolp) + (progn (backward-char 1) (= (preceding-char) ?-))) + (progn + (setq s (point)) + (skip-chars-backward "-a-zA-Z0-9_.") + (setq name (concat (buffer-substring (point) (1- s)) name)) + (setq s (point)))) + ;; if there are upper case letters in the section, downcase them. + (if (string-match "(.*[A-Z]+.*)$" name) + (setq name (concat (substring name 0 (match-beginning 0)) + (downcase (substring name (match-beginning 0)))))) + ;; (setq already-fontified (extent-at s)) + (setq extent (make-extent s e)) + (set-extent-property extent 'man (list 'Manual-follow-xref name)) + (set-extent-property extent 'highlight t) + ;; (if (not already-fontified)... + (set-extent-face extent 'man-xref) + (goto-char e)))) + +(defun Manual-follow-xref (&optional name-or-event) + "Invoke `manual-entry' on the cross-reference under the mouse. +When invoked noninteractively, the arg may be an xref string to parse instead." + (interactive "e") + (if (eventp name-or-event) + (let* ((p (event-point name-or-event)) + (extent (and p (extent-at p + (event-buffer name-or-event) + 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (eval data) + (error "no manual cross-reference there."))) + (let ((Manual-match-topic-exactly t) + (Manual-query-multiple-pages nil)) + (or (manual-entry name-or-event) + ;; If that didn't work, maybe it's in a different section than the + ;; man page writer expected. For example, man pages tend assume + ;; that all user programs are in section 1, but X tends to generate + ;; makefiles that put things in section "n" instead... + (and (string-match "[ \t]*([^)]+)\\'" name-or-event) + (progn + (message "No entries found for %s; checking other sections..." + name-or-event) + (manual-entry + (substring name-or-event 0 (match-beginning 0)) + nil t))))))) + +(defun Manual-popup-menu (&optional event) + "Pops up a menu of cross-references in this manual page. +If there is a cross-reference under the mouse button which invoked this +command, it will be the first item on the menu. Otherwise, they are +on the menu in the order in which they appear in the buffer." + (interactive "e") + (let ((buffer (current-buffer)) + (sep "---") + (prefix "Show Manual Page for ") + xref items) + (cond (event + (setq buffer (event-buffer event)) + (let* ((p (event-point event)) + (extent (and p (extent-at p buffer 'highlight))) + (data (and extent (extent-property extent 'man)))) + (if (eq (car-safe data) 'Manual-follow-xref) + (setq xref (nth 1 data)))))) + (if xref (setq items (list sep xref))) + (map-extents #'(lambda (extent ignore) + (let ((data (extent-property extent 'man))) + (if (and (eq (car-safe data) 'Manual-follow-xref) + (not (member (nth 1 data) items))) + (setq items (cons (nth 1 data) items))) + nil)) + buffer) + (if (eq sep (car items)) (setq items (cdr items))) + (let ((popup-menu-titles nil)) + (popup-menu + (cons "Manual Entry" + (mapcar #'(lambda (item) + (if (eq item sep) + item + (vector (concat prefix item) + (list 'Manual-follow-xref item) t))) + (nreverse items))))))) + +(defun pager-cleanup-hook () + "cleanup man page if called via $PAGER" + (let ((buf-name (or buffer-file-name (buffer-name)))) + (if (and (or (string-match "^/tmp/man[0-9]+" buf-name) + (string-match ".*/man/\\(man\\|cat\\)[1-9a-z]/" buf-name)) + (not (string-match Manual-bogus-file-pattern buf-name))) + (let (buffer manpage) + (require 'man) + (goto-char (point-min)) + (setq buffer-read-only nil) + (Manual-nuke-nroff-bs) + (goto-char (point-min)) + (if (re-search-forward "[^ \t]") + (goto-char (- (point) 1))) + (if (looking-at "\\([a-zA-Z0-9]+\\)[ \t]*(") + (setq manpage (buffer-substring (match-beginning 1) (match-end 1))) + (setq manpage "???")) + (setq buffer + (rename-buffer + (generate-new-buffer-name (concat "*man " manpage "*")))) + (setq buffer-file-name nil) + (goto-char (point-min)) + (insert (format "%s\n" buf-name)) + (goto-char (point-min)) + (buffer-disable-undo buffer) + (set-buffer-modified-p nil) + (Manual-mode) + )))) + +(add-hook 'server-visit-hook 'pager-cleanup-hook) +(provide 'man)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/packages/rnews.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,982 @@ +;;; rnews.el --- USENET news reader for gnu emacs +;; Keywords: news + +;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Synched up with: FSF 19.30. +;;; Obsolete and should be removed. + +;; Created Sun Mar 10,1985 at 21:35:01 ads and sundar@hernes.ai.mit.edu +;; Should do the point pdl stuff sometime +;; finito except pdl.... Sat Mar 16,1985 at 06:43:44 +;; lets keep the summary stuff out until we get it working .. +;; sundar@hermes.ai.mit.edu Wed Apr 10,1985 at 16:32:06 +;; hack slash maim. mly@prep.ai.mit.edu Thu 18 Apr, 1985 06:11:14 +;; modified to correct reentrance bug, to not bother with groups that +;; received no new traffic since last read completely, to find out +;; what traffic a group has available much more quickly when +;; possible, to do some completing reads for group names - should +;; be much faster... +;; KING@KESTREL.arpa, Thu Mar 13 09:03:28 1986 +;; made news-{next,previous}-group skip groups with no new messages; and +;; added checking for unsubscribed groups to news-add-news-group +;; tower@prep.ai.mit.edu Jul 18 1986 +;; bound rmail-output to C-o; and changed header-field commands binding to +;; agree with the new C-c C-f usage in sendmail +;; tower@prep Sep 3 1986 +;; added news-rotate-buffer-body +;; tower@prep Oct 17 1986 +;; made messages more user friendly, cleanuped news-inews +;; move posting and mail code to new file rnewpost.el +;; tower@prep Oct 29 1986 +;; added caesar-region, rename news-caesar-buffer-body, hacked accordingly +;; tower@prep Nov 21 1986 +;; added (provide 'rnews) tower@prep 22 Apr 87 +(provide 'rnews) +(require 'mail-utils) + +(autoload 'rmail-output "rmailout" + "Append this message to Unix mail file named FILE-NAME." + t) + +(autoload 'news-reply "rnewspost" + "Compose and post a reply to the current article on USENET. +While composing the reply, use \\[mail-yank-original] to yank the original +message into it." + t) + +(autoload 'news-mail-other-window "rnewspost" + "Send mail in another window. +While composing the message, use \\[mail-yank-original] to yank the +original message into it." + t) + +(autoload 'news-post-news "rnewspost" + "Begin editing a new USENET news article to be posted." + t) + +(autoload 'news-mail-reply "rnewspost" + "Mail a reply to the author of the current article. +While composing the reply, use \\[mail-yank-original] to yank the original +message into it." + t) + +(defvar news-group-hook-alist nil + "Alist of (GROUP-REGEXP . HOOK) pairs. +Just before displaying a message, each HOOK is called +if its GROUP-REGEXP matches the current newsgroup name.") + +(defvar rmail-last-file (expand-file-name "~/mbox.news")) + +;Now in paths.el. +;(defvar news-path "/usr/spool/news/" +; "The root directory below which all news files are stored.") + +(defvar news-startup-file "$HOME/.newsrc" "Contains ~/.newsrc") +(defvar news-certification-file "$HOME/.news-dates" "Contains ~/.news-dates") + +;; random headers that we decide to ignore. +(defvar news-ignored-headers + "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" + "All random fields within the header of a message.") + +(defvar news-mode-map nil) +(defvar news-read-first-time-p t) +;; Contains the (dotified) news groups of which you are a member. +(defvar news-user-group-list nil) + +(defvar news-current-news-group nil) +(defvar news-current-group-begin nil) +(defvar news-current-group-end nil) +(defvar news-current-certifications nil + "An assoc list of a group name and the time at which it is +known that the group had no new traffic") +(defvar news-current-certifiable nil + "The time when the directory we are now working on was written") + +(defvar news-message-filter nil + "User specifiable filter function that will be called during +formatting of the news file") + +;(defvar news-mode-group-string "Starting-Up" +; "Mode line group name info is held in this variable") +(defvar news-list-of-files nil + "Global variable in which we store the list of files +associated with the current newsgroup") +(defvar news-list-of-files-possibly-bogus nil + "variable indicating we only are guessing at which files are available. +Not currently used.") + +;; association list in which we store lists of the form +;; (pointified-group-name (first last old-last)) +(defvar news-group-article-assoc nil) + +(defvar news-current-message-number 0 "Displayed Article Number") +(defvar news-total-current-group 0 "Total no of messages in group") + +(defvar news-unsubscribe-groups ()) +(defvar news-point-pdl () "List of visited news messages.") +(defvar news-no-jumps-p t) +(defvar news-buffer () "Buffer into which news files are read.") + +(defmacro news-push (item ref) + (list 'setq ref (list 'cons item ref))) + +(defmacro news-cadr (x) (list 'car (list 'cdr x))) +(defmacro news-cdar (x) (list 'cdr (list 'car x))) +(defmacro news-caddr (x) (list 'car (list 'cdr (list 'cdr x)))) +(defmacro news-cadar (x) (list 'car (list 'cdr (list 'car x)))) +(defmacro news-caadr (x) (list 'car (list 'car (list 'cdr x)))) +(defmacro news-cdadr (x) (list 'cdr (list 'car (list 'cdr x)))) + +(defmacro news-wins (pfx index) + (` (file-exists-p (concat (, pfx) "/" (int-to-string (, index)))))) + +(defvar news-max-plausible-gap 2 + "* In an rnews directory, the maximum possible gap size. +A gap is a sequence of missing messages between two messages that exist. +An empty file does not contribute to a gap -- it ends one.") + +(defun news-find-first-and-last (prefix base) + (and (news-wins prefix base) + (cons (news-find-first-or-last prefix base -1) + (news-find-first-or-last prefix base 1)))) + +(defmacro news-/ (a1 a2) +;; a form of / that guarantees that (/ -1 2) = 0 + (if (zerop (/ -1 2)) + (` (/ (, a1) (, a2))) + (` (if (< (, a1) 0) + (- (/ (- (, a1)) (, a2))) + (/ (, a1) (, a2)))))) + +(defun news-find-first-or-last (pfx base dirn) + ;; first use powers of two to find a plausible ceiling + (let ((original-dir dirn)) + (while (news-wins pfx (+ base dirn)) + (setq dirn (* dirn 2))) + (setq dirn (news-/ dirn 2)) + ;; Then use a binary search to find the high water mark + (let ((offset (news-/ dirn 2))) + (while (/= offset 0) + (if (news-wins pfx (+ base dirn offset)) + (setq dirn (+ dirn offset))) + (setq offset (news-/ offset 2)))) + ;; If this high-water mark is bogus, recurse. + (let ((offset (* news-max-plausible-gap original-dir))) + (while (and (/= offset 0) (not (news-wins pfx (+ base dirn offset)))) + (setq offset (- offset original-dir))) + (if (= offset 0) + (+ base dirn) + (news-find-first-or-last pfx (+ base dirn offset) original-dir))))) + +(defun rnews () +"Read USENET news for groups for which you are a member and add or +delete groups. +You can reply to articles posted and send articles to any group. + +Type \\[describe-mode] once reading news to get a list of rnews commands." + (interactive) + (let ((last-buffer (buffer-name))) + (make-local-variable 'rmail-last-file) + (switch-to-buffer (setq news-buffer (get-buffer-create "*news*"))) + (news-mode) + (setq news-buffer-save last-buffer) + (setq buffer-read-only nil) + (erase-buffer) + (setq buffer-read-only t) + (set-buffer-modified-p t) + (sit-for 0) + (message "Getting new USENET news...") + (news-set-mode-line) + (news-get-certifications) + (news-get-new-news))) + +(defun news-group-certification (group) + (cdr-safe (assoc group news-current-certifications))) + + +(defun news-set-current-certifiable () + ;; Record the date that corresponds to the directory you are about to check + (let ((file (concat news-path + (string-subst-char ?/ ?. news-current-news-group)))) + (setq news-current-certifiable + (nth 5 (file-attributes + (or (file-symlink-p file) file)))))) + +(defun news-get-certifications () + ;; Read the certified-read file from last session + (save-excursion + (save-window-excursion + (setq news-current-certifications + (car-safe + (condition-case var + (let* + ((file (substitute-in-file-name news-certification-file)) + (buf (find-file-noselect file))) + (and (file-exists-p file) + (progn + (switch-to-buffer buf 'norecord) + (unwind-protect + (read-from-string (buffer-string)) + (kill-buffer buf))))) + (error nil))))))) + +(defun news-write-certifications () + ;; Write a certification file. + ;; This is an assoc list of group names with doubletons that represent + ;; mod times of the directory when group is read completely. + (save-excursion + (save-window-excursion + (with-output-to-temp-buffer + "*CeRtIfIcAtIoNs*" + (print news-current-certifications)) + (let ((buf (get-buffer "*CeRtIfIcAtIoNs*"))) + (switch-to-buffer buf) + (write-file (substitute-in-file-name news-certification-file)) + (kill-buffer buf))))) + +(defun news-set-current-group-certification () + (let ((cgc (assoc news-current-news-group news-current-certifications))) + (if cgc (setcdr cgc news-current-certifiable) + (news-push (cons news-current-news-group news-current-certifiable) + news-current-certifications)))) + +(defun news-set-minor-modes () + "Creates a minor mode list that has group name, total articles, +and attribute for current article." + (setq news-minor-modes (list (cons 'foo + (concat news-current-message-number + "/" + news-total-current-group + (news-get-attribute-string))))) + ;; Detect Emacs versions 18.16 and up, which display + ;; directly from news-minor-modes by using a list for mode-name. + (or (boundp 'minor-mode-alist) + (setq minor-modes news-minor-modes))) + +(defun news-set-message-counters () + "Scan through current news-groups filelist to figure out how many messages +are there. Set counters for use with minor mode display." + (if (null news-list-of-files) + (setq news-current-message-number 0))) + +(if news-mode-map + nil + (setq news-mode-map (make-keymap)) + (suppress-keymap news-mode-map) + (define-key news-mode-map "." 'beginning-of-buffer) + (define-key news-mode-map " " 'scroll-up) + (define-key news-mode-map "\177" 'scroll-down) + (define-key news-mode-map "n" 'news-next-message) + (define-key news-mode-map "c" 'news-make-link-to-message) + (define-key news-mode-map "p" 'news-previous-message) + (define-key news-mode-map "j" 'news-goto-message) + (define-key news-mode-map "q" 'news-exit) + (define-key news-mode-map "e" 'news-exit) + (define-key news-mode-map "\ej" 'news-goto-news-group) + (define-key news-mode-map "\en" 'news-next-group) + (define-key news-mode-map "\ep" 'news-previous-group) + (define-key news-mode-map "l" 'news-list-news-groups) + (define-key news-mode-map "?" 'describe-mode) + (define-key news-mode-map "g" 'news-get-new-news) + (define-key news-mode-map "f" 'news-reply) + (define-key news-mode-map "m" 'news-mail-other-window) + (define-key news-mode-map "a" 'news-post-news) + (define-key news-mode-map "r" 'news-mail-reply) + (define-key news-mode-map "o" 'news-save-item-in-file) + (define-key news-mode-map "\C-o" 'rmail-output) + (define-key news-mode-map "t" 'news-show-all-headers) + (define-key news-mode-map "x" 'news-force-update) + (define-key news-mode-map "A" 'news-add-news-group) + (define-key news-mode-map "u" 'news-unsubscribe-current-group) + (define-key news-mode-map "U" 'news-unsubscribe-group) + (define-key news-mode-map "\C-c\C-r" 'news-caesar-buffer-body)) + +(defun news-mode () + "News Mode is used by M-x rnews for reading USENET Newsgroups articles. +New readers can find additional help in newsgroup: news.announce.newusers . +All normal editing commands are turned off. +Instead, these commands are available: + +. move point to front of this news article (same as Meta-<). +Space scroll to next screen of this news article. +Delete scroll down previous page of this news article. +n move to next news article, possibly next group. +p move to previous news article, possibly previous group. +j jump to news article specified by numeric position. +M-j jump to news group. +M-n goto next news group. +M-p goto previous news group. +l list all the news groups with current status. +? print this help message. +C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). +g get new USENET news. +f post a reply article to USENET. +a post an original news article. +A add a newsgroup. +o save the current article in the named file (append if file exists). +C-o output this message to a Unix-format mail file (append it). +c \"copy\" (actually link) current or prefix-arg msg to file. + warning: target directory and message file must be on same device + (UNIX magic) +t show all the headers this news article originally had. +q quit reading news after updating .newsrc file. +e exit updating .newsrc file. +m mail a news article. Same as C-x 4 m. +x update last message seen to be the current message. +r mail a reply to this news article. Like m but initializes some fields. +u unsubscribe from current newsgroup. +U unsubscribe from specified newsgroup." + (interactive) + (kill-all-local-variables) + (make-local-variable 'news-read-first-time-p) + (setq news-read-first-time-p t) + (make-local-variable 'news-current-news-group) +; (setq news-current-news-group "??") + (make-local-variable 'news-current-group-begin) + (setq news-current-group-begin 0) + (make-local-variable 'news-current-message-number) + (setq news-current-message-number 0) + (make-local-variable 'news-total-current-group) + (make-local-variable 'news-buffer-save) + (make-local-variable 'version-control) + (setq version-control 'never) + (make-local-variable 'news-point-pdl) +; This breaks it. I don't have time to figure out why. -- RMS +; (make-local-variable 'news-group-article-assoc) + (setq major-mode 'news-mode) + (setq modeline-process '(news-minor-modes)) + (setq mode-name "NEWS") + (news-set-mode-line) + (set-syntax-table text-mode-syntax-table) + (use-local-map news-mode-map) + (setq local-abbrev-table text-mode-abbrev-table) + (run-hooks 'news-mode-hook)) + +(defun string-subst-char (new old string) + (let (index) + (setq old (regexp-quote (char-to-string old)) + string (substring string 0)) + (while (setq index (string-match old string)) + (aset string index new))) + string) + +;; update read message number +(defmacro news-update-message-read (ngroup nno) + (list 'setcar + (list 'news-cdadr + (list 'assoc ngroup 'news-group-article-assoc)) + nno)) + +(defun news-parse-range (number-string) + "Parse string representing range of numbers of he form <a>-<b> +to a list (a . b)" + (let ((n (string-match "-" number-string))) + (if n + (cons (string-to-int (substring number-string 0 n)) + (string-to-int (substring number-string (1+ n)))) + (setq n (string-to-int number-string)) + (cons n n)))) + +;(defun is-in (elt lis) +; (catch 'foo +; (while lis +; (if (equal (car lis) elt) +; (throw 'foo t) +; (setq lis (cdr lis)))))) + +(defun news-get-new-news () + "Get new USENET news, if there is any for the current user." + (interactive) + (if (not (null news-user-group-list)) + (news-update-newsrc-file)) + (setq news-group-article-assoc ()) + (setq news-user-group-list ()) + (message "Looking up %s file..." news-startup-file) + (let ((file (substitute-in-file-name news-startup-file)) + (temp-user-groups ())) + (save-excursion + (let ((newsrcbuf (find-file-noselect file)) + start end endofline tem) + (set-buffer newsrcbuf) + (goto-char 0) + (while (search-forward ": " nil t) + (setq end (point)) + (beginning-of-line) + (setq start (point)) + (end-of-line) + (setq endofline (point)) + (setq tem (buffer-substring start (- end 2))) + (let ((range (news-parse-range + (buffer-substring end endofline)))) + (if (assoc tem news-group-article-assoc) + (message "You are subscribed twice to %s; I ignore second" + tem) + (setq temp-user-groups (cons tem temp-user-groups) + news-group-article-assoc + (cons (list tem (list (car range) + (cdr range) + (cdr range))) + news-group-article-assoc))))) + (kill-buffer newsrcbuf))) + (setq temp-user-groups (nreverse temp-user-groups)) + (message "Prefrobnicating...") + (switch-to-buffer news-buffer) + (setq news-user-group-list temp-user-groups) + (while (and temp-user-groups + (not (news-read-files-into-buffer + (car temp-user-groups) nil))) + (setq temp-user-groups (cdr temp-user-groups))) + (if (null temp-user-groups) + (message "No news is good news.") + (message "")))) + +(defun news-list-news-groups () + "Display all the news groups to which you belong." + (interactive) + (with-output-to-temp-buffer "*Newsgroups*" + (save-excursion + (set-buffer standard-output) + (insert + "News Group Msg No. News Group Msg No.\n") + (insert + "------------------------- -------------------------\n") + (let ((temp news-user-group-list) + (flag nil)) + (while temp + (let ((item (assoc (car temp) news-group-article-assoc))) + (insert (car item)) + (indent-to (if flag 52 20)) + (insert (int-to-string (news-cadr (news-cadr item)))) + (if flag + (insert "\n") + (indent-to 33)) + (setq temp (cdr temp) flag (not flag)))))))) + +;; Mode line hack +(defun news-set-mode-line () + "Set mode line string to something useful." + (setq mode-line-process + (concat " " + (if (integerp news-current-message-number) + (int-to-string news-current-message-number) + "??") + "/" + (if (integerp news-current-group-end) + (int-to-string news-current-group-end) + news-current-group-end))) + (setq mode-line-buffer-identification + (concat "NEWS: " + news-current-news-group + ;; Enough spaces to pad group name to 17 positions. + (substring " " + 0 (max 0 (- 17 (length news-current-news-group)))))) + (set-buffer-modified-p t) + (sit-for 0)) + +(defun news-goto-news-group (gp) + "Takes a string and goes to that news group." + (interactive (list (completing-read "NewsGroup: " + news-group-article-assoc))) + (message "Jumping to news group %s..." gp) + (news-select-news-group gp) + (message "Jumping to news group %s... done." gp)) + +(defun news-select-news-group (gp) + (let ((grp (assoc gp news-group-article-assoc))) + (if (null grp) + (error "Group %s not subscribed to" gp) + (progn + (news-update-message-read news-current-news-group + (news-cdar news-point-pdl)) + (news-read-files-into-buffer (car grp) nil) + (news-set-mode-line))))) + +(defun news-goto-message (arg) + "Goes to the article ARG in current newsgroup." + (interactive "p") + (if (null current-prefix-arg) + (setq arg (read-no-blanks-input "Go to article: " ""))) + (news-select-message arg)) + +(defun news-select-message (arg) + (if (stringp arg) (setq arg (string-to-int arg))) + (let ((file (concat news-path + (string-subst-char ?/ ?. news-current-news-group) + "/" arg))) + (if (= arg + (or (news-cadr (memq (news-cdar news-point-pdl) news-list-of-files)) + 0)) + (setcdr (car news-point-pdl) arg)) + (setq news-current-message-number arg) + (if (file-exists-p file) + (let ((buffer-read-only nil)) + (news-read-in-file file) + (news-set-mode-line)) + (news-set-mode-line) + (error "Article %d nonexistent" arg)))) + +(defun news-force-update () + "updates the position of last article read in the current news group" + (interactive) + (setcdr (car news-point-pdl) news-current-message-number) + (message "Updated to %d" news-current-message-number)) + +(defun news-next-message (arg) + "Move ARG messages forward within one newsgroup. +Negative ARG moves backward. +If ARG is 1 or -1, moves to next or previous newsgroup if at end." + (interactive "p") + (let ((no (+ arg news-current-message-number))) + (if (or (< no news-current-group-begin) + (> no news-current-group-end)) + (cond ((= arg 1) + (news-set-current-group-certification) + (news-next-group)) + ((= arg -1) + (news-previous-group)) + (t (error "Article out of range"))) + (let ((plist (news-get-motion-lists + news-current-message-number + news-list-of-files))) + (if (< arg 0) + (news-select-message (nth (1- (- arg)) (car (cdr plist)))) + (news-select-message (nth (1- arg) (car plist)))))))) + +(defun news-previous-message (arg) + "Move ARG messages backward in current newsgroup. +With no arg or arg of 1, move one message +and move to previous newsgroup if at beginning. +A negative ARG means move forward." + (interactive "p") + (news-next-message (- arg))) + +(defun news-move-to-group (arg) + "Given arg move forward or backward to a new newsgroup." + (let ((cg news-current-news-group)) + (let ((plist (news-get-motion-lists cg news-user-group-list)) + ngrp) + (if (< arg 0) + (or (setq ngrp (nth (1- (- arg)) (news-cadr plist))) + (error "No previous news groups")) + (or (setq ngrp (nth arg (car plist))) + (error "No more news groups"))) + (news-select-news-group ngrp)))) + +(defun news-next-group () + "Moves to the next user group." + (interactive) +; (message "Moving to next group...") + (news-move-to-group 0) + (while (null news-list-of-files) + (news-move-to-group 0))) +; (message "Moving to next group... done.") + +(defun news-previous-group () + "Moves to the previous user group." + (interactive) +; (message "Moving to previous group...") + (news-move-to-group -1) + (while (null news-list-of-files) + (news-move-to-group -1))) +; (message "Moving to previous group... done.") + +(defun news-get-motion-lists (arg listy) + "Given a msgnumber/group this will return a list of two lists; +one for moving forward and one for moving backward." + (let ((temp listy) + (result ())) + (catch 'out + (while temp + (if (equal (car temp) arg) + (throw 'out (cons (cdr temp) (list result))) + (setq result (nconc (list (car temp)) result)) + (setq temp (cdr temp))))))) + +;; miscellaneous io routines +(defun news-read-in-file (filename) + (erase-buffer) + (let ((start (point))) + (insert-file-contents filename) + (news-convert-format) + ;; Run each hook that applies to the current newsgroup. + (let ((hooks news-group-hook-alist)) + (while hooks + (goto-char start) + (if (string-match (car (car hooks)) news-group-name) + (funcall (cdr (car hooks)))) + (setq hooks (cdr hooks)))) + (goto-char start) + (forward-line 1) + (if (eobp) + (message "(Empty file?)") + (goto-char start)))) + +(defun news-convert-format () + (save-excursion + (save-restriction + (let* ((start (point)) + (end (condition-case () + (progn (search-forward "\n\n") (point)) + (error nil))) + has-from has-date) + (cond (end + (narrow-to-region start end) + (goto-char start) + (setq has-from (search-forward "\nFrom:" nil t)) + (cond ((and (not has-from) has-date) + (goto-char start) + (search-forward "\nDate:") + (beginning-of-line) + (kill-line) (kill-line))) + (news-delete-headers start) + (goto-char start))))))) + +(defun news-show-all-headers () + "Redisplay current news item with all original headers" + (interactive) + (let (news-ignored-headers + (buffer-read-only ())) + (erase-buffer) + (news-set-mode-line) + (news-read-in-file + (concat news-path + (string-subst-char ?/ ?. news-current-news-group) + "/" (int-to-string news-current-message-number))))) + +(defun news-delete-headers (pos) + (goto-char pos) + (and (stringp news-ignored-headers) + (while (re-search-forward news-ignored-headers nil t) + (beginning-of-line) + (delete-region (point) + (progn (re-search-forward "\n[^ \t]") + (forward-char -1) + (point)))))) + +(defun news-exit () + "Quit news reading session and update the .newsrc file." + (interactive) + (if (y-or-n-p "Do you really wanna quit reading news ? ") + (progn (message "Updating %s..." news-startup-file) + (news-update-newsrc-file) + (news-write-certifications) + (message "Updating %s... done" news-startup-file) + (message "Now do some real work") + (and (fboundp 'bury-buffer) (bury-buffer (current-buffer))) + (switch-to-buffer news-buffer-save) + (setq news-user-group-list ())) + (message ""))) + +(defun news-update-newsrc-file () + "Updates the .newsrc file in the users home dir." + (let ((newsrcbuf (find-file-noselect + (substitute-in-file-name news-startup-file))) + (tem news-user-group-list) + group) + (save-excursion + (if (not (null news-current-news-group)) + (news-update-message-read news-current-news-group + (news-cdar news-point-pdl))) + (set-buffer newsrcbuf) + (while tem + (setq group (assoc (car tem) news-group-article-assoc)) + (if (= (news-cadr (news-cadr group)) (news-caddr (news-cadr group))) + nil + (goto-char 0) + (if (search-forward (concat (car group) ": ") nil t) + (kill-line nil) + (insert (car group) ": \n") (backward-char 1)) + (insert (int-to-string (car (news-cadr group))) "-" + (int-to-string (news-cadr (news-cadr group))))) + (setq tem (cdr tem))) + (while news-unsubscribe-groups + (setq group (assoc (car news-unsubscribe-groups) + news-group-article-assoc)) + (goto-char 0) + (if (search-forward (concat (car group) ": ") nil t) + (progn + (backward-char 2) + (kill-line nil) + (insert "! " (int-to-string (car (news-cadr group))) + "-" (int-to-string (news-cadr (news-cadr group)))))) + (setq news-unsubscribe-groups (cdr news-unsubscribe-groups))) + (save-buffer) + (kill-buffer (current-buffer))))) + + +(defun news-unsubscribe-group (group) + "Removes you from newgroup GROUP." + (interactive (list (completing-read "Unsubscribe from group: " + news-group-article-assoc))) + (news-unsubscribe-internal group)) + +(defun news-unsubscribe-current-group () + "Removes you from the newsgroup you are now reading." + (interactive) + (if (y-or-n-p "Do you really want to unsubscribe from this group ? ") + (news-unsubscribe-internal news-current-news-group))) + +(defun news-unsubscribe-internal (group) + (let ((tem (assoc group news-group-article-assoc))) + (if tem + (progn + (setq news-unsubscribe-groups (cons group news-unsubscribe-groups)) + (news-update-message-read group (news-cdar news-point-pdl)) + (if (equal group news-current-news-group) + (news-next-group)) + (message "")) + (error "Not subscribed to group: %s" group)))) + +(defun news-save-item-in-file (file) + "Save the current article that is being read by appending to a file." + (interactive "FSave item in file: ") + (append-to-file (point-min) (point-max) file)) + +(defun news-get-pruned-list-of-files (gp-list end-file-no) + "Given a news group it finds all files in the news group. +The arg must be in slashified format. +Using ls was found to be too slow in a previous version." + (let + ((answer + (and + (not (and end-file-no + (equal (news-set-current-certifiable) + (news-group-certification gp-list)) + (setq news-list-of-files nil + news-list-of-files-possibly-bogus t))) + (let* ((file-directory (concat news-path + (string-subst-char ?/ ?. gp-list))) + tem + (last-winner + (and end-file-no + (news-wins file-directory end-file-no) + (news-find-first-or-last file-directory end-file-no 1)))) + (setq news-list-of-files-possibly-bogus t news-list-of-files nil) + (if last-winner + (progn + (setq news-list-of-files-possibly-bogus t + news-current-group-end last-winner) + (while (> last-winner end-file-no) + (news-push last-winner news-list-of-files) + (setq last-winner (1- last-winner))) + news-list-of-files) + (if (or (not (file-directory-p file-directory)) + (not (file-readable-p file-directory))) + nil + (setq news-list-of-files + (condition-case error + (directory-files file-directory) + (file-error + (if (string= (nth 2 error) "permission denied") + (message "Newsgroup %s is read-protected" + gp-list) + (signal 'file-error (cdr error))) + nil))) + (setq tem news-list-of-files) + (while tem + (if (or (not (string-match "^[0-9]*$" (car tem))) + ;; dont get confused by directories that look like numbers + (file-directory-p + (concat file-directory "/" (car tem))) + (<= (string-to-int (car tem)) end-file-no)) + (setq news-list-of-files + (delq (car tem) news-list-of-files))) + (setq tem (cdr tem))) + (if (null news-list-of-files) + (progn (setq news-current-group-end 0) + nil) + (setq news-list-of-files + (mapcar 'string-to-int news-list-of-files)) + (setq news-list-of-files (sort news-list-of-files '<)) + (setq news-current-group-end + (elt news-list-of-files + (1- (length news-list-of-files)))) + news-list-of-files))))))) + (or answer (progn (news-set-current-group-certification) nil)))) + +(defun news-read-files-into-buffer (group reversep) + (let* ((files-start-end (news-cadr (assoc group news-group-article-assoc))) + (start-file-no (car files-start-end)) + (end-file-no (news-cadr files-start-end)) + (buffer-read-only nil)) + (setq news-current-news-group group) + (setq news-current-message-number nil) + (setq news-current-group-end nil) + (news-set-mode-line) + (news-get-pruned-list-of-files group end-file-no) + (news-set-mode-line) + ;; @@ should be a lot smarter than this if we have to move + ;; @@ around correctly. + (setq news-point-pdl (list (cons (car files-start-end) + (news-cadr files-start-end)))) + (if (null news-list-of-files) + (progn (erase-buffer) + (setq news-current-group-end end-file-no) + (setq news-current-group-begin end-file-no) + (setq news-current-message-number end-file-no) + (news-set-mode-line) +; (message "No new articles in " group " group.") + nil) + (setq news-current-group-begin (car news-list-of-files)) + (if reversep + (setq news-current-message-number news-current-group-end) + (if (> (car news-list-of-files) end-file-no) + (setcdr (car news-point-pdl) (car news-list-of-files))) + (setq news-current-message-number news-current-group-begin)) + (news-set-message-counters) + (news-set-mode-line) + (news-read-in-file (concat news-path + (string-subst-char ?/ ?. group) + "/" + (int-to-string + news-current-message-number))) + (news-set-message-counters) + (news-set-mode-line) + t))) + +(defun news-add-news-group (gp) + "Resubscribe to or add a USENET news group named GROUP (a string)." +; @@ (completing-read ...) +; @@ could be based on news library file ../active (slightly facist) +; @@ or (expensive to compute) all directories under the news spool directory + (interactive "sAdd news group: ") + (let ((file-dir (concat news-path (string-subst-char ?/ ?. gp)))) + (save-excursion + (if (null (assoc gp news-group-article-assoc)) + (let ((newsrcbuf (find-file-noselect + (substitute-in-file-name news-startup-file)))) + (if (file-directory-p file-dir) + (progn + (switch-to-buffer newsrcbuf) + (goto-char 0) + (if (search-forward (concat gp "! ") nil t) + (progn + (message "Re-subscribing to group %s." gp) + ;;@@ news-unsubscribe-groups isn't being used + ;;(setq news-unsubscribe-groups + ;; (delq gp news-unsubscribe-groups)) + (backward-char 2) + (delete-char 1) + (insert ":")) + (progn + (message + "Added %s to your list of newsgroups." gp) + (end-of-buffer) + (insert gp ": 1-1\n"))) + (search-backward gp nil t) + (let (start end endofline tem) + (search-forward ": " nil t) + (setq end (point)) + (beginning-of-line) + (setq start (point)) + (end-of-line) + (setq endofline (point)) + (setq tem (buffer-substring start (- end 2))) + (let ((range (news-parse-range + (buffer-substring end endofline)))) + (setq news-group-article-assoc + (cons (list tem (list (car range) + (cdr range) + (cdr range))) + news-group-article-assoc)))) + (save-buffer) + (kill-buffer (current-buffer))) + (message "Newsgroup %s doesn't exist." gp))) + (message "Already subscribed to group %s." gp))))) + +(defun news-make-link-to-message (number newname) + "Forges a link to an rnews message numbered number (current if no arg) +Good for hanging on to a message that might or might not be +automatically deleted." + (interactive "P +FName to link to message: ") + (add-name-to-file + (concat news-path + (string-subst-char ?/ ?. news-current-news-group) + "/" (if number + (prefix-numeric-value number) + news-current-message-number)) + newname)) + +;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 +;;; modified by tower@prep Nov 86 +(defun caesar-region (&optional n) + "Caesar rotation of region by N, default 13, for decrypting netnews." + (interactive (if current-prefix-arg ; Was there a prefix arg? + (list (prefix-numeric-value current-prefix-arg)) + (list nil))) + (cond ((not (numberp n)) (setq n 13)) + ((< n 0) (setq n (- 26 (% (- n) 26)))) + (t (setq n (% n 26)))) ;canonicalize N + (if (not (zerop n)) ; no action needed for a rot of 0 + (progn + (if (or (not (boundp 'caesar-translate-table)) + (/= (aref caesar-translate-table ?a) (+ ?a n))) + (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) + (message "Building caesar-translate-table...") + (setq caesar-translate-table (make-vector 256 0)) + (while (< i 256) + (aset caesar-translate-table i i) + (setq i (1+ i))) + (setq lower (concat lower lower) upper (upcase lower) i 0) + (while (< i 26) + (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) + (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) + (setq i (1+ i))) + (message "Building caesar-translate-table... done"))) + (let ((from (region-beginning)) + (to (region-end)) + (i 0) str len) + (setq str (buffer-substring from to)) + (setq len (length str)) + (while (< i len) + (aset str i (aref caesar-translate-table (aref str i))) + (setq i (1+ i))) + (goto-char from) + (kill-region from to) + (insert str))))) + +;;; news-caesar-buffer-body written by paul@media-lab.mit.edu Wed Oct 1, 1986 +;;; hacked further by tower@prep.ai.mit.edu +(defun news-caesar-buffer-body (&optional rotnum) + "Caesar rotates all letters in the current buffer by 13 places. +Used to encode/decode possibly offensive messages (commonly in net.jokes). +With prefix arg, specifies the number of places to rotate each letter forward. +Mail and USENET news headers are not rotated." + (interactive (if current-prefix-arg ; Was there a prefix arg? + (list (prefix-numeric-value current-prefix-arg)) + (list nil))) + (save-excursion + (let ((buffer-status buffer-read-only)) + (setq buffer-read-only nil) + ;; setup the region + (set-mark (if (progn (goto-char (point-min)) + (search-forward + (concat "\n" + (if (equal major-mode 'news-mode) + "" + mail-header-separator) + "\n") nil t)) + (point) + (point-min))) + (goto-char (point-max)) + (caesar-region rotnum) + (setq buffer-read-only buffer-status))))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/packages/rnewspost.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,468 @@ +;;; rnewspost.el --- USENET news poster/mailer for GNU Emacs +;; Keywords: mail, news + +;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Synched up with: FSF 19.28. + +;; moved posting and mail code from rnews.el +;; tower@prep.ai.mit.edu Wed Oct 29 1986 +;; brought posting code almost up to the revision of RFC 850 for News 2.11 +;; - couldn't see handling the special meaning of the Keyword: poster +;; - not worth the code space to support the old A news Title: (which +;; Subject: replaced) and Article-I.D.: (which Message-ID: replaced) +;; tower@prep Nov 86 +;; changed C-c C-r key-binding due to rename of news-caesar-buffer-body +;; tower@prep 21 Nov 86 +;; added (require 'rnews) tower@prep 22 Apr 87 +;; restricted call of news-show-all-headers in news-post-news & news-reply +;; tower@prep 28 Apr 87 +;; commented out Posting-Front-End to save USENET bytes tower@prep Jul 31 87 +;; commented out -n and -t args in news-inews tower@prep 15 Oct 87 +(require 'sendmail) +(require 'rnews) + +;Now in paths.el. +;(defvar news-inews-program "inews" +; "Function to post news.") + +;; Replying and posting news items are done by these functions. +;; imported from rmail and modified to work with rnews ... +;; Mon Mar 25,1985 at 03:07:04 ads@mit-hermes. +;; this is done so that rnews can operate independently from rmail.el and +;; sendmail and dosen't have to autoload these functions. +;; +;;; >> Nuked by Mly to autoload those functions again, as the duplication of +;;; >> code was making maintenance too difficult. + +(defvar news-reply-mode-map () "Mode map used by news-reply.") + +(or news-reply-mode-map + (progn + (setq news-reply-mode-map (make-keymap)) + (define-key news-reply-mode-map "\C-c?" 'describe-mode) + (define-key news-reply-mode-map "\C-c\C-f\C-d" 'news-reply-distribution) + (define-key news-reply-mode-map "\C-c\C-f\C-k" 'news-reply-keywords) + (define-key news-reply-mode-map "\C-c\C-f\C-n" 'news-reply-newsgroups) + (define-key news-reply-mode-map "\C-c\C-f\C-f" 'news-reply-followup-to) + (define-key news-reply-mode-map "\C-c\C-f\C-s" 'mail-subject) + (define-key news-reply-mode-map "\C-c\C-f\C-a" 'news-reply-summary) + (define-key news-reply-mode-map "\C-c\C-r" 'news-caesar-buffer-body) + (define-key news-reply-mode-map "\C-c\C-w" 'news-reply-signature) + (define-key news-reply-mode-map "\C-c\C-y" 'news-reply-yank-original) + (define-key news-reply-mode-map "\C-c\C-q" 'mail-fill-yanked-message) + (define-key news-reply-mode-map "\C-c\C-c" 'news-inews) + (define-key news-reply-mode-map "\C-c\C-s" 'news-inews) + (define-key news-reply-mode-map 'button3 'news-reply-menu))) + +(defun news-reply-mode () + "Major mode for editing news to be posted on USENET. +First-time posters are asked to please read the articles in newsgroup: + news.announce.newusers . +Like Text Mode but with these additional commands: + +C-c C-s news-inews (post the message) C-c C-c news-inews +C-c C-f move to a header field (and create it if there isn't): + C-c C-f C-n move to Newsgroups: C-c C-f C-s move to Subj: + C-c C-f C-f move to Followup-To: C-c C-f C-k move to Keywords: + C-c C-f C-d move to Distribution: C-c C-f C-a move to Summary: +C-c C-y news-reply-yank-original (insert current message, in NEWS). +C-c C-q mail-fill-yanked-message (fill what was yanked). +C-c C-r caesar rotate all letters by 13 places in the article's body (rot13)." + (interactive) + ;; require... + (or (fboundp 'mail-setup) (load "sendmail")) + (kill-all-local-variables) + (make-local-variable 'mail-reply-buffer) + (setq mail-reply-buffer nil) + (set-syntax-table text-mode-syntax-table) + (use-local-map news-reply-mode-map) + (setq local-abbrev-table text-mode-abbrev-table) + (setq major-mode 'news-reply-mode) + (setq mode-name "News") + (make-local-variable 'paragraph-separate) + (make-local-variable 'paragraph-start) + (setq paragraph-start (concat "^" mail-header-separator "$\\|" + paragraph-start)) + (setq paragraph-separate (concat "^" mail-header-separator "$\\|" + paragraph-separate)) + (run-hooks 'text-mode-hook 'news-reply-mode-hook)) + +(defvar news-reply-yank-from "" + "Save From: field for news-reply-yank-original.") + +(defvar news-reply-yank-message-id "" + "Save Message-Id: field for news-reply-yank-original.") + +(defun news-reply-yank-original (arg) + "Insert the message being replied to, if any (in postnews). +Puts point before the text and mark after. +Indents each nonblank line ARG spaces (default 3). +Just \\[universal-argument] as argument means don't indent +and don't delete any header fields." + (interactive "P") + (let ((zmacs-regions nil)) + (mail-yank-original arg) + (exchange-point-and-mark) + (run-hooks 'news-reply-header-hook))) + +(defvar news-reply-header-hook + '(lambda () + (insert "In article " news-reply-yank-message-id + " " news-reply-yank-from " writes:\n\n")) + "Hook for inserting a header at the top of a yanked message.") + +(defun news-reply-newsgroups () + "Move point to end of Newsgroups: field. +RFC 850 constrains the Newsgroups: field to be a comma separated list of valid +newsgroups names at your site: +Newsgroups: news.misc,comp.misc,rec.misc" + (interactive) + (expand-abbrev) + (goto-char (point-min)) + (mail-position-on-field "Newsgroups")) + +(defun news-reply-followup-to () + "Move point to end of Followup-To: field. Create the field if none. +One usually requests followups to only one newsgroup. +RFC 850 constrains the Followup-To: field to be a comma separated list of valid +newsgroups names at your site, that are also in the Newsgroups: field: +Newsgroups: news.misc,comp.misc,rec.misc,misc.misc,soc.misc +Followup-To: news.misc,comp.misc,rec.misc" + (interactive) + (expand-abbrev) + (or (mail-position-on-field "Followup-To" t) + (progn (mail-position-on-field "newsgroups") + (insert "\nFollowup-To: "))) + ;; @@ could do a completing read based on the Newsgroups: field to + ;; @@ fill in the Followup-To: field +) + +(defun news-reply-distribution () + "Move point to end of Distribution: optional field. +Create the field if none. Without this field the posting goes to all of +USENET. The field is used to restrict the posting to parts of USENET." + (interactive) + (expand-abbrev) + (mail-position-on-field "Distribution") + ;; @@could do a completing read based on the news library file: + ;; @@ ../distributions to fill in the field. + ) + +(defun news-reply-keywords () + "Move point to end of Keywords: optional field. Create the field if none. +Used as an aid to the news reader, it can contain a few, well selected keywords +identifying the message." + (interactive) + (expand-abbrev) + (mail-position-on-field "Keywords")) + +(defun news-reply-summary () + "Move point to end of Summary: optional field. Create the field if none. +Used as an aid to the news reader, it can contain a succinct +summary (abstract) of the message." + (interactive) + (expand-abbrev) + (mail-position-on-field "Summary")) + +(defun news-reply-signature () + "The inews program appends ~/.signature automatically." + (interactive) + (message "~/.signature will be appended automatically.")) + +(defun news-setup (to subject in-reply-to newsgroups replybuffer) + "Setup the news reply or posting buffer with the proper headers and in +news-reply-mode." + (setq mail-reply-buffer replybuffer) + (let ((mail-setup-hook nil)) + (if (null to) + ;; this hack is needed so that inews wont be confused by + ;; the fcc: and bcc: fields + (let ((mail-self-blind nil) + (mail-archive-file-name nil)) + (mail-setup to subject in-reply-to nil replybuffer nil) + (beginning-of-line) + ;;(kill-line 1) ; XEmacs fix to longstanding damned annoying bug + (delete-region (point) (progn (forward-line 1) (point))) + (goto-char (point-max))) + (mail-setup to subject in-reply-to nil replybuffer nil)) + ;;;(mail-position-on-field "Posting-Front-End") + ;;;(insert (emacs-version)) + (goto-char (point-max)) + (if (let ((case-fold-search t)) + (re-search-backward "^Subject:" (point-min) t)) + (progn (beginning-of-line) + (insert "Newsgroups: " (or newsgroups "") "\n") + (if (not newsgroups) + (backward-char 1) + (goto-char (point-max))))) + (run-hooks 'news-setup-hook))) + +(defun news-inews () + "Send a news message using inews." + (interactive) + (let* ((case-fold-search nil) + ;;newsgroups subject + ) + (save-excursion + (save-restriction + (goto-char (point-min)) + (search-forward (concat "\n" mail-header-separator "\n")) + (narrow-to-region (point-min) (point)) + ;;(setq newsgroups (mail-fetch-field "newsgroups") + ;; subject (mail-fetch-field "subject")) + ) + (widen) + (goto-char (point-min)) + (run-hooks 'news-inews-hook) + (goto-char (point-min)) + (search-forward (concat "\n" mail-header-separator "\n")) + (replace-match "\n\n") + (goto-char (point-max)) + ;; require a newline at the end for inews to append .signature to + (or (= (preceding-char) ?\n) + (insert ?\n)) + (message "Posting to USENET...") + (call-process-region (point-min) (point-max) + news-inews-program nil 0 nil + "-h") ; take all header lines! + ;@@ setting of subject and newsgroups still needed? + ;"-t" subject + ;"-n" newsgroups + (message "Posting to USENET... done") + (goto-char (point-min)) ;restore internal header separator + (search-forward "\n\n") + (replace-match (concat "\n" mail-header-separator "\n")) + (set-buffer-modified-p nil)) + (and (fboundp 'bury-buffer) (bury-buffer)))) + +(defvar news-reply-subject-prefix nil + "*The prefix to use when replying to a news message (such as \"Re:\").") + +;@@ shares some code with news-reply and news-post-news +(defun news-mail-reply () + "Mail a reply to the author of the current article. +While composing the reply, use \\[news-reply-yank-original] to yank the +original message into it." + (interactive) + (let (from subject date to reply-to references message-id ;;b + (buffer (current-buffer))) + (save-restriction + (widen) + (narrow-to-region (point-min) (progn (goto-char (point-min)) + (search-forward "\n\n") + (- (point) 1))) + (setq from (mail-fetch-field "from") + subject (mail-fetch-field "subject") + reply-to (mail-fetch-field "reply-to") + date (mail-fetch-field "date") + references (mail-fetch-field "references") + message-id (mail-fetch-field "message-id")) + (if (and news-reply-subject-prefix subject + (not (string-match + (concat "^[ \t]*" (regexp-quote news-reply-subject-prefix) + "[ )t]*") + subject))) + (setq subject (concat news-reply-subject-prefix " " subject))) + (setq to from) + (pop-to-buffer "*mail*") +;; (setq b (current-buffer)) + (if (mail nil (if reply-to reply-to to) subject + (let ((stop-pos + (string-match " *at \\| *@ \\| *(\\| *<" from))) + (concat (if stop-pos (substring from 0 stop-pos) from) + "'s message of " + date)) + nil + buffer) + (save-excursion +;; (set-buffer b) + (mail-position-on-field "References") + (if references (insert references)) + (if (and references message-id) (insert " ")) + (if message-id (insert message-id))))))) + +;@@ the guts of news-reply and news-post-news should be combined. -tower +(defun news-reply () + "Compose and post a reply (aka a followup) to the current article on USENET. +While composing the followup, use \\[news-reply-yank-original] to yank the +original message into it." + (interactive) + (if (y-or-n-p "Are you sure you want to followup to all of USENET? ") + (let (from subject date followup-to newsgroups message-of + references distribution message-id + (buffer (current-buffer))) + (save-restriction + (and (not (= 0 (buffer-size))) ;@@real problem is non-existence of + ;@@ of article file + (equal major-mode 'news-mode) ;@@ if rmail-mode, + ;@@ should show full headers + (progn + (news-show-all-headers) ;@@ should save/restore header state, + ;@@ but rnews.el lacks support + (narrow-to-region (point-min) (progn (goto-char (point-min)) + (search-forward "\n\n") + (- (point) 1))))) + (setq from (mail-fetch-field "from") + news-reply-yank-from from + ;; @@ not handling old Title: field + subject (mail-fetch-field "subject") + date (mail-fetch-field "date") + followup-to (mail-fetch-field "followup-to") + newsgroups (or followup-to + (mail-fetch-field "newsgroups")) + references (mail-fetch-field "references") + ;; @@ not handling old Article-I.D.: field + distribution (mail-fetch-field "distribution") + message-id (mail-fetch-field "message-id") + news-reply-yank-message-id message-id) + (pop-to-buffer "*post-news*") + (news-reply-mode) + (if (and (buffer-modified-p) + (not + (y-or-n-p "Unsent article being composed; erase it? "))) + () + (progn + (erase-buffer) + (and subject + (progn (if (string-match "\\`Re: " subject) + (while (string-match "\\`Re: " subject) + (setq subject (substring subject 4)))) + (setq subject (concat "Re: " subject)))) + (and from + (progn + (let ((stop-pos + (string-match " *at \\| *@ \\| *(\\| *<" from))) + (setq message-of + (concat + (if stop-pos (substring from 0 stop-pos) from) + "'s message of " + date))))) + (news-setup + nil + subject + message-of + newsgroups + buffer) + (if followup-to + (progn (news-reply-followup-to) + (insert followup-to))) + (if distribution + (progn + (mail-position-on-field "Distribution") + (insert distribution))) + (mail-position-on-field "References") + (if references + (insert references)) + (if (and references message-id) + (insert " ")) + (if message-id + (insert message-id)) + (goto-char (point-max)))))) + (message ""))) + +;@@ the guts of news-reply and news-post-news should be combined. -tower +(defun news-post-news () + "Begin editing a new USENET news article to be posted. +Type \\[describe-mode] once editing the article to get a list of commands." + (interactive) + (if (y-or-n-p "Are you sure you want to post to all of USENET? ") + (let ((buffer (current-buffer))) + (save-restriction + (and (not (= 0 (buffer-size))) ;@@real problem is non-existence of + ;@@ of article file + (equal major-mode 'news-mode) ;@@ if rmail-mode, + ;@@ should show full headers + (progn + (news-show-all-headers) ;@@ should save/restore header state, + ;@@ but rnews.el lacks support + (narrow-to-region (point-min) (progn (goto-char (point-min)) + (search-forward "\n\n") + (- (point) 1))))) + (setq news-reply-yank-from (mail-fetch-field "from") + ;; @@ not handling old Article-I.D.: field + news-reply-yank-message-id (mail-fetch-field "message-id"))) + (pop-to-buffer "*post-news*") + (news-reply-mode) + (if (and (buffer-modified-p) + (not (y-or-n-p "Unsent article being composed; erase it? "))) + () ;@@ not saving point from last time + (progn (erase-buffer) + (news-setup () () () () buffer)))) + (message ""))) + +(defun news-mail-other-window () + "Send mail in another window. +While composing the message, use \\[news-reply-yank-original] to yank the +original message into it." + (interactive) + (mail-other-window nil nil nil nil nil (current-buffer))) + + +;; menus + +(defconst news-reply-menu + '("Post News" + "Go to Field:" + "----" + ["Subject:" mail-subject t] + ["Summary:" news-reply-summary t] + ["Keywords:" news-reply-keywords t] + ["Newsgroups:" news-reply-newsgroups t] + ["Followup-To:" news-reply-followup-to t] + ["Distribution:" news-reply-distribution t] + ["Text" (let ((mail-header-separator "")) (mail-text)) t] + "----" + "Miscellaneous Commands:" + "----" + ["Yank Original" news-reply-yank-original t] + ["Fill Yanked Message" mail-fill-yanked-message t] +;; ["Insert Signature" news-reply-signature t] + ["Caesar (rot13) Message" news-caesar-buffer-body t] + "----" + ["Post Message" news-inews t] + )) + +(defun news-reply-menu (event) + (interactive "e") + (select-window (event-window event)) + (let (yank sig fill rot (rest news-reply-menu)) + (while rest + (if (vectorp (car rest)) + (cond ((eq (aref (car rest) 1) 'news-reply-yank-original) + (setq yank (car rest))) + ((eq (aref (car rest) 1) 'news-reply-signature) + (setq sig (car rest))) + ((eq (aref (car rest) 1) 'mail-fill-yanked-message) + (setq fill (car rest))) + ((eq (aref (car rest) 1) 'news-caesar-buffer-body) + (setq rot (car rest))))) + (setq rest (cdr rest))) + (if yank (aset yank 2 (not (null mail-reply-buffer)))) + (if sig (aset sig 2 (and (stringp mail-signature-file) + (file-exists-p mail-signature-file)))) + (let ((body-p (save-excursion + (goto-char (point-min)) + (and (search-forward (concat "\n" mail-header-separator + "\n") nil t) + (not (looking-at "[ \t\n]*\\'")))))) + (if fill (aset fill 2 body-p)) + (if rot (aset rot 2 body-p)))) + (let ((popup-menu-titles nil)) + (popup-menu 'news-reply-menu)))
--- a/lisp/prim/files.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/prim/files.el Mon Aug 13 08:47:35 2007 +0200 @@ -689,10 +689,13 @@ "Create a suitably named buffer for visiting FILENAME, and return it. FILENAME (sans directory) is used unchanged if that name is free; otherwise a string <2> or <3> or ... is appended to get an unused name." - (let ((lastname (file-name-nondirectory filename))) - (if (string= lastname "") - (setq lastname filename)) - (generate-new-buffer lastname))) + (let ((handler (find-file-name-handler filename 'create-file-buffer))) + (if handler + (funcall handler 'create-file-buffer filename) + (let ((lastname (file-name-nondirectory filename))) + (if (string= lastname "") + (setq lastname filename)) + (generate-new-buffer lastname))))) (defun generate-new-buffer (name) "Create and return a buffer with a name based on NAME. @@ -711,50 +714,53 @@ See documentation of variable `directory-abbrev-alist' for more information. If optional argument HACK-HOMEDIR is non-nil, then this also substitutes \"~\" for the user's home directory." - ;; Get rid of the prefixes added by the automounter. - ;(if (and (string-match automount-dir-prefix filename) - ; (file-exists-p (file-name-directory - ; (substring filename (1- (match-end 0)))))) - ; (setq filename (substring filename (1- (match-end 0))))) - (let ((tail directory-abbrev-alist)) - ;; If any elt of directory-abbrev-alist matches this name, - ;; abbreviate accordingly. - (while tail - (if (string-match (car (car tail)) filename) - (setq filename - (concat (cdr (car tail)) (substring filename (match-end 0))))) - (setq tail (cdr tail)))) - (if hack-homedir - (progn - ;; Compute and save the abbreviated homedir name. - ;; We defer computing this until the first time it's needed, to - ;; give time for directory-abbrev-alist to be set properly. - ;; We include a slash at the end, to avoid spurious matches - ;; such as `/usr/foobar' when the home dir is `/usr/foo'. - (or abbreviated-home-dir - (setq abbreviated-home-dir - (let ((abbreviated-home-dir "$foo")) - (concat "\\`" (regexp-quote (abbreviate-file-name - (expand-file-name "~"))) - "\\(/\\|\\'\\)")))) - ;; If FILENAME starts with the abbreviated homedir, - ;; make it start with `~' instead. - (if (and (string-match abbreviated-home-dir filename) - ;; If the home dir is just /, don't change it. - (not (and (= (match-end 0) 1) ;#### unix-specific - (= (aref filename 0) ?/))) - ;; MS-DOS root directories can come with a drive letter; - ;; Novell Netware allows drive letters beyond `Z:'. - (not (and (or (eq system-type 'ms-dos) - (eq system-type 'windows-nt)) - (save-match-data - (string-match "^[a-zA-Z-`]:/$" filename))))) - (setq filename - (concat "~" - (substring filename - (match-beginning 1) (match-end 1)) - (substring filename (match-end 0))))))) - filename) + (let ((handler (find-file-name-handler filename 'abbreviate-file-name))) + (if handler + (funcall handler 'abbreviate-file-name filename hack-homedir) + ;; Get rid of the prefixes added by the automounter. + ;;(if (and (string-match automount-dir-prefix filename) + ;; (file-exists-p (file-name-directory + ;; (substring filename (1- (match-end 0)))))) + ;; (setq filename (substring filename (1- (match-end 0))))) + (let ((tail directory-abbrev-alist)) + ;; If any elt of directory-abbrev-alist matches this name, + ;; abbreviate accordingly. + (while tail + (if (string-match (car (car tail)) filename) + (setq filename + (concat (cdr (car tail)) (substring filename (match-end 0))))) + (setq tail (cdr tail)))) + (if hack-homedir + (progn + ;; Compute and save the abbreviated homedir name. + ;; We defer computing this until the first time it's needed, to + ;; give time for directory-abbrev-alist to be set properly. + ;; We include a slash at the end, to avoid spurious matches + ;; such as `/usr/foobar' when the home dir is `/usr/foo'. + (or abbreviated-home-dir + (setq abbreviated-home-dir + (let ((abbreviated-home-dir "$foo")) + (concat "\\`" (regexp-quote (abbreviate-file-name + (expand-file-name "~"))) + "\\(/\\|\\'\\)")))) + ;; If FILENAME starts with the abbreviated homedir, + ;; make it start with `~' instead. + (if (and (string-match abbreviated-home-dir filename) + ;; If the home dir is just /, don't change it. + (not (and (= (match-end 0) 1) ;#### unix-specific + (= (aref filename 0) ?/))) + ;; MS-DOS root directories can come with a drive letter; + ;; Novell Netware allows drive letters beyond `Z:'. + (not (and (or (eq system-type 'ms-dos) + (eq system-type 'windows-nt)) + (save-match-data + (string-match "^[a-zA-Z-`]:/$" filename))))) + (setq filename + (concat "~" + (substring filename + (match-beginning 1) (match-end 1)) + (substring filename (match-end 0))))))) + filename))) (defvar find-file-not-true-dirname-list nil "*List of logical names for which visiting shouldn't save the true dirname. @@ -1666,83 +1672,87 @@ If the value is non-nil, it is the result of `file-modes' on the original file; this means that the caller, after saving the buffer, should change the modes of the new file to agree with the old modes." - (if (and make-backup-files (not backup-inhibited) - (not buffer-backed-up) - (file-exists-p buffer-file-name) - (memq (aref (elt (file-attributes buffer-file-name) 8) 0) - '(?- ?l))) - (let ((real-file-name buffer-file-name) - backup-info backupname targets setmodes) - ;; If specified name is a symbolic link, chase it to the target. - ;; Thus we make the backups in the directory where the real file is. - (setq real-file-name (file-chase-links real-file-name)) - (setq backup-info (find-backup-file-name real-file-name) - backupname (car backup-info) - targets (cdr backup-info)) + (if buffer-file-name + (let ((handler (find-file-name-handler buffer-file-name 'backup-buffer))) + (if handler + (funcall handler 'backup-buffer) + (if (and make-backup-files (not backup-inhibited) + (not buffer-backed-up) + (file-exists-p buffer-file-name) + (memq (aref (elt (file-attributes buffer-file-name) 8) 0) + '(?- ?l))) + (let ((real-file-name buffer-file-name) + backup-info backupname targets setmodes) + ;; If specified name is a symbolic link, chase it to the target. + ;; Thus we make the backups in the directory where the real file is. + (setq real-file-name (file-chase-links real-file-name)) + (setq backup-info (find-backup-file-name real-file-name) + backupname (car backup-info) + targets (cdr backup-info)) ;;; (if (file-directory-p buffer-file-name) ;;; (error "Cannot save buffer in directory %s" buffer-file-name)) - (if backup-info - (condition-case () - (let ((delete-old-versions - ;; If have old versions to maybe delete, - ;; ask the user to confirm now, before doing anything. - ;; But don't actually delete til later. - (and targets - (or (eq delete-old-versions t) - (eq delete-old-versions nil)) - (or delete-old-versions - (y-or-n-p (format "Delete excess backup versions of %s? " - real-file-name)))))) - ;; Actually write the back up file. - (condition-case () - (if (or file-precious-flag - ; (file-symlink-p buffer-file-name) - backup-by-copying - (and backup-by-copying-when-linked - (> (file-nlinks real-file-name) 1)) - (and backup-by-copying-when-mismatch - (let ((attr (file-attributes real-file-name))) - (or (nth 9 attr) - (not (file-ownership-preserved-p real-file-name)))))) + (if backup-info + (condition-case () + (let ((delete-old-versions + ;; If have old versions to maybe delete, + ;; ask the user to confirm now, before doing anything. + ;; But don't actually delete til later. + (and targets + (or (eq delete-old-versions t) + (eq delete-old-versions nil)) + (or delete-old-versions + (y-or-n-p (format "Delete excess backup versions of %s? " + real-file-name)))))) + ;; Actually write the back up file. (condition-case () - (copy-file real-file-name backupname t t) + (if (or file-precious-flag + ; (file-symlink-p buffer-file-name) + backup-by-copying + (and backup-by-copying-when-linked + (> (file-nlinks real-file-name) 1)) + (and backup-by-copying-when-mismatch + (let ((attr (file-attributes real-file-name))) + (or (nth 9 attr) + (not (file-ownership-preserved-p real-file-name)))))) + (condition-case () + (copy-file real-file-name backupname t t) + (file-error + ;; If copying fails because file BACKUPNAME + ;; is not writable, delete that file and try again. + (if (and (file-exists-p backupname) + (not (file-writable-p backupname))) + (delete-file backupname)) + (copy-file real-file-name backupname t t))) + ;; rename-file should delete old backup. + (rename-file real-file-name backupname t) + (setq setmodes (file-modes backupname))) (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))) - ;; rename-file should delete old backup. - (rename-file real-file-name backupname t) - (setq setmodes (file-modes backupname))) - (file-error - ;; If trouble writing the backup, write it in ~. - (setq backupname (expand-file-name - (convert-standard-filename - "~/%backup%~"))) - (message "Cannot write backup file; backing up in %s" - (file-name-nondirectory backupname)) - (sleep-for 1) - (condition-case () - (copy-file real-file-name backupname t t) - (file-error - ;; If copying fails because file BACKUPNAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p backupname) - (not (file-writable-p backupname))) - (delete-file backupname)) - (copy-file real-file-name backupname t t))))) - (setq buffer-backed-up t) - ;; Now delete the old versions, if desired. - (if delete-old-versions - (while targets - (condition-case () - (delete-file (car targets)) - (file-error nil)) - (setq targets (cdr targets)))) - setmodes) - (file-error nil)))))) + ;; If trouble writing the backup, write it in ~. + (setq backupname (expand-file-name + (convert-standard-filename + "~/%backup%~"))) + (message "Cannot write backup file; backing up in %s" + (file-name-nondirectory backupname)) + (sleep-for 1) + (condition-case () + (copy-file real-file-name backupname t t) + (file-error + ;; If copying fails because file BACKUPNAME + ;; is not writable, delete that file and try again. + (if (and (file-exists-p backupname) + (not (file-writable-p backupname))) + (delete-file backupname)) + (copy-file real-file-name backupname t t))))) + (setq buffer-backed-up t) + ;; Now delete the old versions, if desired. + (if delete-old-versions + (while targets + (condition-case () + (delete-file (car targets)) + (file-error nil)) + (setq targets (cdr targets)))) + setmodes) + (file-error nil))))))))) (defun file-name-sans-versions (name &optional keep-backup-version) "Return FILENAME sans backup versions or strings. @@ -2491,28 +2501,35 @@ ;; Not just because users often use the default. (interactive "FRecover file: ") (setq file (expand-file-name file)) - (if (auto-save-file-name-p (file-name-nondirectory file)) - (error "%s is an auto-save file" file)) - (let ((file-name (let ((buffer-file-name file)) - (make-auto-save-file-name)))) - (cond ((if (file-exists-p file) - (not (file-newer-than-file-p file-name file)) - (not (file-exists-p file-name))) - (error "Auto-save file %s not current" file-name)) - ((save-window-excursion - (if (not (eq system-type 'vax-vms)) - (with-output-to-temp-buffer "*Directory*" - (buffer-disable-undo standard-output) - (call-process "ls" nil standard-output nil - (if (file-symlink-p file) "-lL" "-l") - file file-name))) - (yes-or-no-p (format "Recover auto save file %s? " file-name))) - (switch-to-buffer (find-file-noselect file t)) - (let ((buffer-read-only nil)) - (erase-buffer) - (insert-file-contents file-name nil)) - (after-find-file nil nil t)) - (t (error "Recover-file cancelled."))))) + (let ((handler (or (find-file-name-handler file 'recover-file) + (find-file-name-handler + (let ((buffer-file-name file)) + (make-auto-save-file-name)) + 'recover-file)))) + (if handler + (funcall handler 'recover-file file) + (if (auto-save-file-name-p (file-name-nondirectory file)) + (error "%s is an auto-save file" file)) + (let ((file-name (let ((buffer-file-name file)) + (make-auto-save-file-name)))) + (cond ((if (file-exists-p file) + (not (file-newer-than-file-p file-name file)) + (not (file-exists-p file-name))) + (error "Auto-save file %s not current" file-name)) + ((save-window-excursion + (if (not (eq system-type 'vax-vms)) + (with-output-to-temp-buffer "*Directory*" + (buffer-disable-undo standard-output) + (call-process "ls" nil standard-output nil + (if (file-symlink-p file) "-lL" "-l") + file file-name))) + (yes-or-no-p (format "Recover auto save file %s? " file-name))) + (switch-to-buffer (find-file-noselect file t)) + (let ((buffer-read-only nil)) + (erase-buffer) + (insert-file-contents file-name nil)) + (after-find-file nil nil t)) + (t (error "Recover-file cancelled."))))))) (defun recover-session () "Recover auto save files from a previous Emacs session.
--- a/lisp/prim/glyphs.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/prim/glyphs.el Mon Aug 13 08:47:35 2007 +0200 @@ -632,12 +632,16 @@ ;; finish initializing continuation glyph -- created internally ;; because it has a built-in bitmap - (set-glyph-image continuation-glyph "\\" 'global 'tty))) + (set-glyph-image continuation-glyph "\\" 'global 'tty) + + ;; finish initializing continuation glyph -- created internally + ;; because it has a built-in bitmap + (set-glyph-image hscroll-glyph "$" 'global 'tty))) (set-glyph-image octal-escape-glyph "\\") (set-glyph-image control-arrow-glyph "^") (set-glyph-image invisible-text-glyph " ...") - (set-glyph-image hscroll-glyph "$") + ;; (set-glyph-image hscroll-glyph "$") ;; finish initializing xemacs logo -- created internally because it ;; has a built-in bitmap
--- a/lisp/prim/loadup.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/prim/loadup.el Mon Aug 13 08:47:35 2007 +0200 @@ -136,7 +136,7 @@ (load-gc "text-mode") (load-gc "fill") ;; (load-gc "cc-mode") ; as FSF goes so go we .. - (load-gc "scroll-in-place") + ;; (load-gc "scroll-in-place") ; We're not ready for this :-( ;; we no longer load buff-menu automatically. ;; it will get autoloaded if needed.
--- a/lisp/prim/simple.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/prim/simple.el Mon Aug 13 08:47:35 2007 +0200 @@ -1536,7 +1536,8 @@ (switch-to-buffer buffer))) -(defvar next-line-add-newlines t +;;; After 8 years of waiting ... -sb +(defvar next-line-add-newlines nil ; XEmacs "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.") (defun next-line (arg)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/psgml/psgml-style.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,32 @@ +;;; style.el --- example style file for psgml-fs.el and catalog.sgml + +( + ("example" + default-top 1 + default-bottom 1) + ("front") + ("body") + ("pubfront" text "") + ("abstract" + block t + before (block t text "ABSTRACT") + left 4) + ("p" block t) + ("title" block t) + ("titlegrp" block t bottom 2 default-bottom 0 default-top 0) + ("subtitle" before (text " // ")) + ("list" block t) + ("head" block t) + ("item" + left (+ (fs-char 'left) 3) + hang-from " * ") + ("keyword" + before (text "|") + after (text "|")) + ("chapter" block t top 2 before (text "CHAPTER")) + ("lit" block t literal t) + (t + before (text (format "<%s>" (sgml-element-gi e))) + after (text " ") + ) +)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/rmail/rmail-lucid.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,218 @@ +;; Mouse and font support for RMAIL running in Lucid GNU Emacs +;; written by Wilson H. Tien (wtien@urbana.mcd.mot.com); modified by jwz. +;; Copyright (C) 1992-1993 Free Software Foundation, Inc. + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Right button pops up a menu of commands in Rmail and Rmail summary buffers. +;;; Middle button selects indicated mail message in Rmail summary buffer + +(defvar rmail-summary-mode-menu + '("Rmail Summary Commands" + ["Select Message" rmail-summary-goto-msg t nil] + "----" + ["Previous Page" scroll-down t] + ["Next Page" scroll-up t] + "----" + ["Delete Message" rmail-summary-delete-forward t nil] + ["Undelete Message" rmail-summary-undelete t nil] + "----" + ["Exit rmail Summary" rmail-summary-exit t] + ["Quit rmail" rmail-summary-quit t])) + +(defun rmail-summary-update-menubar () + ;; if min point is in visible in the window, don't make page-up menu item + ;; selectable + (let ((current-menubar rmail-summary-mode-menu) + (select '("Select Message")) + (delete '("Delete Message")) + (undelete '("Undelete Message")) + (prev-page '("Previous Page")) + (next-page '("Next Page"))) + (beginning-of-line) + (let ((curmsg (string-to-int + (buffer-substring (point) + (min (point-max) (+ 5 (point)))))) + deleted-p) + (if (= 0 curmsg) + (progn + (rmail-update-menu-item delete nil) + (rmail-update-menu-item undelete nil) + (rmail-update-menu-item select nil)) + (pop-to-buffer rmail-buffer) + (setq deleted-p (rmail-message-deleted-p curmsg)) + (pop-to-buffer rmail-summary-buffer) + (let ((delete-menu-item + (car (find-menu-item current-menubar delete))) + (undelete-menu-item + (car (find-menu-item current-menubar undelete))) + (select-menu-item + (car (find-menu-item current-menubar select))) + (msg (format "#%d" curmsg))) + (aset delete-menu-item 2 (not deleted-p)) + (aset delete-menu-item 3 msg) + (aset undelete-menu-item 2 deleted-p) + (aset undelete-menu-item 3 msg) + (aset select-menu-item 2 t) + (aset select-menu-item 3 msg)))) + (rmail-update-menu-item prev-page (> (window-start) (point-min))) + (rmail-update-menu-item next-page (< (window-end) (point-max))))) + +(defun rmail-summary-mode-menu (event) + "Pops up a menu of applicable rmail summary commands." + (interactive "e") + (mouse-set-point event) + (beginning-of-line) + (rmail-summary-update-menubar) + (popup-menu rmail-summary-mode-menu)) + +;; The following are for rmail mode +(defconst rmail-mode-menu + '("Rmail Commands" + ["Previous Page" scroll-down t] + ["Next Page" scroll-up t] + ["Top Of This Message" rmail-beginning-of-message t] + "----" + "Go To Message:" + "----" + ["Next Nondeleted Message" rmail-next-undeleted-message t] + ["Previous Nondeleted Message" rmail-previous-undeleted-message t] + ["Next Message" rmail-next-message t] + ["Previous Message" rmail-previous-message t] + ["First Message" rmail-show-message t] + ["Last Message" rmail-last-message t] + "----" + ["Delete This Message" rmail-delete-forward t] + ["Undelete This Message" rmail-undelete-previous-message t] + ["Save This Message" rmail-output-to-rmail-file t] + "----" + ["Reply This Message" rmail-reply t] + ["Forward This Message" rmail-forward t] +; ["Continue This Message" rmail-continue t] + "----" + ["Add Label" rmail-add-label t] + ["Kill Label" rmail-kill-label t] + ["Next Labeled Message" rmail-next-labeled-message t] + ["Previous Labeled Message" rmail-previous-labeled-message t] + ["Summary by Label" rmail-summary-by-labels t] + "----" + ["Summary" rmail-summary t] + ["Get New Mail" rmail-get-new-mail t] + ["rmail Input From" rmail-input t] + ["Expunge rmail" rmail-expunge t] + ["Expunge and Save" rmail-expunge-and-save t] + ["Quit rmail" rmail-quit t])) + +(defun rmail-update-menu-item (item p) + "If P is true, enable the menu item. O/w disable it." + (aset (car (or (find-menu-item current-menubar item) + (error "couldn't find rmail menu item %S" item))) + 2 p)) + +(defun rmail-update-menubar () + (let ((current-menubar rmail-mode-menu) + (prev-page '("Previous Page")) + (next-page '("Next Page")) + (top-page '("Top Of This Message")) + (real-next '("Next Message")) + (real-prev '("Previous Message")) + (undel-next '("Next Nondeleted Message")) + (undel-prev '("Previous Nondeleted Message")) + (delete '("Delete This Message")) + (undelete '("Undelete This Message")) + i) + ;; Disable/enable page-up/page-down menu items + (rmail-update-menu-item prev-page (> (window-start) (point-min))) + (rmail-update-menu-item next-page (< (window-end) (point-max))) + (rmail-update-menu-item top-page (> (window-start) (point-min))) + (rmail-update-menu-item real-next + (/= rmail-current-message rmail-total-messages)) + (rmail-update-menu-item real-prev (/= rmail-current-message 1)) + (setq i (1+ rmail-current-message)) + (while (and (<= i rmail-total-messages) (rmail-message-deleted-p i)) + (setq i (1+ i))) + (rmail-update-menu-item undel-next (<= i rmail-total-messages)) + (setq i (1- rmail-current-message)) + (while (and (>= i 1) (rmail-message-deleted-p i)) + (setq i (1- i))) + (rmail-update-menu-item undel-prev (>= i 1)) + (rmail-update-menu-item delete + (not (rmail-message-deleted-p rmail-current-message))) + (rmail-update-menu-item undelete + (rmail-message-deleted-p rmail-current-message)) + t)) + +(defun rmail-mode-menu (event) + "Pops up a menu of applicable rmail commands." + (interactive "e") + (select-window (event-window event)) + (rmail-update-menubar) + (popup-menu rmail-mode-menu)) + +(defun rmail-activate-menubar-hook () + (cond ((eq major-mode 'rmail-mode) + (rmail-update-menubar)) + ((eq major-mode 'rmail-summary-mode) + (rmail-summary-update-menubar)))) + +(add-hook 'activate-menubar-hook 'rmail-activate-menubar-hook) + +;;; Put message headers in boldface, etc... + +(require 'highlight-headers) + +(defun rmail-fontify-headers () + (highlight-headers (point-min) (point-max) t)) + +(add-hook 'rmail-show-message-hook 'rmail-fontify-headers) + +;; MENU and MENUBAR setup for both Rmail and Rmail summary buffers +(defun rmail-install-menubar () + (if (and current-menubar (not (assoc (car rmail-mode-menu) current-menubar))) + (let ((menu (cond ((eq major-mode 'rmail-mode) rmail-mode-menu) + ((eq major-mode 'rmail-summary-mode) + rmail-summary-mode-menu) + (t (error "not rmail or rmail summary mode"))))) + (set-buffer-menubar (copy-sequence current-menubar)) + (add-menu nil (car rmail-mode-menu) (cdr menu))))) + +(defun rmail-mode-menu-setup () + (rmail-install-menubar) + (define-key rmail-mode-map 'button3 'rmail-mode-menu)) + +(add-hook 'rmail-mode-hook 'rmail-mode-menu-setup) + +(defun rmail-summary-mode-menu-setup () + (rmail-install-menubar) + (define-key rmail-summary-mode-map 'button2 'rmail-summary-mouse-goto-msg) + (define-key rmail-summary-mode-map 'button3 'rmail-summary-mode-menu)) + +(defun rmail-summary-mouse-goto-msg (e) + (interactive "e") + (mouse-set-point e) + (beginning-of-line) + (rmail-summary-goto-msg)) + +(defun rmail-install-mouse-tracker () + (require 'mode-motion) + (setq mode-motion-hook 'mode-motion-highlight-line)) + +(add-hook 'rmail-summary-mode-hook 'rmail-install-mouse-tracker) +(add-hook 'rmail-summary-mode-hook 'rmail-summary-mode-menu-setup) + + +(provide 'rmail-lucid)
--- a/lisp/tl/cless.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/cless.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: cless.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: cless.el,v 1.2 1996/12/22 00:29:30 steve Exp $ ;; Keywords: common lisp ;; This file is not part of GNU Emacs.
--- a/lisp/tl/emu-x20.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/emu-x20.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,32 +1,34 @@ -;;; -;;; emu-x20.el --- Mule 2 emulation module for XEmacs 20 with Mule -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;;; Version: -;;; $Id: emu-x20.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ -;;; Keywords: emulation, compatibility, Mule, XEmacs -;;; -;;; This file is part of tl (Tiny Library). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; +;;; emu-x20.el --- emu API implementation for XEmacs 20 with mule + +;; Copyright (C) 1995 Free Software Foundation, Inc. +;; Copyright (C) 1994,1995,1996 MORIOKA Tomohiko + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; Version: $Id: emu-x20.el,v 1.2 1996/12/22 00:29:30 steve Exp $ +;; Keywords: emulation, compatibility, Mule, XEmacs + +;; This file is part of tl (Tiny Library). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: +(require 'cyrillic) +(require 'emu-xemacs) + (defvar xemacs-beta-version (if (string-match "(beta\\([0-9]+\\))" emacs-version) (string-to-number @@ -34,103 +36,193 @@ ))) -;;; @ character set +;;; @ graphic character set ;;; -(defalias 'char-leading-char 'char-charset) +(defalias 'charset-description 'charset-doc-string) -(defun find-charset-string (string) +(defalias 'find-charset-string 'charsets-in-string) +(defalias 'find-charset-region 'charsets-in-region) + +(defun find-non-ascii-charset-string (string) "Return a list of charsets in the STRING except ascii. \[emu-x20.el; Mule emulating function]" (delq 'ascii (charsets-in-string string)) ) -(defun find-charset-region (start end) +(defun find-non-ascii-charset-region (start end) "Return a list of charsets except ascii in the region between START and END. \[emu-x20.el; Mule emulating function]" (delq 'ascii (charsets-in-region start end)) ) -(defconst lc-ascii 'ascii) -(defconst lc-ltn1 'latin-1) -(defconst lc-ltn2 'latin-2) -(defconst lc-ltn3 'latin-3) -(defconst lc-ltn4 'latin-4) -(defconst lc-crl 'cyrillic) -(defconst lc-arb 'arabic) -(defconst lc-grk 'greek) -(defconst lc-hbw 'hebrew) -(defconst lc-ltn5 'latin-5) -(defconst lc-jp 'japanese) -(defconst lc-jp2 'japanese-2) -(defconst lc-kr 'korean) -(defconst lc-big5-1 'chinese-big5-1) -(defconst lc-big5-2 'chinese-big5-2) -(defconst lc-cn 'chinese-gb) -(defconst lc-cns1 'chinese-cns-1) -(defconst lc-cns2 'chinese-cns-2) -(defconst lc-cns3 'chinese-cns-3) -(defconst lc-cns4 'chinese-cns-4) -(defconst lc-cns5 'chinese-cns-5) -(defconst lc-cns6 'chinese-cns-6) -(defconst lc-cns7 'chinese-cns-7) - ;;; @ coding-system ;;; -(defconst *noconv* 'noconv) +(defconst *noconv* 'no-conversion) (defconst *ctext* 'ctext) (defconst *hz* 'hz) (defconst *big5* 'big5) (defconst *euc-kr* 'euc-kr) -(defconst *koi8* nil) +(defconst *koi8* 'koi8) -(defvar code-converter-is-broken - (and xemacs-beta-version (<= xemacs-beta-version 18))) +(defalias 'set-buffer-file-coding-system 'set-file-coding-system) -(if code-converter-is-broken -(progn -;;; -(defun decode-coding-region (start end coding-system &optional buffer) - "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-x20.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (save-restriction - (narrow-to-region start end) - (let ((process-output-coding-system 'noconv) - (process-input-coding-system coding-system)) - (call-process-region start end "cat" t t nil) - )))) +(defmacro as-binary-process (&rest body) + `(let (selective-display ; Disable ^M to nl translation. + process-input-coding-system + process-output-coding-system) + ,@body)) -(defun encode-coding-region (start end coding-system &optional buffer) - "Encode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-x20.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (save-restriction - (narrow-to-region start end) - (let ((process-output-coding-system coding-system) - (process-input-coding-system 'noconv)) - (call-process-region start end "cat" t t nil) - )))) -;;; -)) +(defmacro as-binary-input-file (&rest body) + `(let ((file-coding-system-for-read 'no-conversion)) + ,@body)) -;;; @ character and string +;;; @ MIME charset +;;; + +(defvar charsets-mime-charset-alist + '(((ascii) . us-ascii) + ((ascii latin-iso8859-1) . iso-8859-1) + ((ascii latin-iso8859-2) . iso-8859-2) + ((ascii latin-iso8859-3) . iso-8859-3) + ((ascii latin-iso8859-4) . iso-8859-4) +;;; ((ascii cyrillic-iso8859-5) . iso-8859-5) + ((ascii cyrillic-iso8859-5) . koi8-r) + ((ascii arabic-iso8859-6) . iso-8859-6) + ((ascii greek-iso8859-7) . iso-8859-7) + ((ascii hebrew-iso8859-8) . iso-8859-8) + ((ascii latin-iso8859-9) . iso-8859-9) + ((ascii japanese-jisx0208-1978 japanese-jisx0208) . iso-2022-jp) + ((ascii korean-ksc5601) . euc-kr) + ((ascii chinese-big5-1 chinese-big5-2) . big5) + ((ascii japanese-jisx0208-1978 chinese-gb + japanese-jisx0208 korean-ksc5601 + japanese-jisx0212 latin-iso8859-1 + greek-iso8859-7) . iso-2022-jp-2) + ((ascii japanese-jisx0208-1978 chinese-gb2312 + japanese-jisx0208 korean-ksc5601 + japanese-jisx0212 + chinese-cns11643-1 chinese-cns11643-2 + latin-iso8859-1 greek-iso8859-7) . iso-2022-int-1) + )) + +(defvar default-mime-charset 'iso-2022-int-1) + +(defvar mime-charset-coding-system-alist + '((iso-8859-1 . ctext) + (gb2312 . euc-china) + (koi8-r . koi8) + (iso-2022-jp-2 . iso-2022-ss2-7) + (x-iso-2022-jp-2 . iso-2022-ss2-7) + (shift_jis . sjis) + (x-shiftjis . sjis) + )) + +(defun mime-charset-to-coding-system (charset) + "Return coding-system by MIME charset. [emu-x20.el]" + (if (stringp charset) + (setq charset (intern (downcase charset))) + ) + (or (cdr (assq charset mime-charset-coding-system-alist)) + (and (memq charset (coding-system-list)) charset) + )) + +(defun detect-mime-charset-region (start end) + "Return MIME charset for region between START and END. +\[emu-x20.el]" + (charsets-to-mime-charset (charsets-in-region start end))) + +(defun encode-mime-charset-region (start end charset) + "Encode the text between START and END as MIME CHARSET. +\[emu-x20.el]" + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (encode-coding-region start end cs) + ))) + +(defun decode-mime-charset-region (start end charset) + "Decode the text between START and END as MIME CHARSET. +\[emu-x20.el]" + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (decode-coding-region start end cs) + ))) + +(defun encode-mime-charset-string (string charset) + "Encode the STRING as MIME CHARSET. [emu-x20.el]" + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (encode-coding-string string cs) + string))) + +(defun decode-mime-charset-string (string charset) + "Decode the STRING as MIME CHARSET. [emu-x20.el]" + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (decode-coding-string string cs) + string))) + + +;;; @ character ;;; (defun char-bytes (chr) 1) -(defun char-width (chr) 1) + +(defun char-length (character) + "Return number of elements a CHARACTER occupies in a string or buffer. +\[emu-x20.el]" + 1) + +(defun char-columns (character) + "Return number of columns a CHARACTER occupies when displayed. +\[emu-x20.el]" + (charset-columns (char-charset character)) + ) + +;;; @@ Mule emulating aliases +;;; +;;; You should not use them. + +(defalias 'char-width 'char-columns) + +(defalias 'char-leading-char 'char-charset) -(defalias 'string-width 'length) +(defun char-category (character) + "Return string of category mnemonics for CHAR in TABLE. +CHAR can be any multilingual character +TABLE defaults to the current buffer's category table. +\[emu-x20.el; Mule emulating function]" + (mapconcat (lambda (chr) + (char-to-string (int-char chr)) + ) + (char-category-list character) + "")) + + +;;; @ string +;;; + +(defun string-columns (string) + "Return number of columns STRING occupies when displayed. +\[emu-x20.el]" + (let ((col 0) + (len (length string)) + (i 0)) + (while (< i len) + (setq col (+ col (char-columns (aref string i)))) + (setq i (1+ i)) + ) + col)) + +(defalias 'string-width 'string-columns) + +(defun string-to-int-list (str) + (mapcar #'char-int str) + ) (defalias 'sref 'aref) @@ -144,12 +236,6 @@ ) -;;; @ etc -;;; - -(require 'emu-xemacs) - - ;;; @ end ;;;
--- a/lisp/tl/emu-xemacs.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/emu-xemacs.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,14 +1,14 @@ -;;; emu-xemacs.el --- Emacs 19 emulation module for XEmacs +;;; emu-xemacs.el --- emu API implementation for XEmacs ;; Copyright (C) 1995 Free Software Foundation, Inc. ;; Copyright (C) 1995,1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: emu-xemacs.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: emu-xemacs.el,v 1.2 1996/12/22 00:29:30 steve Exp $ ;; Keywords: emulation, compatibility, XEmacs -;; This file is part of tl (Tiny Library). +;; This file is part of emu. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -21,9 +21,9 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. ;;; Code: @@ -141,6 +141,29 @@ `(mapconcat #'char-to-string ,char-list "")) +;;; @@ to avoid bug of XEmacs 19.14 +;;; + +(or (string-match "^../" + (file-relative-name "/usr/local/share" "/usr/local/lib")) + ;; This function was imported from Emacs 19.33. + (defun file-relative-name (filename &optional directory) + "Convert FILENAME to be relative to DIRECTORY +(default: default-directory). [emu-xemacs.el]" + (setq filename (expand-file-name filename) + directory (file-name-as-directory + (expand-file-name + (or directory default-directory)))) + (let ((ancestor "")) + (while (not (string-match (concat "^" (regexp-quote directory)) + filename)) + (setq directory (file-name-directory (substring directory 0 -1)) + ancestor (concat "../" ancestor))) + (concat ancestor (substring filename (match-end 0))) + )) + ) + + ;;; @ end ;;;
--- a/lisp/tl/emu.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/emu.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,10 +3,10 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: emu.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ -;; Keywords: emulation, compatibility, NEmacs, MULE, XEmacs +;; Version: $Id: emu.el,v 1.2 1996/12/22 00:29:31 steve Exp $ +;; Keywords: emulation, compatibility, NEmacs, MULE, Emacs/mule, XEmacs -;; This file is part of tl (Tiny Library). +;; This file is part of emu. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -25,6 +25,20 @@ ;;; Code: +(defmacro defun-maybe (name &rest everything-else) + (or (and (fboundp name) + (not (get name 'defun-maybe)) + ) + (` (or (fboundp (quote (, name))) + (progn + (defun (, name) (,@ everything-else)) + (put (quote (, name)) 'defun-maybe t) + )) + ))) + +(put 'defun-maybe 'lisp-indent-function 'defun) + + (or (boundp 'emacs-major-version) (defconst emacs-major-version (string-to-int emacs-version))) (or (boundp 'emacs-minor-version) @@ -130,14 +144,24 @@ (defvar path-separator ":" "Character used to separate concatenated paths.") -(or (fboundp 'buffer-substring-no-properties) - (defun buffer-substring-no-properties (beg end) - "Return the text from BEG to END, without text properties, as a string. +(defun-maybe buffer-substring-no-properties (beg end) + "Return the text from BEG to END, without text properties, as a string. \[emu.el; EMACS 19.29 emulating function]" - (let ((string (buffer-substring beg end))) - (tl:set-text-properties 0 (length string) nil string) - string)) - ) + (let ((string (buffer-substring beg end))) + (tl:set-text-properties 0 (length string) nil string) + string)) + +(defun-maybe match-string (num &optional string) + "Return string of text matched by last search. +NUM specifies which parenthesized expression in the last regexp. + Value is nil if NUMth pair didn't match, or there were less than NUM pairs. +Zero means the entire text matched by the whole regexp or whole string. +STRING should be given if the last search was by `string-match' on STRING. +\[emu.el; EMACS 19.29 emulating function]" + (if (match-beginning num) + (if string + (substring string (match-beginning num) (match-end num)) + (buffer-substring (match-beginning num) (match-end num))))) (or running-emacs-19_29-or-later running-xemacs @@ -155,17 +179,16 @@ ) )) -(or (fboundp 'add-to-list) - ;; This function was imported Emacs 19.30. - (defun add-to-list (list-var element) - "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. +;; This function was imported Emacs 19.30. +(defun-maybe add-to-list (list-var element) + "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. If you want to use `add-to-list' on a variable that is not defined until a certain package is loaded, you should put the call to `add-to-list' into a hook function that will be run only after loading the package. \[emu.el; EMACS 19.30 emulating function]" - (or (member element (symbol-value list-var)) - (set list-var (cons element (symbol-value list-var))))) - ) + (or (member element (symbol-value list-var)) + (set list-var (cons element (symbol-value list-var))) + )) ;;; @ EMACS 19.30 emulation @@ -194,16 +217,14 @@ ;;; @ EMACS 19.31 emulation ;;; -(or (fboundp 'buffer-live-p) - (defun buffer-live-p (object) - "Return non-nil if OBJECT is a buffer which has not been killed. +(defun-maybe buffer-live-p (object) + "Return non-nil if OBJECT is a buffer which has not been killed. Value is nil if OBJECT is not a buffer or if it has been killed. \[emu.el; EMACS 19.31 emulating function]" - (and object - (get-buffer object) - (buffer-name (get-buffer object)) - )) - ) + (and object + (get-buffer object) + (buffer-name (get-buffer object)) + )) (or (fboundp 'save-selected-window) ;; This function was imported Emacs 19.33. @@ -221,17 +242,15 @@ ;;; @ XEmacs emulation ;;; -(or (fboundp 'functionp) - (defun functionp (obj) - "Returns t if OBJ is a function, nil otherwise. +(defun-maybe functionp (obj) + "Returns t if OBJ is a function, nil otherwise. \[emu.el; XEmacs emulating function]" - (or (subrp obj) - (byte-code-function-p obj) - (and (symbolp obj)(fboundp obj)) - (and (consp obj)(eq (car obj) 'lambda)) - )) - ) - + (or (subrp obj) + (byte-code-function-p obj) + (and (symbolp obj)(fboundp obj)) + (and (consp obj)(eq (car obj) 'lambda)) + )) + ;;; @ for XEmacs 20 ;;;
--- a/lisp/tl/file-detect.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/file-detect.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: file-detect.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: file-detect.el,v 1.2 1996/12/22 00:29:31 steve Exp $ ;; Keywords: install, module ;; This file is part of tl (Tiny Library).
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/tl/filename.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,142 @@ +;;; filename.el --- file name filter + +;; Copyright (C) 1996 MORIOKA Tomohiko + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; Version: $Id: filename.el,v 1.1 1996/12/22 00:37:04 steve Exp $ +;; Keywords: string, file name + +;; This file is part of tl (Tiny Library). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: + +(require 'tl-list) +(require 'tl-str) + + +;;; @ variables +;;; + +(defvar filename-limit-length 21) + +(defvar filename-replacement-alist + (list + (cons (string-to-char-list " \t") "_") + (cons (string-to-char-list (expand-char-ranges "!-*,/:;<>?[-^`{-~")) "_") + '(filename-control-p . "") + )) + +(defvar filename-filters + (nconc + (and (file-installed-p "kakasi" exec-path) + '(filename-japanese-to-roman-string) + ) + '(filename-special-filter + filename-eliminate-top-low-lines + filename-canonicalize-low-lines + filename-maybe-truncate-by-size + filename-eliminate-bottom-low-lines + ))) + + +;;; @ filters +;;; + +(defun filename-japanese-to-roman-string (str) + (save-excursion + (set-buffer (get-buffer-create " *temp kakasi*")) + (erase-buffer) + (insert str) + (call-process-region (point-min)(point-max) "kakasi" t t t + "-Ha" "-Ka" "-Ja" "-Ea" "-ka") + (buffer-string) + )) + +(defun filename-control-p (character) + (let ((code (char-int character))) + (or (< code 32)(= code 127)) + )) + +(defun filename-special-filter (string) + (let (dest + (i 0) + (len (length string)) + (b 0) + ) + (while (< i len) + (let* ((chr (sref string i)) + (ret (ASSOC chr filename-replacement-alist + :test (function + (lambda (chr key) + (if (functionp key) + (funcall key chr) + (memq chr key) + ) + )))) + ) + (if ret + (setq dest (concat dest (substring string b i)(cdr ret)) + i (+ i (char-length chr)) + b i) + (setq i (+ i (char-length chr))) + ))) + (concat dest (substring string b)) + )) + +(defun filename-eliminate-top-low-lines (string) + (if (string-match "^_+" string) + (substring string (match-end 0)) + string)) + +(defun filename-canonicalize-low-lines (string) + (let (dest) + (while (string-match "__+" string) + (setq dest (concat dest (substring string 0 (1+ (match-beginning 0))))) + (setq string (substring string (match-end 0))) + ) + (concat dest string) + )) + +(defun filename-maybe-truncate-by-size (string) + (if (and (> (length string) filename-limit-length) + (string-match "_" string filename-limit-length) + ) + (substring string 0 (match-beginning 0)) + string)) + +(defun filename-eliminate-bottom-low-lines (string) + (if (string-match "_+$" string) + (substring string 0 (match-beginning 0)) + string)) + + +;;; @ interface +;;; + +(defun replace-as-filename (string) + "Return safety filename from STRING. [filename.el]" + (poly-funcall filename-filters string) + ) + + +;;; @ end +;;; + +(provide 'filename) + +;;; filename.el ends here
--- a/lisp/tl/range.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/range.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; Lars Magne Ingebrigtsen <larsi@ifi.uio.no> ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: range.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: range.el,v 1.2 1996/12/22 00:29:31 steve Exp $ ;; Keywords: range ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/richtext.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/richtext.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,30 +1,30 @@ -;;; ;;; richtext.el -- read and save files in text/richtext format -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1995 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;;; Created: 1995/7/15 -;;; Version: -;;; $Id: richtext.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ -;;; Keywords: wp, faces, MIME, multimedia -;;; -;;; This file is part of GNU Emacs. -;;; -;;; GNU Emacs is free software; you can redistribute it and/or modify -;;; it under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 2, or (at your option) -;;; any later version. -;;; -;;; GNU Emacs is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Emacs; see the file COPYING. If not, write to -;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;; Copyright (C) 1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; Created: 1995/7/15 +;; Version: $Id: richtext.el,v 1.2 1996/12/22 00:29:31 steve Exp $ +;; Keywords: wp, faces, MIME, multimedia + +;; This file is not part of GNU Emacs yet. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: (require 'enriched) @@ -143,7 +143,7 @@ (narrow-to-region from to) (goto-char from) (let ((file-width (enriched-get-file-width)) - (use-hard-newlines t) pc nc) + (use-hard-newlines t)) (enriched-remove-header) (goto-char from) @@ -181,3 +181,5 @@ ;;; (provide 'richtext) + +;;; richtext.el ends here
--- a/lisp/tl/texi-util.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/texi-util.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: texi-util.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: texi-util.el,v 1.2 1996/12/22 00:29:31 steve Exp $ ;; Keywords: Texinfo ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tl-atype.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-atype.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tl-atype.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tl-atype.el,v 1.2 1996/12/22 00:29:32 steve Exp $ ;; Keywords: atype ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tl-list.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-list.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> ;; Lars Magne Ingebrigtsen <larsi@ifi.uio.no> ;; Version: -;; $Id: tl-list.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: tl-list.el,v 1.2 1996/12/22 00:29:32 steve Exp $ ;; Keywords: list ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tl-misc.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-misc.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: tl-misc.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: tl-misc.el,v 1.2 1996/12/22 00:29:32 steve Exp $ ;; Keywords: load-path, module, structure ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tl-num.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-num.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,5 +1,5 @@ ;;; -;;; $Id: tl-num.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;;; $Id: tl-num.el,v 1.2 1996/12/22 00:29:32 steve Exp $ ;;; ;;; by MORIOKA Tomohiko <morioka@jaist.ac.jp>, 1993/10/4 ;;;
--- a/lisp/tl/tl-seq.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-seq.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: tl-seq.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: tl-seq.el,v 1.2 1996/12/22 00:29:33 steve Exp $ ;; Keywords: sequence ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tl-str.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tl-str.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: tl-str.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: tl-str.el,v 1.2 1996/12/22 00:29:33 steve Exp $ ;; Keywords: string ;; This file is part of tl (Tiny Library). @@ -206,40 +206,7 @@ (substring filename 0 (match-beginning 0)) filename)) -(defvar filename-special-char-range - (nconc '((0 . 31)) - (string-to-int-list "!\"$") - (list (cons (char-int ?&) (char-int ?*))) - (string-to-int-list "/;<>?") - (list (cons (char-int ?\[) (char-int ?^))) - (string-to-int-list "`") - (list (cons (char-int ?{) (char-int ?}))) - '((127 . 159))) - "*Range of characters which is not available in file name. [tl-str.el]") - -(defvar filename-space-char-range '(9 32 160) - "*Range of characters which indicates space. These characters -are replaced to `_' by function `replace-as-filename' [tl-str.el]") - -(defun replace-as-filename (str) - "Return safety filename from STR. [tl-str.el]" - (let (sf) - (mapconcat (function - (lambda (chr) - (cond ((member-of-range chr filename-space-char-range) - (if sf - "" - (setq sf t) - "_")) - ((member-of-range chr filename-special-char-range) - "") - (t - (setq sf nil) - (char-to-string chr) - )) - )) - (string-to-char-list str) - ""))) +(autoload 'replace-as-filename "filename") ;;; @ symbol
--- a/lisp/tl/tu-comment.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tu-comment.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1995/10/27 -;; Version: $Id: tu-comment.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tu-comment.el,v 1.2 1996/12/22 00:29:33 steve Exp $ ;; Keywords: comment, Lisp ;; This file is part of tl (Tiny Library).
--- a/lisp/tl/tu-replace.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tl/tu-replace.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tu-replace.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tu-replace.el,v 1.2 1996/12/22 00:29:33 steve Exp $ ;; Keywords: replace ;; This file is part of tl (Tiny Library).
--- a/lisp/tm/gnus-art-mime.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/gnus-art-mime.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 ;; Version: -;; $Id: gnus-art-mime.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: gnus-art-mime.el,v 1.2 1996/12/22 00:29:34 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet.
--- a/lisp/tm/gnus-charset.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/gnus-charset.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 ;; Version: -;; $Id: gnus-charset.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: gnus-charset.el,v 1.2 1996/12/22 00:29:34 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet. @@ -88,7 +88,10 @@ (let ((format-alist nil) (auto-mode-alist (nnheader-auto-mode-alist)) (default-major-mode 'fundamental-mode) - (after-insert-file-functions nil)) + (after-insert-file-functions ; for jam-code-guess + (if (memq 'jam-code-guess-after-insert-file-function + after-insert-file-functions) + '(jam-code-guess-after-insert-file-function)))) (apply 'find-file-noselect args))) ) ;; Red Gnus 0.67 or later @@ -98,9 +101,24 @@ (let ((format-alist nil) (auto-mode-alist (nnheader-auto-mode-alist)) (default-major-mode 'fundamental-mode) - (after-insert-file-functions nil)) + (enable-local-variables nil) + (after-insert-file-functions ; for jam-code-guess + (if (memq 'jam-code-guess-after-insert-file-function + after-insert-file-functions) + '(jam-code-guess-after-insert-file-function)))) (insert-file-contents filename visit beg end replace)) )) + ;; imported from Red Gnus 0.66 + (or (fboundp 'nnheader-auto-mode-alist) + (defun nnheader-auto-mode-alist () + (let ((alist auto-mode-alist) + out) + (while alist + (when (listp (cdar alist)) + (push (car alist) out)) + (pop alist)) + (nreverse out))) + ) ;; alias for Old Gnus (defalias 'nnheader-insert-file-contents-literally 'nnheader-insert-file-contents)
--- a/lisp/tm/gnus-mime-old.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/gnus-mime-old.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/9/4 ;; Version: -;; $Id: gnus-mime-old.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: gnus-mime-old.el,v 1.2 1996/12/22 00:29:34 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet.
--- a/lisp/tm/gnus-mime.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/gnus-mime.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet. @@ -33,7 +33,7 @@ ;;; (defconst gnus-mime-RCS-ID - "$Id: gnus-mime.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: gnus-mime.el,v 1.2 1996/12/22 00:29:35 steve Exp $") (defconst gnus-mime-version (get-version-string gnus-mime-RCS-ID))
--- a/lisp/tm/gnus-sum-mime.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/gnus-sum-mime.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 ;; Version: -;; $Id: gnus-sum-mime.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: gnus-sum-mime.el,v 1.2 1996/12/22 00:29:35 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet.
--- a/lisp/tm/message-mime.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/message-mime.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 ;; Version: -;; $Id: message-mime.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: message-mime.el,v 1.2 1996/12/22 00:29:36 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/tm/mime-setup.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,184 @@ +;;; mime-setup.el --- setup file for tm viewer and composer. + +;; Copyright (C) 1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; Version: +;; $Id: mime-setup.el,v 1.1 1996/12/22 00:36:44 steve Exp $ +;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word + +;; This file is part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Code: + +(require 'tm-setup) + +(autoload 'mime/editor-mode "tm-edit" + "Minor mode for editing MIME message." t) +(autoload 'mime/decode-message-header "tm-ew-d" + "Decode MIME encoded-words in message header." t) + +(defun mime-setup-decode-message-header () + (save-excursion + (save-restriction + (goto-char (point-min)) + (narrow-to-region + (point-min) + (if (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "$") + nil t) + (match-beginning 0) + (point-max) + )) + (mime/decode-message-header) + (set-buffer-modified-p nil) + ))) + +(add-hook 'mime/editor-mode-hook 'mime-setup-decode-message-header) + + +;;; @ variables +;;; + +(defvar mime-setup-use-sc nil + "If it is not nil, mime-setup requires sc-setup. [mime-setup.el]") + +(defvar mime-setup-use-signature t + "If it is not nil, mime-setup sets up to use signature.el. +\[mime-setup.el]") + +(defvar mime-setup-default-signature-key "\C-c\C-s" + "*Key to insert signature. [mime-setup.el]") + +(defvar mime-setup-signature-key-alist '((mail-mode . "\C-c\C-w")) + "Alist of major-mode vs. key to insert signature. [mime-setup.el]") + + +;;; @ for signature +;;; + +(defun mime-setup-set-signature-key () + (let ((key (or (cdr (assq major-mode mime-setup-signature-key-alist)) + mime-setup-default-signature-key))) + (define-key (current-local-map) key (function insert-signature)) + )) + +(if mime-setup-use-signature + (progn + (autoload 'insert-signature "signature" "Insert signature" t) + (add-hook 'mime/editor-mode-hook 'mime-setup-set-signature-key) + (setq gnus-signature-file nil) + (setq mail-signature nil) + (setq message-signature nil) + )) + + +;;; @ about SuperCite +;;; + +(if mime-setup-use-sc + (require 'sc-setup) + ) + + +;;; @ for mu-cite +;;; + +(add-hook 'mu-cite/pre-cite-hook 'mime/decode-message-header) + + +;;; @ for RMAIL and VM +;;; + +(add-hook 'mail-setup-hook 'mime/decode-message-header) +(add-hook 'mail-setup-hook 'mime/editor-mode 'append) +(add-hook 'mail-send-hook 'mime-editor/maybe-translate) + + +;;; @ for mh-e +;;; + +(defun mime-setup-mh-draft-setting () + (mime/editor-mode) + (make-local-variable 'mail-header-separator) + (setq mail-header-separator "--------") + (save-excursion + (goto-char (point-min)) + (setq buffer-read-only nil) + (if (re-search-forward "^-*$" nil t) + (progn + (replace-match mail-header-separator) + (set-buffer-modified-p (buffer-modified-p)) + )) + )) + +(add-hook 'mh-letter-mode-hook 'mime-setup-mh-draft-setting t) +(add-hook 'mh-before-send-letter-hook 'mime-editor/maybe-translate) + + +;;; @ for GNUS +;;; + +(add-hook 'news-reply-mode-hook 'mime/editor-mode) +(add-hook 'news-inews-hook 'mime-editor/maybe-translate) + + +;;; @ for message (September Gnus 0.58 or later) +;;; + +(defun message-maybe-setup-default-charset () + (let ((charset + (and (boundp 'gnus-summary-buffer) + (buffer-live-p gnus-summary-buffer) + (save-excursion + (set-buffer gnus-summary-buffer) + default-mime-charset)))) + (if charset + (progn + (make-local-variable 'default-mime-charset) + (setq default-mime-charset charset) + )))) + +(or (boundp 'epoch::version) + (progn + (add-hook 'message-setup-hook 'mime/editor-mode) + (add-hook 'message-setup-hook 'message-maybe-setup-default-charset) + (add-hook 'message-send-hook 'mime-editor/maybe-translate) + (add-hook 'message-header-hook 'mime/encode-message-header) + + (call-after-loaded + 'message + (function + (lambda () + (require 'message-mime) + ))) + )) + + +;;; @ end +;;; + +(provide 'mime-setup) + +(run-hooks 'mime-setup-load-hook) + +;;; mime-setup.el ends here +;;; +;;; Local Variables: +;;; mode: emacs-lisp +;;; End:
--- a/lisp/tm/sc-setup.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/sc-setup.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,5 +1,5 @@ ;;; -;;; $Id: sc-setup.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;;; $Id: sc-setup.el,v 1.2 1996/12/22 00:29:37 steve Exp $ ;;; (require 'emu)
--- a/lisp/tm/signature.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/signature.el Mon Aug 13 08:47:35 2007 +0200 @@ -9,7 +9,7 @@ ;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> ;; Created: 1994/7/11 ;; Version: -;; $Id: signature.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; $Id: signature.el,v 1.2 1996/12/22 00:29:37 steve Exp $ ;; Keywords: mail, news, signature ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-bbdb.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-bbdb.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; Author: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> ;; Artur Pioro <artur@flugor.if.uj.edu.pl> ;; Maintainer: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> -;; Version: $Id: tm-bbdb.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tm-bbdb.el,v 1.2 1996/12/22 00:29:37 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, BBDB ;; This file is part of tm (Tools for MIME). @@ -31,13 +31,47 @@ (require 'std11) (require 'tm-ew-d) (require 'tm-view) -(require 'bbdb-com) ; (require 'bbdb) implicitly +(if (module-installed-p 'bbdb-com) + (require 'bbdb-com) + (eval-when-compile + ;; imported from bbdb-1.51 + (defmacro bbdb-pop-up-elided-display () + '(if (boundp 'bbdb-pop-up-elided-display) + bbdb-pop-up-elided-display + bbdb-elided-display)) + (defmacro bbdb-user-mail-names () + "Returns a regexp matching the address of the logged-in user" + '(or bbdb-user-mail-names + (setq bbdb-user-mail-names + (concat "\\b" (regexp-quote (user-login-name)) "\\b")))) + )) + + +;;; @ User Variables +;;; + +(defvar tm-bbdb/use-mail-extr t + "*If non-nil, `mail-extract-address-components' is used. +Otherwise `tm-bbdb/extract-address-components' overrides it.") + +(defvar tm-bbdb/auto-create-p nil + "*If t, create new BBDB records automatically. +If function, then it is called with no arguments to decide whether an +entry should be automatically creaded. + +tm-bbdb uses this variable instead of `bbdb/mail-auto-create-p' or +`bbdb/news-auto-create-p' unless other tm-MUA overrides it.") + +(defvar tm-bbdb/delete-empty-window nil + "*If non-nil, delete empty BBDB window. +All bbdb-MUAs but bbdb-gnus display BBDB window even if it is empty. +If you prefer behavior of bbdb-gnus, set this variable to t. + +For framepop users: If empty, `framepop-banish' is used instead.") ;;; @ mail-extr ;;; -(defvar tm-bbdb/use-mail-extr t) - (defun tm-bbdb/extract-address-components (str) (let* ((ret (std11-extract-address-components str)) (phrase (car ret)) @@ -116,8 +150,6 @@ ;;; @ BBDB functions for mime/viewer-mode ;;; -(defvar tm-bbdb/auto-create-p nil) - (defun tm-bbdb/update-record (&optional offer-to-create) "Return the record corresponding to the current MIME previewing message. Creating or modifying it as necessary. A record will be created if @@ -197,10 +229,9 @@ (bbdb-display-records (list record)) (framepop-banish)) (bbdb-display-records (if record (list record) nil)) - (if (not record) - (progn - (set-buffer "*BBDB*") - (delete-window)))) + (if (and (null record) + tm-bbdb/delete-empty-window) + (delete-windows-on (get-buffer "*BBDB*")))) (set-buffer b) record))))
--- a/lisp/tm/tm-def.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-def.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tm-def.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tm-def.el,v 1.2 1996/12/22 00:29:38 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, definition ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-edit-mc.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-edit-mc.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tm-edit-mc.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tm-edit-mc.el,v 1.2 1996/12/22 00:29:38 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, security, PGP ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-edit.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-edit.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1994/08/21 renamed from mime.el -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: mail, news, MIME, multimedia, multilingual ;; This file is part of tm (Tools for MIME). @@ -110,7 +110,6 @@ (require 'sendmail) (require 'mail-utils) (require 'mel) -(require 'tl-822) (require 'tl-list) (require 'tm-view) (require 'tm-ew-e) @@ -121,7 +120,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: tm-edit.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: tm-edit.el,v 1.2 1996/12/22 00:29:39 steve Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -2479,18 +2478,27 @@ (t (let* (charset (pstr - (mapconcat (function - (lambda (attr) - (if (string-equal (car attr) - "charset") - (progn - (setq charset (cdr attr)) - "") - (concat ";" (car attr) - "=" (cdr attr)) - ) - )) - params "")) + (let ((bytes (+ 14 (length ctype)))) + (mapconcat (function + (lambda (attr) + (if (string-equal (car attr) "charset") + (progn + (setq charset (cdr attr)) + "") + (let* ((str + (concat (car attr) + "=" (cdr attr)) + ) + (bs (length str)) + ) + (setq bytes (+ bytes bs 2)) + (if (< bytes 76) + (concat "; " str) + (setq bytes (+ bs 1)) + (concat ";\n " str) + ) + )))) + params ""))) encoding encoded) (save-excursion
--- a/lisp/tm/tm-ew-d.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-ew-d.el Mon Aug 13 08:47:35 2007 +0200 @@ -9,7 +9,7 @@ ;; Original: 1992/07/20 ENAMI Tsugutomo's `mime.el'. ;; Renamed: 1993/06/03 to tiny-mime.el. ;; Renamed: 1995/10/03 from tiny-mime.el. (split off encoder) -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: encoded-word, MIME, multilingual, header, mail, news ;; This file is part of tm (Tools for MIME). @@ -41,7 +41,7 @@ ;;; (defconst tm-ew-d/RCS-ID - "$Id: tm-ew-d.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: tm-ew-d.el,v 1.2 1996/12/22 00:29:39 steve Exp $") (defconst mime/eword-decoder-version (get-version-string tm-ew-d/RCS-ID))
--- a/lisp/tm/tm-ew-e.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-ew-e.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: encoded-word, MIME, multilingual, header, mail, news ;; This file is part of tm (Tools for MIME). @@ -35,7 +35,7 @@ ;;; (defconst tm-ew-e/RCS-ID - "$Id: tm-ew-e.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $") + "$Id: tm-ew-e.el,v 1.2 1996/12/22 00:29:39 steve Exp $") (defconst mime-eword/encoder-version (get-version-string tm-ew-e/RCS-ID)) @@ -90,11 +90,15 @@ (iso-8859-9 . "Q") (iso-2022-jp . "B") (iso-2022-kr . "B") + (gb2312 . "B") + (cn-gb . "B") + (cn-gb-2312 . "B") (euc-kr . "B") (iso-2022-jp-2 . "B") (iso-2022-int-1 . "B") )) + ;;; @ encoded-text encoder ;;;
--- a/lisp/tm/tm-file.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-file.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; modified by Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp> -;; Version: $Id: tm-file.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;; Version: $Id: tm-file.el,v 1.2 1996/12/22 00:29:39 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, file, extract ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-ftp.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-ftp.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> (1994/11/ 8) ;;; and OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> (1994/11/11) ;;; -;;; $Id: tm-ftp.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ +;;; $Id: tm-ftp.el,v 1.2 1996/12/22 00:29:39 steve Exp $ ;;; (require 'tm-view)
--- a/lisp/tm/tm-html.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-html.el Mon Aug 13 08:47:35 2007 +0200 @@ -8,7 +8,7 @@ ;;; Created: 1995/9/14 ;;; based on tm-latex.el by OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> ;;; Version: -;;; $Id: tm-html.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;;; $Id: tm-html.el,v 1.2 1996/12/22 00:29:40 steve Exp $ ;;; Keywords: mail, news, MIME, multimedia, HTML, WWW ;;; ;;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-image.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-image.el Mon Aug 13 08:47:35 2007 +0200 @@ -7,7 +7,7 @@ ;; Dan Rich <drich@morpheus.corp.sgi.com> ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1995/12/15 -;; Version: $Id: tm-image.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-image.el,v 1.2 1996/12/22 00:29:40 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, image, picture, X-Face
--- a/lisp/tm/tm-latex.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-latex.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;;; ;;; modified by MORIOKA Tomohiko <morioka@jaist.ac.jp> ;;; -;;; $Id: tm-latex.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;;; $Id: tm-latex.el,v 1.2 1996/12/22 00:29:40 steve Exp $ ;;; (require 'tm-view)
--- a/lisp/tm/tm-mail.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-mail.el Mon Aug 13 08:47:35 2007 +0200 @@ -7,7 +7,7 @@ ;; and Neal Becker <neal@neal.ctd.comsat.com> ;; Maintainer: KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp> ;; Created: 1995/11/27 -;; Version: $Id: tm-mail.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-mail.el,v 1.2 1996/12/22 00:29:40 steve Exp $ ;; Keywords: mail, MIME, multimedia ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-mh-e.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-mh-e.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1993/11/21 (obsolete mh-e-mime.el) -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual ;; This file is part of tm (Tools for MIME). @@ -48,7 +48,7 @@ ;;; (defconst tm-mh-e/RCS-ID - "$Id: tm-mh-e.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $") + "$Id: tm-mh-e.el,v 1.2 1996/12/22 00:29:40 steve Exp $") (defconst tm-mh-e/version (get-version-string tm-mh-e/RCS-ID)) @@ -214,16 +214,6 @@ (mh-header-display) )) -(defun tm-mh-e/scroll-up-msg (&optional arg) - (interactive) - (mh-page-msg (or arg 1)) - ) - -(defun tm-mh-e/scroll-down-msg (&optional arg) - (interactive) - (mh-page-msg (- (or arg 1))) - ) - (defun tm-mh-e/burst-multipart/digest () "Burst apart the current message, which should be a multipart/digest. The message is replaced by its table of contents and the letters from the @@ -291,7 +281,7 @@ (goto-char (point-max)) (setq mh-show-buffer buf) (apply (function mh-send) - (std11-field-bodies '("To" "cc" "Subject") "")) + (std11-field-bodies '("From" "cc" "Subject") "")) (setq mh-sent-from-folder buf) (setq mh-sent-from-msg 1) (let ((last (point))) @@ -340,8 +330,6 @@ (define-key mh-folder-mode-map "." (function tm-mh-e/show)) (define-key mh-folder-mode-map "," (function tm-mh-e/header-display)) (define-key mh-folder-mode-map "\e," (function tm-mh-e/raw-display)) -(define-key mh-folder-mode-map "\r" (function tm-mh-e/scroll-up-msg)) -(define-key mh-folder-mode-map "\e\r" (function tm-mh-e/scroll-down-msg)) (define-key mh-folder-mode-map "\C-c\C-b" (function tm-mh-e/burst-multipart/digest))
--- a/lisp/tm/tm-parse.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-parse.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tm-parse.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-parse.el,v 1.2 1996/12/22 00:29:41 steve Exp $ ;; Keywords: mail, news, MIME, multimedia ;; This file is part of tm (Tools for MIME). @@ -25,7 +25,7 @@ ;;; Code: -(require 'tl-822) +(require 'std11) (require 'tl-misc) (require 'tm-def) @@ -33,6 +33,16 @@ ;;; @ field parser ;;; +(defconst rfc822/quoted-pair-regexp "\\\\.") +(defconst rfc822/qtext-regexp + (concat "[^" (char-list-to-string std11-non-qtext-char-list) "]")) +(defconst rfc822/quoted-string-regexp + (concat "\"" + (regexp-* + (regexp-or rfc822/qtext-regexp rfc822/quoted-pair-regexp) + ) + "\"")) + (defconst mime/content-parameter-value-regexp (concat "\\(" rfc822/quoted-string-regexp
--- a/lisp/tm/tm-partial.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-partial.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: OKABE Yasuo @ Kyoto University ;; MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Version: -;; $Id: tm-partial.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; $Id: tm-partial.el,v 1.2 1996/12/22 00:29:41 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, message/partial ;; This file is a part of tm (Tools for MIME).
--- a/lisp/tm/tm-pgp.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-pgp.el Mon Aug 13 08:47:35 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1995/12/7 -;; Version: $Id: tm-pgp.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-pgp.el,v 1.2 1996/12/22 00:29:41 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, PGP, security ;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-play.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-play.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1995/9/26 (separated from tm-view.el) -;; Version: $Id: tm-play.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-play.el,v 1.2 1996/12/22 00:29:41 steve Exp $ ;; Keywords: mail, news, MIME, multimedia ;; This file is part of tm (Tools for MIME). @@ -28,19 +28,6 @@ (require 'tm-view) -(defvar mime-viewer/external-progs "/usr/local/share/tm" - "*Directory containing tm external methods.") - -(add-to-list 'exec-path mime-viewer/external-progs) - -(let ((paths (parse-colon-path (getenv "PATH")))) - (or (member mime-viewer/external-progs paths) - (setenv "PATH" - (mapconcat (function identity) - (append paths (list mime-viewer/external-progs)) - path-separator)) - )) - ;;; @ content decoder ;;;
--- a/lisp/tm/tm-rmail.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-rmail.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,30 +1,30 @@ -;;; -;;; Copyright (C) 1995 Free Software Foundation, Inc. -;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko -;;; -;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;;; modified by KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp> -;;; Created: 1994/8/30 -;;; Version: -;;; $Revision: 1.1.1.1 $ -;;; Keywords: mail, MIME, multimedia, multilingual, encoded-word -;;; -;;; This file is part of tm (Tools for MIME). -;;; -;;; This program is free software; you can redistribute it and/or -;;; modify it under the terms of the GNU General Public License as -;;; published by the Free Software Foundation; either version 2, or -;;; (at your option) any later version. -;;; -;;; This program is distributed in the hope that it will be useful, -;;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;;; General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with This program. If not, write to the Free Software -;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; +;;; tm-rmail.el --- MIME extension for RMAIL + +;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> +;; modified by KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp> +;; Created: 1994/8/30 +;; Version: $Revision: 1.2 $ +;; Keywords: mail, MIME, multimedia, multilingual, encoded-word + +;; This file is not part of tm (Tools for MIME). + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + ;;; Code: (require 'tl-list) @@ -40,7 +40,7 @@ ;;; (defconst tm-rmail/RCS-ID - "$Id: tm-rmail.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $") + "$Id: tm-rmail.el,v 1.2 1996/12/22 00:29:42 steve Exp $") (defconst tm-rmail/version (get-version-string tm-rmail/RCS-ID)) (defvar tm-rmail/decode-all nil) @@ -120,6 +120,8 @@ (add-hook 'rmail-show-message-hook 'tm-rmail/preview-message-if-you-need) +(load "rmailsum") + (cond ((fboundp 'rmail-summary-rmail-update) ;; for Emacs 19 or later (or (fboundp 'tm:rmail-summary-rmail-update) @@ -361,7 +363,7 @@ 'mail-mode (function (lambda () (interactive) - (sendmail-send-it) + (funcall send-mail-function) ))) ))) )))
--- a/lisp/tm/tm-setup.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-setup.el Mon Aug 13 08:47:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: tm-setup.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tm-setup.el,v 1.2 1996/12/22 00:29:42 steve Exp $ ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of tm (Tools for MIME). @@ -85,12 +85,14 @@ ;;; @ for RMAIL ;;; -(call-after-loaded 'rmail - (function - (lambda () - (require 'tm-rmail) - )) - 'rmail-mode-hook) +(or running-xemacs-with-mule + (call-after-loaded 'rmail + (function + (lambda () + (require 'tm-rmail) + )) + 'rmail-mode-hook) + ) ;;; @ for mh-e
--- a/lisp/tm/tm-tar.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-tar.el Mon Aug 13 08:47:35 2007 +0200 @@ -1,5 +1,5 @@ ;;; -;;; $Id: tm-tar.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;;; $Id: tm-tar.el,v 1.2 1996/12/22 00:29:42 steve Exp $ ;;; ;;; tm-tar.el ;;;
--- a/lisp/tm/tm-text.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-text.el Mon Aug 13 08:47:35 2007 +0200 @@ -8,7 +8,7 @@ ;;; ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;;; Version: -;;; $Id: tm-text.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;;; $Id: tm-text.el,v 1.2 1996/12/22 00:29:42 steve Exp $ ;;; Keywords: mail, news, MIME, multimedia, text ;;; ;;; This file is part of tm (Tools for MIME).
--- a/lisp/tm/tm-view.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-view.el Mon Aug 13 08:47:35 2007 +0200 @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el) -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: mail, news, MIME, multimedia ;; This file is part of tm (Tools for MIME). @@ -42,7 +42,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $") + "$Id: tm-view.el,v 1.2 1996/12/22 00:29:43 steve Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -380,6 +380,9 @@ (defvar mime-viewer/following-method-alist nil) +(defvar mime-viewer/following-required-fields-list + '("From")) + ;;; @@ X-Face ;;; @@ -981,6 +984,24 @@ rcnum (cdr rcnum)) ) ) + (let ((rest mime-viewer/following-required-fields-list)) + (while rest + (let ((field-name (car rest))) + (or (std11-field-body field-name) + (insert + (format + (concat field-name + ": " + (save-excursion + (set-buffer the-buf) + (set-buffer mime::preview/mother-buffer) + (set-buffer mime::preview/article-buffer) + (std11-field-body field-name) + ) + "\n"))) + )) + (setq rest (cdr rest)) + )) (mime/decode-message-header) ) (funcall (cdr (assq mode mime-viewer/following-method-alist)) @@ -1025,7 +1046,7 @@ (i (- (length pcl) 1)) beg) (catch 'tag - (while (>= i 0) + (while (> i 0) (setq beg (mime::preview-content-info/point-min (nth i pcl))) (if (> p beg) (throw 'tag (goto-char beg))
--- a/lisp/tm/tm-vm.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tm-vm.el Mon Aug 13 08:47:35 2007 +0200 @@ -9,7 +9,7 @@ ;; Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch> ;; Created: 1994/10/29 -;; Version: $Revision: 1.1.1.1 $ +;; Version: $Revision: 1.2 $ ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word ;; This file is part of tm (Tools for MIME). @@ -35,13 +35,16 @@ ;;; Code: +(eval-when-compile + (require 'tm-edit) + (require 'tm-mail) + (require 'vm) + (require 'vm-window)) + (require 'tm-view) -(require 'vm) -(eval-when-compile - (require 'ps-print)) (defconst tm-vm/RCS-ID - "$Id: tm-vm.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $") + "$Id: tm-vm.el,v 1.2 1996/12/22 00:29:43 steve Exp $") (defconst tm-vm/version (get-version-string tm-vm/RCS-ID)) (define-key vm-mode-map "Z" 'tm-vm/view-message) @@ -315,12 +318,14 @@ (if mime::preview/article-buffer (set-buffer mime::preview/article-buffer) (vm-select-folder-buffer)) - (if mime::article/preview-buffer + (if (and mime::article/preview-buffer + (get-buffer mime::article/preview-buffer)) (save-excursion (set-buffer mime::article/preview-buffer) (goto-char (point-min)) (widen))) (if (or (and mime::article/preview-buffer + (get-buffer mime::article/preview-buffer) (vm-get-visible-buffer-window mime::article/preview-buffer)) (vm-get-visible-buffer-window (current-buffer))) (progn @@ -380,33 +385,32 @@ (was-invisible (and (null mwin) (null pwin))) ) ;; now current buffer is folder buffer. - (tm-vm/save-window-excursion - (if (or mp-changed was-invisible) - (vm-display mbuf t '(vm-scroll-forward vm-scroll-backward) - (list this-command 'reading-message))) - (tm-vm/display-preview-buffer) - (setq mwin (vm-get-buffer-window mbuf) - pwin (and pbuf (vm-get-buffer-window pbuf))) - (cond - ((or mp-changed was-invisible) - nil - ) - ((null pbuf) - ;; preview buffer is killed. - (tm-vm/preview-current-message) - (vm-update-summary-and-mode-line)) - ((eq (tm-vm/system-state) 'previewing) - (tm-vm/show-current-message)) - (t - (select-window pwin) - (set-buffer pbuf) - (if (pos-visible-in-window-p (point-max) pwin) - (tm-vm/next-message) - ;; not end of message. scroll preview buffer only. - (scroll-up) - (tm-vm/howl-if-eom) - (set-buffer mbuf)) - )))) + (if (or mp-changed was-invisible) + (vm-display mbuf t '(vm-scroll-forward vm-scroll-backward) + (list this-command 'reading-message))) + (tm-vm/display-preview-buffer) + (setq mwin (vm-get-buffer-window mbuf) + pwin (and pbuf (vm-get-buffer-window pbuf))) + (cond + ((or mp-changed was-invisible) + nil) + ((null pbuf) + ;; preview buffer is killed. + (tm-vm/preview-current-message) + (vm-update-summary-and-mode-line)) + ((eq (tm-vm/system-state) 'previewing) + (tm-vm/show-current-message)) + (t + (tm-vm/save-window-excursion + (select-window pwin) + (set-buffer pbuf) + (if (pos-visible-in-window-p (point-max) pwin) + (tm-vm/next-message) + ;; not end of message. scroll preview buffer only. + (scroll-up) + (tm-vm/howl-if-eom) + (set-buffer mbuf)) + )))) ))) ;;; based on vm-scroll-backward [vm-page.el] @@ -427,29 +431,29 @@ (if (or mp-changed was-invisible) (vm-display mbuf t '(vm-scroll-forward vm-scroll-backward) (list this-command 'reading-message))) - (tm-vm/save-window-excursion - (tm-vm/display-preview-buffer) - (setq mwin (vm-get-buffer-window mbuf) - pwin (and pbuf (vm-get-buffer-window pbuf))) - (cond - (was-invisible - nil - ) - ((null pbuf) - ;; preview buffer is killed. - (tm-vm/preview-current-message) - (vm-update-summary-and-mode-line)) - ((eq (tm-vm/system-state) 'previewing) - (tm-vm/show-current-message)) - (t - (select-window pwin) - (set-buffer pbuf) - (if (pos-visible-in-window-p (point-min) pwin) - nil - ;; scroll preview buffer only. - (scroll-down) - (set-buffer mbuf)) - )))) + (tm-vm/display-preview-buffer) + (setq mwin (vm-get-buffer-window mbuf) + pwin (and pbuf (vm-get-buffer-window pbuf))) + (cond + (was-invisible + nil + ) + ((null pbuf) + ;; preview buffer is killed. + (tm-vm/preview-current-message) + (vm-update-summary-and-mode-line)) + ((eq (tm-vm/system-state) 'previewing) + (tm-vm/show-current-message)) + (t + (tm-vm/save-window-excursion + (select-window pwin) + (set-buffer pbuf) + (if (pos-visible-in-window-p (point-min) pwin) + nil + ;; scroll preview buffer only. + (scroll-down) + (set-buffer mbuf)) + )))) ))) ;;; based on vm-beginning-of-message [vm-page.el] @@ -1059,7 +1063,7 @@ 'mail-mode (function (lambda () (interactive) - (sendmail-send-it) + (funcall send-mail-function) ))) (if (and (string-match "XEmacs\\|Lucid" emacs-version) tm-vm/use-xemacs-popup-menu) @@ -1103,13 +1107,12 @@ ;;; @ for ps-print (Suggestted by Anders Stenman <stenman@isy.liu.se>) ;;; -(defvar tm-vm/use-ps-print (not (or running-mule-merged-emacs - running-xemacs-with-mule)) +(defvar tm-vm/use-ps-print (not (featurep 'mule)) "*Use Postscript printing (ps-print) to print MIME messages.") (if tm-vm/use-ps-print (progn - (require 'ps-print) + (autoload 'ps-print-buffer-with-faces "ps-print" "Postscript Print" t) (add-hook 'vm-mode-hook 'tm-vm/ps-print-setup) (add-hook 'mime-viewer/define-keymap-hook 'tm-vm/ps-print-setup) (fset 'vm-toolbar-print-command 'tm-vm/print-message))) @@ -1117,7 +1120,10 @@ (defun tm-vm/ps-print-setup () "Set things up for printing MIME messages with ps-print. Set binding to the [Print Screen] key." - (local-set-key (ps-prsc) 'tm-vm/print-message) + (local-set-key (if running-xemacs + 'f22 + [f22]) + 'tm-vm/print-message) (setq ps-header-lines 3) (setq ps-left-header (list 'ps-article-subject 'ps-article-author 'buffer-name)))
--- a/lisp/tm/tmh-comp.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/tm/tmh-comp.el Mon Aug 13 08:47:35 2007 +0200 @@ -6,7 +6,7 @@ ;; OKABE Yasuo <okabe@kudpc.kyoto-u.ac.jp> ;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/2/29 (separated from tm-mh-e.el) -;; Version: $Id: tmh-comp.el,v 1.1.1.1 1996/12/18 03:55:32 steve Exp $ +;; Version: $Id: tmh-comp.el,v 1.2 1996/12/22 00:29:44 steve Exp $ ;; Keywords: mail, MH, MIME, multimedia, encoded-word, multilingual ;; This file is part of tm (Tools for MIME).
--- a/lisp/tooltalk/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -# @(#)Makefile 1.4 94/04/19 - -EMACS=../../src/xemacs - -TOOLTALK.el = tooltalk-macros.el tooltalk-init.el tooltalk-util.el -TOOLTALK.elc = $(TOOLTALK.el:.el=.elc) - -all: $(TOOLTALK.elc) - -.INIT: tooltalk-load.el $(TOOLTALK.el) - -.SUFFIXES: .elc .el - -.el.elc: - $(EMACS) -batch -q -f batch-byte-compile $(@:.elc=.el) - -clean: - $(RM) $(TOOLTALK.elc)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/utils/bench.el Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,282 @@ +;;; bench.el --- a crude benchmark for emacsen +;; Copyright (C) 1987,88,89,90,93,94,95,96 Free Software Foundation, Inc. + +;; Author: Shane Holder <holder@rsn.hp.com> +;; Adapted-By: Steve Baur <steve@altair.xemacs.org> + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Commentary: + +;; To run +;; Extract the shar file in /tmp, or modify bench-large-lisp-file to +;; point to the gnus-bench.el file. +;; At the shell prompt emacs -q --no-site-file <= don't load users .emacs or +;; site-file +;; M-x byte-compile-file "/tmp/bench.el" +;; M-x load-file "/tmp/bench.elc" +;; In the scratch buffer (bench 1) + +;;; Code: + +;; Use elp to profile benchmarks +(require 'elp) +(eval-when-compile (require 'cl)) ; Emacs doesn't have when and cdar + +(defconst bench-version 1.0) + +(defconst bench-large-lisp-file "/usr/local/lib/gnus-bench.el" + "Large lisp file to use in benchmarks. +Grab `ftp://ftp.xemacs.org/pub/beta/contrib/gnus-bench.el.gz' for a good +version. Don't install this file with Emacs/XEmacs.") + +(defconst bench-sort-buffer "*Sort*" + "File to be used in the sort benchmark") + +(defconst bench-sort-number-words 10000 + "Number of words to use in sort benchmark") + +(defconst bench-pre-bench-hook nil + "Hook for individual bench mark initialization.") + +(defconst bench-post-bench-hook nil + "Hook for individual bench mark statistic collection.") + +(defconst bench-mark-function-alist + '( + (bench-mark-1 . "Tower of Hanoi") + (bench-mark-2 . "Font Lock") + (bench-mark-3 . "Large File scrolling") + (bench-mark-4 . "Frame Creation") + (bench-mark-5 . "Generate Words") + (bench-mark-6 . "Sort Buffer") + (bench-mark-7 . "Large File bytecompilation") + (bench-mark-8 . "Loop Computation") + (bench-mark-9 . "Make a Few Large Size List") + (bench-mark-10 . "Garbage Collection Large Size List") + (bench-mark-11 . "Make Several Small Size List") + (bench-mark-12 . "Garbage Collection Small Size List") + (bench-mark-13 . "Append to buffer") +)) + +(defconst bench-enabled-profiling nil + "If non-nil and the underlying emacs supports it, do function profiling.") + +(defconst bench-mark-profile-buffer "*Profile*" + "Buffer used for collection of profiling data.") + +(setq gc-cons-threshold 40000000) + +(defconst bench-number-of-large-lists 10 + "Number of lists to use in large list creation/garbage collections") + +(defconst bench-number-of-small-lists 1000000 + "Number of lists to use in small list creation/garbage collections") + +(defconst bench-large-list-size 1000000 + "Size of list to use in small list creation/garbage collection") + +(defconst bench-small-list-size 10 + "Size of list to use in small list creation/garbage collection") + +;----------------------------------------------------------------------------- +(defun bench-mark-1 () + "How long to complete the tower of hanoi." + (hanoi 4)) + +;----------------------------------------------------------------------------- +(defun bench-mark-2 () + "How long to fonitfy a large file." + (find-file bench-large-lisp-file) + (font-lock-fontify-buffer)) + +;----------------------------------------------------------------------------- +(defun bench-mark-3 () + "How long does it take to scroll down through a large file." + (let ((buffer-read-only t)) + (goto-char (point-min)) + (while (< (point) (point-max)) + (next-line 1) + (sit-for 0)))) + +;----------------------------------------------------------------------------- +(defun bench-mark-4 () + "How quickly can emacs create a new frame." + (make-frame)) + + +;----------------------------------------------------------------------------- +(defun bench-mark-5 () + "How long does it take to generate lots of random words." + (set-buffer (get-buffer-create bench-sort-buffer)) + (let ((tmp-words bench-sort-number-words)) + (while (not (= tmp-words 0)) + (let ((word-len (random 10))) + (while (not (= word-len 0)) + (insert (+ ?a (random 25))) + (setq word-len (- word-len 1)))) + (insert "\n") + (setq tmp-words (- tmp-words 1))))) + +;----------------------------------------------------------------------------- + +(defun bench-mark-6 () + "How long does it take to sort the random words from bench-mark-5." + (set-buffer (get-buffer-create bench-sort-buffer)) + (sort-lines nil (point-min) (point-max)) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-7 () + "How long does it take to byte-compile a large lisp file" + (byte-compile-file bench-large-lisp-file) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-8 () + "How long does it take to run through a loop." + (let ((count 250000)) + (let ((i 0) (gcount 0)) + (while (< i count) + (increment) + (setq i (1+ i))) + (message "gcount = %d" gcount)))) + +(defun increment () + "Increment a variable for bench-mark-8." + (setq gcount (1+ gcount))) + +;----------------------------------------------------------------------------- +(defun bench-mark-9 () + (let ((tmp-foo bench-number-of-large-lists)) + (while (> tmp-foo 0) + (make-list bench-large-list-size '1) + (setq tmp-foo (- tmp-foo 1))) + ) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-10 () + (garbage-collect) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-11 () + (let ((tmp-foo bench-number-of-small-lists)) + (while (> tmp-foo 0) + (make-list bench-small-list-size '1) + (setq tmp-foo (- tmp-foo 1)) + )) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-12 () + (garbage-collect) +) + +;----------------------------------------------------------------------------- +(defun bench-mark-13 () + (unwind-protect + (let ((a 100000)) + (set-buffer (get-buffer-create "*tmp*")) + (erase-buffer) + (while (> a 0) + (insert "0123456789\n") + (setq a (1- a)))) + (kill-buffer "*tmp*"))) + + +;============================================================================= +(defun bench-init () + "Initialize profiling for bench marking package." + (if (fboundp 'start-profiling) + (let ((buf (get-buffer-create bench-mark-profile-buffer))) + (erase-buffer buf) + (when (profiling-active-p) + (stop-profiling) + (clear-profiling-info))) + (message "Profiling not available in this Emacs.") + (sit-for 2))) + +(defun bench-profile-start (test-name) + "Turn on profiling for test `test-name'." + (when (and bench-enabled-profiling + (fboundp 'start-profiling)) + (when (profiling-active-p) + (stop-profiling)) + (let ((buf (get-buffer-create bench-mark-profile-buffer))) + (save-excursion + (set-buffer buf) + (insert "Test `" test-name "'\n") + (start-profiling))))) + +(defun bench-profile-stop (test-name) + "Turn off profiling for test `test-name'." + (when (and bench-enabled-profiling + (fboundp 'stop-profiling)) + (stop-profiling) + (let ((buf (get-buffer-create bench-mark-profile-buffer))) + (save-excursion + (set-buffer buf) + (insert (with-output-to-string + (pretty-print-profiling-info)) "\n"))) + (clear-profiling-info))) + +(add-hook 'bench-pre-bench-hook 'bench-profile-start) +(add-hook 'bench-post-bench-hook 'bench-profile-stop) + +(defun bench (arg) + "Run a series of benchmarks." + (interactive "p") + (elp-instrument-package "bench-mark") ;Only instrument functions + ;beginning with bench-mark + (bench-init) + (if (fboundp 'byte-optimize) ;Turn off byte-compile optimization in XEmacs + (setq byte-optimize nil)) + (let ((benches bench-mark-function-alist)) + (while benches + (let ((test-name (cdar benches))) + (run-hook-with-args 'bench-pre-bench-hook test-name) + (let ((count arg)) + (while (> count 0) + (message "Running %s - %s." (symbol-name (caar benches)) test-name) + (funcall (caar benches)) + (setq count (1- count)))) + (setq benches (cdr benches)) + (run-hook-with-args 'bench-post-bench-hook test-name)) + )) + (elp-results) + (goto-char (point-min)) + (next-line 2) +; I can't figure out a good way to sort the lines numerically. +; If someone comes up with a good way, let me know. + (sort-lines nil (point) (point-max)) + (goto-char (point-min)) + (let ((benches bench-mark-function-alist)) + (while benches + (goto-char (point-min)) + (let ((test-name (cdar benches)) + (test-func (caar benches))) + (search-forward (symbol-name test-func)) + (end-of-line) + (insert " <= " test-name)) + (setq benches (cdr benches)) + )) +) + +;;; bench.el ends here
--- a/lisp/version.el Mon Aug 13 08:47:16 2007 +0200 +++ b/lisp/version.el Mon Aug 13 08:47:35 2007 +0200 @@ -26,7 +26,7 @@ (defconst emacs-version "19.15" "\ Version numbers of this version of Emacs.") -(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta4)"))) +(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta5)"))) (defconst emacs-major-version (progn (or (string-match "^[0-9]+" emacs-version)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,88 @@ +# Makefile for man subdirectory in XEmacs +# Copyright (C) 1995 Board of Trustees, University of Illinois +# Copyright (C) 1994, 1995 Sun Microsystems. + +# This file is part of XEmacs. + +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. + +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. + +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Avoid trouble on systems where the "SHELL" variable might be +# inherited from the environment. +SHELL = /bin/sh + +.SUFFIXES: .info .texi .dvi + +# Subdirectories to make recursively. +SUBDIR = xemacs lispref new-users-guide internals + +../info/%.info : %.texi + makeinfo -o $@ $< + +# hyperbole and oo-browser manuals broken - do not TeX properly +srcs = ange-ftp cc-mode cl dired ediff external-widget forms gnus \ + ilisp info ispell mailcrypt message mh-e \ + pcl-cvs psgml psgml-api rmail standards supercite term \ + termcap texinfo viper vm w3 xemacs-faq + +info = $(srcs:%=../info/%.info) +dvi = $(srcs:%=%.dvi) + +all : info +info : $(info) + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done + +xemacs: FORCE + cd $@ && $(MAKE) $(MFLAGS) +lispref: FORCE + cd $@ && $(MAKE) $(MFLAGS) +new-users-guide: FORCE + cd $@ && $(MAKE) $(MFLAGS) +internals: FORCE + cd $@ && $(MAKE) $(MFLAGS) +tm: FORCE + cd $@ && $(MAKE) $(MFLAGS) +FORCE : + +PERL = perl +TEXI2DVI = texi2dvi + +gnus.dvi : gnus.texi + $(PERL) -n -e 'print unless (/\@iflatex/ .. /\@end iflatex/)' gnus.texi > gnus.tmptexi + $(TEXI2DVI) gnus.tmptexi + rm -f gnus.tmptexi + +texinfo.dvi: texinfo.texi + $(TEXI2DVI) $< +.texi.dvi: + $(TEXI2DVI) $< + +dvi : $(dvi) FORCE + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done + +mostlyclean: + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done + rm -f *.toc *.aux *.log \ + *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.pgs *.vr *.vrs *.tp *.tps +clean: mostlyclean + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done + rm -f *.o core *.dvi +distclean: clean + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done +realclean: distclean + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done +extraclean: distclean + for d in $(SUBDIR) ; do (cd $${d} && $(MAKE) $(MFLAGS) $@) ; done + -rm -f *~ \#*
--- a/man/Makefile.in.in Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -/* Makefile for man subdirectory in XEmacs - Copyright (C) 1995 Board of Trustees, University of Illinois - Copyright (C) 1994, 1995 Sun Microsystems. - -This file is part of XEmacs. - -XEmacs is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. - -XEmacs is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with XEmacs; see the file COPYING. If not, write to the Free -Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Avoid trouble on systems where the `SHELL' variable might be - inherited from the environment. */ -SHELL = /bin/sh - -/* Some people use these in paths they define. We don't want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef i386 -#undef ppc -#undef sgi - -/* ==================== Things `configure' will edit ==================== */ - -CC=@CC@ -CFLAGS=@CFLAGS@ -YACC=@YACC@ -version=@version@ -configuration=@configuration@ - -/* ==================== Where To Install Things ==================== */ - -/* The default location for installation. Everything is placed in - subdirectories of this directory. The default values for many of - the variables below are expressed in terms of this one, so you may - not need to change them. This is set with the --prefix option to - `../configure'. */ -prefix=@prefix@ - -/* Like `prefix', but used for architecture-specific files. This is - set with the --exec-prefix option to `../configure'. */ -exec_prefix=@exec_prefix@ - -/* Where to install Emacs and other binaries that people will want to - run directly (like etags). This is set with the --bindir option - to `../configure'. */ -bindir=@bindir@ - -/* Where to install and expect executable files to be run by Emacs - rather than directly by users, and other architecture-dependent - data. ${archlibdir} is usually below this. This is set with the - --libdir option to `../configure'. */ -libdir=@libdir@ - -/* Where to find the source code. This is set by the configure - script's `--srcdir' option. However, the value of ${srcdir} in - this makefile is not identical to what was specified with --srcdir, - since the variable here has `/man' added at the end. */ -srcdir=@srcdir@ - -/* ============================= Targets ============================== */ - -#define NO_SHORTNAMES -#define THIS_IS_YMAKEFILE -#define NOT_C_CODE -#include "../src/config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make `vpath' directive continues this tradition, but at - least lets you restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c @srcdir@ -vpath %.h @srcdir@ -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that's built from something else - (e.g. a .in file). */ -/* none here */ -#else -VPATH=@srcdir@ -#endif - -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - -#ifndef C_SWITCH_SITE -#define C_SWITCH_SITE -#endif - -#ifndef LD_SWITCH_SITE -#define LD_SWITCH_SITE -#endif - -LOADLIBES=LD_SWITCH_SITE @libsrc_libs@ - -CPPFLAGS= - -ALL_CFLAGS = C_SWITCH_SITE C_SWITCH_SYSTEM -Demacs -DHAVE_CONFIG_H \ - -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CFLAGS} -CPP_CFLAGS = C_SWITCH_SITE C_SWITCH_SYSTEM -Demacs -DHAVE_CONFIG_H \ - -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -OBJS = makeinfo.o getopt.o getopt1.o alloca.o - -/* Subdirectories to make recursively. */ -SUBDIR = xemacs lispref new-users-guide internals - -/* The makefiles of the directories in $SUBDIR. */ -SUBDIR_MAKEFILES = xemacs/Makefile lispref/Makefile new-users-guide/Makefile internals/Makefile - -.c.o: - ${CC} -c ${CPP_CFLAGS} $< - -../info/%.info : %.texi - -./makeinfo -o $@ $< - -srcs = ange-ftp cc-mode cl dired ediff external-widget forms gnus \ - hyperbole ilisp info internals ispell mailcrypt message mh-e \ - oo-browser pcl-cvs psgml psgml-api rmail standards supercite term \ - termcap texinfo viper vm w3 xemacs-faq - -info = $(srcs:%=../info/%.info) - -all : ${SUBDIR} $(info) - -.RECURSIVE: ${SUBDIR} - -xemacs: FRC.xemacs -lispref: FRC.lispref -new-users-guide: FRC.new-users-guide -internals: FRC.internals - -${SUBDIR}: ${SUBDIR_MAKEFILES} makeinfo FRC - cd $@ && $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - -makeinfo: ../src/config.h $(OBJS) - $(CC) -o makeinfo $(OBJS) - -texindex: texindex.o - $(CC) -o texindex texindex.o - -alloca.c : - [ -h alloca.c ] || ln -s ../src/alloca.c . - -getopt.h : - [ -h getopt.h ] || ln -s ../lib-src/getopt.h . - -getopt.c : - [ -h getopt.c ] || ln -s ../lib-src/getopt.c . - -getopt1.c : - [ -h getopt1.c ] || ln -s ../lib-src/getopt1.c . - -mostlyclean: clean - (cd xemacs && $(MAKE) $(MFLAGS) mostlyclean) - (cd lispref && $(MAKE) $(MFLAGS) mostlyclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) mostlyclean) - (cd internals && $(MAKE) $(MFLAGS) mostlyclean) - -clean: - rm -f *.dvi - rm -f getopt1.c getopt.c getopt.h alloca.c makeinfo texindex - rm -f *.toc *.aux *.log *.cp *.fn *.ky *.pg *.vr *.o core - -/* These are needed because they are present in the other makefiles. */ -distclean: mostlyclean - (cd xemacs && $(MAKE) $(MFLAGS) distclean) - (cd lispref && $(MAKE) $(MFLAGS) distclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) distclean) - (cd internals && $(MAKE) $(MFLAGS) distclean) - rm -f Makefile Makefile.in -realclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) realclean) - (cd lispref && $(MAKE) $(MFLAGS) realclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) realclean) - (cd internals && $(MAKE) $(MFLAGS) realclean) -extraclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) extraclean) - (cd lispref && $(MAKE) $(MFLAGS) extraclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) extraclean) - (cd internals && $(MAKE) $(MFLAGS) extraclean) - -rm -f *~ \#* - -makeinfo.o : getopt.h -getopt.o : getopt.h -getopt1.o : getopt.h -texindex.o : getopt.h - -FRC FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals: -
--- a/man/ilisp.texi Mon Aug 13 08:47:16 2007 +0200 +++ b/man/ilisp.texi Mon Aug 13 08:47:35 2007 +0200 @@ -1,5 +1,5 @@ -\input texinfo @c -*-texinfo-*- Last modified: April 10, 1993 -@setfilename ../info/ilisp.info +\input texinfo @c -*-texinfo-*- Last modified: October 25, 1996 +@setfilename ilisp.info @settitle The ILISP Inferior LISP Interface @c NOTE: KEYBINDING DESCRIPTIONS IN THIS FILE @@ -69,10 +69,13 @@ @ifinfo This file documents ILISP. -This is edition 0.11 of the ILISP manual -for ILISP Version 5.5. +This is edition 0.12 of the ILISP manual +for ILISP Version 5.8. Copyright (C) 1991,1992,1993 Todd Kaufmann + 1993,1994 Ivan Vasquez + 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker + 1996 Marco Antoniotti and Rick Campbell Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -96,8 +99,8 @@ @titlepage @title ILISP User Manual @subtitle A GNU Emacs Interface for Interacting with Lisp -@subtitle Edition 0.11, June 1993 -@subtitle For ILISP Version 5.5 +@subtitle Edition 0.13, October 1996 +@subtitle For ILISP Version 5.8 @c @c the following comment string is removed by the ctrl-c-doc.sh script, @c which can be used to change all ilisp-prefix bindings to C-c (or @@ -105,16 +108,19 @@ @c @comment ctrl-C version: @subtitle This is the ``@key{C-z}'' version of the manual. -@author by Todd Kaufmann, Chris McConnell and Ivan Vazquez +@author by Todd Kaufmann, Chris McConnell, Ivan Vazquez, Marco Antoniotti, and Rick Campbell @page @vskip 0pt plus 1filll Copyright @copyright{} 1991, 1992, 1993 Todd Kaufmann + 1993, 1994 Ivan Vasquez + 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker + 1996 Marco Antoniotti and Rick Campbell @sp 2 -This is edition 0.11 of the @cite{ILISP User Manual} -for ILISP Version 5.5, -June 1993. +This is edition 0.12 of the @cite{ILISP User Manual} +for ILISP Version 5.8, +July 1996. @sp 2 @@ -186,81 +192,144 @@ copy it. If you do start using the package, please send mail to -@samp{ilisp-request@@lehman.com} so that I can keep a mailing list of -users. +@code{ilisp-request@@naggum.no} to subscribe to the ILISP mailing +list. -Please send bugs, questions or suggestions for discussion to @samp{ilisp@@lehman.com} +Please send bugs, questions or suggestions for discussion to +@code{ilisp@@naggum.no}. Message sent there will be distributed to +all subscribers. @menu * FTP directions:: FTP directions +* WWW directions:: WWW directions @end menu -@node FTP directions, , , Distribution +@node FTP directions, WWW directions, , Distribution @unnumberedsec FTP directions @cindex FTP site @cindex Anonymous FTP @cindex How to get @cindex Getting ILISP @noindent -You can anonymously ftp the source files from FTP.CS.CMU.EDU: +You can get the distribution file, @code{ilisp-5.8.tar.gz} via +anonymous FTP from @code{FTP.CS.CMU.EDU} (128.2.206.173) in +@code{/afs/cs/user/campbell/http/ilisp/}. -@itemize @bullet -@item -Ftp to ftp.cs.cmu.edu (128.2.206.173) -@item -login as anonymous, with user@@host as password -@item -@code{cd /user/ai/lang/lisp/util/emacs/ilisp/57} -@item -@code{binary} -@item -@code{get ilisp.tgz} -@end itemize +@format +% @dfn{ftp ftp.cs.cmu.edu} +Name (ftp.cs.cmu.edu:rickc): @dfn{anonymous} +331 Guest login ok, send username@@node as password. +Password: @dfn{@var{your-user-id@@your-hostname}} +ftp> @dfn{cd /afs/cs/user/campbell/http/ilisp} +250 Directory path set to /afs/cs/user/campbell/http/ilisp. +ftp> @dfn{type binary} +200 Type set to I. +ftp> @dfn{get ilisp-5.8.tar.gz} +200 PORT command successful. +150 Opening data connection for ilisp-5.8.tar.gz. +226 Transfer complete. +local: ilisp-5.8.tar.gz remote: ilisp-5.8.tar.gz +168801 bytes received. +ftp> @dfn{quit} +221 Goodbye. +@end format @noindent -Or get whatever single files you need. +Or get whatever single files you need from the @code{untarred} +subdirectory. + +@noindent +You can also get @code{ilisp-5.8.tar.gz} via +anonymous FTP from @code{FTP.ICSI.BERKELEY.EDU} in either +@code{/pub/software/elisp/} or @code{/pub/theory/marcoxa/elisp/}. @noindent Unpack and install: -@code{uncompress ilisp.tar.Z; tar xf ilisp.tar} +@code{% @dfn{gzip -dc ilisp-5.8.tar.gz | tar xf -}} @xref{Installation}. -If you want to use Thinking Machines' completion code, then Ftp it from -THINK.COM +@node WWW directions, , FTP directions, Distribution +@unnumberedsec WWW directions +@cindex WWW site +@cindex How to get +@cindex Getting ILISP +@noindent +You can use the World Wide Web (WWW) to get the distribution file from +the anonymous FTP locations using one of the following URLs: +@itemize @bullet +@item +@code{ftp://ftp.cs.cmu.edu/afs/cs/user/campbell/http/ilisp/ilisp-5.8.tar.gz} +@item +@code{ftp://ftp.icsi.berkeley.edu/pub/software/elisp/ilisp-5.8.tar.gz} +@item +@code{ftp://ftp.icsi.berkeley.edu/pub/theory/marcoxa/ilisp-5.8.tar.gz} +@end itemize + +You can also use the CMU Artificial Intelligence Repository: + +@code{http://www.cs.cmu.edu/Web/Groups/AI/html/repository.html} -It no longer comes as part of the distribution. +@noindent +From there follow: @code{LISP}, @code{UTIL}, @code{EMACS} and finally +@code{ILISP}. Use your browser capabilities to download what you +need. + +@noindent +The complete URL for the distribution file in the CMU AI Repository is +@code{http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/util/emacs/ilisp/v57/ilisp57.tgz} + +@noindent +Other URLs for the distribution file include: +@itemize @bullet +@item +@code{http://www.c2.net/~campbell/ilisp/ilisp-5.8.tar.gz} +@item +@code{http://www.cs.cmu.edu/~campbell/ilisp/ilisp-5.8.tar.gz} +@end itemize + +@noindent +Unpack and install: + +@code{% @dfn{gzip -dc ilisp-5.8.tar.gz | tar xf -}} + +@xref{Installation}. @node Acknowledgements, Introduction, Distribution, Top @unnumbered Acknowledgements ILISP replaces the standard inferior LISP mode. ILISP is based on comint mode and derived from a number of different interfaces including -Symbolics, cmulisp, and Thinking Machines. +Symbolics, CMU Common Lisp, and Thinking Machines. There are many people that have taken the time to report bugs, make suggestions and even better send code to fix bugs or implement new features. -Thanks to Neil Smithline, David Braunegg, Fred White, Jim Healy, Larry -Stead, Hans Chalupsky, Michael Ernst, Frank Ritter, Tom Emerson, David -Duff, Dan Pierson, Michael Kashket, Jamie Zawinski, Bjorn Victor, Brian -Dennis, Guido Bosch, Chuck Irvine, Thomas M. Breuel, Ben Hyde, Paul -Fuqua (for the CMU-CL GC display code) and Marco Antoniotti for bug -reports, suggestions and code. My apologies to those whom I may have -forgotten. +Thanks to Guido Bosch, David Braunegg, Tim Bradshaw, Thomas M. Breuel, +Hans Chalupsky, Kimball Collins, Brian Dennis, David Duff, Tom +Emerson, Michael Ernst, Scott Fahlman, David Gadbois, Robert +P. Goldman, Marty Hall, Richard Harris, Jim Healy, Christopher Hoover, +Larry Hunter, Ben Hyde, Chuck Irvine, Michael Kashket, Mark +Kantrowitz, Qiegang Long, Erik Naggum, Dan Pierson, Yusuf Pisan, Frank +Ritter, Jeffrey Mark Siskind, Neil Smithline, Richard Stallman, Larry +Stead, Jason Trenouth, Christof Ullwer, Bjorn Victor, Fred White, Ben +Wing, Matsuo Yoshihiro, Jamie Zawinski, Paul Fuqua (for the CMU-CL GC +display code) and Marco Antoniotti for bug reports, suggestions and +code. Our apologies to anyone we may have forgotten. Special thanks to Todd Kaufmann for the texinfo file, work on bridge, -epoch-pop and for really exercising everything. +epoch-pop and for really exercising everything. Please send bug reports, fixes and extensions to -@samp{ilisp@@lehman.com} so I can merge them into the master +@code{ilisp@@naggum.no} so that they can be merged into the master source. @noindent @example ---Chris McConnell 18-Mar-91 ---Ivan Vazquez 27-Jun-93 +--Chris McConnell 18-Mar-91 +--Ivan Vazquez 27-Jun-93 +--Marco Antoniotti and Rick Campbell 25-Oct-96 @end example @@ -273,7 +342,7 @@ @itemize @bullet @item -Runs under emacs-18, fsf emacs-19, and Lucid emacs-19. +Runs under Emacs-18, Emacs-19, and XEmacs-19. @item Support for multiple LISP dialects including Lucid, Allegro and CMU @@ -349,12 +418,12 @@ If ILISP has already been installed at your location, you can probably skip ahead to ``Autoloading.'' -Note that jwz's byte-compiler is required when compiling ILISP. If you -don't have it, get it from -@code{archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/bytecomp2.tar.Z} +Note that Jamie Zawinki's byte-compiler is required when compiling +ILISP. If you don't have it, get it from +@code{ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/bytecomp2.tar.Z} -You don't need it if you are running emacs version 19 as both the Fsf -and Lucid releases include this in their distributions. +You don't need it if you are running emacs version 19 as both the FSF +and XEmacs releases include this in their distributions. @menu * Makefile configuration:: @@ -368,25 +437,26 @@ Some configuration needs to be done before compiling the emacs-lisp files that comprise ILISP. This should be done in the -@code{Makefile-ilisp} file in the section of the file marked +@code{Makefile} file in the section of the file marked CONFIGURATION SECTION. First, set the @code{YOUR_EMACS} variable to be the pathname of the emacs you will be using ILISP with. This is the emacs that will be used to compile ILISP with. -If you don't have jwz's byte compiler in your standard load path then -you will have to uncomment the @code{BYTECOMP} line and set it to point -to the correct location of the bytecomp files. +If you don't have Jamie Zawinski's byte compiler in your standard load +path ( both FSF's 19 and XEmacs 19 do have enhaced versions of it ) +then you will have to uncomment the @code{BYTECOMP} line and set it to +point to the correct location of the bytecomp files. -If you do not have comint already in your emacs ( both Fsf 19 and Lucid +If you do not have comint already in your emacs ( both FSF 19 and XEmacs 19 do ) then uncomment the @code{USE_BUNDLED_COMINT} line. This will cause the copy of @code{comint.el} to be moved from the @code{Extras} directory into the main ILISP directory. The advice section is left uncommented out in the distributed -@code{Makefile-ilisp} because most people will not have -@code{advice.elc} in their load path. Only Lucid emacs 19.8 will have +@code{Makefile} because most people will not have +@code{advice.elc} in their load path. Only XEmacs will have this in the standard distribution. If you do have it in your load path, then to avoid having two copies in your load-path and avoiding future confusion then comment out both the @code{ADVICE} and @@ -403,7 +473,7 @@ You can then compile everything with the shell command - @code{make -f Makefile-ilisp <your target here>'} + @code{% @dfn{make -f Makefile-ilisp }}@dfn{@var{<your target here>}} Where the possible targets are @code{emacs_18}, @code{emacs_18_epoch}, @code{emacs_18_menu}, and @code{emacs_19}. @@ -419,6 +489,10 @@ reside to your @code{load-path}. There is an example of this in @code{ilisp.emacs} +As an alternative you could set up a @code{.ilisp} which contains the +appropriate portions of @code{ilisp.emacs}, in order to avoid cluttering +too much @code{.emacs} or @code{default.el} + The first time a dialect is started, the interface files will complain about not being compiled, just hit @kbd{i} to ignore the message. Once a lisp dialect is started up, you should execute the command @@ -648,11 +722,6 @@ ;;; If you always want partial minibuffer completion (require 'completer) -;;; If want TMC completion then you will have to Ftp it yourself from think.com -;;; It's become to flaky for me to deal with. -- Ivan -;;;(load "completion") -;;;(initialize-completions) - ;;; If you want to redefine typeout-window keys: (add-hook 'ilisp-load-hook '(lambda () @@ -743,7 +812,46 @@ dialects in the nesting order above. Many dialects call @code{ilisp-load-init} in their dialect setup. -These are the currently supported dialects. The dialects +These are the currently supported dialects. + +@itemize @bullet +@item allegro +Allegro Common Lisp from Franz Inc. + +@item lispworks +Harlequin Common Lisp from Harlequin Ltd. + +@item lucid +Lucid Common Lisp, currently supported by Harlequin Ltd. + +@item kcl +Kyoto Common Lisp, original version. + +@item akcl +Austin Kyoto Common Lisp, the U. Texas derivative. + +@item gcl +GNU Common Lisp, the official GNU release. A derivative of AKCL. + +@item ecl +EcoLisp, the Embeddable Common Lisp by Beppe Attardi. A derivative of +KCL and AKCL. + +@item ibcl +Ibuki Common Lisp, derived from KCL. + +@item cmucl +CMU Common Lisp, the major development platform for ILISP so far. + +@item clisp-hs +CLISP by Haible and Stoll. + +@item oaklisp +Oaklisp scheme. + +@end itemize + +The dialects are listed so that the indentation correponds to the hierarchical relationship between dialects. @example @@ -752,8 +860,12 @@ lucid kcl akcl + gcl + ecl ibcl cmulisp + clisp-hs + lispworks scheme oaklisp @end example
--- a/man/internals/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ b/man/internals/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -1,28 +1,21 @@ # Makefile for the XEmacs Internals Manual. -# -# based on the Lisp Reference Manual. + +# This file is part of XEmacs. -# Redefine `TEX' if `tex' does not invoke plain TeX. For example: -# TEX=platex - -TEX=tex - -# Where the TeX macros are kept: -texmacrodir = /usr/local/lib/tex/macros +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. -# Where the Emacs hierarchy lives ($EMACS in the INSTALL document for Emacs.) -# For example: -# emacslibdir = /usr/local/gnu/lib/emacs - -# Directory where Emacs is installed, by default: -emacslibdir = /usr/local/xemacs +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. -# Unless you have a nonstandard Emacs installation, these shouldn't have to -# be changed. -prefix = /usr/local -infodir = ${prefix}/info - -# The name of the manual: +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. VERSION=1.0 NAME=internals @@ -35,75 +28,37 @@ srcs = internals.texi index.unperm index.perm -all: ../../info/$(NAME).info +all : info +info : ../../info/$(NAME).info -$(NAME).dvi: $(srcs) index.texi ../texindex +../../info/$(NAME).info: $(srcs) index.texi + makeinfo $(NAME).texi + +dvi : $(NAME).dvi + +$(NAME).dvi: $(srcs) index.texi # Avoid losing old contents of aux file entirely. -mv $(NAME).aux $(NAME).oaux # First shot to define xrefs: $(TEX) $(NAME).texi if [ a${permuted_index} != a ]; \ - then \ - ./permute-index; \ - mv permuted.fns $(NAME).fns; \ - else \ - ../texindex $(NAME).??; \ + then ./permute-index && mv permuted.fns $(NAME).fns; \ + else texindex $(NAME).??; \ fi $(TEX) $(NAME).texi index.texi: if [ a${permuted_index} != a ]; \ - then \ - ln -s index.perm index.texi; \ - else \ - ln -s index.unperm index.texi; \ + then ln -s index.perm index.texi; \ + else ln -s index.unperm index.texi; \ fi -../../info/$(NAME).info: $(srcs) index.texi ../makeinfo - ../makeinfo $(NAME).texi - mostlyclean: rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ *.vr *.vrs *.pg *.pgs *.ky *.kys - clean: mostlyclean - rm -f *.dvi *.ps - rm -f make.out core - rm -f index.texi - -# not working. -#install: elisp elisp.dvi -# mv elisp elisp-* $(infodir) -# @echo also add the line for elisp to $(infodir)/dir. - -# not working. -#installall: install -# install -c texinfo.tex $(texmacrodir) - -distclean: clean -realclean: distclean -extraclean: distclean + rm -f *.dvi *.ps make.out core index.texi +distclean: clean +realclean: clean +extraclean: clean -rm -f *~ \#* - -../texindex: - (cd ..; make texindex) - -# not working. -#maintainer-clean: clean -# rm -f elisp elisp-* - -# not working. -# dist: -# -mkdir temp -# -mkdir temp/$(manual) -# -ln README Makefile permute-index $(srcs) \ -# texinfo.tex getopt.c getopt1.c getopt.h \ -# elisp.dvi elisp.aux elisp.??s elisp elisp-[0-9] elisp-[0-9][0-9] temp/$(manual) -# -rm -f temp/$(manual)/texindex.c temp/$(manual)/makeinfo.c -# cp texindex.c makeinfo.c temp/$(manual) -# (cd temp/$(manual); rm -f *~) -# (cd temp; tar chf - $(manual)) | gzip > $(manual).tar.gz -# -rm -rf temp - -../makeinfo: - (cd ..; make makeinfo)
--- a/man/lispref/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ b/man/lispref/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -1,35 +1,28 @@ # Makefile for the XEmacs Lisp Programmer's Manual. -# -# based on FSF Makefile, 11 August 1990 -# Modified by Ben Wing, February 1994 -# merged with Makefile for ELisp Manual 2.4 + +# This file is part of XEmacs. -# Redefine `TEX' if `tex' does not invoke plain TeX. For example: -# TEX=platex - -TEX=tex - -# Where the TeX macros are kept: -texmacrodir = /usr/local/lib/tex/macros +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. -# Where the Emacs hierarchy lives ($EMACS in the INSTALL document for Emacs.) -# For example: -# emacslibdir = /usr/local/gnu/lib/emacs - -# Directory where Emacs is installed, by default: -emacslibdir = /usr/local/emacs +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. -# Unless you have a nonstandard Emacs installation, these shouldn't have to -# be changed. -prefix = /usr/local -infodir = ${prefix}/info - -# The name of the manual: +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. VERSION=2.4 NAME=lispref manual = elisp-manual-19-$(VERSION) +TEXI2DVI = texi2dvi + # Uncomment this line for permuted index. # permuted_index = 1 @@ -49,75 +42,37 @@ text.texi tips.texi toolbar.texi tooltalk.texi variables.texi windows.texi \ x-windows.texi index.unperm index.perm -all: ../../info/$(NAME).info +all : info +info : ../../info/$(NAME).info -$(NAME).dvi: $(srcs) index.texi ../texindex +../../info/$(NAME).info: $(srcs) index.texi + makeinfo -o $@ $(NAME).texi + +dvi: $(NAME).dvi + +$(NAME).dvi: $(srcs) index.texi # Avoid losing old contents of aux file entirely. -mv $(NAME).aux $(NAME).oaux # First shot to define xrefs: $(TEX) $(NAME).texi if [ a${permuted_index} != a ]; \ - then \ - ./permute-index; \ - mv permuted.fns $(NAME).fns; \ - else \ - ../texindex $(NAME).??; \ + then ./permute-index && mv permuted.fns $(NAME).fns; \ + else texindex $(NAME).??; \ fi $(TEX) $(NAME).texi index.texi: if [ a${permuted_index} != a ]; \ - then \ - ln -s index.perm index.texi; \ - else \ - ln -s index.unperm index.texi; \ + then ln -s index.perm index.texi; \ + else ln -s index.unperm index.texi; \ fi -../../info/$(NAME).info: $(srcs) index.texi ../makeinfo - ../makeinfo $(NAME).texi - mostlyclean: rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ *.vr *.vrs *.pg *.pgs *.ky *.kys - clean: mostlyclean - rm -f *.dvi *.ps - rm -f make.out core - rm -f index.texi - -# not working. -#install: elisp elisp.dvi -# mv elisp elisp-* $(infodir) -# @echo also add the line for elisp to $(infodir)/dir. - -# not working. -#installall: install -# install -c texinfo.tex $(texmacrodir) - + rm -f *.dvi *.ps make.out core index.texi distclean: clean realclean: distclean extraclean: distclean -rm -f *~ \#* - -../texindex: - (cd ..; make texindex) - -# not working. -#maintainer-clean: clean -# rm -f elisp elisp-* - -# not working. -# dist: -# -mkdir temp -# -mkdir temp/$(manual) -# -ln README Makefile permute-index $(srcs) \ -# texinfo.tex getopt.c getopt1.c getopt.h \ -# elisp.dvi elisp.aux elisp.??s elisp elisp-[0-9] elisp-[0-9][0-9] temp/$(manual) -# -rm -f temp/$(manual)/texindex.c temp/$(manual)/makeinfo.c -# cp texindex.c makeinfo.c temp/$(manual) -# (cd temp/$(manual); rm -f *~) -# (cd temp; tar chf - $(manual)) | gzip > $(manual).tar.gz -# -rm -rf temp - -../makeinfo: - (cd ..; make makeinfo)
--- a/man/new-users-guide/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ b/man/new-users-guide/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -1,65 +1,49 @@ # Makefile for the XEmacs New Users Guide -# -# based on XEmacs Makefile + +# This file is part of XEmacs. -# Redefine `TEX' if `tex' does not invoke plain TeX. For example: -# TEX=platex - -TEX=tex - -# Where the TeX macros are kept: -texmacrodir = /usr/local/lib/tex/macros +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. -# Where the Emacs hierarchy lives ($EMACS in the INSTALL document for Emacs.) -# For example: -# emacslibdir = /usr/local/gnu/lib/emacs - -# Directory where Emacs is installed, by default: -emacslibdir = /usr/local/emacs +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. -# Unless you have a nonstandard Emacs installation, these shouldn't have to -# be changed. -prefix = /usr/local -infodir = ${prefix}/info - -# The name of the manual: +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. NAME=new-users-guide +SHELL = /bin/sh +TEXI2DVI = texi2dvi + # List of all the texinfo files in the manual: srcs = new-users-guide.texi custom1.texi files.texi region.texi \ custom2.texi help.texi search.texi edit.texi modes.texi \ xmenu.texi enter.texi -all: ../../info/$(NAME).info +all : info +info : ../../info/$(NAME).info -$(NAME).dvi: $(srcs) ../texindex - # Avoid losing old contents of aux file entirely. - -mv $(NAME).aux $(NAME).oaux - # First shot to define xrefs: - $(TEX) $(NAME).texi - ../texindex $(NAME).?? - $(TEX) $(NAME).texi +../../info/$(NAME).info: $(srcs) + makeinfo -o $@ $(NAME).texi -../../info/$(NAME).info: $(srcs) ../makeinfo - ../makeinfo $(NAME).texi +dvi : $(NAME).dvi +.texi.dvi : + $(TEXI2DVI) $< mostlyclean: rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ *.vr *.vrs *.pg *.pgs *.ky *.kys - clean: mostlyclean - rm -f *.dvi *.ps - rm -f make.out core - -distclean: clean -realclean: distclean -extraclean: distclean + rm -f *.dvi *.ps make.out core +distclean: clean +realclean: clean +extraclean: clean -rm -f *~ \#* - -../texindex: - (cd ..; make texindex) - -../makeinfo: - (cd ..; make makeinfo)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,51 @@ +# Makefile for TM manual + +# This file is part of XEmacs. + +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. + +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. + +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +#### This makefile is currently broken! +#### makeinfo doesn't work with these .texi files! +NAMES = tm tm-edit tm-view gnus-mime tm-mh-e +NAMES_EN = $(NAMES:%=%-en) +NAMES_JA = $(NAMES:%=%-ja) +NAMES_ALL = $(NAMES_EN) $(NAMES_JA) +INFOS = $(NAMES_ALL:%=../../info/%.info) +DVIS = $(NAMES_ALL:%=%.dvi) + +TEXI2DVI = texi2dvi + +# List of all the texinfo files in the manual: + +all : info +info : $(INFOS) + +../../info/%.info : %.texi + makeinfo -o $@ $< + +dvi: $(DVIS) +.texi.dvi : + $(TEXI2DVI) $< + +mostlyclean: + rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ + *.vr *.vrs *.pg *.pgs *.ky *.kys +clean: mostlyclean + rm -f *.dvi *.ps make.out core +distclean: clean +realclean: clean +extraclean: clean + -rm -f *~ \#*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/gnus-mime-en.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,339 @@ +<!doctype sinfo system> +<!-- $Id: gnus-mime-en.sgml,v 1.1 1996/12/22 00:09:31 steve Exp $ --> +<head> +<title>gnus-mime 0.10 reference manual (English Version) +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/21 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents gnus-mime, a MIME extension for Gnus. +</abstract> + + +<h1> What is gnus-mime? +<node> Introduction +<p> +<concept>gnus-mime</concept> is a <dref file="tm-en">MIME</dref> +extender for <a file="gnus">Gnus</a> using <a file="tm-en" +node="tm-kernel">tm</a>. + +<memo title="Notice"> +<p> +gnus-mime is for only Gnus. Please use <a +file="tm-gnus_en">tm-gnus</a> for GNUS. +</memo> + +<p> +gnus-mime supports automatic MIME preview in <code>"*Article*"</code> +buffer using <a file="tm-view-en">tm-view</a>. In particular, with +XEmacs, it decodes images as same as text. +<p> +In addition, gnus-mime supports multilingual/internationalization +feature for mule such as <a file="tm-en" node="mule">MULE</a>, +XEmacs/mule and mule merged Emacs. It supports code-conversion by +MIME charset or depended default MIME charset of newsgroups. +<p> +For RFC 1522, original Gnus supports only Q-encoded <dref +file="tm-en">iso-8859-1</dref> <dref file="tm-en">encoded-word</dref>. +So gnus-mime supports more MIME charsets, such as <dref +file="tm-en">iso-8859-2</dref>, <dref file="tm-en">iso-8859-3</dref>, +..., <dref file="tm-en">iso-2022-jp</dref>, <dref +file="tm-en">euc-kr</dref>, <dref file="tm-en">iso-2022-kr</dref>, +gb2312, <dref file="tm-en">hz-gb-2312</dref>, <dref +file="tm-en">cn-big5</dref>, and B-encoding. In addition, original +Gnus does not support unfolding or space elimination rule of RFC +1522. gnus-mime is more rightful. + + +<h1> Inline display for MIME message +<node> Automatic MIME Preview +<p> +<concept>automatic MIME preview</concept> feature is available for +gnus-mime. In automatic MIME preview mode, when reading an article in +summary mode, gnus-mime displays preview buffer processed by tm-view +instead of raw article buffer. <cf file="tm-view-en"> +<p> +Therefore if an article is encoded by <dref file="tm-en">Base64</dref> +or <dref file="tm-en">Quoted-Printable</dref>, a decoded article is +displayed. Or rich text article, such as <dref +file="tm-en">text/enriched</dref> format, is automatic formated. Of +course, <dref file="tm-en">multipart</dref> article is dealt with +correctly. +<p> +In addition, in <concept>XEmacs</concept>, images are displayed in +preview buffer as same as text. +<p> +Different from using metamail, speaker does not roar just then read an +article includes audio content, video player does not play just then +read an article includes video content, it does not do anonymous <dref +file="tm-en">ftp</dref> or send mail when read an article includes +external-message. These contents are played when you do decoding +command in preview buffer. +<p> +However if you use a slow machine, or are just really impatient, you +can stop automatic MIME preview. + + +<h2> How to process MIME in Article Buffer +<node> MIME processing +<p> +When <code>gnus-show-mime</code> is not <code>nil</code> and an +article has Mime-Version field in its message header, namely it is a +MIME message, Gnus calls <code>gnus-show-mime-method</code> to process +MIME. +<p> +When <code>gnus-strict-mime</code> is <code>nil</code> and +<code>gnus-show-mime</code> is not <code>nil</code>, Gnus calls +<code>gnus-show-mime-method</code> even if an message does not have +Mime-Version field in its message header. +<p> +Gnus 5.2 or later calls <code>gnus-show-mime-method</code> when +<code>gnus-strict-mime</code> is not <code>nil</code> and an article +does not have Mime-Version field. Notice that old Gnus does not have +it, so it may be better to set <code>gnus-strict-mime</code> to +<code>nil</code>. + + +<defvar name="gnus-show-mime"> +<p> +If it is not <code>nil</code>, Gnus do automatic MIME preview. +Default value is <code>t</code>. +<p> +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed. + +<cf file="gnus" node="Using MIME"> +</defvar> + +<defvar name="gnus-show-mime-method"> +<p> +Gnus calls function bound by it to process MIME. Default value is +<code>gnus-article-preview-mime-message</code>. +<p> +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed. + +<cf file="gnus" node="Using MIME"> +</defvar> + +<defvar name="gnus-decode-encoded-word-method"> +<p> +Gnus calls function bound by it to decode encoded-words. Default +value is <code>gnus-article-decode-encoded-word</code>. +<p> +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed. +<p> +In addition, it is not available at Gnus 5.0.* or Gnus 5.1. +</defvar> + +<memo title="Notice"> +<p> +gnus-mime uses some variables of Gnus and defines different default +values by <code>defvar</code>. For example, gnus-mime's default value +of <code>gnus-show-mime</code> is <code>t</code> instead of +<code>nil</code>. Or its default value of +<code>gnus-show-mime-method</code> is +<code>gnus-article-preview-mime-message</code> instead of +<code>metamail-buffer</code>. +<cf file="gnus" node="Using MIME"> +<p> +gnus-mime uses <code>defvar</code> instead of <code>setq</code>, +because of respect user's setting before gnus-mime is loaded, such as +using <file>~/.emacs</file>. But it has a problem. If gnus is loaded +before gnus-mime is loaded, features of gnus-mime is not available in +default even if gnus-mime is loaded. Therefore there is serious +problem to load gnus before gnus-mime is loaded. In other words, +setting in <file>~/.gnus</file>, such as to load +<file>gnus-mime</file> or <file>mime-setup</file>, is not good way. +If you want such way, please do setting for +<code>gnus-show-mime</code> and <code>gnus-show-mime-method</code>. +</memo> + + +<h2> Mechanism of Automatic MIME preview +<node> Two buffers for an article +<p> +Gnus 5.2 or later has two buffers for an article, +<code>gnus-original-article-buffer</code> (<code>" *Original +Article*"</code>) and <code>gnus-article-buffer</code> +(<code>"*Article*"</code>). The former is called <concept>raw article +buffer</concept>, the latter is called <concept>preview +buffer</concept>. +<p> +Content of raw article buffer is non-processed ``raw message''. In +particular, for emacs variants includes <dref file="tm-en">mule</dref> +features, message is not code-converted in it. +<p> +Content of preview buffer is MIME processed message to display for +user. In particular, for emacs variants includes mule features, +non-ASCII message is code-converted in it by MIME charset or default +<dref file="tm-en">MIME charset</dref> for selected newsgroup. +<p> +Gnus 5.0.* and Gnus 5.1 don't have distinction between raw article +buffer and preview buffer. So gnus-mime emulate raw article buffer. +It is unnatural, so it may be better to use Gnus 5.2 or later, which +are designed for tm-view. +<p> +<cf file="tm-view-en" node="Two buffers for an article"> + + +<h1> Internationalization +<node> mule +<p> +For emacs variants includes mule feature, such as <dref +file="tm-en">MULE</dref>, XEmacs/mule and Emacs/mule(*1), gnus-mime +supports code-conversion by <dref file="tm-en">MIME charset</dref> or +<code>default-mime-charset</code> of selected newsgroup. + +<memo> +(*1) It means next generation of Emacs includes mule features. Now +(October 1996), HANDA Ken'ichi and RMS are developing it. +</memo> + +<p> +Detail of code conversion is following: + +<ol> +<li>If a newsgroup is selected, MIME charset for the newsgroup is +searched from <code>gnus-newsgroup-default-charset-alist</code>. If +it is found, it is set to buffer local variable +<code>default-mime-charset</code> of Summary Buffer. If not found, +global value of <code>default-mime-charset</code> is used. +</li> +<li>Non-ASCII characters in Summary Buffer are code-converted by +<code>default-mime-charset</code> in Summary Buffer. +</li> +<li><dref file="tm-en">encoded-word</dref> are code-converted by their +specified <dref file="tm-en">MIME charset</dref>. +</li> +<li>Code-conversion of articles are following: + +<ol> +<li>If a part of a MIME message has charset parameter of <dref +file="tm-en">Content-Type field</dref>, it is code-converted by the +MIME charset. +</li> +<li>When there are no specified MIME charset, such as message header +or non-MIME message, they are code-converted by +<code>default-mime-charset</code> in Summary Buffer. +</ol> +</ol> + + +<defvar name="gnus-newsgroup-default-charset-alist"> +<p> +Association-list regexp for newsgroup vs. symbol for default MIME +charset. +<p> +Default setting are following: + +<dl> +<dt>alt.chinese.* +<dd> +<dref file="tm-en">hz-gb-2312</dref> +</dd> +<dt>alt.chinese.text.big5, hk.*, hkstar.*, tw.* +<dd> +<dref file="tm-en">cn-big5</dref> +</dd> +<dt>fj.* +<dd> +<dref file="tm-en">iso-2022-jp-2</dref> +</dd> +<dt>han.* +<dd> +<dref file="tm-en">euc-kr</dref> +</dd> +<dt>relcom.* +<dd><dref file="tm-en">koi8-r</dref> +</dl> +<p> +If there is no MIME charsets for a newsgroup, +<code>default-mime-charset</code> is used as default MIME charset. +</defvar> + +<defun name="gnus-set-newsgroup-default-charset"> +<args>newsgroup charset +<p> +Set default MIME <var>charset</var> of <var>newsgroup</var> to +<code>gnus-newsgroup-default-charset-alist</code>. +<p> +<var>newsgroup</var> is string of newsgroup name or category, for +<code>"gnu.emacs.gnus"</code>, <code>"gnu.emacs"</code>, +<code>"gnu"</code>. +<p> +<var>charset</var> is symbol of MIME charset, for example +<code>iso-8859-1</code>, <code>iso-2022-jp</code>. +</defun> + + +<h1> Composing MIME messages +<node> MIME-Edit +<p> +If using <dref file="tm-en">mime-setup</dref>, you can edit MIME +message in message-mode using <a file="tm-edit-en">tm-edit</a>. + +<memo title="Notice"> +<p> +Default setting of mime-setup avoids automatic inserting signature +when sending a message. + +<cf file="tm-en" node="mime-setup"> +</memo> + +<p> +gnus-mime does not have implementation for <kbd>C-c C-x C-m</kbd> +(<code>mime-editor/insert-mail</code>). Because gnus-mime does not +know which mail-reader should be used. In addition, <kbd>C-c C-x +C-y</kbd> (<code>mime-editor/insert-message</code>) is enough to +insert mail (namely to select a mail group and select a message to +insert, then it is available to insert the mail message). +<p> +However you can use <kbd>C-c C-x C-m</kbd> to specify an +implementation of <code>message-mode</code> to +<code>mime-editor/mail-inserter-alist</code>. + + +<h2> Example: same as <kbd>C-c C-x C-m</kbd> +<p> +<lisp> +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function message-mime-insert-article)) +</lisp> + + +<h2> Example: including from MH folder +<p> +<lisp> +(autoload 'tm-mh-e/insert-mail "tm-mh-e") + +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function tm-mh-e/insert-mail)) +</lisp> + + +<h1> Concept Index +<node> Concept Index +<p> +<cindex> + + +<h1> Function Index +<node> Function Index +<p> +<findex> + + +<h1> Variable Index +<node> Variable Index +<p> +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/gnus-mime-en.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,357 @@ +\input texinfo.tex +@setfilename gnus-mime-en.info +@settitle{gnus-mime 0.10 reference manual (English Version)} +@titlepage +@title gnus-mime 0.10 reference manual (English Version) +@author MORIOKA Tomohiko <morioka@@jaist.ac.jp> +@subtitle 1996/10/21 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top gnus-mime 0.10 reference manual (English Version) + +@ifinfo + +This file documents gnus-mime, a MIME extension for Gnus. +@end ifinfo + +@menu +* Introduction:: What is gnus-mime? +* Automatic MIME Preview:: Inline display for MIME message +* mule:: Internationalization +* MIME-Edit:: Composing MIME messages +* Concept Index:: +* Function Index:: +* Variable Index:: +@end menu + +@node Introduction, Automatic MIME Preview, Top, Top +@chapter What is gnus-mime? + +@cindex{gnus-mime}@strong{gnus-mime} is a MIME (@ref{(tm-en)MIME}) +extender for Gnus (@ref{(gnus)}) using tm (@ref{(tm-en)tm-kernel}). + +@noindent +@strong{[Notice]} +@quotation + +gnus-mime is for only Gnus. Please use tm-gnus (@ref{(tm-gnus_en)}) for +GNUS. +@end quotation + + +gnus-mime supports automatic MIME preview in @code{"*Article*"} buffer +using tm-view (@ref{(tm-view-en)}). In particular, with XEmacs, it +decodes images as same as text.@refill + +In addition, gnus-mime supports multilingual/internationalization +feature for mule such as MULE (@ref{(tm-en)mule}), XEmacs/mule and mule +merged Emacs. It supports code-conversion by MIME charset or depended +default MIME charset of newsgroups.@refill + +For RFC 1522, original Gnus supports only Q-encoded iso-8859-1 +(@ref{(tm-en)iso-8859-1}) encoded-word (@ref{(tm-en)encoded-word}). So +gnus-mime supports more MIME charsets, such as iso-8859-2 +(@ref{(tm-en)iso-8859-2}), iso-8859-3 (@ref{(tm-en)iso-8859-3}), ..., +iso-2022-jp (@ref{(tm-en)iso-2022-jp}), euc-kr (@ref{(tm-en)euc-kr}), +iso-2022-kr (@ref{(tm-en)iso-2022-kr}), gb2312, hz-gb-2312 +(@ref{(tm-en)hz-gb-2312}), cn-big5 (@ref{(tm-en)cn-big5}), and +B-encoding. In addition, original Gnus does not support unfolding or +space elimination rule of RFC 1522. gnus-mime is more rightful. + + +@node Automatic MIME Preview, mule, Introduction, Top +@chapter Inline display for MIME message + +@cindex{automatic MIME preview}@strong{automatic MIME preview} feature +is available for gnus-mime. In automatic MIME preview mode, when +reading an article in summary mode, gnus-mime displays preview buffer +processed by tm-view instead of raw article +buffer. (cf. @ref{(tm-view-en)}) @refill + +Therefore if an article is encoded by Base64 (@ref{(tm-en)Base64}) or +Quoted-Printable (@ref{(tm-en)Quoted-Printable}), a decoded article is +displayed. Or rich text article, such as text/enriched +(@ref{(tm-en)text/enriched}) format, is automatic formated. Of course, +multipart (@ref{(tm-en)multipart}) article is dealt with +correctly.@refill + +In addition, in @cindex{XEmacs}@strong{XEmacs}, images are displayed in +preview buffer as same as text.@refill + +Different from using metamail, speaker does not roar just then read an +article includes audio content, video player does not play just then +read an article includes video content, it does not do anonymous ftp +(@ref{(tm-en)ftp}) or send mail when read an article includes +external-message. These contents are played when you do decoding +command in preview buffer.@refill + +However if you use a slow machine, or are just really impatient, you +can stop automatic MIME preview. + + +@menu +* MIME processing:: How to process MIME in Article Buffer +* Two buffers for an article:: Mechanism of Automatic MIME preview +@end menu + +@node MIME processing, Two buffers for an article, Automatic MIME Preview, Automatic MIME Preview +@section How to process MIME in Article Buffer + +When @code{gnus-show-mime} is not @code{nil} and an article has +Mime-Version field in its message header, namely it is a MIME message, +Gnus calls @code{gnus-show-mime-method} to process MIME.@refill + +When @code{gnus-strict-mime} is @code{nil} and @code{gnus-show-mime} is +not @code{nil}, Gnus calls @code{gnus-show-mime-method} even if an +message does not have Mime-Version field in its message header.@refill + +Gnus 5.2 or later calls @code{gnus-show-mime-method} when +@code{gnus-strict-mime} is not @code{nil} and an article +does not have Mime-Version field. Notice that old Gnus does not have +it, so it may be better to set @code{gnus-strict-mime} to +@code{nil}. + + +@defvar gnus-show-mime + +If it is not @code{nil}, Gnus do automatic MIME preview. Default value +is @code{t}.@refill + +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed. + +(cf. @ref{(gnus)Using MIME}) +@end defvar + + +@defvar gnus-show-mime-method + +Gnus calls function bound by it to process MIME. Default value is +@code{gnus-article-preview-mime-message}.@refill + +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed. + +(cf. @ref{(gnus)Using MIME}) +@end defvar + + +@defvar gnus-decode-encoded-word-method + +Gnus calls function bound by it to decode encoded-words. Default value +is @code{gnus-article-decode-encoded-word}.@refill + +It is a variable of Gnus, so if gnus is loaded before gnus-mime is +loaded, default value is not guaranteed.@refill + +In addition, it is not available at Gnus 5.0.* or Gnus 5.1. +@end defvar + + +@noindent +@strong{[Notice]} +@quotation + +gnus-mime uses some variables of Gnus and defines different default +values by @code{defvar}. For example, gnus-mime's default value of +@code{gnus-show-mime} is @code{t} instead of @code{nil}. Or its default +value of @code{gnus-show-mime-method} is +@code{gnus-article-preview-mime-message} instead of +@code{metamail-buffer}. (cf. @ref{(gnus)Using MIME}) @refill + +gnus-mime uses @code{defvar} instead of @code{setq}, because of respect +user's setting before gnus-mime is loaded, such as using +@file{~/.emacs}. But it has a problem. If gnus is loaded before +gnus-mime is loaded, features of gnus-mime is not available in default +even if gnus-mime is loaded. Therefore there is serious problem to load +gnus before gnus-mime is loaded. In other words, setting in +@file{~/.gnus}, such as to load @file{gnus-mime} or @file{mime-setup}, +is not good way. If you want such way, please do setting for +@code{gnus-show-mime} and @code{gnus-show-mime-method}. +@end quotation + + + +@node Two buffers for an article, , MIME processing, Automatic MIME Preview +@section Mechanism of Automatic MIME preview + +Gnus 5.2 or later has two buffers for an article, +@code{gnus-original-article-buffer} (@code{" *Original Article*"}) and +@code{gnus-article-buffer} (@code{"*Article*"}). The former is called +@cindex{raw article buffer}@strong{raw article buffer}, the latter is +called @cindex{preview buffer}@strong{preview buffer}.@refill + +Content of raw article buffer is non-processed ``raw message''. In +particular, for emacs variants includes mule (@ref{(tm-en)mule}) +features, message is not code-converted in it.@refill + +Content of preview buffer is MIME processed message to display for user. +In particular, for emacs variants includes mule features, non-ASCII +message is code-converted in it by MIME charset or default MIME charset +(@ref{(tm-en)MIME charset}) for selected newsgroup.@refill + +Gnus 5.0.* and Gnus 5.1 don't have distinction between raw article +buffer and preview buffer. So gnus-mime emulate raw article buffer. It +is unnatural, so it may be better to use Gnus 5.2 or later, which are +designed for tm-view.@refill + +(cf. @ref{(tm-view-en)Two buffers for an article}) + + + +@node mule, MIME-Edit, Automatic MIME Preview, Top +@chapter Internationalization + +For emacs variants includes mule feature, such as MULE +(@ref{(tm-en)MULE}), XEmacs/mule and Emacs/mule(*1), gnus-mime supports +code-conversion by MIME charset (@ref{(tm-en)MIME charset}) or +@code{default-mime-charset} of selected newsgroup. + +@noindent +@strong{[Memo]} +@quotation +(*1) It means next generation of Emacs includes mule features. Now +(October 1996), HANDA Ken'ichi and RMS are developing it. +@end quotation + + +Detail of code conversion is following: + +@enumerate +@item +If a newsgroup is selected, MIME charset for the newsgroup is +searched from @code{gnus-newsgroup-default-charset-alist}. If +it is found, it is set to buffer local variable +@code{default-mime-charset} of Summary Buffer. If not found, +global value of @code{default-mime-charset} is used. +@item +Non-ASCII characters in Summary Buffer are code-converted by +@code{default-mime-charset} in Summary Buffer. +@item +encoded-word (@ref{(tm-en)encoded-word}) are code-converted by their +specified MIME charset (@ref{(tm-en)MIME charset}). +@item +Code-conversion of articles are following: + +@enumerate +@item +If a part of a MIME message has charset parameter of Content-Type field +(@ref{(tm-en)Content-Type field}), it is code-converted by the MIME +charset. +@item +When there are no specified MIME charset, such as message header +or non-MIME message, they are code-converted by +@code{default-mime-charset} in Summary Buffer. +@end enumerate +@end enumerate + + + +@defvar gnus-newsgroup-default-charset-alist + +Association-list regexp for newsgroup vs. symbol for default MIME +charset.@refill + +Default setting are following: + +@table @samp +@item alt.chinese.* +hz-gb-2312 (@ref{(tm-en)hz-gb-2312})@refill + +@item alt.chinese.text.big5, hk.*, hkstar.*, tw.* +cn-big5 (@ref{(tm-en)cn-big5})@refill + +@item fj.* +iso-2022-jp-2 (@ref{(tm-en)iso-2022-jp-2})@refill + +@item han.* +euc-kr (@ref{(tm-en)euc-kr})@refill + +@item relcom.* +koi8-r (@ref{(tm-en)koi8-r})@refill + +@end table + +If there is no MIME charsets for a newsgroup, +@code{default-mime-charset} is used as default MIME charset. +@end defvar + + +@defun gnus-set-newsgroup-default-charsetnewsgroup charset + +Set default MIME @var{charset} of @var{newsgroup} to +@code{gnus-newsgroup-default-charset-alist}.@refill + +@var{newsgroup} is string of newsgroup name or category, for +@code{"gnu.emacs.gnus"}, @code{"gnu.emacs"}, @code{"gnu"}.@refill + +@var{charset} is symbol of MIME charset, for example @code{iso-8859-1}, +@code{iso-2022-jp}. +@end defun + + + +@node MIME-Edit, Concept Index, mule, Top +@chapter Composing MIME messages + +If using mime-setup (@ref{(tm-en)mime-setup}), you can edit MIME message +in message-mode using tm-edit (@ref{(tm-edit-en)}). + +@noindent +@strong{[Notice]} +@quotation + +Default setting of mime-setup avoids automatic inserting signature +when sending a message. + +(cf. @ref{(tm-en)mime-setup}) +@end quotation + + +gnus-mime does not have implementation for @kbd{C-c C-x C-m} +(@code{mime-editor/insert-mail}). Because gnus-mime does not know which +mail-reader should be used. In addition, @kbd{C-c C-x C-y} +(@code{mime-editor/insert-message}) is enough to insert mail (namely to +select a mail group and select a message to insert, then it is available +to insert the mail message).@refill + +However you can use @kbd{C-c C-x C-m} to specify an +implementation of @code{message-mode} to +@code{mime-editor/mail-inserter-alist}. + + +@section Example: same as @kbd{C-c C-x C-m} + +@lisp +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function message-mime-insert-article)) +@end lisp + + + +@section Example: including from MH folder + +@lisp +(autoload 'tm-mh-e/insert-mail "tm-mh-e") + +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function tm-mh-e/insert-mail)) +@end lisp + + + +@node Concept Index, Function Index, MIME-Edit, Top +@chapter Concept Index + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter Function Index + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter Variable Index + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/gnus-mime-ja.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,330 @@ +<!doctype sinfo system> +<!-- $Id: gnus-mime-ja.sgml,v 1.1 1996/12/22 00:09:31 steve Exp $ --> +<head> +<title>gnus-mime 0.10 $B@bL@=q!JF|K\8lHG!K(B +<author>$B<i2,(B $BCNI'(B <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/21 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents gnus-mime, a MIME extension for Gnus. +<p> +tm $B$r;H$C$F(B Gnus $B$N(B MIME $B5!G=$r6/2=$9$k$?$a$N(B package $B$G$"$k(B +`gnus-mime' $B$K$D$$$F@bL@$7$^$9!#(B +</abstract> + + +<h1> gnus-mime $B$C$F2?!)(B +<node> Introduction +<p> +<concept>gnus-mime</concept> $B$O(B <a file="tm-ja" +node="tm-kernel">tm</a> $B$r;H$C$F(B <a file="gnus">Gnus</a> $B$N(B <dref +file="tm-ja">MIME</dref> $B5!G=$r6/2=$9$k$?$a$N(B package $B$G$9!#(B + +<memo title="$BCm0U(B"> +<p> +gnus-mime $B$O(B Gnus $B@lMQ$G$9!#(BGNUS $B$K$O(B <a file="tm-gnus_ja">tm-gnus</a> +$B$r;H$$$^$9!#(B +</memo> + +<p> +gnus-mime $B$r;H$&$H(B <a file="tm-view-ja"> tm-view</a> $B$rMQ$$$F(B +<code>"*Article*"</code> buffer $B$G(B MIME preview $B$r9T$&$3$H$,$G$-$^$9!#(B +$BFC$K!"(BXEmacs $B$G$O!"(Btext $B$HF1MM$K!"3($b(B inline $BI=<($r$9$k$3$H$,$G$-$^$9!#(B +<p> +$B$^$?!"(B<a file="tm-ja" node="mule"> MULE</a>, XEmacs/mule, mule $BE}9gHG(B +Emacs $B$G$OB?8@8l!&9q:]2=5!G=$,(B support $B$5$l!"(BMIME message $B$KBP$9$k(B +charset $B$N(B support, $BHs(B MIME message $B$KBP$9$k(B Newsgroup $BKh$N(B +default-mime-charset $B$N;XDj$r9T$&$3$H$,$G$-$^$9!#(B +<p> +$B$^$?!"(Boriginal $B$N(B Gnus $B$G$O(B <dref file="tm-ja">iso-8859-1</dref> $B$N(B Q +encoding $B$N(B <dref file="tm-ja">encoded-word</dref> $B$N(B decode $B$7$+(B +support $B$5$l$^$;$s$,!"(Bgnus-mime $B$G$O!"(B<dref +file="tm-ja">iso-8859-2</dref>, <dref file="tm-ja">iso-8859-3</dref>, +..., <dref file="tm-ja">iso-2022-jp</dref>, <dref +file="tm-ja">euc-kr</dref>, <dref file="tm-ja">iso-2022-kr</dref>, +<dref file="tm-ja">hz-gb-2312</dref>, <dref +file="tm-ja">cn-big5</dref> $B$J$I!"(Bmule $B$GMxMQ2DG=$J$5$^$6$^$J(B charset +$B$N(B B $B$J$i$S$K(B Q encoding $B$N(B encoded-word $B$r07$&$3$H$,$G$-$^$9!#$^$?!"(B +Gnus $B$h$j$b(B RFC 1522 $B$KCi<B$K=hM}$7$F$$$^$9!#(B + + +<h1> MIME message $B$N(B inline $BI=<((B +<node> Automatic MIME Preview +<p> +gnus-mime $B$G$O(B <concept>automatic MIME preview</concept> $B5!G=$rMxMQ$9(B +$B$k$3$H$,$G$-$^$9!#$3$N5!G=$r;H$&$H(B Summary mode $B$G5-;v$rFI$`;~!"DL>oI=(B +$B<($5$l$k(B Article buffer $B$NBe$o$j$K(B tm-view $B$G=hM}$5$l$?(B preview buffer +$B$rI=<($7$^$9!#(B<cf file="tm-view-ja"> +<p> +$B$3$N$?$a!"(B<dref file="tm-ja">Base64</dref> $B$d(B <dref +file="tm-ja">Quoted-Printable</dref> $B$G(B encode $B$5$l$?5-;v$r(B decode $B$7(B +$B$FI=<($9$k$3$H$,$G$-$^$9!#$"$k$$$O!"(B<dref +file="tm-ja">text/enriched</dref> $B7A<0$N$h$&$J=qBN$dAHHG$K4X$9$k>pJs$r(B +$B;}$C$?5-;v$r@07A$7$FI=<($G$-$^$9!#EvA3$N$3$H$J$,$i!"(B<dref +file="tm-ja">multipart</dref> $B$N5-;v$b@5$7$/=hM}$G$-$^$9!#(B +<p> +$B$^$?!"(B<concept>XEmacs</concept> $B$G$O(B text $B$HF1MM$K3($b(B preview buffer +$BFb$GI=<($9$k$3$H$,$G$-$^$9!#(B +<p> +metamail $B$r;H$C$?>l9g$H0[$J$j!"2;$NF~$C$?5-;v$rFI$s$@$H$?$s!"$$$-$J$j!"(B +$B2;$,LD$j=P$7$?$j!"(Bvideo $B$NF~$C$?5-;v$rFI$`$?$S$K(B video $B$,:F@8$5$l$?$j!"(B +anonymous <dref file="tm-ja">ftp</dref> $B$d(B mail-server $B$rMxMQ$7$?(B +external-message $B$NF~$C$?5-;v$rFI$`$?$S$K(B anonymous ftp $B$r<B9T$7$?$j!"(B +mail $B$rAw$C$?$j$9$k$3$H$,KI$2$^$9!#$3$&$7$?(B content $B$O(B preview buffer +$B$NCf$KF~$C$F:F@8(B command $B$r<B9T$7$?;~$N$_:F@8$5$l$^$9!#(B +<p> +$B$7$+$7$J$,$i!"CY$$(B machine $B$r;H$C$F$$$F!"(BMIME $B=hM}$N(B overhead $B$,5$$K$J(B +$B$k>l9g!"(Bautomatic MIME preview $B$rM^;_$9$k$3$H$,$G$-$^$9!#(B + + +<h2> MIME $B=hM}$N;EAH$_(B +<node> MIME processing +<p> +<code>gnus-show-mime</code> $B$,(B <code>nil</code> $B$G$J$/!"$+$D!"(Barticle +$B$,(B Mime-Version field $B$r;}$C$F$$$k>l9g!"B($A!"$=$N(B article $B$,(B MIME +message $B$N>l9g!"(B<code>gnus-show-mime-method</code> $B$,8F$P$l$F(B MIME $B=h(B +$BM}$,9T$J$o$l$^$9!#(B +<p> +<code>gnus-strict-mime</code> $B$,(B <code>nil</code> $B$N>l9g!"(B +<code>gnus-show-mime</code> $B$,(B <code>nil</code> $B$G$J$1$l$P>o$K(B +<code>gnus-show-mime-method</code> $B$,8F$P$l$F(B MIME $B=hM}$,9T$J$o$l$^$9!#(B +<p> +Gnus 5.2 $B0J9_$G$O!"(B<code>gnus-strict-mime</code> $B$,(B <code>nil</code> +$B$G$J$/!"$+$D!"(Barticle $B$K(B Mime-Version field $B$,$J$$>l9g!"(B +<code>gnus-show-mime-method</code> $B$,8F$P$l$kBe$o$j$K(B +<code>gnus-decode-encoded-word-method</code> $B$,8F$P$l$^$9!#$G$b!"8E$$(B +Gnus $B$G$OM-8z$G$O$J$$$N$G!"$3$N>l9g!"(B<code>gnus-strict-mime</code> $B$O(B +<code>nil</code> $B$K$7$F$*$$$?J}$,NI$$$G$7$g$&!#(B + + +<defvar name="gnus-show-mime"> +<p> +$B$3$NJQ?t$,(B <code>nil</code> $B$G$J$$$H$-!"(Bautomatic MIME preview $B$,9T$J(B +$B$o$l$^$9!#4{DjCM$O(B <code>t</code> $B$G$9!#(B +<p> +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B +load $B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B + +<cf file="gnus" node="Using MIME"> +</defvar> + +<defvar name="gnus-show-mime-method"> +<p> +MIME $B=hM}$r9T$J$&;~$K!"$3$NJQ?t$KB+G{$5$l$?4X?t$,8F$P$l$^$9!#4{DjCM$O(B +<code>gnus-article-preview-mime-message</code> $B$G$9!#(B +<p> +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B +load $B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B + +<cf file="gnus" node="Using MIME"> +</defvar> + +<defvar name="gnus-decode-encoded-word-method"> +<p> +<code>gnus-show-mime</code> $B$H(B <code>gnus-strict-mime</code> $B$,$H$b$K(B +<code>nil</code> $B$G$J$$>l9g$K!"(BMime-Version field $B$,$J$$(B article $B$KBP(B +$B$7$F$3$NJQ?t$KB+G{$5$l$?4X?t$,8F$P$l$^$9!#4{DjCM$O!"(B +<code>gnus-article-decode-encoded-word</code> $B$G$9!#(B +<p> +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B +load $B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B +<p> +$B$^$?!"(BGnus 5.0.* $B$*$h$S(B Gnus 5.1 $B$G$OL58z$G$9!#(B +</defvar> + +<memo title="$BCm0U(B"> +<p> +gnus-mime $B$O(B Gnus $B$NJQ?t$rMQ$$!"$3$l$r(B gnus-mime $B$N=i4|CM$G(B +<code>defvar</code> $B$7$F$$$^$9!#Nc$($P!"(B<code>gnus-show-mime</code> $B$O(B +<code>nil</code>$B$G$O$J$/(B <code>t</code> $B$G!"(B +<code>gnus-show-mime-method</code> $B$O(B <code>metamail-buffer</code> $B$G(B +$B$O$J$/(B<code>gnus-article-preview-mime-message</code> $B$G(B +<code>defvar</code> $B$7$F$$$^$9!#(B<cf file="gnus" node="Using MIME"> +<p> +<code>setq</code> $B$G$O$J$/(B <code>defvar</code> $B$rMQ$$$F$$$k$N$O(B +gnus-mime $B$,(B load$B$5$l$kA0$K(B <file>~/.emacs</file> $BEy$G(B user $B$,9T$C$?@_(B +$BDj$rB:=E$9$k$?$a$G$9$,!"$3$N$3$H$OF1;~$K!"$b$7(B gnus-mime $B$,(B load $B$5$l(B +$B$kA0$K(B gnus $B$,(B load $B$5$l$l$P(B gnus-mime $B$N5!G=$OI8=`$G$OF/$+$J$$$3$H$r(B +$B0UL#$7$F$$$^$9!#$h$C$F!"(B<file>~/.gnus</file> $BEy$G(B gnus-mime $B$d(B +mime-setup $B$r(B load $B$9$k$3$H$K$OLdBj$,$"$j$^$9!#$I$&$7$F$b$=$&$7$?$$>l(B +$B9g$O!"(B<code>gnus-show-mime</code> $B$d(B<code>gnus-show-mime-method</code> +$B$N@_Dj$r9T$C$F$/$@$5$$!#(B +</memo> + + +<h2> Automatic MIME preview $B$N;EAH$_(B +<node> Two buffers for an article +<p> +Gnus 5.2 $B0J9_$G$O(B Gnus $B$O#1$D$N(B article $B$KBP$7$F(B +<code>gnus-original-article-buffer</code> (<code>" *Original +Article*"</code>) $B$H(B<code>gnus-article-buffer</code> +(<code>"*Article*"</code>) $B$H$$$$D$N(B buffer $B$r;}$C$F$$$^$9!#$3$3$G(B +$B$OA0<T$r(B <concept>raw article buffer</concept>, $B8e<T$r(B +<concept>preview buffer</concept> $B$H8F$V$3$H$K$7$^$9!#(B +<p> +raw article buffer $B$K$O2?$b=hM}$r$5$l$F$$$J$$!X@8$N(B article$B!Y$,F~$C$F(B +$B$$$^$9!#FC$K!"(B<dref file="tm-ja">mule</dref> $B$G$O(B code $BJQ49$r9T$J$o$J(B +$B$$>uBV$N5-;v$,F~$j$^$9!#(B +<p> +preview buffer $B$O(B raw article buffer $B$r85$K(B MIME $B=hM}$r9T$J$C$F@07A$5(B +$B$l$?5-;v$,F~$j$^$9!#FC$K!"(Bmule $B$N>l9g!"$3$NCf$G!"(Bcharset $B$b$7$/$O(B +newsgroup $BKh$K;XDj$5$l$?J8;z(B code $B$G$N(B code $BJQ49$,9T$J$o$l$^$9!#(B +<p> +Gnus 5.0.* $B$*$h$S(B Gnus 5.1 $B$G$O(B raw article buffer $B$H(B preview buffer +$B$N6hJL$O$"$j$^$;$s$,(B gnus-mime $B$,L5M}LpM}(B raw article buffer $B$r:n$j=P(B +$B$7$F$$$^$9!#$h$C$F!"FC$KM}M3$,$J$1$l$P(B Gnus 5.2 $B0J9_$r;H$o$l$k$3$H$r$*(B +$B4+$a$7$^$9!#(B +<p> +<cf file="tm-view-ja" node="Two buffers for an article"> + + +<h1> $B9q:]2=(B +<node> mule +<p> +<a file="tm-ja" node="mule">MULE</a>, XEmacs/mule, $B$*$h$S!"(Bmule $BE}9gHG(B +Emacs (*1) $B$J$I$N(B mule $B5!G=$r;}$C$?(B emacs $B$G$O(B <dref file="tm-ja">MIME +charset</dref> $B$*$h$S!"Hs(B MIME message/part $B$KBP$9$k(B newsgroup $BKh$K;X(B +$BDj$5$l$?(B <code>default-mime-charset</code> $B$G$N(B code $BJQ49$,9T$o$l$^$9!#(B + +<memo> +(*1) 1996 $BG/(B 10 $B7n8=:_!"H>ED(B $B7u0l(B $B;a$H(B RMS $B;a$,3+H/Cf$N(B Emacs $B$G!"(BMULE +$B$N5!G=$N$&$A!"B?8@8l2=$H9q:]2=$K4X$9$k5!G=$,(B merge $B$5$l$?$b$N$r;X$7$F(B +$B$$$^$9!#(B +</memo> + +<p> +$B6qBNE*$K$O!"(Bcode $BJQ49$O<!$N$h$&$K9T$o$l$^$9!'(B + +<ol> +<li> +$B$"$k(B newsgroup $B$rA*Br$9$k$H!"$=$N(B newsgroup $B$KBP1~$9$k(B default $B$N(B MIME +charset $B$r(B <code>gnus-newsgroup-default-charset-alist</code> $B$+$iA\$7!"(B +$B$b$7!"8+IU$+$l$P!"(BSummary Buffer $B$N(B buffer local $BJQ?t(B +<code>default-mime-charset</code> $B$K$=$l$r@_Dj$9$k!#$b$7!"$J$1$l$P!"(B +<code>default-mime-charset</code> $B$NBg0hCM$,MQ$$$i$l$k!#(B +<p> +<li> +Summary Buffer $BCf$NHs(B ASCII $BJ8;z$O(B <code>default-mime-charset</code> +$B$N(B Summary Buffer $B>e$G$NCM$G(B code $BJQ49$5$l$k!#(B +<p> +<li> +<dref file="tm-ja">encoded-word</dref> $B$N>l9g!"@k8@$5$l$?(B <dref +file="tm-ja">MIME charset</dref> $B$G(B code $BJQ49$r9T$&!#(B +<p> +<li> +article $B$N(B code $BJQ49$O!'(B + +<ol> +<li> +$B$b$7!"$"$k(B MIME message $B$N$"$k(B part $B$,(B <dref file="tm-ja">Content-Type +field</dref> $B$K(B charset parameter $B$r;}$C$F$$$l$P!"$=$N(B MIME charset $B$r(B +$BMQ$$$F(B code $BJQ49$r9T$&!#(B +<p> +<li> +message header $B$dHs(B MIME message $B$J$I!"(Bcharset $B$,@k8@$5$l$F$$$J$$>l9g!"(B +Summary Buffer $B>e$N(B <code>default-mime-charset</code> $B$NCM$G(B code $BJQ49(B +$B$5$l$k!#(B +</ol> +</ol> + +<defvar name="gnus-newsgroup-default-charset-alist"> +<p> +newsgroup $B$KBP1~$9$k@55,I=8=$H(B default MIME charset $B$rI=$9(B symbol $B$NBP(B +$B$+$i$J$kO"A[(B list. +<p> +$B4{DjCM$G$O!"(Balt.chinese.* $B$G$O(B <dref file="tm-ja">hz-gb-2312</dref>, +alt.chinese.text.big5, hk.*, hkstar.*, tw.* $B$G$O(B <dref +file="tm-ja">cn-big5</dref>, fj.* $B$G$O(B <dref +file="tm-ja">iso-2022-jp-2</dref>, han.* $B$G$O(B <dref +file="tm-ja">euc-kr</dref>, relcom.* $B$G$O(B <dref +file="tm-ja">koi8-r</dref> $B$,;XDj$5$l$F$$$^$9!#(B +<p> +$B$"$k(B newsgroup $B$KBP1~$9$k(B MIME charset $B$,B8:_$7$J$$>l9g$O(B +<code>default-mime-charset</code> $B$,MQ$$$i$l$^$9!#(B +</defvar> + +<defun name="gnus-set-newsgroup-default-charset"> +<args>newsgroup charset +<p> +<var>newsgroup</var> $B$KBP$9$k(B default MIME charset $B$r(B +<var>charset</var> $B$K@_Dj$9$k!#(B +<p> +<var>newsgroup</var> $B$O(B newsgroup $BL>$+$=$N0lIt$+$i$J$kJ8;zNs!#!JNc!'(B +<code>"gnu.emacs.gnus"</code>, <code>"gnu.emacs"</code>, +<code>"gnu"</code>$B!K(B +<p> +<var>charset</var> $B$O(B MIME charset $B$rI=$9(B symbol. $B!JNc!'(B +<code>iso-8859-1</code>, <code>iso-2022-jp</code>$B!K(B +</defun> + + +<h1> MIME message $B$N:n@.(B +<node> MIME-Edit +<p> +<dref file="tm-ja">mime-setup</dref> $B$r;H$C$F$$$k>l9g!"(B<a +file="tm-edit-ja">tm-edit</a> $B$rMQ$$$?(B MIME message $B$N:n@.$r9T$&$3$H$,(B +$B$G$-$^$9!#(B + +<memo title="$BCm0U(B"> +<p> +mime-setup $B$NI8=`@_Dj$G$O(B signature $B$N<+F0A^F~$,M^@)$5$l$^$9!#(B + +<cf file="tm-ja" node="mime-setup"> +</memo> + +<p> +<kbd>C-c C-x C-m</kbd> (<code>mime-editor/insert-mail</code>) $B$KBP$9$k(B +$B<BAu$OI8=`$G$OM?$($i$l$^$;$s!#$3$l$O!"(BGnus $B$HAH$_9g$o$;$k$Y$-(B mail +reader $B$r$I$&$9$l$PNI$$$+$,H=$i$J$$$+$i$G$9!#$^$?!"BgDq$N>l9g!"(B +<kbd>C-c C-x C-y</kbd> (<code>mime-editor/insert-message</code>) $B$G;v(B +$BB-$j$k!JB($A!"A^F~$7$?$$(Bmessage $B$rA*Br$7$F$=$N(B +<code>"*Article*"</code> buffer $B$rI=<($9$l$P$=$N(Bmessage $B$r(B <kbd>C-c +C-x C-y</kbd> $B$GA^F~$9$k$3$H$,$G$-$^$9!K$+$i$G$9!#(B +<p> +$B$7$+$7$J$,$i!"(B<code>mime-editor/mail-inserter-alist</code> $B$N(B +<code>message-mode</code> $B$NCM$K@_Dj$7$?$$<BAu$r;XDj$9$k$3$H$G(B +<kbd>C-c C-x C-m</kbd> $B$rMxMQ$9$k$3$H$,$G$-$^$9!#(B + + +<h2> $BNc!'(B<kbd>C-c C-x C-m</kbd> $B$HF1$8F0:n$r$5$;$k>l9g(B +<p> +<lisp> +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function message-mime-insert-article)) +</lisp> + + +<h2> $BNc!'(BMH $B$N(B folder $B$+$i<h$j9~$`>l9g(B +<p> +<lisp> +(autoload 'tm-mh-e/insert-mail "tm-mh-e") + +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function tm-mh-e/insert-mail)) +</lisp> + + +<h1> $B35G0:w0z(B +<node> Concept Index +<p> +<cindex> + + +<h1> $B4X?t:w0z(B +<node> Function Index +<p> +<findex> + + +<h1> $BJQ?t:w0z(B +<node> Variable Index +<p> +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/gnus-mime-ja.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,350 @@ +\input texinfo.tex +@setfilename gnus-mime-ja.info +@settitle{gnus-mime 0.10 $B@bL@=q!JF|K\8lHG!K(B} +@titlepage +@title gnus-mime 0.10 $B@bL@=q!JF|K\8lHG!K(B +@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp> +@subtitle 1996/10/21 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top gnus-mime 0.10 $B@bL@=q!JF|K\8lHG!K(B + +@ifinfo + +This file documents gnus-mime, a MIME extension for Gnus.@refill + +tm $B$r;H$C$F(B Gnus $B$N(B MIME $B5!G=$r6/2=$9$k$?$a$N(B package $B$G$"$k(B `gnus-mime' +$B$K$D$$$F@bL@$7$^$9!#(B +@end ifinfo + +@menu +* Introduction:: gnus-mime $B$C$F2?!)(B +* Automatic MIME Preview:: MIME message $B$N(B inline $BI=<((B +* mule:: $B9q:]2=(B +* MIME-Edit:: MIME message $B$N:n@.(B +* Concept Index:: $B35G0:w0z(B +* Function Index:: $B4X?t:w0z(B +* Variable Index:: $BJQ?t:w0z(B +@end menu + +@node Introduction, Automatic MIME Preview, Top, Top +@chapter gnus-mime $B$C$F2?!)(B + +@cindex{gnus-mime}@strong{gnus-mime} $B$O(B tm (@ref{(tm-ja)tm-kernel}) $B$r;H$C(B +$B$F(B Gnus (@ref{(gnus)}) $B$N(B MIME (@ref{(tm-ja)MIME}) $B5!G=$r6/2=$9$k$?$a$N(B +package $B$G$9!#(B + +@noindent +@strong{[$BCm0U(B]} +@quotation + +gnus-mime $B$O(B Gnus $B@lMQ$G$9!#(BGNUS $B$K$O(B tm-gnus (@ref{(tm-gnus_ja)}) $B$r;H(B +$B$$$^$9!#(B +@end quotation + + +gnus-mime $B$r;H$&$H(B tm-view (@ref{(tm-view-ja)}) $B$rMQ$$$F(B +@code{"*Article*"} buffer $B$G(B MIME preview $B$r9T$&$3$H$,$G$-$^$9!#FC$K!"(B +XEmacs $B$G$O!"(Btext $B$HF1MM$K!"3($b(B inline $BI=<($r$9$k$3$H$,$G$-$^$9!#(B + +$B$^$?!"(BMULE (@ref{(tm-ja)mule}), XEmacs/mule, mule $BE}9gHG(B Emacs $B$G$OB?8@(B +$B8l!&9q:]2=5!G=$,(B support $B$5$l!"(BMIME message $B$KBP$9$k(B charset $B$N(B support, +$BHs(B MIME message $B$KBP$9$k(B Newsgroup $BKh$N(B default-mime-charset $B$N;XDj$r9T(B +$B$&$3$H$,$G$-$^$9!#(B@refill + +$B$^$?!"(Boriginal $B$N(B Gnus $B$G$O(B iso-8859-1 (@ref{(tm-ja)iso-8859-1}) $B$N(B Q +encoding $B$N(B encoded-word (@ref{(tm-ja)encoded-word}) $B$N(B decode $B$7$+(B +support $B$5$l$^$;$s$,!"(Bgnus-mime $B$G$O!"(Biso-8859-2 +(@ref{(tm-ja)iso-8859-2}), iso-8859-3 (@ref{(tm-ja)iso-8859-3}), ..., +iso-2022-jp (@ref{(tm-ja)iso-2022-jp}), euc-kr (@ref{(tm-ja)euc-kr}), +iso-2022-kr (@ref{(tm-ja)iso-2022-kr}), hz-gb-2312 +(@ref{(tm-ja)hz-gb-2312}), cn-big5 (@ref{(tm-ja)cn-big5}) $B$J$I!"(Bmule $B$G(B +$BMxMQ2DG=$J$5$^$6$^$J(B charset $B$N(B B $B$J$i$S$K(B Q encoding $B$N(B encoded-word $B$r(B +$B07$&$3$H$,$G$-$^$9!#$^$?!"(BGnus $B$h$j$b(B RFC 1522 $B$KCi<B$K=hM}$7$F$$$^$9!#(B + + +@node Automatic MIME Preview, mule, Introduction, Top +@chapter MIME message $B$N(B inline $BI=<((B + +gnus-mime $B$G$O(B @cindex{automatic MIME preview}@strong{automatic MIME +preview} $B5!G=$rMxMQ$9$k$3$H$,$G$-$^$9!#$3$N5!G=$r;H$&$H(B Summary mode $B$G(B +$B5-;v$rFI$`;~!"DL>oI=<($5$l$k(B Article buffer $B$NBe$o$j$K(B tm-view $B$G=hM}$5(B +$B$l$?(B preview buffer $B$rI=<($7$^$9!#(B(cf. @ref{(tm-view-ja)}) @refill + +$B$3$N$?$a!"(BBase64 (@ref{(tm-ja)Base64}) $B$d(B Quoted-Printable +(@ref{(tm-ja)Quoted-Printable}) $B$G(B encode $B$5$l$?5-;v$r(B decode $B$7$FI=<($9(B +$B$k$3$H$,$G$-$^$9!#$"$k$$$O!"(Btext/enriched (@ref{(tm-ja)text/enriched}) +$B7A<0$N$h$&$J=qBN$dAHHG$K4X$9$k>pJs$r;}$C$?5-;v$r@07A$7$FI=<($G$-$^$9!#Ev(B +$BA3$N$3$H$J$,$i!"(Bmultipart (@ref{(tm-ja)multipart}) $B$N5-;v$b@5$7$/=hM}$G(B +$B$-$^$9!#(B@refill + +$B$^$?!"(B@cindex{XEmacs}@strong{XEmacs} $B$G$O(B text $B$HF1MM$K3($b(B preview +buffer $BFb$GI=<($9$k$3$H$,$G$-$^$9!#(B@refill + +metamail $B$r;H$C$?>l9g$H0[$J$j!"2;$NF~$C$?5-;v$rFI$s$@$H$?$s!"$$$-$J$j!"(B +$B2;$,LD$j=P$7$?$j!"(Bvideo $B$NF~$C$?5-;v$rFI$`$?$S$K(B video $B$,:F@8$5$l$?$j!"(B +anonymous ftp (@ref{(tm-ja)ftp}) $B$d(B mail-server $B$rMxMQ$7$?(B +external-message $B$NF~$C$?5-;v$rFI$`$?$S$K(B anonymous ftp $B$r<B9T$7$?$j!"(B +mail $B$rAw$C$?$j$9$k$3$H$,KI$2$^$9!#$3$&$7$?(B content $B$O(B preview buffer $B$N(B +$BCf$KF~$C$F:F@8(B command $B$r<B9T$7$?;~$N$_:F@8$5$l$^$9!#(B@refill + +$B$7$+$7$J$,$i!"CY$$(B machine $B$r;H$C$F$$$F!"(BMIME $B=hM}$N(B overhead $B$,5$$K$J(B +$B$k>l9g!"(Bautomatic MIME preview $B$rM^;_$9$k$3$H$,$G$-$^$9!#(B + + +@menu +* MIME processing:: MIME $B=hM}$N;EAH$_(B +* Two buffers for an article:: Automatic MIME preview $B$N;EAH$_(B +@end menu + +@node MIME processing, Two buffers for an article, Automatic MIME Preview, Automatic MIME Preview +@section MIME $B=hM}$N;EAH$_(B + +@code{gnus-show-mime} $B$,(B @code{nil} $B$G$J$/!"$+$D!"(Barticle $B$,(B +Mime-Version field $B$r;}$C$F$$$k>l9g!"B($A!"$=$N(B article $B$,(B MIME message +$B$N>l9g!"(B@code{gnus-show-mime-method} $B$,8F$P$l$F(B MIME $B=hM}$,9T$J$o$l$^$9!#(B +@refill + +@code{gnus-strict-mime} $B$,(B @code{nil} $B$N>l9g!"(B@code{gnus-show-mime} $B$,(B +@code{nil} $B$G$J$1$l$P>o$K(B @code{gnus-show-mime-method} $B$,8F$P$l$F(B MIME +$B=hM}$,9T$J$o$l$^$9!#(B@refill + +Gnus 5.2 $B0J9_$G$O!"(B@code{gnus-strict-mime} $B$,(B @code{nil} +$B$G$J$/!"$+$D!"(Barticle $B$K(B Mime-Version field $B$,$J$$>l9g!"(B +@code{gnus-show-mime-method} $B$,8F$P$l$kBe$o$j$K(B +@code{gnus-decode-encoded-word-method} $B$,8F$P$l$^$9!#$G$b!"8E$$(B +Gnus $B$G$OM-8z$G$O$J$$$N$G!"$3$N>l9g!"(B@code{gnus-strict-mime} $B$O(B +@code{nil} $B$K$7$F$*$$$?J}$,NI$$$G$7$g$&!#(B + + +@defvar gnus-show-mime + +$B$3$NJQ?t$,(B @code{nil} $B$G$J$$$H$-!"(Bautomatic MIME preview $B$,9T$J$o$l$^$9!#(B +$B4{DjCM$O(B @code{t} $B$G$9!#(B@refill + +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B +load $B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B + +(cf. @ref{(gnus)Using MIME}) +@end defvar + + +@defvar gnus-show-mime-method + +MIME $B=hM}$r9T$J$&;~$K!"$3$NJQ?t$KB+G{$5$l$?4X?t$,8F$P$l$^$9!#4{DjCM$O(B +@code{gnus-article-preview-mime-message} $B$G$9!#(B@refill + +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B +load $B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B + +(cf. @ref{(gnus)Using MIME}) +@end defvar + + +@defvar gnus-decode-encoded-word-method + +@code{gnus-show-mime} $B$H(B @code{gnus-strict-mime} $B$,$H$b$K(B @code{nil} $B$G(B +$B$J$$>l9g$K!"(BMime-Version field $B$,$J$$(B article $B$KBP$7$F$3$NJQ?t$KB+G{$5$l(B +$B$?4X?t$,8F$P$l$^$9!#4{DjCM$O!"(B@code{gnus-article-decode-encoded-word} $B$G(B +$B$9!#(B@refill + +$B$3$NJQ?t$O(B Gnus $B$NJQ?t$J$N$G!"(Bgnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B load +$B$5$l$?>l9g!"4{DjCM$OJ]>Z$5$l$^$;$s!#(B@refill + +$B$^$?!"(BGnus 5.0.* $B$*$h$S(B Gnus 5.1 $B$G$OL58z$G$9!#(B +@end defvar + + +@noindent +@strong{[$BCm0U(B]} +@quotation + +gnus-mime $B$O(B Gnus $B$NJQ?t$rMQ$$!"$3$l$r(B gnus-mime $B$N=i4|CM$G(B@code{defvar} +$B$7$F$$$^$9!#Nc$($P!"(B@code{gnus-show-mime} $B$O(B @code{nil}$B$G$O$J$/(B @code{t} +$B$G!"(B@code{gnus-show-mime-method} $B$O(B @code{metamail-buffer} $B$G$O$J$/(B +@code{gnus-article-preview-mime-message} $B$G(B @code{defvar} $B$7$F$$$^$9!#(B +(cf. @ref{(gnus)Using MIME}) @refill + +@code{setq} $B$G$O$J$/(B @code{defvar} $B$rMQ$$$F$$$k$N$O(B gnus-mime $B$,(B load$B$5(B +$B$l$kA0$K(B @file{~/.emacs} $BEy$G(B user $B$,9T$C$?@_Dj$rB:=E$9$k$?$a$G$9$,!"$3(B +$B$N$3$H$OF1;~$K!"$b$7(B gnus-mime $B$,(B load $B$5$l$kA0$K(B gnus $B$,(B load $B$5$l$l$P(B +gnus-mime $B$N5!G=$OI8=`$G$OF/$+$J$$$3$H$r0UL#$7$F$$$^$9!#$h$C$F!"(B +@file{~/.gnus} $BEy$G(B gnus-mime $B$d(B mime-setup $B$r(B load $B$9$k$3$H$K$OLdBj$,$"(B +$B$j$^$9!#$I$&$7$F$b$=$&$7$?$$>l9g$O!"(B@code{gnus-show-mime} $B$d(B +@code{gnus-show-mime-method} $B$N@_Dj$r9T$C$F$/$@$5$$!#(B +@end quotation + + + +@node Two buffers for an article, , MIME processing, Automatic MIME Preview +@section Automatic MIME preview $B$N;EAH$_(B + +Gnus 5.2 $B0J9_$G$O(B Gnus $B$O#1$D$N(B article $B$KBP$7$F(B +@code{gnus-original-article-buffer} (@code{" *Original Article*"}) $B$H(B +@code{gnus-article-buffer} (@code{"*Article*"}) $B$H$$$$D$N(B buffer $B$r;}$C(B +$B$F$$$^$9!#$3$3$G$OA0<T$r(B @cindex{raw article buffer}@strong{raw article +buffer}, $B8e<T$r(B @cindex{preview buffer}@strong{preview buffer} $B$H8F$V$3(B +$B$H$K$7$^$9!#(B@refill + +raw article buffer $B$K$O2?$b=hM}$r$5$l$F$$$J$$!X@8$N(B article$B!Y$,F~$C$F$$(B +$B$^$9!#FC$K!"(Bmule (@ref{(tm-ja)mule}) $B$G$O(B code $BJQ49$r9T$J$o$J$$>uBV$N5-(B +$B;v$,F~$j$^$9!#(B@refill + +preview buffer $B$O(B raw article buffer $B$r85$K(B MIME $B=hM}$r9T$J$C$F@07A$5$l(B +$B$?5-;v$,F~$j$^$9!#FC$K!"(Bmule $B$N>l9g!"$3$NCf$G!"(Bcharset $B$b$7$/$O(B +newsgroup $BKh$K;XDj$5$l$?J8;z(B code $B$G$N(B code $BJQ49$,9T$J$o$l$^$9!#(B@refill + +Gnus 5.0.* $B$*$h$S(B Gnus 5.1 $B$G$O(B raw article buffer $B$H(B preview buffer $B$N(B +$B6hJL$O$"$j$^$;$s$,(B gnus-mime $B$,L5M}LpM}(B raw article buffer $B$r:n$j=P$7$F(B +$B$$$^$9!#$h$C$F!"FC$KM}M3$,$J$1$l$P(B Gnus 5.2 $B0J9_$r;H$o$l$k$3$H$r$*4+$a$7(B +$B$^$9!#(B@refill + +(cf. @ref{(tm-view-ja)Two buffers for an article}) + + + +@node mule, MIME-Edit, Automatic MIME Preview, Top +@chapter $B9q:]2=(B + +MULE (@ref{(tm-ja)mule}), XEmacs/mule, $B$*$h$S!"(Bmule $BE}9gHG(B Emacs (*1) $B$J(B +$B$I$N(B mule $B5!G=$r;}$C$?(B emacs $B$G$O(B MIME charset (@ref{(tm-ja)MIME +charset}) $B$*$h$S!"Hs(B MIME message/part $B$KBP$9$k(B newsgroup $BKh$K;XDj$5$l$?(B +@code{default-mime-charset} $B$G$N(B code $BJQ49$,9T$o$l$^$9!#(B + +@noindent +@strong{[Memo]} +@quotation +(*1) 1996 $BG/(B 10 $B7n8=:_!"H>ED(B $B7u0l(B $B;a$H(B RMS $B;a$,3+H/Cf$N(B Emacs $B$G!"(BMULE +$B$N5!G=$N$&$A!"B?8@8l2=$H9q:]2=$K4X$9$k5!G=$,(B merge $B$5$l$?$b$N$r;X$7$F(B +$B$$$^$9!#(B +@end quotation + + +$B6qBNE*$K$O!"(Bcode $BJQ49$O<!$N$h$&$K9T$o$l$^$9!'(B + +@enumerate +@item +$B$"$k(B newsgroup $B$rA*Br$9$k$H!"$=$N(B newsgroup $B$KBP1~$9$k(B default $B$N(B MIME +charset $B$r(B @code{gnus-newsgroup-default-charset-alist} $B$+$iA\$7!"(B +$B$b$7!"8+IU$+$l$P!"(BSummary Buffer $B$N(B buffer local $BJQ?t(B +@code{default-mime-charset} $B$K$=$l$r@_Dj$9$k!#$b$7!"$J$1$l$P!"(B +@code{default-mime-charset} $B$NBg0hCM$,MQ$$$i$l$k!#(B + +@item +Summary Buffer $BCf$NHs(B ASCII $BJ8;z$O(B @code{default-mime-charset} +$B$N(B Summary Buffer $B>e$G$NCM$G(B code $BJQ49$5$l$k!#(B + +@item +encoded-word (@ref{(tm-ja)encoded-word}) $B$N>l9g!"@k8@$5$l$?(B MIME charset +(@ref{(tm-ja)MIME charset}) $B$G(B code $BJQ49$r9T$&!#(B + +@item +article $B$N(B code $BJQ49$O!'(B + +@enumerate +@item +$B$b$7!"$"$k(B MIME message $B$N$"$k(B part $B$,(B Content-Type field +(@ref{(tm-ja)Content-Type field}) $B$K(B charset parameter $B$r;}$C$F$$$l$P!"(B +$B$=$N(B MIME charset $B$rMQ$$$F(B code $BJQ49$r9T$&!#(B + +@item +message header $B$dHs(B MIME message $B$J$I!"(Bcharset $B$,@k8@$5$l$F$$$J$$>l9g!"(B +Summary Buffer $B>e$N(B @code{default-mime-charset} $B$NCM$G(B code $BJQ49(B +$B$5$l$k!#(B +@end enumerate +@end enumerate + + +@defvar gnus-newsgroup-default-charset-alist + +newsgroup $B$KBP1~$9$k@55,I=8=$H(B default MIME charset $B$rI=$9(B symbol $B$NBP$+(B +$B$i$J$kO"A[(B list.@refill + +$B4{DjCM$G$O!"(Balt.chinese.* $B$G$O(B hz-gb-2312 (@ref{(tm-ja)hz-gb-2312}), +alt.chinese.text.big5, hk.*, hkstar.*, tw.* $B$G$O(B cn-big5 +(@ref{(tm-ja)cn-big5}), fj.* $B$G$O(B iso-2022-jp-2 +(@ref{(tm-ja)iso-2022-jp-2}), han.* $B$G$O(B euc-kr (@ref{(tm-ja)euc-kr}), +relcom.* $B$G$O(B koi8-r (@ref{(tm-ja)koi8-r}) $B$,;XDj$5$l$F$$$^$9!#(B@refill + +$B$"$k(B newsgroup $B$KBP1~$9$k(B MIME charset $B$,B8:_$7$J$$>l9g$O(B +@code{default-mime-charset} $B$,MQ$$$i$l$^$9!#(B +@end defvar + + +@defun gnus-set-newsgroup-default-charsetnewsgroup charset + +@var{newsgroup} $B$KBP$9$k(B default MIME charset $B$r(B @var{charset} $B$K@_Dj$9(B +$B$k!#(B@refill + +@var{newsgroup} $B$O(B newsgroup $BL>$+$=$N0lIt$+$i$J$kJ8;zNs!#!JNc!'(B +@code{"gnu.emacs.gnus"}, @code{"gnu.emacs"}, @code{"gnu"}$B!K(B@refill + +@var{charset} $B$O(B MIME charset $B$rI=$9(B symbol. $B!JNc!'(B@code{iso-8859-1}, +@code{iso-2022-jp}$B!K(B +@end defun + + + +@node MIME-Edit, Concept Index, mule, Top +@chapter MIME message $B$N:n@.(B + +mime-setup (@ref{(tm-ja)mime-setup}) $B$r;H$C$F$$$k>l9g!"(Btm-edit +(@ref{(tm-edit-ja)}) $B$rMQ$$$?(B MIME message $B$N:n@.$r9T$&$3$H$,$G$-$^$9!#(B + +@noindent +@strong{[$BCm0U(B]} +@quotation + +mime-setup $B$NI8=`@_Dj$G$O(B signature $B$N<+F0A^F~$,M^@)$5$l$^$9!#(B + +(cf. @ref{(tm-ja)mime-setup}) +@end quotation + + +@kbd{C-c C-x C-m} (@code{mime-editor/insert-mail}) $B$KBP$9$k<BAu$OI8=`$G(B +$B$OM?$($i$l$^$;$s!#$3$l$O!"(BGnus $B$HAH$_9g$o$;$k$Y$-(B mail reader $B$r$I$&$9$l(B +$B$PNI$$$+$,H=$i$J$$$+$i$G$9!#$^$?!"BgDq$N>l9g!"(B@kbd{C-c C-x C-y} +(@code{mime-editor/insert-message}) $B$G;vB-$j$k!JB($A!"A^F~$7$?$$(Bmessage +$B$rA*Br$7$F$=$N(B @code{"*Article*"} buffer $B$rI=<($9$l$P$=$N(Bmessage $B$r(B +@kbd{C-c C-x C-y} $B$GA^F~$9$k$3$H$,$G$-$^$9!K$+$i$G$9!#(B@refill + +$B$7$+$7$J$,$i!"(B@code{mime-editor/mail-inserter-alist} $B$N(B +@code{message-mode} $B$NCM$K@_Dj$7$?$$<BAu$r;XDj$9$k$3$H$G(B +@kbd{C-c C-x C-m} $B$rMxMQ$9$k$3$H$,$G$-$^$9!#(B + + +@section $BNc!'(B@kbd{C-c C-x C-m} $B$HF1$8F0:n$r$5$;$k>l9g(B + +@lisp +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function message-mime-insert-article)) +@end lisp + + + +@section $BNc!'(BMH $B$N(B folder $B$+$i<h$j9~$`>l9g(B + +@lisp +(autoload 'tm-mh-e/insert-mail "tm-mh-e") + +(set-alist 'mime-editor/mail-inserter-alist + 'message-mode (function tm-mh-e/insert-mail)) +@end lisp + + + +@node Concept Index, Function Index, MIME-Edit, Top +@chapter $B35G0:w0z(B + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter $B4X?t:w0z(B + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter $BJQ?t:w0z(B + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-edit-en.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,448 @@ +<!doctype sinfo system> +<!-- $Id: tm-edit-en.sgml,v 1.1 1996/12/22 00:09:32 steve Exp $ --> +<head> +<title>tm-edit 7.90 Reference Manual (English Version) +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/11 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-edit, a MIME composer for GNU Emacs. +</abstract> + + +<h1> What is tm-edit? +<node> Introduction +<p> +<concept>tm-edit</concept> is a general MIME composer for GNU Emacs. +<p> +tm-edit is based on mime.el by UMEDA Masanobu +<mail>umerin@mse.kyutech.ac.jp</mail>, who is famous as the author of +GNUS. tm-edit expands following points from <file>mime.el</file>: + +<ul> +<li> +based on RFC 1521/1522 +<li> +<a file="tm-en" node="Content-Disposition">Content-Disposition +field</a> (RFC 1806) supports +<li> +nested <a file="tm-en" node="multipart">multi-part message</a> +<li> +<dref>PGP</dref> (PGP/MIME (RFC 2015) based on security multipart (RFC +1847) and application/pgp based on traditional PGP) +<li> +strength automatic specification for parameter of file type +</ul> + +<p> +In <dref file="tm-en">tm-MUA</dref>, you can edit MIME message easily +to use tm-edit. + + +<h1> mime/editor-mode +<node> mime/editor-mode +<p> +<concept>mime/editor-mode</concept> is a minor mode to compose MIME +message. In this mode, <concept>tag</concept> represents various +kinds of data, you can edit <a file="tm-en" node="multipart">multi +part</a> message. +<p> +There are 2 kinds of tags: + +<ul> +<li> single-part tag +<li> multi-part tag +</ul> +<p> +single-part tag represents single part, this form is following: + +<verb> + --[[TYPE/SUBTYPE;PARAMETERS][ENCODING] + OPTIONAL-FIELDS] +</verb> +<p> +TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of +<dref file="tm-en">Content-Type field</dref>. TYPE/SUBTYPE is +required, PARAMETERS is optional. +<p> +ENCODING indicates Content-Transfer-Encoding field. It is optional +too. +<p> +OPTIONAL-FIELDS is to represent another fields except Content-Type +field and Content-Transfer-Encoding field. +<p> +multi-part tags represent <a file="tm-en" node="multipart">multi +part</a>. They consist of a pair of <concept>multi-part beginning +tag</concept> and <concept>multi-part ending tag</concept>. +<p> +multi-part beginning tag's form is following: +<p> +<verb> + --<<TYPE>>-{ +</verb> +<p> +multi-part ending tag's form is following: +<p> +<verb> + --}-<<TYPE>> +</verb> +<p> +A region from multi-part beginning tag to multi-part ending tag is +called as <concept>enclosure</concept>. + + +<h1> single-part operations +<node> single-part operations +<p> +Operations to make single-part are following: + +<kl> +<kt>C-c C-x C-t +<kd> +Insert single-part tag indicates text part. +</kd> +<kt>C-c C-x C-i +<kd> +Insert file as a MIME attachment. +</kd> +<kt>C-c C-x C-e +<kd> +Insert external part. +</kd> +<kt>C-c C-x C-v +<kd> +Record audio input until <kbd>C-g</kbd> is pressed, and insert as a +audio part. (It requires /dev/audio in default.) +</kd> +<kt>C-c C-x C-y +<kd> +Insert current (mail or news) message. (It is MUA depended.) +</kd> +<kt>C-c C-x C-m +<kd> +Insert mail message. (It is MUA depended.) +</kd> +<dt><key>C-c C-x C-w</key>, <key>C-c C-x C-s</key> +<dd> +Insert signature. +</dd> +<kt>C-c C-x C-k +<kd> +Insert <dref>PGP</dref> public key. (It requires Mailcrypt package.) +</kd> +<kt>C-c C-x t +<kd> +Insert any single-part tag. +</kd> +</kl> + + +<h1> enclosure operation +<node> enclosure operation +<p> +Operations to make enclosure are following: + +<kl> +<kt>C-c C-x a +<kd> +Enclose specified region as multipart/alternative. +</kd> +<kt>C-c C-x p +<kd> +Enclose specified region as multipart/parallel. +</kd> +<kt>C-c C-x m +<kd> +Enclose specified region as multipart/mixed. +</kd> +<kt>C-c C-x d +<kd> +Enclose specified region as multipart/digest. +</kd> +<kt>C-c C-x s +<kd> +Digital-sign to specified region. <cf node="PGP"> +</kd> +<kt>C-c C-x e +<kd> +Encrypt to specified region. <cf node="PGP"> +<kt>C-c C-x q +<kd> +avoid to encode tags in specified region. In other words, tags is +interpreted as such string. (In current version, it may be +incomplete. Maybe PGP-signature does not work for this enclosure.) +</kl> + + +<h1> other operations of mime/editor-mode +<node> other operations of mime/editor-mode +<p> +There are another operations in mime/editor-mode. + +<kl> +<kt>C-c C-c +<kd> +Send current editing message. +</kd> +<kt>C-c C-x C-p +<kd> +Preview current editing message. (<ref file="tm-view-en" +node="mime/viewer-mode">) +</kd> +<kt>C-c C-x C-z +<kd> +Exit mime/editor-mode. (<key>M-x mime/edit-again</key> is available to +reedit.) +</kd> +<kt>C-c C-x ? +<kd> +Display help message. +</kd> +<kt>C-c C-x / +<kd> +Set current editing message to enable automatic splitting or not. +Form of automatic split messages is message/partial. +</kd> +<kt>C-c C-x 7 +<kd> +Set <dref file="tm-en">7bit</dref> to <dref>transfer level</dref>. +</kd> +<kt>C-c C-x 8 +<kd> +Set <dref file="tm-en">8bit</dref> to <dref>transfer level</dref>. +</kd> +<kt>C-c C-x v +<kd> +Set current editing message to digital-sign or not. <cf node="PGP"> +</kd> +<kt>C-c C-x h +<kd> +Set current editing message to encrypt or not. <cf node="PGP"> +</kl> + + +<h1> transfer level +<node> transfer level +<p> +Contents inserted in a message are represented by <dref +file="tm-en">7bit</dref>, <dref file="tm-en">8bit</dref> or <dref +file="tm-en">binary</dref>. +<p> +If a message is translated by 7bit-through <dref +file="tm-en">MTA</dref>, there is no need to encode 7bit data, but +8bit and binary data must be encoded to 7bit data. +<p> +Similarly, if a message is translated by 8bit-through MTA, there is no +need to encode 7bit or 8bit data, but binary data must be encoded to +7bit or 8bit data. +<p> +<memo> +EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be +encoded by base64. But I don't know EBCDIC. (^_^; +<p> +Similarly, I wish ASCII-printable only MTA and code-conversion MTA +disappeared. (^_^; +<p> +Maybe there are binary-through MTA, but I think it is not major. +</memo> +<p> +<concept>transfer level</concept> represents how range data is +available. tm-edit has a variable +<code>mime-editor/transfer-level</code> to represent transfer level. + + +<defvar name="mime-editor/transfer-level"> +<p> +transfer level. +<p> +If transfer level of a data is over it, a data is encoded to 7bit. +<p> +Currently, 7 or 8 is available. Default value is 7. +<p> +In extension plan, EBCDIC will be 5, ASCII printable only will be 6, +binary will be 9. But it will not be implemented. +</defvar> + + +<memo> +transfer level is only for body, not for <a node="header">header</a>. +RFC 1521 extends <dref file="tm-en">RFC 822</dref> to use 8bit data in +body, but it requires to use <dref file="tm-en">us-ascii</dref> in +header. +</memo> + + +<h1> Using non-ASCII characters in header +<node> header +<p> +<dref file="tm-en">RFC 1522</dref> defines representation of non-ASCII +characters in header. +<p> +It is a format called as <a file="tm-en" +node="encoded-word"><concept>encoded-word</concept></a>, it is +available to represent every non-ASCII characters by <dref +file="tm-en">7bit</dref> to declare <dref file="tm-en">MIME +charset</dref>. + + +<h2> If you can not allow encoded-word +<node> evil setting in header +<p> +It is wrong to use ``raw'' non-ASCII characters in header not to use +encoded-word. Because there are various kinds of <a file="tm-en" +node="Coded character set">coded character set</a> in the Internet, so +we can not distinguish them if <dref file="tm-en">MIME charset</dref> +is not declared. +<p> +For example, we can not distinguish <dref +file="tm-en">iso-8859-1</dref> and <dref +file="tm-en">iso-8859-2</dref> if MIME charset is not declared. +<p> +However you can not permit to use encoded-word, please set to +following variables: + + +<defvar name="mime/field-encoding-method-alist"> +<p> +Association-list to specify field encoding method. Its key is +field-name, value is encoding method. +<p> +field-name allows string or <code>t</code> meaning any fields. +<p> +Encoding method allows following: <code>nil</code> means +no-conversion, <code>mime</code> means to convert as encoded-word, +symbol represent MIME charset means to convert as the coded character +set instead of to convert as encoded-word. +<p> +field-name is searched from string. If it is not found, +<code>t</code> is used. +<p> +Default value of <code>mime/field-encoding-method-alist</code> is +following: + +<lisp> +(("X-Nsubject" . iso-2022-jp-2) + ("Newsgroups" . nil) + (t . mime) + )) +</lisp> +</defvar> + +<p> +In addition, if you want to specify by coded character set instead of +field, please use <code>mime-eword/charset-encoding-alist</code>. +<cf node="API about header"> + + +<h2> Functions and variables about header +<node> API about header +<p> +<define type="Command" name="mime/encode-message-header"> +<opts> code-conversion +<p> +It translate non-ASCII characters in message header of current buffer +into network representation, such as encoded-words. +<p> +If <var>code-conversion</var> is non-<code>nil</code>, field not +encoded by encoded-word is converted by +<code>mime/field-encoding-method-alist</code>. +</define> + +<defun name="mime/encode-field"> +<args> string +<p> +It encodes <var>string</var> into encoded-words as a field. +<p> +Long lines are folded. +</defun> + +<defun name="mime-eword/encode-string"> +<args> string <opts> column mode +<p> +It encodes <var>string</var> into encoded-words. +<p> +Long lines are folded. +<p> +<var>column</var> specifies start column. If it is omitted, 0 is +used. +<p> +<var>mode</var> specifies where <var>string</var> is in. Available +values are <code>text</code>, <code>comment</code>, +<code>phrase</code>. If it is omitted, <code>phrase</code> is used. +</defun> + +<defvar name="mime-eword/charset-encoding-alist"> +<p> +Association-list of symbol represent MIME charset vs. nil, +<code>"B"</code> or <code>"Q"</code>. +<p> +<code>nil</code> means not to encode as encoded-word. +<code>"B"</code> means to use B-encoding. +<code>"Q"</code> means to use Q-encoding. +</defvar> + + +<h1> PGP +<node> PGP +<p> +tm-edit provides PGP encryption, signature and inserting public-key +features based on <a file="tm-en" +node="PGP/MIME"><concept>PGP/MIME</concept></a> (RFC 2015) or <a +file="tm-en" node="PGP-kazu"><concept>PGP-kazu</concept></a> +(draft-kazu-pgp-mime-00.txt). +<p> +This feature requires pgp command and <a file="mailcrypt">Mailcrypt +package</a>. +<p> +If you want to use this feature, please set <code>pgp-elkins</code> or +<code>pgp-kazu</code> to variable +<code>mimed-editor/signing-type</code> and variable +<code>mime-editor/encrypting-type</code>. +<p> +If <code>pgp-elkins</code> is specified, PGP/MIME is used. If +<code>pgp-kazu</code> is specified, PGP-kazu is used. + + +<defvar name="mime-editor/signing-type"> +<p> +Format of PGP signature. +<p> +It allows <code>pgp-elkins</code> or <code>pgp-kazu</code>. +<p> +Default value is <code>nil</code>. +</defvar> + +<defvar name="mime-editor/encrypting-type"> +<p> +Format of PGP encryption. +<p> +It allows <code>pgp-elkins</code> or <code>pgp-kazu</code>. +<p> +Default value is <code>nil</code>. +</defvar> + + +<h1> Concept Index +<node> Concept Index + +<cindex> + + +<h1> Function Index +<node> Function Index + +<findex> + + +<h1> Variable Index +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-edit-en.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,451 @@ +\input texinfo.tex +@setfilename tm-edit-en.info +@settitle{tm-edit 7.90 Reference Manual (English Version)} +@titlepage +@title tm-edit 7.90 Reference Manual (English Version) +@author MORIOKA Tomohiko <morioka@@jaist.ac.jp> +@subtitle 1996/10/11 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-edit 7.90 Reference Manual (English Version) + +@ifinfo + +This file documents tm-edit, a MIME composer for GNU Emacs. +@end ifinfo + +@menu +* Introduction:: What is tm-edit? +* mime/editor-mode:: +* single-part operations:: +* enclosure operation:: +* other operations of mime/editor-mode:: +* transfer level:: +* header:: Using non-ASCII characters in header +* PGP:: +* Concept Index:: +* Function Index:: +* Variable Index:: +@end menu + +@node Introduction, mime/editor-mode, Top, Top +@chapter What is tm-edit? + +@cindex{tm-edit}@strong{tm-edit} is a general MIME composer for GNU +Emacs.@refill + +tm-edit is based on mime.el by UMEDA Masanobu +<umerin@@mse.kyutech.ac.jp>, who is famous as the author of +GNUS. tm-edit expands following points from @file{mime.el}: + +@itemize @bullet +@item +based on RFC 1521/1522 +@item +Content-Disposition field (@ref{(tm-en)Content-Disposition}) (RFC 1806) +supports +@item +nested multi-part message (@ref{(tm-en)multipart}) +@item +PGP (@ref{PGP}) (PGP/MIME (RFC 2015) based on security multipart (RFC +1847) and application/pgp based on traditional PGP) +@item +strength automatic specification for parameter of file type +@end itemize + + +In tm-MUA (@ref{(tm-en)tm-MUA}), you can edit MIME message easily to use +tm-edit. + + +@node mime/editor-mode, single-part operations, Introduction, Top +@chapter mime/editor-mode + +@cindex{mime/editor-mode}@strong{mime/editor-mode} is a minor mode to +compose MIME message. In this mode, @cindex{tag}@strong{tag} represents +various kinds of data, you can edit multi part (@ref{(tm-en)multipart}) +message.@refill + +There are 2 kinds of tags: + +@itemize @bullet +@item + single-part tag +@item + multi-part tag +@end itemize + +single-part tag represents single part, this form is following: + +@example + --[[TYPE/SUBTYPE;PARAMETERS][ENCODING] + OPTIONAL-FIELDS] +@end example + +TYPE/SUBTYPE and PARAMETERS indicates type/subtype and parameters of +Content-Type field (@ref{(tm-en)Content-Type field}). TYPE/SUBTYPE is +required, PARAMETERS is optional.@refill + +ENCODING indicates Content-Transfer-Encoding field. It is optional +too.@refill + +OPTIONAL-FIELDS is to represent another fields except Content-Type field +and Content-Transfer-Encoding field.@refill + +multi-part tags represent multi part (@ref{(tm-en)multipart}). They +consist of a pair of @cindex{multi-part beginning tag}@strong{multi-part +beginning tag} and @cindex{multi-part ending tag}@strong{multi-part +ending tag}.@refill + +multi-part beginning tag's form is following:@refill + +@example + --<<TYPE>>-@{ +@end example + +multi-part ending tag's form is following:@refill + +@example + --@}-<<TYPE>> +@end example + +A region from multi-part beginning tag to multi-part ending tag is +called as @cindex{enclosure}@strong{enclosure}. + + +@node single-part operations, enclosure operation, mime/editor-mode, Top +@chapter single-part operations + +Operations to make single-part are following: + +@table @kbd +@item @key{C-c C-x C-t} +Insert single-part tag indicates text part. + +@item @key{C-c C-x C-i} +Insert file as a MIME attachment. + +@item @key{C-c C-x C-e} +Insert external part. + +@item @key{C-c C-x C-v} +Record audio input until @kbd{C-g} is pressed, and insert as a +audio part. (It requires /dev/audio in default.) + +@item @key{C-c C-x C-y} +Insert current (mail or news) message. (It is MUA depended.) + +@item @key{C-c C-x C-m} +Insert mail message. (It is MUA depended.) + +@item @key{C-c C-x C-w}, @key{C-c C-x C-s} +Insert signature. + +@item @key{C-c C-x C-k} +Insert PGP (@ref{PGP}) public key. (It requires Mailcrypt package.) + +@item @key{C-c C-x t} +Insert any single-part tag. + +@end table + + + +@node enclosure operation, other operations of mime/editor-mode, single-part operations, Top +@chapter enclosure operation + +Operations to make enclosure are following: + +@table @kbd +@item @key{C-c C-x a} +Enclose specified region as multipart/alternative. + +@item @key{C-c C-x p} +Enclose specified region as multipart/parallel. + +@item @key{C-c C-x m} +Enclose specified region as multipart/mixed. + +@item @key{C-c C-x d} +Enclose specified region as multipart/digest. + +@item @key{C-c C-x s} +Digital-sign to specified region. (cf. @ref{PGP}) + +@item @key{C-c C-x e} +Encrypt to specified region. (cf. @ref{PGP}) + +@item @key{C-c C-x q} +avoid to encode tags in specified region. In other words, tags is +interpreted as such string. (In current version, it may be +incomplete. Maybe PGP-signature does not work for this enclosure.) + +@end table + + + +@node other operations of mime/editor-mode, transfer level, enclosure operation, Top +@chapter other operations of mime/editor-mode + +There are another operations in mime/editor-mode. + +@table @kbd +@item @key{C-c C-c} +Send current editing message. + +@item @key{C-c C-x C-p} +Preview current editing message. (@ref{(tm-view-en)mime/viewer-mode}) + +@item @key{C-c C-x C-z} +Exit mime/editor-mode. (@key{M-x mime/edit-again} is available to +reedit.) + +@item @key{C-c C-x ?} +Display help message. + +@item @key{C-c C-x /} +Set current editing message to enable automatic splitting or not. +Form of automatic split messages is message/partial. + +@item @key{C-c C-x 7} +Set 7bit (@ref{(tm-en)7bit}) to transfer level (@ref{transfer level}). + +@item @key{C-c C-x 8} +Set 8bit (@ref{(tm-en)8bit}) to transfer level (@ref{transfer level}). + +@item @key{C-c C-x v} +Set current editing message to digital-sign or not. (cf. @ref{PGP}) + +@item @key{C-c C-x h} +Set current editing message to encrypt or not. (cf. @ref{PGP}) + +@end table + + + +@node transfer level, header, other operations of mime/editor-mode, Top +@chapter transfer level + +Contents inserted in a message are represented by 7bit +(@ref{(tm-en)7bit}), 8bit (@ref{(tm-en)8bit}) or binary +(@ref{(tm-en)binary}).@refill + +If a message is translated by 7bit-through MTA (@ref{(tm-en)MTA}), there +is no need to encode 7bit data, but 8bit and binary data must be encoded +to 7bit data.@refill + +Similarly, if a message is translated by 8bit-through MTA, there is no +need to encode 7bit or 8bit data, but binary data must be encoded to +7bit or 8bit data.@refill + +@noindent +@strong{[Memo]} +@quotation +EBCDIC MTA breaks 7bit data, so in this case, 7bit data must be +encoded by base64. But I don't know EBCDIC. (^_^; + +Similarly, I wish ASCII-printable only MTA and code-conversion MTA +disappeared. (^_^;@refill + +Maybe there are binary-through MTA, but I think it is not major. +@end quotation + +@cindex{transfer level}@strong{transfer level} represents how range data is +available. tm-edit has a variable +@code{mime-editor/transfer-level} to represent transfer level. + + +@defvar mime-editor/transfer-level + +transfer level.@refill + +If transfer level of a data is over it, a data is encoded to +7bit.@refill + +Currently, 7 or 8 is available. Default value is 7.@refill + +In extension plan, EBCDIC will be 5, ASCII printable only will be 6, +binary will be 9. But it will not be implemented. +@end defvar + + + +@noindent +@strong{[Memo]} +@quotation +transfer level is only for body, not for header (@ref{header}). RFC +1521 extends RFC 822 (@ref{(tm-en)RFC 822}) to use 8bit data in body, +but it requires to use us-ascii (@ref{(tm-en)us-ascii}) in header. +@end quotation + + + +@node header, PGP, transfer level, Top +@chapter Using non-ASCII characters in header + +RFC 1522 (@ref{(tm-en)RFC 1522}) defines representation of non-ASCII +characters in header.@refill + +It is a format called as @cindex{encoded-word}@strong{encoded-word} +(@ref{(tm-en)encoded-word}), it is available to represent every +non-ASCII characters by 7bit (@ref{(tm-en)7bit}) to declare MIME charset +(@ref{(tm-en)MIME charset}). + + +@menu +* evil setting in header:: If you can not allow encoded-word +* API about header:: Functions and variables about header +@end menu + +@node evil setting in header, API about header, header, header +@section If you can not allow encoded-word + +It is wrong to use ``raw'' non-ASCII characters in header not to use +encoded-word. Because there are various kinds of coded character set +(@ref{(tm-en)Coded character set}) in the Internet, so we can not +distinguish them if MIME charset (@ref{(tm-en)MIME charset}) is not +declared.@refill + +For example, we can not distinguish iso-8859-1 (@ref{(tm-en)iso-8859-1}) +and iso-8859-2 (@ref{(tm-en)iso-8859-2}) if MIME charset is not +declared.@refill + +However you can not permit to use encoded-word, please set to +following variables: + + +@defvar mime/field-encoding-method-alist + +Association-list to specify field encoding method. Its key is +field-name, value is encoding method.@refill + +field-name allows string or @code{t} meaning any fields.@refill + +Encoding method allows following: @code{nil} means no-conversion, +@code{mime} means to convert as encoded-word, symbol represent MIME +charset means to convert as the coded character set instead of to +convert as encoded-word.@refill + +field-name is searched from string. If it is not found, @code{t} is +used.@refill + +Default value of @code{mime/field-encoding-method-alist} is +following: + +@lisp +(("X-Nsubject" . iso-2022-jp-2) + ("Newsgroups" . nil) + (t . mime) + )) +@end lisp +@end defvar + + +In addition, if you want to specify by coded character set instead of +field, please use @code{mime-eword/charset-encoding-alist}. +(cf. @ref{API about header}) + + + +@node API about header, , evil setting in header, header +@section Functions and variables about header + +@deffn{Command} mime/encode-message-header &optional code-conversion + +It translate non-ASCII characters in message header of current buffer +into network representation, such as encoded-words.@refill + +If @var{code-conversion} is non-@code{nil}, field not encoded by +encoded-word is converted by @code{mime/field-encoding-method-alist}. +@end deffn + + +@defun mime/encode-field string + +It encodes @var{string} into encoded-words as a field.@refill + +Long lines are folded. +@end defun + + +@defun mime-eword/encode-string string &optional column mode + +It encodes @var{string} into encoded-words.@refill + +Long lines are folded.@refill + +@var{column} specifies start column. If it is omitted, 0 is +used.@refill + +@var{mode} specifies where @var{string} is in. Available values are +@code{text}, @code{comment}, @code{phrase}. If it is omitted, +@code{phrase} is used. +@end defun + + +@defvar mime-eword/charset-encoding-alist + +Association-list of symbol represent MIME charset vs. nil, @code{"B"} or +@code{"Q"}.@refill + +@code{nil} means not to encode as encoded-word. @code{"B"} means to use +B-encoding. @code{"Q"} means to use Q-encoding. +@end defvar + + + +@node PGP, Concept Index, header, Top +@chapter PGP + +tm-edit provides PGP encryption, signature and inserting public-key +features based on @cindex{PGP/MIME}@strong{PGP/MIME} +(@ref{(tm-en)PGP/MIME}) (RFC 2015) or @cindex{PGP-kazu}@strong{PGP-kazu} +(@ref{(tm-en)PGP-kazu}) (draft-kazu-pgp-mime-00.txt).@refill + +This feature requires pgp command and Mailcrypt package +(@ref{(mailcrypt)}).@refill + +If you want to use this feature, please set @code{pgp-elkins} or +@code{pgp-kazu} to variable @code{mimed-editor/signing-type} and +variable @code{mime-editor/encrypting-type}.@refill + +If @code{pgp-elkins} is specified, PGP/MIME is used. If +@code{pgp-kazu} is specified, PGP-kazu is used. + + +@defvar mime-editor/signing-type + +Format of PGP signature.@refill + +It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill + +Default value is @code{nil}. +@end defvar + + +@defvar mime-editor/encrypting-type + +Format of PGP encryption.@refill + +It allows @code{pgp-elkins} or @code{pgp-kazu}.@refill + +Default value is @code{nil}. +@end defvar + + + +@node Concept Index, Function Index, PGP, Top +@chapter Concept Index + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter Function Index + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter Variable Index + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-edit-ja.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,467 @@ +<!doctype sinfo system> +<!-- $Id: tm-edit-ja.sgml,v 1.1 1996/12/22 00:09:32 steve Exp $ --> +<head> +<title>tm-edit 7.90 $B@bL@=q!JF|K\8lHG!K(B +<author>$B<i2,(B $BCNI'(B <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/11 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-edit, a MIME composer for GNU Emacs. +<p> +GNU Emacs $BMQ$N(B MIME composer $B$G$"$k(B `tm-edit' $B$K$D$$$F@bL@$7$^$9!#(B +</abstract> + + +<h1> What is tm-edit? +<node> Introduction +<p> +<concept>tm-edit</concept> $B$O(B GNU Emacs $B$GF0:n$9$kHFMQE*$J(B MIME +composer $B$G$9!#(B +<p> +tm-edit $B$O(B GNUS $B$N:n<T$H$7$F$bM-L>$J(B $BG_ED(B $B@/?.(B +<mail>umerin@mse.kyutech.ac.jp</mail> $B$5$s$,=q$+$l$?(B +<file>mime.el</file> $B$r4p$K(B + +<ul> +<li> +RFC 1521/1522 $B2=(B +<li> +<a file="tm-ja" node="Content-Disposition">Content-Disposition +field</a> (RFC 1806) $B$NMxMQ(B +<li> +$BF~$l;R$K$J$C$?(B <a file="tm-ja" node="multipart">multi-part message</a> +<li> +<dref>PGP</dref> +<li> +file type $B$K$*$1$k(B parameter $B$N<+F0;XDj$N6/2=(B +</ul> + +<noindent> +$B$J$I$N2~NI$r9T$$$^$7$?!#(B +<p> +<dref file="tm-ja">tm-MUA</dref> $B$G$O(B tm-edit $B$r;H$&$3$H$K$h$j!"MF0W$K(B +MIME message $B$r:n@.$G$-$^$9!#(B + + +<h1> mime/editor-mode +<node> mime/editor-mode +<p> +<concept>mime/editor-mode</concept> $B$O(B MIME message $B$r:n@.$9$k$?$a$N(B +minor mode $B$G$9!#$3$N(B mode $B$G$O(B <concept>tag</concept> $B$r;H$C$F$5$^$6(B +$B$^$J<oN`$N(B data $B$rI=8=$7!"(B<a file="tm-ja" node="multipart">$BJ#?t$NItJ,(B +$B$+$i$J$k(B message</a> $B$rJT=8$9$k$3$H$r2DG=$K$7$F$$$^$9!#(B +<p> +tag $B$K$O(B + +<ul> +<li> single-part tag +<li> multi-part tag +</ul> + +<noindent> +$B$N#2$D$,$"$j$^$9!#(B +<p> +single-part tag $B$O(B single part $B$rI=8=$9$k$?$a$N(B tag $B$G!"(B +<p> +<verb> + --[[TYPE/SUBTYPE;PARAMETERS][ENCODING] + OPTIONAL-FIELDS] +</verb> +<p> +<noindent> +$B$H$$$&$h$&$J7A$r$7$F$$$^$9!#(B +<p> +TYPE/SUBTYPE $B$*$h$S(B PARAMETERS $B$O(B <dref file="tm-ja">Content-Type +field</dref> $B$N(B type/subtype $B$*$h$S(B parameters $B$rI=$7$^$9!#(B +TYPE/SUBTYPE $B$OI,?\$G$"$j!"(BPARAMETERS $B$O>JN,2D$G$9!#(B +<p> +ENCODING $B$O(B Content-Transfer-Encoding field $B$rI=$7$^$9!#$3$l$b>JN,2D$G(B +$B$9!#(B +<p> +OPTIONAL-FIELDS $B$O(B Content-Type, Content-Transfer-Encoding $B0J30$N(B +field $B$r=q$/$?$a$NItJ,$G!">JN,2D$G$9!#(B +<p> +multi-part tag $B$O(B <a file="tm-ja" node="multipart">multi part</a> $B$rI=(B +$B8=$9$k$?$a$N(B tag $B$G!"(B +<p> +<verb> + --<<TYPE>>-@{ +</verb> +<p> +<noindent> +$B$H$$$&7A$N(B <concept>multi-part $B3+;O(B tag</concept> $B$H8F$P$l$k(B multi +part $B$N3+;O$r<($9(B tag $B$H(B +<p> +<verb> + --@}-<<TYPE>> +</verb> +<p> +<noindent> +$B$H$$$&7A$N(B <concept>multi-part $B=*N;(B tag</concept> $B$H8F$P$l$k(B multi +part $B$N=*N;$r<($9(B tag $B$,$"$j$^$9!#(B +<p> +$B$^$?!"(Bmulti-part $B3+;O(B tag $B$H(B multi-part $B=*N;(B tag $B$G0O$^$l$?ItJ,$r(B +<concept>enclosure</concept> $B$H8F$S$^$9!#(B + + +<h1> single-part $B$KBP$9$kA`:n(B +<node> single-part operations +<p> +single-part $B$r:n$k$?$a$NA`:n$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B + +<kl> +<kt>C-c C-x C-t +<kd> +text part $B$rI=$9(B single-part tag $B$rA^F~$7$^$9!#(B +</kd> +<kt>C-c C-x C-i +<kd> +file $B$r(B MIME part $B$H$7$FE:IU$7$^$9!#(B +</kd> +<kt>C-c C-x C-e +<kd> +external part $B$rA^F~$7$^$9!#(B +</kd> +<kt>C-c C-x C-v +<kd> +<kbd>C-g</kbd> $B$,2!$5$l$k$^$GO?2;$r9T$$!"2;@<(B part $B$rA^F~$7$^$9!#!J;H(B +$BMQ$G$-$J$$>l9g$,$"$j$^$9!K(B +</kd> +<kt>C-c C-x C-y +<kd> +$B8=:_I=<(Cf$N(B (mail or news) message $B$rA^F~$7$^$9!#!J<B:]$NF0:n$O;HMQ$7(B +$B$F$$$k(B MUA $B$K0MB8$7$^$9!K(B +</kd> +<kt>C-c C-x C-m +<kd> +mail message $B$rA^F~$7$^$9!#(B +</kd> +<dt><key>C-c C-x C-w</key>, <key>C-c C-x C-s</key> +<dd> +signature $B$rA^F~$7$^$9!#(B +</dd> +<kt>C-c C-x C-k +<kd> +<dref>PGP</dref> $B$N8x3+80$rA^F~$7$^$9!#(B +</kd> +<kt>C-c C-x t +<kd> +$BG$0U$N(B single-part tag $B$rA^F~$7$^$9!#(B +</kl> + + +<h1> enclosure $B$KBP$9$kA`:n(B +<node> enclosure operation +<p> +enclosure $B$r:n$k$?$a$NA`:n$H$7$F$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B + +<kl> +<kt>C-c C-x a +<kd> +$B;XDj$7$?(B region $B$r(B multipart/alternative $B$H$7$F0O$_$^$9!#(B +</kd> +<kt>C-c C-x p +<kd> +$B;XDj$7$?(B region $B$r(B multipart/parallel $B$H$7$F0O$_$^$9!#(B +</kd> +<kt>C-c C-x m +<kd> +$B;XDj$7$?(B region $B$r(B multipart/mixed $B$H$7$F0O$_$^$9!#(B +</kd> +<kt>C-c C-x d +<kd> +$B;XDj$7$?(B region $B$r(B multipart/digest $B$H$7$F0O$_$^$9!#(B +</kd> +<kt>C-c C-x s +<kd> +$B;XDj$7$?(B region $B$KEE;R=pL>$r9T$$$^$9!#(B(<ref node="PGP">) +</kd> +<kt>C-c C-x e +<kd> +$B;XDj$7$?(B region $B$r0E9f2=$7$^$9!#(B(<ref node="PGP">) +<kt>C-c C-x q +<kd> +$B;XDj$7$?(B region $BFb$N(B tag $B$rL58z$K$7!"$=$N(B tag $B$rJ8;zNs$H$7$FMxMQ$G$-$k(B +$B$h$&$K$7$^$9!#!J8=:_$NHG$G$O$&$^$/F/$+$J$$$3$H$,$"$j$^$9!#$^$?!"EE;R=p(B +$BL>$H$NJ;MQ$K4X$7$F$bIT40A4$G$9!K(B +</kl> + + +<h1> mime/editor-mode $B$K$*$1$k$=$NB>$NA`:n(B +<node> other operations of mime/editor-mode +<p> +mime/editor-mode $B$K$*$1$k$=$NB>$NA`:n$r@bL@$7$^$9!#(B + +<kl> +<kt>C-c C-c +<kd> +$BJT=8Cf$N(B message $B$rAw?.$7$^$9!#(B +</kd> +<kt>C-c C-x C-p +<kd> +$BJT=8Cf$N(B message $B$r(B preview $B$7$^$9!#(B(<ref file="tm-view-ja" +node="mime/viewer-mode">) +</kd> +<kt>C-c C-x C-z +<kd> +$BJT=8Cf$N(B message $B$rAw?.$9$k$3$H$J$/!"(Bmime/editor-mode $B$r=*N;$7$^$9!#(B +</kd> +<kt>C-c C-x ? +<kd> +help message $B$rI=<($7$^$9!#(B +</kd> +<kt>C-c C-x / +<kd> +$BBg$-$J(B message $B$rAw?.$9$k>l9g$K(B message/partial $B7A<0$K<+F0J,3d2DG=$H$9(B +$B$k$+$I$&$+$r7h$a$^$9!#(B +</kd> +<kt>C-c C-x 7 +<kd> +<dref>transfer level</dref> $B$r(B <dref file="tm-ja">7bit</dref> $B$K$7$^$9!#(B +</kd> +<kt>C-c C-x 8 +<kd> +<dref>transfer level</dref> $B$r(B <dref file="tm-ja">8bit</dref> $B$K$7$^$9!#(B +</kd> +<kt>C-c C-x v +<kd> +message $BA4BN$rEE;R=pL>$9$k$+$I$&$+$r7h$a$^$9!#(B(<ref node="PGP">) +</kd> +<kt>C-c C-x h +<kd> +message $BA4BN$r0E9f2=$9$k$+$I$&$+$r7h$a$^$9!#(B(<ref node="PGP">) +<kt>C-c C-x ? +<kd> +help message $B$rI=<($7$^$9!#(B +</kl> + + +<h1> transfer level +<node> transfer level +<p> +message $B$KA^F~$9$k(B data $B$O(B <dref file="tm-ja">7bit</dref> $B$J$$$7(B <dref +file="tm-ja">8bit</dref> $B$b$7$/$O(B <dref file="tm-ja">binary</dref> $B$G(B +$BI=8=$9$k$3$H$,$G$-$^$9!#(B +<p> +$B$h$C$F!"(B7bit $B$7$+DL$5$J$$(B <dref file="tm-ja">MTA</dref> $B$r7PM3$9$k>l9g!"(B +7bit $B$N(B data $B$O$=$N$^$^$GAw$l$^$9$,!"(B8bit $B$d(B binary $B$N(B data $B$O(B 7bit $B$K(B +$BJQ49$7$J$1$l$P$J$j$^$;$s!#(B +<p> +$BF1MM$K!"(B8bit $B$7$+DL$5$J$$(B MTA $B$r7PM3$9$k>l9g!"(B7bit $B$d(B 8bit $B$N(B data $B$O(B +$B$=$N$^$^$GAw$l$^$9$,!"(Bbinary $B$N(B data $B$O(B 7bit $B$+(B 8bit $B$KJQ49$7$J$1$l$P(B +$B$J$j$^$;$s!#(B +<p> +<memo> +EBCDIC $B$7$+DL$5$J$$(B MTA $B$r7PM3$9$k>l9g!"(B7bit $B$N(B data $B$b(B base64 $BEy$GJQ(B +$B49$7$J$$$HAw$l$^$;$s$,!";d$O(B EBCDIC $B$N$3$H$^$G$OCN$j$^$;$s!#(B(^_^; +<p> +$BF1MM$K!"@)8fJ8;z$rDL$5$J$$(B MTA $B$N$3$H$d(B code $BJQ49$r9T$J$&(B MTA $B$b>C$($F(B +$B$J$/$J$C$FM_$7$$$G$9!#(B(^_^; +<p> +binary $B$bDL$9(B MTA $B$bB8:_$9$k$s$G$7$g$&$,!":#$N$H$3$m$"$^$j0lHLE*$H$O$$(B +$B$($J$$$G$7$g$&!#(B +</memo> +<p> +<concept>transfer level</concept> $B$H$$$&$N$O$I$NHO0O$N(B data $B$^$GAw$l$k(B +$B$+$H$$$&$3$H$rI=$9$b$N$G$9!#(Btm-edit $B$O(B +<code>mime-editor/transfer-level</code> $B$H$$$&JQ?t$r;}$C$F$*$j!"$3$l$G(B +transfer level $B$rI=8=$7$^$9!#(B + + +<defvar name="mime-editor/transfer-level"> +<p> +transfer level $B$rI=$9!#(B +<p> +$B$"$k(B data $B$N(B transfer level $B$,$3$NCM$r1[$($k>l9g!"(B7bit data $B$X$NJQ49$,(B +$B9T$o$l$k!#(B +<p> +$B8=:_$N$H$3$m!"(B7 $B$+(B 8 $B$,M-8z$G$"$k!#4{DjCM$O(B 7 $B$G$"$k!#(B +<p> +EBCDIC $B$r(B 5, ASCII printable $B$N$_$r(B 6, binary $B$r(B 9 $B$H$9$k$3$H$r7W2h$7(B +$B$F$$$k$,!"<BAu$NM=Dj$O$J$$!#(B +</defvar> + + +<memo> +transfer level $B$O(B <a node="header">message header</a> $B$K$O4X78$7$J$$!#(B +RFC 1521 $B$O(B body $B$K$*$$$F!"(B8bit $B$N(B data $B$r;H$($k$h$&$K(B <dref +file="tm-ja">RFC 822</dref> $B$r3HD%$7$F$$$k$,!"(Bmessage header $B$G$O(B +<dref file="tm-ja">us-ascii</dref> $B$N$_$rMQ$$$k$3$H$r5a$a$F$$$k!#(B +</memo> + + +<h1> header $B$G$NHs(B ASCII $BJ8;z$N;HMQ(B<node> header +<p> +<dref file="tm-ja">RFC 1522</dref> $B$G$O(B header $B$GHs(B ASCII $BJ8;z$rI=8=$9(B +$B$k$?$a$NJ}K!$rDj5A$7$F$$$^$9!#(B +<p> +$B$3$l$O(B <a file="tm-ja" +node="encoded-word"><concept>encoded-word</concept></a> $B$H8F$P$l$k7?<0(B +$B$G!"(B<dref file="tm-ja">MIME charset</dref> $B$r@k8@$7!"$+$D!"(B<dref +file="tm-ja">7bit</dref> $B$GI=8=$9$k$3$H$r2DG=$K$7$F$$$^$9!#(B + + +<h2> $B$I$&$7$F$b(B encoded-word $B$r;H$$$?$/$J$$>l9g(B +<node> evil setting in header +<p> +$B$H$3$m$G!"(Bheader $B$G(B encoded-word $B$rMQ$$$:$K@8$GHs(B ASCII $BJ8;zNs$rF~$l$k(B +$B$N$O4V0c$C$F$$$^$9!#$J$<$J$i!"(BInternet $B$G$O$5$^$6$^$J(B<a file="tm-ja" +node="Coded character set">$BId9f2=J8;z=89g(B</a>$B$,;H$o$l$F$*$j!"(B<dref +file="tm-ja">MIME charset</dref> $B$rL@<(E*$K@k8@$7$J$1$l$P$=$l$i$r@53N(B +$B$K6hJL$9$k$3$H$O$G$-$J$$$+$i$G$9!#(B +<p> +$BNc$($P!"(BMIME charset $B$r@k8@$7$J$1$l$P(B <dref +file="tm-ja">iso-8859-1</dref> $B$H(B <dref file="tm-ja">iso-8859-2</dref> +$B$O8+J,$1$,IU$+$J$$$G$7$g$&!#(B +<p> +$B$7$+$7$J$,$i!"$I$&$7$F$b(B encoded-word $B$r;H$$$?$/$J$$>l9g$K$O0J2<$NJQ?t(B +$B$r@_Dj$7$F$/$@$5$$!#(B + + +<defvar name="mime/field-encoding-method-alist"> +<p> +field $BL>$HId9f2=K!$rI=$9(B symbol $B$NBP$+$i$J$kO"A[(B list. +<p> +field $BL>$OJ8;zNs!"$b$7$/$O!"G$0U$NJ8;zNs$rI=$9(B <code>t</code> $B$G$"$k!#(B +<p> +$BId9f2=K!$O!"(B<code>nil</code> $B$J$i$PL5JQ49!"(B<code>mime</code> $B$J$i$P(B +encoded-word, MIME charset $B$rI=$9(B symbol $B$J$i$P$=$NId9f2=J8;z=89g$X(B +encoded-word $B$rMQ$$$:$KJQ49$9$k$3$H$rI=$9!#(B +<p> +field $BL>$OJ8;zNs$+$i8!:w$5$l!";XDj$7$?J8;zNs$,8+IU$+$i$J$1$l$P(B +<code>t</code> $B$rMQ$$$k!#(B +<p> +$B4{DjCM$O(B + +<lisp> +(("X-Nsubject" . iso-2022-jp-2) + ("Newsgroups" . nil) + (t . mime) + )) +</lisp> + +<noindent> +$B$G$"$k!#B($A!"(BX-Nsubject field $B$O@8$N(B <dref +file="tm-ja">iso-2022-jp-2</dref>, Newsgroup $B$OL5JQ49!"$=$l0J30$N(B +field $B$O(B encoded-word $B$KJQ49$5$l$k!#(B +</defvar> + +<p> +$B$^$?!"(Bfield $BKh$G$O$J$/!"Id9f2=J8;z=89gKh$K;XDj$7$?$$>l9g$O!"JQ?t(B +<code>mime-eword/charset-encoding-alist</code> $B$rMQ$$$F$/$@$5$$!#(B +(<ref node="API about header">) + + +<h2> header $B$K4X$9$k4X?t!&JQ?t(B +<node> API about header +<p> +<define type="Command" name="mime/encode-message-header"> +<opts> code-conversion +<p> +Current buffer $B$N(B message header $B$KB8:_$9$kHs(B ASCII $BJ8;z$r(B +network $BI=8=$KJQ49$7$^$9!#(B +<p> +optional $B0z?t$N(B <var>code-conversion</var> $B$KHs(B-nil $B$,;XDj$5$l$?>l9g!"(B +encoded-word $B$K$7$J$$(B field $B$r(B +<code>mime/field-encoding-method-alist</code> $B$K=>$C$F!"(Bcode $BJQ49$7$^(B +$B$9!#(B +</define> + +<defun name="mime/encode-field"> +<args> string +<p> +<var>string</var> $B$r(B field $B$H$7$F(B encoded-word $B$KJQ49$7$^$9!#(B +<p> +$BD9$$9T$O(B RFC 822 $B$K=>$C$F@^JV$5$l$^$9!#(B +</defun> + +<defun name="mime-eword/encode-string"> +<args> string <opts> column mode +<p> +<var>string</var> $B$r(B encoded-word $B$KJQ49$7$^$9!#(B +<p> +$BD9$$9T$O(B RFC 822 $B$K=>$C$F@^JV$5$l$^$9!#(B +<p> +<var>column</var> $B$O$3$NJ8;zNs$,2?7eL\$+$i;O$^$C$F$$$k$+$r;XDj$7$^$9!#(B +$B4{DjCM$O(B 0 $B$G$9!#(B +<p> +<var>mode</var> $B$O$3$NJ8;zNs$,$I$&$$$&ItJ,$G;H$o$l$F$$$k$+$r<($7$^$9!#(B +$B;XDj$G$-$kCM$H$7$F$O(B <code>text</code>, <code>comment</code>, +<code>phrase</code> $B$,$"$j$^$9!#4{DjCM$O(B <code>phrase</code> $B$G$9!#(B +</defun> + +<defvar name="mime-eword/charset-encoding-alist"> +<p> +MIME charset $B$rI=$9(B symbol $B$H(B nil, $B$b$7$/$O!"(B<code>"B"</code> $B$+(B +<code>"Q"</code> $B$NJ8;zNs$NBP$+$i$J$kO"A[(B list. +<p> +<code>nil</code> $B$O$=$N(B MIME charset $B$r(B encoded-word $B$K$7$J$$$3$H$rI=(B +$B$7!"(B<code>"B"</code> $B$O$=$N(B MIME charset $B$r(B B $BJ}<0$N(B encoded-word $B$K$9(B +$B$k$3$H$rI=$7!"(B<code>"Q"</code> $B$O$=$N(B MIME charset $B$r(B Q $BJ}<0$N(B +encoded-word $B$K$9$k$3$H$rI=$9!#(B +</defvar> + + +<h1> PGP +<node> PGP +<p> +tm-edit $B$G$O(B <a file="tm-ja" +node="PGP/MIME"><concept>PGP/MIME</concept></a> (RFC 2015) $B$*$h$S(B <a +file="tm-ja" node="PGP-kazu"><concept>PGP-kazu</concept></a> +(draft-kazu-pgp-mime-00.txt) $B$K$h$k0E9f2=!&EE;R=pL>!&8x3+80$NA^F~5!G=(B +$B$rMxMQ$9$k$3$H$,$G$-$^$9!#(B +<p> +$BC"$7!"$3$N5!G=$rMxMQ$9$k$K$O(B <a file="mailcrypt">Mailcrypt package</a> +$B$H(B pgp command $B$,I,MW$G$9!#(B +<p> +$B$^$?!"JQ?t(B <code>mimed-editor/signing-type</code> $B$HJQ?t(B +<code>mime-editor/encrypting-type</code> $B$K(B <code>pgp-elkins</code> $B$+(B +<code>pgp-kazu</code> $B$rBeF~$7$F$/$@$5$$!#(B +<p> +<code>pgp-elkins</code> $B$r;XDj$7$?>l9g(B PGP/MIME $B$,;H$o$l!"(B +<code>pgp-kazu</code> $B$r;XDj$7$?>l9g(B PGP-kazu $B$,;H$o$l$^$9!#(B + + +<defvar name="mimed-editor/signing-type"> +<p> +PGP $B$G$NEE;R=qL>$N7A<0$r;XDj$7$^$9!#(B +<p> +<code>pgp-elkins</code> $B$+(B <code>pgp-kazu</code> $B$r;XDj$7$F$/$@$5$$!#(B +<p> +$B4{DjCM$O(B <code>nil</code> $B$G$9!#(B +</defvar> + +<defvar name="mime-editor/encrypting-type"> +<p> +PGP $B$G$N0E9f2=$N7A<0$r;XDj$7$^$9!#(B +<p> +<code>pgp-elkins</code> $B$+(B <code>pgp-kazu</code> $B$r;XDj$7$F$/$@$5$$!#(B +<p> +$B4{DjCM$O(B <code>nil</code> $B$G$9!#(B +</defvar> + + +<h1> $B35G0:w0z(B +<node> Concept Index + +<cindex> + + +<h1> $B4X?t:w0z(B +<node> Function Index + +<findex> + + +<h1> $BJQ?t:w0z(B +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-edit-ja.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,473 @@ +\input texinfo.tex +@setfilename tm-edit-ja.info +@settitle{tm-edit 7.90 $B@bL@=q!JF|K\8lHG!K(B} +@titlepage +@title tm-edit 7.90 $B@bL@=q!JF|K\8lHG!K(B +@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp> +@subtitle 1996/10/11 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-edit 7.90 $B@bL@=q!JF|K\8lHG!K(B + +@ifinfo + +This file documents tm-edit, a MIME composer for GNU Emacs.@refill + +GNU Emacs $BMQ$N(B MIME composer $B$G$"$k(B `tm-edit' $B$K$D$$$F@bL@$7$^$9!#(B +@end ifinfo + +@menu +* Introduction:: What is tm-edit? +* mime/editor-mode:: +* single-part operations:: single-part $B$KBP$9$kA`:n(B +* enclosure operation:: enclosure $B$KBP$9$kA`:n(B +* other operations of mime/editor-mode:: mime/editor-mode $B$K$*$1$k$=$NB>$NA`:n(B +* transfer level:: +* header:: header $B$G$NHs(B ASCII $BJ8;z$N;HMQ(B +* PGP:: +* Concept Index:: $B35G0:w0z(B +* Function Index:: $B4X?t:w0z(B +* Variable Index:: $BJQ?t:w0z(B +@end menu + +@node Introduction, mime/editor-mode, Top, Top +@chapter What is tm-edit? + +@cindex{tm-edit}@strong{tm-edit} $B$O(B GNU Emacs $B$GF0:n$9$kHFMQE*$J(B MIME +composer $B$G$9!#(B@refill + +tm-edit $B$O(B GNUS $B$N:n<T$H$7$F$bM-L>$J(B $BG_ED(B $B@/?.(B +<umerin@@mse.kyutech.ac.jp> $B$5$s$,=q$+$l$?(B +@file{mime.el} $B$r4p$K(B + +@itemize @bullet +@item +RFC 1521/1522 $B2=(B +@item +Content-Disposition field (@ref{(tm-ja)Content-Disposition}) (RFC 1806) +$B$NMxMQ(B +@item +$BF~$l;R$K$J$C$?(B multi-part message (@ref{(tm-ja)multipart}) +@item +PGP (@ref{PGP}) +@item +file type $B$K$*$1$k(B parameter $B$N<+F0;XDj$N6/2=(B +@end itemize + +@noindent +$B$J$I$N2~NI$r9T$$$^$7$?!#(B + +tm-MUA (@ref{(tm-ja)tm-MUA}) $B$G$O(B tm-edit $B$r;H$&$3$H$K$h$j!"MF0W$K(B MIME +message $B$r:n@.$G$-$^$9!#(B + + +@node mime/editor-mode, single-part operations, Introduction, Top +@chapter mime/editor-mode + +@cindex{mime/editor-mode}@strong{mime/editor-mode} $B$O(B MIME message $B$r:n(B +$B@.$9$k$?$a$N(B minor mode $B$G$9!#$3$N(B mode $B$G$O(B @cindex{tag}@strong{tag} $B$r(B +$B;H$C$F$5$^$6$^$J<oN`$N(B data $B$rI=8=$7!"J#?t$NItJ,$+$i$J$k(B message +(@ref{(tm-ja)multipart}) $B$rJT=8$9$k$3$H$r2DG=$K$7$F$$$^$9!#(B@refill + +tag $B$K$O(B + +@itemize @bullet +@item + single-part tag +@item + multi-part tag +@end itemize + +@noindent +$B$N#2$D$,$"$j$^$9!#(B + +single-part tag $B$O(B single part $B$rI=8=$9$k$?$a$N(B tag $B$G!"(B@refill + +@example + --[[TYPE/SUBTYPE;PARAMETERS][ENCODING] + OPTIONAL-FIELDS] +@end example + +@noindent +$B$H$$$&$h$&$J7A$r$7$F$$$^$9!#(B + +TYPE/SUBTYPE $B$*$h$S(B PARAMETERS $B$O(B Content-Type field +(@ref{(tm-ja)Content-Type field}) $B$N(B type/subtype $B$*$h$S(B parameters $B$rI=(B +$B$7$^$9!#(BTYPE/SUBTYPE $B$OI,?\$G$"$j!"(BPARAMETERS $B$O>JN,2D$G$9!#(B@refill + +ENCODING $B$O(B Content-Transfer-Encoding field $B$rI=$7$^$9!#$3$l$b>JN,2D$G$9!#(B +@refill + +OPTIONAL-FIELDS $B$O(B Content-Type, Content-Transfer-Encoding $B0J30$N(B field +$B$r=q$/$?$a$NItJ,$G!">JN,2D$G$9!#(B@refill + +multi-part tag $B$O(B multi part (@ref{(tm-ja)multipart}) $B$rI=8=$9$k$?$a$N(B +tag $B$G!"(B@refill + +@example + --<<TYPE>>-@@@{ +@end example + +@noindent +$B$H$$$&7A$N(B @cindex{multi-part $B3+;O(B tag}@strong{multi-part $B3+;O(B tag} $B$H8F$P$l$k(B multi +part $B$N3+;O$r<($9(B tag $B$H(B + +@example + --@@@}-<<TYPE>> +@end example + +@noindent +$B$H$$$&7A$N(B @cindex{multi-part $B=*N;(B tag}@strong{multi-part $B=*N;(B tag} $B$H8F$P$l$k(B multi +part $B$N=*N;$r<($9(B tag $B$,$"$j$^$9!#(B + +$B$^$?!"(Bmulti-part $B3+;O(B tag $B$H(B multi-part $B=*N;(B tag $B$G0O$^$l$?ItJ,$r(B +@cindex{enclosure}@strong{enclosure} $B$H8F$S$^$9!#(B + + +@node single-part operations, enclosure operation, mime/editor-mode, Top +@chapter single-part $B$KBP$9$kA`:n(B + +single-part $B$r:n$k$?$a$NA`:n$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B + +@table @kbd +@item @key{C-c C-x C-t} +text part $B$rI=$9(B single-part tag $B$rA^F~$7$^$9!#(B + +@item @key{C-c C-x C-i} +file $B$r(B MIME part $B$H$7$FE:IU$7$^$9!#(B + +@item @key{C-c C-x C-e} +external part $B$rA^F~$7$^$9!#(B + +@item @key{C-c C-x C-v} +@kbd{C-g} $B$,2!$5$l$k$^$GO?2;$r9T$$!"2;@<(B part $B$rA^F~$7$^$9!#!J;H(B +$BMQ$G$-$J$$>l9g$,$"$j$^$9!K(B + +@item @key{C-c C-x C-y} +$B8=:_I=<(Cf$N(B (mail or news) message $B$rA^F~$7$^$9!#!J<B:]$NF0:n$O;HMQ$7(B +$B$F$$$k(B MUA $B$K0MB8$7$^$9!K(B + +@item @key{C-c C-x C-m} +mail message $B$rA^F~$7$^$9!#(B + +@item @key{C-c C-x C-w}, @key{C-c C-x C-s} +signature $B$rA^F~$7$^$9!#(B + +@item @key{C-c C-x C-k} +PGP (@ref{PGP}) $B$N8x3+80$rA^F~$7$^$9!#(B + +@item @key{C-c C-x t} +$BG$0U$N(B single-part tag $B$rA^F~$7$^$9!#(B + +@end table + + + +@node enclosure operation, other operations of mime/editor-mode, single-part operations, Top +@chapter enclosure $B$KBP$9$kA`:n(B + +enclosure $B$r:n$k$?$a$NA`:n$H$7$F$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B + +@table @kbd +@item @key{C-c C-x a} +$B;XDj$7$?(B region $B$r(B multipart/alternative $B$H$7$F0O$_$^$9!#(B + +@item @key{C-c C-x p} +$B;XDj$7$?(B region $B$r(B multipart/parallel $B$H$7$F0O$_$^$9!#(B + +@item @key{C-c C-x m} +$B;XDj$7$?(B region $B$r(B multipart/mixed $B$H$7$F0O$_$^$9!#(B + +@item @key{C-c C-x d} +$B;XDj$7$?(B region $B$r(B multipart/digest $B$H$7$F0O$_$^$9!#(B + +@item @key{C-c C-x s} +$B;XDj$7$?(B region $B$KEE;R=pL>$r9T$$$^$9!#(B(@ref{PGP}) + +@item @key{C-c C-x e} +$B;XDj$7$?(B region $B$r0E9f2=$7$^$9!#(B(@ref{PGP}) + +@item @key{C-c C-x q} +$B;XDj$7$?(B region $BFb$N(B tag $B$rL58z$K$7!"$=$N(B tag $B$rJ8;zNs$H$7$FMxMQ$G$-$k(B +$B$h$&$K$7$^$9!#!J8=:_$NHG$G$O$&$^$/F/$+$J$$$3$H$,$"$j$^$9!#$^$?!"EE;R=p(B +$BL>$H$NJ;MQ$K4X$7$F$bIT40A4$G$9!K(B + +@end table + + + +@node other operations of mime/editor-mode, transfer level, enclosure operation, Top +@chapter mime/editor-mode $B$K$*$1$k$=$NB>$NA`:n(B + +mime/editor-mode $B$K$*$1$k$=$NB>$NA`:n$r@bL@$7$^$9!#(B + +@table @kbd +@item @key{C-c C-c} +$BJT=8Cf$N(B message $B$rAw?.$7$^$9!#(B + +@item @key{C-c C-x C-p} +$BJT=8Cf$N(B message $B$r(B preview $B$7$^$9!#(B(@ref{(tm-view-ja)mime/viewer-mode}) + +@item @key{C-c C-x C-z} +$BJT=8Cf$N(B message $B$rAw?.$9$k$3$H$J$/!"(Bmime/editor-mode $B$r=*N;$7$^$9!#(B + +@item @key{C-c C-x ?} +help message $B$rI=<($7$^$9!#(B + +@item @key{C-c C-x /} +$BBg$-$J(B message $B$rAw?.$9$k>l9g$K(B message/partial $B7A<0$K<+F0J,3d2DG=$H$9(B +$B$k$+$I$&$+$r7h$a$^$9!#(B + +@item @key{C-c C-x 7} +transfer level (@ref{transfer level}) $B$r(B 7bit (@ref{(tm-ja)7bit}) $B$K$7$^(B +$B$9!#(B + +@item @key{C-c C-x 8} +transfer level (@ref{transfer level}) $B$r(B 8bit (@ref{(tm-ja)8bit}) $B$K$7$^(B +$B$9!#(B + +@item @key{C-c C-x v} +message $BA4BN$rEE;R=pL>$9$k$+$I$&$+$r7h$a$^$9!#(B(@ref{PGP}) + +@item @key{C-c C-x h} +message $BA4BN$r0E9f2=$9$k$+$I$&$+$r7h$a$^$9!#(B(@ref{PGP}) + +@item @key{C-c C-x ?} +help message $B$rI=<($7$^$9!#(B + +@end table + + + +@node transfer level, header, other operations of mime/editor-mode, Top +@chapter transfer level + +message $B$KA^F~$9$k(B data $B$O(B 7bit (@ref{(tm-ja)7bit}) $B$J$$$7(B 8bit +(@ref{(tm-ja)8bit}) $B$b$7$/$O(B binary (@ref{(tm-ja)binary}) $B$GI=8=$9$k$3$H(B +$B$,$G$-$^$9!#(B@refill + +$B$h$C$F!"(B7bit $B$7$+DL$5$J$$(B MTA (@ref{(tm-ja)MTA}) $B$r7PM3$9$k>l9g!"(B7bit $B$N(B +data $B$O$=$N$^$^$GAw$l$^$9$,!"(B8bit $B$d(B binary $B$N(B data $B$O(B 7bit $B$KJQ49$7$J$1(B +$B$l$P$J$j$^$;$s!#(B@refill + +$BF1MM$K!"(B8bit $B$7$+DL$5$J$$(B MTA $B$r7PM3$9$k>l9g!"(B7bit $B$d(B 8bit $B$N(B data $B$O$=(B +$B$N$^$^$GAw$l$^$9$,!"(Bbinary $B$N(B data $B$O(B 7bit $B$+(B 8bit $B$KJQ49$7$J$1$l$P$J$j(B +$B$^$;$s!#(B@refill + +@noindent +@strong{[Memo]} +@quotation +EBCDIC $B$7$+DL$5$J$$(B MTA $B$r7PM3$9$k>l9g!"(B7bit $B$N(B data $B$b(B base64 $BEy$GJQ(B +$B49$7$J$$$HAw$l$^$;$s$,!";d$O(B EBCDIC $B$N$3$H$^$G$OCN$j$^$;$s!#(B(^_^; + +$BF1MM$K!"@)8fJ8;z$rDL$5$J$$(B MTA $B$N$3$H$d(B code $BJQ49$r9T$J$&(B MTA $B$b>C$($F$J(B +$B$/$J$C$FM_$7$$$G$9!#(B(^_^;@refill + +binary $B$bDL$9(B MTA $B$bB8:_$9$k$s$G$7$g$&$,!":#$N$H$3$m$"$^$j0lHLE*$H$O$$$((B +$B$J$$$G$7$g$&!#(B +@end quotation + +@cindex{transfer level}@strong{transfer level} $B$H$$$&$N$O$I$NHO0O$N(B data $B$^$GAw$l$k(B +$B$+$H$$$&$3$H$rI=$9$b$N$G$9!#(Btm-edit $B$O(B +@code{mime-editor/transfer-level} $B$H$$$&JQ?t$r;}$C$F$*$j!"$3$l$G(B +transfer level $B$rI=8=$7$^$9!#(B + + +@defvar mime-editor/transfer-level + +transfer level $B$rI=$9!#(B@refill + +$B$"$k(B data $B$N(B transfer level $B$,$3$NCM$r1[$($k>l9g!"(B7bit data $B$X$NJQ49$,9T(B +$B$o$l$k!#(B@refill + +$B8=:_$N$H$3$m!"(B7 $B$+(B 8 $B$,M-8z$G$"$k!#4{DjCM$O(B 7 $B$G$"$k!#(B@refill + +EBCDIC $B$r(B 5, ASCII printable $B$N$_$r(B 6, binary $B$r(B 9 $B$H$9$k$3$H$r7W2h$7$F(B +$B$$$k$,!"<BAu$NM=Dj$O$J$$!#(B +@end defvar + + + +@noindent +@strong{[Memo]} +@quotation +transfer level $B$O(B message header (@ref{header}) $B$K$O4X78$7$J$$!#(BRFC 1521 +$B$O(B body $B$K$*$$$F!"(B8bit $B$N(B data $B$r;H$($k$h$&$K(B RFC 822 (@ref{(tm-ja)RFC +822}) $B$r3HD%$7$F$$$k$,!"(Bmessage header $B$G$O(B us-ascii +(@ref{(tm-ja)us-ascii}) $B$N$_$rMQ$$$k$3$H$r5a$a$F$$$k!#(B +@end quotation + + + +@node header, PGP, transfer level, Top +@chapter header $B$G$NHs(B ASCII $BJ8;z$N;HMQ(B + +RFC 1522 (@ref{(tm-ja)RFC 1522}) $B$G$O(B header $B$GHs(B ASCII $BJ8;z$rI=8=$9$k$?(B +$B$a$NJ}K!$rDj5A$7$F$$$^$9!#(B@refill + +$B$3$l$O(B @cindex{encoded-word}@strong{encoded-word} +(@ref{(tm-ja)encoded-word}) $B$H8F$P$l$k7?<0$G!"(BMIME charset +(@ref{(tm-ja)MIME charset}) $B$r@k8@$7!"$+$D!"(B7bit (@ref{(tm-ja)7bit}) $B$G(B +$BI=8=$9$k$3$H$r2DG=$K$7$F$$$^$9!#(B + + +@menu +* evil setting in header:: $B$I$&$7$F$b(B encoded-word $B$r;H$$$?$/$J$$>l9g(B +* API about header:: header $B$K4X$9$k4X?t!&JQ?t(B +@end menu + +@node evil setting in header, API about header, header, header +@section $B$I$&$7$F$b(B encoded-word $B$r;H$$$?$/$J$$>l9g(B + +$B$H$3$m$G!"(Bheader $B$G(B encoded-word $B$rMQ$$$:$K@8$GHs(B ASCII $BJ8;zNs$rF~$l$k$N(B +$B$O4V0c$C$F$$$^$9!#$J$<$J$i!"(BInternet $B$G$O$5$^$6$^$JId9f2=J8;z=89g(B +(@ref{(tm-ja)Coded character set})$B$,;H$o$l$F$*$j!"(BMIME charset +(@ref{(tm-ja)MIME charset}) $B$rL@<(E*$K@k8@$7$J$1$l$P$=$l$i$r@53N$K6hJL$9(B +$B$k$3$H$O$G$-$J$$$+$i$G$9!#(B@refill + +$BNc$($P!"(BMIME charset $B$r@k8@$7$J$1$l$P(B iso-8859-1 +(@ref{(tm-ja)iso-8859-1}) $B$H(B iso-8859-2 (@ref{(tm-ja)iso-8859-2}) $B$O8+J,(B +$B$1$,IU$+$J$$$G$7$g$&!#(B@refill + +$B$7$+$7$J$,$i!"$I$&$7$F$b(B encoded-word $B$r;H$$$?$/$J$$>l9g$K$O0J2<$NJQ?t(B +$B$r@_Dj$7$F$/$@$5$$!#(B + + +@defvar mime/field-encoding-method-alist + +field $BL>$HId9f2=K!$rI=$9(B symbol $B$NBP$+$i$J$kO"A[(B list.@refill + +field $BL>$OJ8;zNs!"$b$7$/$O!"G$0U$NJ8;zNs$rI=$9(B @code{t} $B$G$"$k!#(B@refill + +$BId9f2=K!$O!"(B@code{nil} $B$J$i$PL5JQ49!"(B@code{mime} $B$J$i$P(Bencoded-word, +MIME charset $B$rI=$9(B symbol $B$J$i$P$=$NId9f2=J8;z=89g$X(Bencoded-word $B$rMQ$$(B +$B$:$KJQ49$9$k$3$H$rI=$9!#(B@refill + +field $BL>$OJ8;zNs$+$i8!:w$5$l!";XDj$7$?J8;zNs$,8+IU$+$i$J$1$l$P(B@code{t} +$B$rMQ$$$k!#(B@refill + +$B4{DjCM$O(B + +@lisp +(("X-Nsubject" . iso-2022-jp-2) + ("Newsgroups" . nil) + (t . mime) + )) +@end lisp + +@noindent +$B$G$"$k!#B($A!"(BX-Nsubject field $B$O@8$N(B iso-2022-jp-2 +(@ref{(tm-ja)iso-2022-jp-2}), Newsgroup $B$OL5JQ49!"$=$l0J30$N(B field $B$O(B +encoded-word $B$KJQ49$5$l$k!#(B +@end defvar + + +$B$^$?!"(Bfield $BKh$G$O$J$/!"Id9f2=J8;z=89gKh$K;XDj$7$?$$>l9g$O!"JQ?t(B +@code{mime-eword/charset-encoding-alist} $B$rMQ$$$F$/$@$5$$!#(B +(@ref{API about header}) + + +@node API about header, , evil setting in header, header +@section header $B$K4X$9$k4X?t!&JQ?t(B + +@deffn{Command} mime/encode-message-header &optional code-conversion + +Current buffer $B$N(B message header $B$KB8:_$9$kHs(B ASCII $BJ8;z$r(Bnetwork $BI=8=$K(B +$BJQ49$7$^$9!#(B@refill + +optional $B0z?t$N(B @var{code-conversion} $B$KHs(B-nil $B$,;XDj$5$l$?>l9g!"(B +encoded-word $B$K$7$J$$(B field $B$r(B@code{mime/field-encoding-method-alist} $B$K(B +$B=>$C$F!"(Bcode $BJQ49$7$^$9!#(B +@end deffn + + +@defun mime/encode-field string + +@var{string} $B$r(B field $B$H$7$F(B encoded-word $B$KJQ49$7$^$9!#(B@refill + +$BD9$$9T$O(B RFC 822 $B$K=>$C$F@^JV$5$l$^$9!#(B +@end defun + + +@defun mime-eword/encode-string string &optional column mode + +@var{string} $B$r(B encoded-word $B$KJQ49$7$^$9!#(B@refill + +$BD9$$9T$O(B RFC 822 $B$K=>$C$F@^JV$5$l$^$9!#(B@refill + +@var{column} $B$O$3$NJ8;zNs$,2?7eL\$+$i;O$^$C$F$$$k$+$r;XDj$7$^$9!#4{DjCM(B +$B$O(B 0 $B$G$9!#(B@refill + +@var{mode} $B$O$3$NJ8;zNs$,$I$&$$$&ItJ,$G;H$o$l$F$$$k$+$r<($7$^$9!#;XDj$G(B +$B$-$kCM$H$7$F$O(B @code{text}, @code{comment}, @code{phrase} $B$,$"$j$^$9!#4{(B +$BDjCM$O(B @code{phrase} $B$G$9!#(B +@end defun + + +@defvar mime-eword/charset-encoding-alist + +MIME charset $B$rI=$9(B symbol $B$H(B nil, $B$b$7$/$O!"(B@code{"B"} $B$+(B@code{"Q"} $B$N(B +$BJ8;zNs$NBP$+$i$J$kO"A[(B list.@refill + +@code{nil} $B$O$=$N(B MIME charset $B$r(B encoded-word $B$K$7$J$$$3$H$rI=$7!"(B +@code{"B"} $B$O$=$N(B MIME charset $B$r(B B $BJ}<0$N(B encoded-word $B$K$9$k$3$H$rI=$7!"(B +@code{"Q"} $B$O$=$N(B MIME charset $B$r(B Q $BJ}<0$N(B encoded-word $B$K$9$k$3$H$rI=$9!#(B +@end defvar + + + +@node PGP, Concept Index, header, Top +@chapter PGP + +tm-edit $B$G$O(B @cindex{PGP/MIME}@strong{PGP/MIME} (@ref{(tm-ja)PGP/MIME}) +(RFC 2015) $B$*$h$S(B @cindex{PGP-kazu}@strong{PGP-kazu} +(@ref{(tm-ja)PGP-kazu}) (draft-kazu-pgp-mime-00.txt) $B$K$h$k0E9f2=!&EE;R(B +$B=pL>!&8x3+80$NA^F~5!G=$rMxMQ$9$k$3$H$,$G$-$^$9!#(B@refill + +$BC"$7!"$3$N5!G=$rMxMQ$9$k$K$O(B Mailcrypt package (@ref{(mailcrypt)}) $B$H(B +pgp command $B$,I,MW$G$9!#(B@refill + +$B$^$?!"JQ?t(B @code{mimed-editor/signing-type} $B$HJQ?t(B +@code{mime-editor/encrypting-type} $B$K(B @code{pgp-elkins} $B$+(B +@code{pgp-kazu} $B$rBeF~$7$F$/$@$5$$!#(B@refill + +@code{pgp-elkins} $B$r;XDj$7$?>l9g(B PGP/MIME $B$,;H$o$l!"(B +@code{pgp-kazu} $B$r;XDj$7$?>l9g(B PGP-kazu $B$,;H$o$l$^$9!#(B + + +@defvar mimed-editor/signing-type + +PGP $B$G$NEE;R=qL>$N7A<0$r;XDj$7$^$9!#(B@refill + +@code{pgp-elkins} $B$+(B @code{pgp-kazu} $B$r;XDj$7$F$/$@$5$$!#(B@refill + +$B4{DjCM$O(B @code{nil} $B$G$9!#(B +@end defvar + + +@defvar mime-editor/encrypting-type + +PGP $B$G$N0E9f2=$N7A<0$r;XDj$7$^$9!#(B@refill + +@code{pgp-elkins} $B$+(B @code{pgp-kazu} $B$r;XDj$7$F$/$@$5$$!#(B@refill + +$B4{DjCM$O(B @code{nil} $B$G$9!#(B +@end defvar + + + +@node Concept Index, Function Index, PGP, Top +@chapter $B35G0:w0z(B + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter $B4X?t:w0z(B + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter $BJQ?t:w0z(B + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-en.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1582 @@ +<!doctype sinfo system> +<!-- $Id: tm-en.sgml,v 1.1 1996/12/22 00:09:33 steve Exp $ --> +<head> +<title>tm 7.90 Manual (English Version) +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/15 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm, a MIME package for GNU Emacs. +</abstract> + +<h1> What is tm? +<node> Introduction +<p> +The tm package is a set of modules to enjoy MIME on GNU Emacs. Using +tm, you can + +<ul> +<li> playback or view the MIME messages using tm-view +<li> compose MIME message using tm-edit +<li> use the enhanced MIME features with mh-e, GNUS, Gnus, RMAIL and VM +</ul> + +<noindent> +and more. +<p> +Please read following about each topics: + +<ul> +<li><a file="gnus-mime-en">tm-MUA for Gnus</a> +<li><a file="tm-gnus-en">tm-MUA for GNUS</a> +<li><a file="tm-mh-e-en">tm-MUA for mh-e</a> +<li><a file="tm-view-en">mime/viewer-mode</a> +<li><a file="tm-edit-en">mime/editor-mode</a> +</ul> + + +<h2> Glossary +<node> Glossary + +<h3> 7bit +<node> 7bit +<p> +<concept>7bit</concept> means any integer between 0 .. 127. +<p> +Any data represented by 7bit integers is called <concept>7bit +data</concept>. +<p> +Textual string consisted of Control characters between 0 .. 31 and +127, and space represented by 32, and graphic characters between 33 +.. 236 are called <concept>7bit (textual) string</concept>. +<p> +Traditional Internet <a node="MTA">MTA</a> can translate 7bit data, so +it is no need to translate by <a +node="Quoted-Printable">Quoted-Printable</a> or <a +node="Base64">Base64</a> for 7bit data. +<p> +However if there are too long lines, it can not translate by 7bit MTA +even if it is 7bit data. <dref>RFC 821</dref> and <dref>RFC +2045</dref> require lines in 7bit data must be less than 998 bytes. +So if a ``7bit data'' has a line more than 999 bytes, it is regarded +as <dref>binary</dref>. For example, Postscript file should be +encoded by Quoted-Printable. + + +<h3> 8bit +<node> 8bit +<p> +<concept>8bit</concept> means any integer between 0 .. 255. +<p> +Any data represented by 8bit integers is called <concept>8bit +data</concept>. +<p> +Textual string consisted of Control characters between 0 .. 31, 127, +and 128 .. 159, and space represented by 32, and graphic characters +between 33 .. 236 and 160 .. 255 are called <concept>8bit (textual) +string</concept>. +<p> +For example, <dref>iso-8859-1</dref> or <dref>euc-kr</dref> are +coded-character-set represented by 8bit textual string. +<p> +Traditional Internet <a node="MTA">MTA</a> can translate only +<dref>7bit</dref> data, so if a 8bit data will be translated such MTA, +it must be encoded by <dref>Quoted-Printable</dref> or +<dref>Base64</dref>. +<p> +However 8bit MTA are increasing today. +<p> +However if there are too long lines, it can not translate by 8bit MTA +even if it is 8bit data. <dref>RFC 2045</dref> require lines in 8bit +data must be less than 998 bytes. So if a ``8bit data'' has a line +more than 999 bytes, it is regarded as <dref>binary</dref>, so it must +be encoded by Base64 or Quoted-Printable. + + +<h3> 94-character set +<node> 94-character set +<p> +<concept>94-character set</concept> is a kind of 1 byte <dref>graphic +character set</dref>, each characters are in positions 02/01 (33) to +07/14 (126) or 10/01 (161) to 15/14 (254). (ex. <dref>ASCII</dref>, +JIS X0201-Latin) + + +<h3> 96-character set +<node> 96-character set +<p> +<concept>96-character set</concept> is a kind of 1 byte <dref>graphic +character set</dref>, each characters are in positions 02/00 (32) to +07/15 (126) or 10/00 (160) to 15/15 (255). (ex. ISO 8859) + + +<h3> 94x94-character set +<node> 94x94-character set +<p> +<concept>94x94-character set</concept> is a kind of 2 byte +<dref>graphic character set</dref>, each bytes are in positions 02/01 +(33) to 07/14 (126) or 10/01 (161) to 15/14 (254). (ex. <dref>JIS +X0208</dref>, <dref>GB 2312</dref>) + + +<h3> ASCII +<node> ASCII +<p> +$B%"%a%j%+O"K.$G;H$o$l$kJ8;z$rId9f2=$7$?(B <dref>94-character set</dref>. +A-Z, a-z $B$N(B Latin $BJ8;z$H?t;z!"4v$D$+$N5-9f$+$i$J$k!#(B<a node="ISO +646">ISO 646</a> $B$N0l$D!#(B + +<standard abbrev="ASCII" title-en="Coded Character Set -- 7-Bit + American Standard Code for Information Interchange" + number="ANSI X3.4" year="1986"> + + +<h3> Base64 +<node> Base64 +<p> +<concept>Base64</concept> is a transfer encoding method of +<dref>MIME</dref> defined in <dref>RFC 2045</dref>. +<p> +The encoding process represents 24-bit groups of input bits as output +strings of 4 encoded characters. Encoded characters represent integer +0 .. 63 or <concept>pad</concept>. Base64 data must be 4 * n bytes, +so pad is used to adjust size. +<p> +These 65 characters are subset of all versions of ISO 646, including +US-ASCII, and all versions of EBCDIC. So it is safe even if it is +translated by non-Internet gateways. + + +<h3> binary +<node> binary +<p> +$BG$0U$N(B byte $BNs$r(B <concept>binary</concept> $B$H8F$V$3$H$K$7$^$9!#(B +<p> +<a node="8bit">8bit</a> $B$H0[$J$k$N$O(B data $B$K9T$N9=B$$r2>Dj$7$J$$$3$H$G(B +$B$9!#(B +<p> +$B$^$?!"9T$N9=B$$,$"$C$F$b!"(B999 byte $B0J>e$+$i$J$k9T$,$"$k>l9g$b(B binary +$B$H8F$V$3$H$K$7$^$9!#(B +<p> +$B$A$J$_$K!"(B<a node="7bit">7bit</a> $B$d(B 8bit $B$GI=8=$G$-$k(B data $B$O(B binary +$B$G$bI=8=$G$-$^$9!#$h$C$F!"(B<concept>binary data</concept> $B$H8@$C$?>l9g!"(B +$BG$0U$N(B data $B$r;X$9$3$H$,$"$j$^$9!#(B + + +<h3> Graphic Character Set +<node> graphic character set +<p> +<dref>Coded character set</dref> for graphic characters. + + +<h3> cn-gb, gb2312 +<node> cn-gb +<p> +$BCf9qBgN&$G$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ISO 2022</dref> $B$K4p$$$F(B <dref>ASCII</dref> $B$K(B <dref>GB +2312</dref> $B$r(B <dref>8bit</dref> $B$G(B<a node="Code extension">$BId9f(B +$B3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> cn-big5, big5 +<node> cn-big5 +<p> +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +<a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ISO 2022</dref> $B$K4p$+$J$$(B <dref>8bit</dref> $B$N(B +<dref>coded character set</dref>$B$G(B de-fact standard $B$G(B +$B$"$k!#(B<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +cf. <report abbrev="BIG5" author="Institute for Information Industry" + title-en="Chinese Coded Character Set in Computer" + date="March 1984"> +<p> +<a node="CNS">CNS 11643-1986</a> $B$HBP1~4X78$,$"$k!#(B + + +<h3> CNS 11643-1992 +<node> CNS +<p> +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +<a node="Character set">$BJ8;z=89g(B</a>$B!#BfOQ$NI8=`!#8=:_!"(B<a node="94x94 +character set">94$B!_(B94</a> $B$NLL$,Bh#1LL$+$iBh#7LL$^$G$"$k!#(B +<p> +<dref>ISO 2022</dref> $B$G$N=*C<J8;z$O!"Bh#1LL$,(B `G', $BBh#2LL$,(B +`H', $BBh#3LL$,(B `I', $BBh#4LL$,(B `J', $BBh#5LL$,(B `K', $BBh#6LL$,(B `L', $BBh#7LL$,(B +`M' $B$G$"$k!#(B + +<standard abbrev="CNS 11643-1992" title-en="Standard Interchange Code + for Generally-Used Chinese Characters" number="CNS + 11643" year="1992"> + + +<h3> Coded character set, Character code +<node> coded character set +<p> +A set of unambiguous rules that establishes a character set and the +one-to-one relationship between the characters of the set and their +bit combinations. + + +<h3> Code extension +<node> code extension +<p> +The techniques for the encoding of characters that are not included in +the character set of a given code. (ex. <dref>ISO 2022</dref>) + + +<h3> Content-Disposition field +<node> Content-Disposition +<p> +Content $B$NI=<($N;EJ}$d(B file $BL>$rI=8=$9$k$?$a$N(B field. <a +node="MIME">MIME</a> $B$N3HD%$N#1$D!#(B +<p> +<rfc number="1806" type="Experimental" author="E R. Troost and + S. Dorner" title="Communicating Presentation Information + in Internet Messages: The Content-Disposition Header" + date="June 1995"> + + +<h3> media type +<node> media type +<p> +<concept>media type</concept> specifies the nature of the data in the +body of <dref>MIME</dref> <dref>entity</dref>. It consists of +<concept>type</> and <concept>subtype</concept>. It is defined in +<dref>RFC 2046</dref>. +<p> +Currently there are following types: + +<ul> +<li><concept>text</concept> +</li> +<li><concept>image</concept> +</li> +<li><concept>audio</concept> +</li> +<li><concept>video</concept> +</li> +<li><concept>application</concept> +</li> +<li><a node="multipart"><concept>multipart</concept></a> +</li> +<li><concept>message</concept> +</ul> + +<p> +And there are various subtypes, for example, application/octet-stream, +audio/basic, image/jpeg, <dref>multipart/mixed</dref>, +<dref>text/plain</dref>, video/mpeg... +<p> +You can refer registered media types at <a +href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types">MEDIA +TYPES</a>. +<p> +In addition, you can use private type or subtype using +<concept>x-token</concept>, which as the prefix `x-'. However you can +not use them in public. +<p> +<cf node="Content-Type field"> + + +<h3> Content-Type field +<node> Content-Type field +<p> +Header field to represent information about body, such as <dref>media +type</dref>, <dref>MIME charset</dref>. It is defined in <dref>RFC +2045</dref>. + +<memo> +<p> +Historically, Content-Type field was proposed in RFC 1049. In it, +Content-Type did not distinguish type and subtype. However MIME +parser may be able to accept RFC 1049 based Content-Type as unknown +type. +</memo> + +<p> +Content-Type field is defined as following: + +<quote> +``Content-Type'' ``:'' <concept>type</concept> ``/'' +<concept>subtype</concept> *( ``;'' <concept>parameter</concept> ) +</quote> + +<p> +For example: + +<quote> +<verb> +Content-Type: image/jpeg +</verb> +</quote> + +<quote> +<verb> +Content-Type: text/plain; charset=iso-2022-jp +</verb> +</quote> + +<memo> +<p> +A part does not have content-type field is regarded as + +<quote> +<verb> +Content-Type: text/plain; charset=us-ascii +</verb> +</quote> + +<noindent> +<cf node="us-ascii"> + +And a part has unknown type/subtype is regarded as + +<quote> +<verb> +Content-Type: application/octet-stream +</verb> +</quote> + +</memo> + + +<h3> Emacs +<node> Emacs +<p> +$B$3$3$G$O(B `Emacs' $B$G(B FSF $B$,G[I[$7$F$$$k(B GNU Emacs $B$r;X$7!"(B`emacs' $B$G(B +GNU Emacs $B$NJQ<o$NAm>N$H$9$k!#(B + + +<h3> encoded-word +<node> encoded-word +<p> +Representation non <dref>ASCII</dref> characters in header. It +is defined in <concept>RFC 2047</concept>. +<p> +<rfc number="2047" type="Standards Track" author="K. Moore" + title="MIME (Multipurpose Internet Mail Extensions) Part + Three: Message Header Extensions for Non-ASCII Text" + date="November 1996" obsolete="1521,1522,1590"> + + +<h3> encapsulation +<node> encapsulation +<p> +<a node="RFC 822">Internet mail</a> $B$rB>$N5-;v$K$^$k$4$HF~$l$kJ}K!!#(B +<p> +$BNc$($P!"5-;v$rE>Aw$7$?$j$9$k$N$KMQ$$$k!#(B +<p> +<cf node="message/rfc822"> + + +<h3> euc-kr +<node> euc-kr +<p> +$B4Z9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ISO 2022</dref> $B$K4p$$$F(B <dref>ASCII</dref> $B$K(B +<a node="KS C5601">KS C5601</a> $B$r(B <dref>8bit</dref> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1557">RFC 1557</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +cf. <standard abbrev="euc-kr" org="Korea Industrial Standards + Association" title-en="Hangul Unix Environment" + number="KS C 5861" year="1992"> + + +<h3> FTP <node> FTP +<p> +Internet $B$G(B file $B$rE>Aw$9$k$?$a$N(B protocol $B$N#1$D!#(BRFC 959 $B$GDj5A$5$l(B +$B$F$$$k!#(B +<p> +<rfc name="FTP" number="959" type="STD 9" author="Postel, J. and + J. Reynolds" title="File Transfer Protocol" + date="October 1985"> + + +<h3> GB 2312-1980 +<node> GB 2312 +<p> +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=$9$?$a$N(B +<dref>94x94-character set</dref>$B!#Cf9q$N9q2HI8=`!#(B<a node="ISO +2022">ISO 2022</a> $B$G$N=*C<J8;z$O(B `A'. +<p> +$B$3$l$O(B GB $B$K$*$1$k4pK\=8$G$"$k!#(B + +<standard abbrev="GB 2312" + title-cn="$B?.B)8r49MQ4A;zJTb{;zId=8(B -- $B4pK\=8(B" + title-en="Code of Chinese Graphic Character Set for + Information Interchange - Primary Set" number="GB 2312" + year="1980"> + + +<h3> GB 8565.2-1988 +<node> GB 8565.2 +<p> +$BCf9q8l$N$?$a$NJd=u(B<a node="Character set">$BJ8;z=89g(B</a>$B!#Cf9q$N9q2HI8=`!#(B +<a node="GB 2312">GB 2312</a> $B$N6u$-ItJ,$KJd=<$9$k$h$&$KDj5A$5$l$?$i$7(B +$B$$!#(B + +<standard abbrev="GB 8565.2" title-en="Information Processing - Coded + Character Sets for Text Communication - Part 2: Graphic + Characters used with Primary Set" number="GB 8565.2" + year="1988"> + + +<h3> hz-gb2312 +<node> hz-gb2312 +<p> +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ASCII</dref> $B$K(B <a node="GB 2312">GB 2312</a> $B$r(B 7bit $B$G(B +<a node="Code extension">$BId9f3HD%(B</a>$B$7$?$b$N$r(B ASCII printable $B$K$J$k(B +$B$h$&$K9)IW$7$F$$$k!#(B +<p> +RFC 1842, 1843 $B$GDj5A$5$l$F$$$k!#(B + +<rfc number="1842" type="Informational" author="Y. Wei, Y. Zhang, + J. Li, J. Ding and Y. Jiang" title="ASCII Printable + Characters-Based Chinese Character Encoding for Internet + Messages" date="August 1995"> +<rfc number="1843" type="Informational" author="F. Lee" title="HZ - A + Data Format for Exchanging Files of Arbitrarily Mixed + Chinese and ASCII characters" date="August 1995"> + + +<h3> ISO 2022 +<node> ISO 2022 +<p> +<a node="Code extension">$BId9f3HD%(B</a>$B$N$?$a$N9q:]I8=`!#(B +<p> +$B$3$l$rMQ$$$FJ#?t$N(B<a node="Character set">$BJ8;z=89g(B</a>$B$rAH9g$;$F(B <a +node="7bit">7bit</a> $B$J$$$7(B <dref>8bit</dref> $B$N(B <a node="Coded +character set">$BId9f2=J8;z=89g(B</a> $B$r:n$k$3$H$,$G$-$k!#(B + +<standard abbrev="ISO 2022" org="International Organization for + Standardization (ISO)" title-en="Information Processing: + ISO 7-bit and 8-bit coded character sets: Code extension + techniques" number="ISO/IEC 2022" year="1994"> + + +<h3> iso-2022-cn +<node> iso-2022-cn +<p> +$BCf9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ISO 2022</dref> $B$K4p$$$F(B <dref>ASCII</dref> $B$K(B +<a node="GB 2312">GB 2312</a>, <a node="CNS">CNS 11643 plain 1, plain +2</a> $B$r(B <a node="7bit">7bit</a> $B$G(B<a node="Code extension">$BId9f3HD%(B +</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> iso-2022-cn-ext +<node> iso-2022-cn-ext +<p> +$BCf9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ISO 2022</dref> $B$K4p$$$F(B <dref>ASCII</dref> $B$K(B +<a node="GB 2312">GB 2312</a>, <a node="CNS">CNS 11643 plain 1 +.. 7</a>, <a node="ISO-IR-165">ISO-IR-165</a> $BEy$r(B <a +node="7bit">7bit</a> $B$G(B<a node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +<memo> +MULE 2.3 $B$*$h$S!"8=:_$N(B XEmacs/mule $B$G$O@5$7$/07$&$3$H$O$G$-$J$$!#(B +<p> +Emacs/mule $B$G$OMxMQ2DG=$G$"$k!#(B +</memo> + + +<h3> iso-2022-jp +<node> iso-2022-jp +<p> +$BF|K\8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N0l$D!#(B +<p> +$B8E$$(B <dref>ISO 2022</dref> $B$K4p$$$F(B <a +node="ASCII">ASCII</a>, JIS X0201-Latin, <a node="JIS C6226-1978">JIS +X0208-1978</a>, <a node="JIS X0208">JIS X0208-1983</a> $B$r@Z$jBX$($k(B <a +node="7bit">7bit</a> $BJ8;zId9f!#(B +<p> +RFC 1468 $B$GDj5A$5$l$F$$$k!#(B +<p> +<memo> +JIS X0208-1996? $B$G$O(B <dref>ISO 2022</dref> $B$HFHN)$KDj5A$5$l(B +$B$kM=Dj!#(B +</memo> + +<rfc name="iso-2022-jp" number="1468" author="Murai J., M. Crispin, + and E. van der Poel" title="Japanese Character Encoding + for Internet Messages" date="June 1993"> + + +<h3> iso-2022-jp-2 +<node> iso-2022-jp-2 +<p> +A <dref>MIME charset</dref>, which is a multilingual extension of +<dref>iso-2022-jp</dref>. +<p> +It is defined in RFC 1554. + +<rfc name="iso-2022-jp-2" number="1554" type="Informational" + author="Ohta M. and Handa K." title="ISO-2022-JP-2: + Multilingual Extension of ISO-2022-JP" date="December + 1993"> + + +<h3> iso-2022-kr +<node> iso-2022-kr +<p> +A <a node="MIME charset">MIME charset</a> for Korean language (Hangul +script). +<p> +It is based on <dref>ISO 2022</dref> <dref>code extension</dref> +technique to extends <dref>ASCII</dref> to use <dref>KS C5601</dref> +as <dref>7bit</dref> text. +<p> +It is defined in <dref>RFC 1557</dref>. + + +<h3> ISO 646 +<node> ISO 646 +<p> +$B3F9q$G6&DL$K;H$($k:G>.8BEY$N(B<a node="Character set">$BJ8;z=89g(B</a>$B$rDj$a(B +$B$?$b$N!#(B<a node="94 character set">94 $BJ8;z=89g(B</a>$B$N#1$D!#(BISO 646 IRV +$B!J9q:]4p=`HG!K$r85$K4v$D$+$NJ8;z$O3F9q$G0c$&J8;z$r3dEv$k$3$H$r5v$7$F$$(B +$B$F!"4v$D$+$NJQ<o$,B8:_$9$k!#(B<dref>ASCII</dref> $B$d(B JIS +X0201-Latin $B$O$=$N0l<o!#(B + +<standard abbrev="ISO 646" org="International Organization for + Standardization (ISO)" title-en="Information technology: + ISO 7-bit coded character set for information + interchange" number="ISO/IEC 646" year="1991"> + + +<h3> ISO 8859-1 +<node> ISO 8859-1 +<p> +<standard abbrev="ISO 8859-1" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 1: Latin Alphabet No.1" number="ISO 8859-1" + year="1987"> + + +<h3> iso-8859-1 +<node> iso-8859-1 +<p> +<concept>iso-8859-1</concept> is a <dref>MIME charset</dref> for +west-European languages written by Latin script. +<p> +<dref>ISO 2022</dref> $B$K4p$$$F!"(B<dref>ASCII</dref> $B$K(B +<a node="ISO 8859-1">ISO 8859-1</a> $B$r(B <dref>8bit</dref> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +It is defined in <dref>RFC 2046</dref>. + + +<h3> ISO 8859-2 +<node> ISO 8859-2 +<p> +<standard abbrev="ISO 8859-2" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 2: Latin alphabet No.2" number="ISO 8859-2" + year="1987"> + + +<h3> iso-8859-2 +<node> iso-8859-2 +<p> +<concept>iso-8859-2</concept> is a <dref>MIME charset</dref> for +east-European languages written by Latin script. +<p> +<dref>ISO 2022</dref> $B$K4p$$$F!"(B<dref>ASCII</dref> $B$K(B +<a node="ISO 8859-2">ISO 8859-2</a> $B$r(B <dref>8bit</dref> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +It is defined in <dref>RFC 2046</dref>. + + +<h3> ISO 8859-3 +<node> ISO 8859-3 +<p> +<standard abbrev="ISO 8859-3" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 3: Latin alphabet No.3" + number="ISO 8859-3" year="1988"> + + +<h3> ISO 8859-4 +<node> ISO 8859-4 +<p> +<standard abbrev="ISO 8859-4" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 4: Latin alphabet No.4" + number="ISO 8859-4" year="1988"> + + +<h3> ISO 8859-5 +<node> ISO 8859-5 +<p> +<standard abbrev="ISO 8859-5" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 5: Latin/Cyrillic alphabet" number="ISO 8859-5" + year="1988"> + + +<h3> iso-8859-5 +<node> iso-8859-5 +<p> +<concept>iso-8859-5</concept> is a <dref>MIME charset</dref> for +Cyrillic script. +<p> +<dref>ISO 2022</dref> $B$K4p$$$F!"(B<dref>ASCII</dref> $B$K(B +<a node="ISO 8859-5">ISO 8859-5</a> $B$r(B <dref>8bit</dref> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +It is defined in <dref>RFC 2046</dref>. + + +<h3> ISO 8859-6 +<node> ISO 8859-6 +<p> +<standard abbrev="ISO 8859-6" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 6: Latin/Arabic alphabet" + number="ISO 8859-6" year="1987"> + + +<h3> ISO 8859-7 +<node> ISO 8859-7 +<p> +<standard abbrev="ISO 8859-7" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 7: Latin/Greek alphabet" number="ISO 8859-7" + year="1987"> + + +<h3> iso-8859-7 +<node> iso-8859-7 +<p> +<concept>iso-8859-7</concept> is a <dref>MIME charset</dref> for +Greek script. +<p> +<dref>ISO 2022</dref> $B$K4p$$$F!"(B<dref>ASCII</dref> $B$K(B +<a node="ISO 8859-7">ISO 8859-7</a> $B$r(B <dref>8bit</dref> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +It is defined in RFC 1947. + +<rfc name="iso-8859-7" number="1947" type="Informational" + author="D. Spinellis" title="Greek Character Encoding + for Electronic Mail Messages" date="May 1996"> + + +<h3> ISO 8859-8 +<node> ISO 8859-8 +<p> +<standard abbrev="ISO 8859-8" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 8: Latin/Hebrew alphabet" + number="ISO 8859-8" year="1988"> + + +<h3> ISO 8859-9 +<node> ISO 8859-9 +<p> +<standard abbrev="ISO 8859-9" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 9: Latin alphabet No.5" + number="ISO 8859-9" year="1990"> + + +<h3> ISO-IR-165, CCITT Extended GB <node> ISO-IR-165 +<p> +CCITT $B$,EPO?$7$?!"Cf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=(B +$B8=$9$k$?$a$N(B <dref>94x94-character set</dref>$B!#(B +<p> +<a node="GB 2312">GB 2312</a> $B$H(B <a node="GB 8865.2">GB 8565 $BI=#2(B</a> +$B$K(B 150 $BJ8;z$[$I$rDI2C$7$?$b$N$i$7$$!#(B +<p> +<dref>ISO 2022</dref> $B$G$N=*C<J8;z$O(B `E' $B$G$"$k!#(B + + +<h3> JIS X0201 +<node> JIS X0201 +<p> +<a node="ISO 646">ISO 646</a> $B$NJQ<o$N#1$D$G$"$k(B Latin $BJ8;z=89g$H(B 1 +byte $B$N%+%?%+%JJ8;z=89g$+$i$J$k!#(B +<p> +$B85$O(B <concept>JIS C6220-1976</concept> $B$H8@$C$?$,(B <concept>JIS +X0201</concept> $B$KHV9f$,JQ99$5$l$?!#(B + +<standard abbrev="JIS X0201-1976" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" title-ja="$B>pJs8r49MQId9f(B" + title-en="Code for Information Interchange" number="JIS + X 0201-1976"> + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=P$kM=Dj!#(B + +<standard abbrev="JIS X0201-1996?" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" + title-ja="$B#7%S%C%H5Z$S#8%S%C%H$N>pJs8r49MQId9f2=J8;z=89g(B" + title-en="7-bit and 8-bit coded character sets for + information interchange" number="JIS X 0201" year="1996? + draft"> + + +<h3> JIS C6226-1978 +<node> JIS C6226 +<p> +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B <dref>94x94-character set</dref>$B!#F|K\$N9q(B +$B2HI8=`!#(BJIS X0208-1978 $B$H$b$$$&!#(B +<p> +<cf node="JIS X0208"> + + +<h3> JIS X0208 +<node> JIS X0208 +<p> +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B <dref>94x94-character set</dref>$B!#F|K\$N9q(B +$B2HI8=`!#(B1978 $BG/HG!"(B1983 $BG/HG!"(B1990 $BG/HG$,$"$k$,!"(BInternet $B$G$O(B 1983 $BG/(B +$BHG$,$b$C$H$bNI$/;H$o$l$F$$$k!#(B +<p> +JIS X0208 $B$O5-9f!"?t;z!"%m!<%^;z!"$R$i$,$J!"%+%?%+%J!"%.%j%7%cJ8;z!"%-(B +$B%j%kJ8;z!"7S@~AG!"Bh#1?e=`!"Bh#2?e=`$N4A;z$,4^$^$l$k!#C"$7!"(B1983 $BG/HG(B +$B$N0lIt$N5-9f$H7S@~AG$O(B 1978 $BG/HG$K$O$J$$!#$^$?!"0lIt$N4A;z$N;z7A$,(B +1983 $BG/HG$G$OJQ99$5$l!"$^$?!"Bh#1?e=`$HBh#2?e=`$,F~$lBX$o$C$F$$$?$j$9(B +$B$k!#$3$N$?$a!"(B1978 $BG/HG$H(B 1983 $BG/HG$O0[$J$kJ8;z=89g$H$7$F07$o$l$k!#(B +<p> +1990 $BG/$N2~Dj$G$O(B 1983 $BG/HG$KBP$9$kDI2C$,9T$o$l$?!#$3$N$?$a!"(B1990 $BG/HG(B +$B$r;X<($9$k>l9g$OA0$K99?7%7!<%1%s%9$rMQ$$$k!#(B + +<standard abbrev="JIS X0208-1978" org="$BF|K\5,3J6(2q(B (Japanese Standards + Association)" title-ja="$B>pJs8r49MQ4A;zId9f7O(B" + title-en="Code of the Japanese graphic character set for + information interchange" number="JIS C6226" year="1978"> +<standard abbrev="JIS X0208-1983,1990" org="$BF|K\5,3J6(2q(B (Japanese Standards + Association)" title-ja="$B>pJs8r49MQ4A;zId9f7O(B" + title-en="Code of the Japanese graphic character set for + information interchange" number="JIS X0208" year="1983,1990"> + +<p> +$B$^$?!"(B1996 $BG/$K2~DjHG$,=PHG$5$l$kM=Dj!#!J;z7A$NJQ99$O9T$o$l$J$$$N$GJ8(B +$B;z=89g$H$7$F$O(B 1990 $BG/HG$HF10l$G$"$k!K(B + +<standard abbrev="JIS X0208-1996?" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" title-ja="$B#7%S%C%H5Z$S#8%S%C%H$N(B + $B#2%P%$%H>pJs8r49MQId9f2=4A;z=89g(B" title-en="7-bit and + 8-bit double byte coded Kanji sets for information + interchange" number="JIS X 0208" year="1996? draft"> + + +<h3> JIS X0212-1990 +<node> JIS X0212 +<p> +<a node="JIS X0208">JIS X0208</a> $B$K$J$+$C$?J8;z$r=8$a$?(B +<dref>94x94-character set</dref>$B!#!VJd=u4A;z!W$H$b8F$P$l$k!#F|K\$N9q2H(B +$BI8=`!#(B<dref>ISO 2022</dref> $B$G$N=*C<J8;z$O(B `D'. + + +<h3> koi8-r +<node> koi8-r +<p> +A <dref>MIME charset</dref> for Cyrillic script for Russian or other +languages. +<p> +It is a 1 byte <dref>8bit</dref> <dref>coded character set</dref>, not +based on <dref>ISO 2022</dref>. It is a de-fact standard. +<p> +It is defined in RFC 1489. +<p> +<rfc number="1489" author="A. Chernov" title="Registration of a + Cyrillic Character Set" date="July 1993"> + + +<h3> KS C5601-1987 +<node> KS C5601 +<p> +A <dref>94x94-character set</dref> for Korean language (Hangul +script). Korean Standard. Final byte of <dref>ISO 2022</dref> is +`C'. + +<standard abbrev="KS C5601" org="Korea Industrial Standards + Association" title-en="Code for Information Interchange + (Hangul and Hanja)" number="KS C 5601" year="1987"> + + +<h3> message +<node> message +<p> +$B$3$3$G$O(B <dref>RFC 822</dref> $B$GDj5A$5$l$k(B mail $B$H(B <dref>RFC +1036</dref> $B$GDj5A$5$l$k(B news $B5-;v$NAm>N$H$7$FMQ$$$k!#(B + + +<h3> message/rfc822 +<node> message/rfc822 +<p> +<concept>message/rfc822</concept> indicates that the body contains an +encapsulated message, with the syntax of an <dref>RFC 822</dref> +message. It is the replacement of traditional <dref>RFC 934</dref> +encapsulation. It is defined in <dref>RFC 2046</dref>. + + +<h3> method +<node> method +<p> +tm $B$GFCDj$N<oN`$N(B data $B$r:F@8$7$?$H$-<B:]$K$=$N=hM}$r9T$J$&(B +program. Emacs Lisp $B$G=q$+$l$?(B <concept>internal method</concept> $B$H(B C +$B$d(B script $B8@8l$J$I$G=q$+$l$?(B <concept>external method</concept> $B$,$"$k!#(B +<p> +<cf file="tm-view-en" node="method"> + + +<h3> MIME +<node> MIME +<p> +MIME stands for <concept>Multipurpose Internet Mail +Extensions</concept>, it is an extension for <dref>RFC 822</dref>. +<p> +According to RFC 2045: +<p> +STD 11, RFC 822, defines a message representation protocol specifying +considerable detail about US-ASCII message headers, and leaves the +message content, or message body, as flat US-ASCII text. This set of +documents, collectively called the Multipurpose Internet Mail +Extensions, or MIME, redefines the format of messages to allow for +<p> +<ol> +<li>textual message bodies in character sets other than US-ASCII, +</li> +<li>an extensible set of different formats for non-textual message +bodies, +</li> +<li>multi-part message bodies, and +</li> +<li>textual header information in character sets other than US-ASCII. +</ol> + +<p> +It is defined in <dref>RFC 2045</dref>, <dref>RFC 2046</dref>, <a +node="encoded-word">RFC 2047</a>, <dref>RFC 2048</dref> and <dref>RFC +2049</dref>. + + +<h3> MIME charset +<node> MIME charset +<p> +<dref>Coded character set</dref> used in <dref>Content-Type +field</dref> or charset parameter of <a +node="encoded-word">encoded-word</a>. +<p> +It is defined in <dref>RFC 2045</dref>. +<p> +<dref>iso-2022-jp</dref> $B$d(B <a node="euc-kr">euc-kr</a> $B$O$=$N#1$D!#(B +$B!J$3$3$G$O!"(BMIME charset $B$O(B<a node="Character set">$BJ8;z=89g(B</a>$B$H6hJL(B +$B$7$F>.J8;z$G=q$$$F$$$k!K(B + + +<h3> MTA +<node> MTA +<p> +<concept>Message Transfer Agent</concept> $B$NN,$G!"(Bsendmail $B$J$I$N(B mail +$BG[Aw(B program $B$H(B news server $B$NAm>N!#(B +<p> +<cf node="MUA"> + + +<h3> MUA +<node> MUA +<p> +<concept>Message User Agent</concept> $B$NN,$G!"(Bmail reader $B$H(B news +reader $B$NAm>N!#(B +<p> +<cf node="MTA"> + + +<h3> MULE +<node> MULE +<p> +$BH>ED(B $B7u0l;a$i$,:n$C$?!"B?8@8l$5$l$?(B <a node="Emacs">Emacs</a>. +<p> +[MULE] Nishikimi M., Handa K. and Tomura S., ``Mule: MULtilingual +Enhancement to GNU Emacs'', Proc. of INET'93, August, 1993. +<p> +$B8=:_!"(BMULE $B$N5!G=$r(B Emacs $B$K(B merge $B$9$k:n6H$,9T$o$l$F$*$j!"(B<a +href="ftp://etlport.etl.go.jp/pub/mule/mule-19.33-gamma.taz"> alpha $BHG(B +</a> $B$,B8:_$9$k!#(B +<p> +$B$=$NB>!"(BXEmacs $B$K(B merge $B$7$?$b$N$bB8:_$9$k!#(B +<p> +$B$3$N$?$a!"8=:_$G$OB?8@8l(B Emacs $B$O!"85!9$N(B MULE $B$r4^$a$F#3<oN`$"$k$3$H(B +$B$K$J$k!#(B +<p> +$B$=$3$G!"$3$3$G$O!"B?8@8l(B Emacs $B$NAm>N$r(B <concept>mule</concept>, $B85!9(B +$B$N(B MULE $B$r(B <concept>MULE</concept>, mule $B5!G=$r(B merge $B$7$?(B Emacs $B$r(B +<concept>Emacs/mule</concept>, mule $B5!G=$r(B merge $B$7$?(B XEmacs $B$r(B +<concept>XEmacs/mule</concept> $B$H8F$V$3$H$K$9$k!#(B + + +<h3> Multipart +<node> multipart +<p> +<concept>multipart</concept> means <dref>media type</dref> to insert +multiple <dref>entities</dref> in a single body. Or it also indicates +a message consists of multiple entities. +<p> +There are following subtypes registered in <dref>RFC 2046</dref>: + +<ul> +<li><dref>multipart/mixed</dref> +<li><dref>multipart/alternative</dref> +<li><dref>multipart/digest</dref> +<li><dref>multipart/parallel</dref> +</ul> + +<noindent> +and registered in <a node="Security multipart">RFC 1847</a>: + +<ul> +<li><dref>multipart/signed</dref> +<li><dref>multipart/encrypted</dref> +</ul> + + +<h3> multipart/alternative +<node> multipart/alternative +<p> +<concept>multipart/digest</concept> is one of <dref>multipart</dref> +media types. This type is syntactically identical to +<dref>multipart/mixed</dref>, but the semantics are different. In +particular, each of the body parts is an ``alternative'' version of +the same information. +<p> +<cf node="RFC 2046"> + + +<h3> multipart/digest +<node> multipart/digest +<p> +<concept>multipart/digest</concept> is one of <dref>multipart</dref> +media types. This type is syntactically identical to +<dref>multipart/mixed</dref>, but the semantics are different. In +particular, in a digest, the default Content-Type value for a body +part is changed from <dref>text/plain</dref> to +<dref>message/rfc822</dref>. +<p> +This is the replacement of traditional <dref>RFC 1153</dref> based +<dref>encapsulation</dref>. +<p> +<cf node="RFC 2046"> + + +<h3> multipart/encrypted +<node> multipart/encrypted +<p> +RFC 1847 $B$GDj5A$5$l$?(B <dref>Security multipart</dref> $B$N#1$D$G!"0E9f2=(B +$B$5$l$?(B message $B$rI=8=$9$k$N$KMQ$$$k!#(B +<p> +<cf node="PGP/MIME"> + + +<h3> multipart/mixed +<node> multipart/mixed +<p> +Primary and default subtype of <dref>multipart</dref>, it is used when +the body parts are independent and need to be bundled in a particular +order. +<p> +<cf node="RFC 2046"> + + +<h3> multipart/parallel +<node> multipart/parallel +<p> +<concept>multipart/parallel</concept> is a subtype of +<dref>multipart</dref>. This type is syntactically identical to +<dref>multipart/mixed</dref>, but the semantics are different. In +particular, in a parallel entity, the order of body parts is not +significant. +<p> +<cf node="RFC 2046"> + + +<h3> multipart/signed +<node> multipart/signed +<p> +RFC 1847 $B$GDj5A$5$l$?(B <dref>Security multipart</dref> $B$N#1$D$G!"EE;R=p(B +$BL>$rI=8=$9$k$N$KMQ$$$k!#(B +<p> +<cf node="PGP/MIME"> + + +<h3> PGP +<node> PGP +<p> +Phil Zimmermann $B;a$,:n@.$7$?8x3+800E9f=hM}7O$N#1$D!#(B +<dref>message</dref> $B$N0E9f2=$dEE;R=pL>$r9T$&$3$H$,$G$-$k!#(BPretty Good +Privacy $B$NN,!#(B +<p> +$BEAE}E*$J(B PGP $B$G$O(B <dref>encapsulation</dref> $B$K(B <dref>RFC 934</dref>$B$K(B +$B=`$8$?J}K!$rMQ$$$k!#$3$l$O(B <dref>MIME</dref> $B$HL7=b$9$k$N$G(B +<dref>PGP/MIME</dref> $B$,Ds0F$5$l$F$$$k!#0lJ}!"(BMIME $B$K$*$$$F(B PGP $B$N(B +encapsulation $B$rMQ$$$kJ}K!(B <cf node="PGP-kazu"> $B$bMxMQ$5$l$F$-$?!#$7$+(B +$B$7!":#8e$O(B PGP/MIME $B$KE}0l$7$F$$$/J}$,K>$^$7$$!#(B +<p> +<rfc name="PGP" number="1991" type="Informational" author="D. Atkins, + W. Stallings and P. Zimmermann" title="PGP Message + Exchange Formats" date="August 1996"> + + + +<h3> PGP-kazu +<node> PGP-kazu +<p> +$B;3K\(B $BOBI'(B $B;a$,Ds0F$7$?(B <a node="MIME">MIME</a> $B$G(B <a +node="PGP">PGP</a> $B$rMxMQ$9$k$?$a$NJ}K!$r$3$3$G$O(B +<concept>PGP-kazu</concept> $B$H8F$V$3$H$K$9$k!#(B +<p> +PGP-kazu $B$O(B <concept>application/pgp</concept> $B$H$$$&(B +<dref>content-type</dref> $B$rDj5A$9$k!#(B +<p> +application/pgp $B$N(B part $B$G$O(B PGP $B$N(B <dref>encapsulation</dref> $B$,MQ$$(B +$B$i$l$k!#(BPGP $B$N(B encapsulation <cf node="RFC 934"> $B$H(B MIME $B$N(B +encapsulation $B$OL7=b$9$k$N$G!"(BPGP $B$N(B encapsulation $B$r2r$+$J$$8B$j!"Cf(B +$B$K4^$^$l$?(B MIME message $B$rFI$`$3$H$,$G$-$J$/$J$k!#B($A!"(BPGP-kazu $B$KBP(B +$B1~$7$F$$$J$$(B MIME $B$KBP1~$7$?(B <dref>MUA</dref> $B$O$=$N(B part $B$,FI$a$J$/$J(B +$B$k!#$=$NBe$o$j!"(BMIME $B$KBP1~$7$F$$$J$$(B PGP $BBP1~$N(B <dref>MUA</dref> $B$G$b(B +message $B$rFI$`$3$H$,$G$-$k!#(B +<p> +PGP-kazu $B$G$O(B MUA $B$O(B PGP $B$N$H(B MIME $B$N$H$$$$D$N(B encapsulation $B$rCN$i(B +$B$J$1$l$P$J$i$J$$!#$^$?!"(Bapplication/pgp part $B$r(B parse $B$9$k$?$a$K$O!"$^(B +$B$:!"(Bpgp $B$N=hM}$r9T$o$J$1$l$P$J$i$J$$$N$G!"(Bparse $B=hM}$,J#;($K$J$k!#(B +<p> +$B$^$?!"(BInternet $B$G$O:#8e(B <dref>PGP/MIME</dref> $B$NJ}8~$GI8=`2=$7$F$$$3$&(B +$B$H$$$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP-kazu $B$OMQ$$$J$$$N$,K>(B +$B$^$7$$!#(B +<p> +[draft-kazu-pgp-mime-00.txt] Yamamoto K., ``PGP MIME Integration'', +October, 1995 + + +<h3> PGP/MIME +<node> PGP/MIME +<p> +Michael Elkins $B;a$,Ds0F$7$?(B <a node="MIME">MIME</a> $B$G(B <a +node="PGP">PGP</a> $B$rMxMQ$9$k$?$a$NJ}K!!#(B +<p> +<a node="Security multipart">RFC 1847</a> $B$K4p$-!"(BMIME $B$N(B multipart $B$K(B +$B$h$k(B <dref>encapsulation</dref> $B$r9T$&!#$3$N$?$a!"(BMIME $B$N<+A3$J3HD%$K(B +$B$J$C$F$$$k!#$7$+$7!"EAE}E*$J(B PGP$B$H$N8_49@-$,<:$o$l$F$$$k!#(B +<p> +PGP/MIME $B$G$O(B <dref>PGP-kazu</dref> $B$H0[$J$j!"(BMIME $B$N(B encapsulation $B$N(B +$B$_$rMQ$$$k!#$^$?!"$3$N$?$a!"(BPGP $B$N=hM}$r9T$&A0$K(B message $B$N(B parse $B$r9T(B +$B$&$3$H$,$G$-$k!#(B +<p> +Internet $B$G$O:#8e(B <dref>PGP/MIME</dref> $B$NJ}8~$GI8=`2=$7$F$$$3$&$H$$$&(B +$B$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP $B$rMQ$$$k>l9g$O(B PGP/MIME$B$rMQ(B +$B$$$k$N$,K>$^$7$$!#(B + +<rfc name="PGP/MIME" number="2015" type="Standards Track" + author="M. Elkins" title="MIME Security with Pretty Good + Privacy (PGP)" date="October 1996"> + + +<h3> Quoted-Printable +<node> Quoted-Printable +<p> +<concept>Quoted-Printable</concept> is a transfer encoding method of +<dref>MIME</dref> defined in <dref>RFC 2045</dref>. +<p> +If the data being encoded are mostly US-ASCII text, the encoded form +of the data remains largely recognizable by humans. +<p> +<cf node="Base64"> + + +<h3> RFC 821 +<node> RFC 821 +<p> +<concept>SMTP</concept> $B$H8F$P$l$k(B Internet mail $B$NG[AwK!$NI8=`$rDj$a(B +$B$F$$$k(B RFC. + +<rfc name="SMTP" number="821" type="STD 10" author="J. Postel" + title="Simple Mail Transfer Protocol" date="August + 1982"> + + +<h3> RFC 822 +<node> RFC 822 +<p> +Internet mail $B$N<g$K(B <concept>message header</concept> $B$K4X$9$k7A<0$K(B +$B4X$9$kI8=`$rDj$a$F$$$k(B RFC. + +<memo> +<p> +news message $B$b$3$l$K=`$8$F$$$k$N$G!"(B<concept>Internet mail</concept> +$B$H=q$/$h$j$b!"(B<concept>Internet message</concept> $B$H=q$$$?J}$,NI$$$+$b(B +$B$7$l$J$$!#(B +</memo> + +<rfc number="822" type="STD 11" author="D. Crocker" title="Standard + for the Format of ARPA Internet Text Messages" + date="August 1982"> + + +<h3> RFC 934 +<node> RFC 934 +<p> +<a node="RFC 822">Internet mail</a> $B$N(B <a node="encapsulation"> +<concept>encapsulation</concept></a> $B$NJ}K!$rDj$a$?(B RFC. +<p> +<dref>MIME</dref> $B$HL7=b$9$k$N$G!"8=:_$G$O(B <dref>message/rfc822</dref> +$B$rMQ$$$k$Y$-$G$"$k!#(B + + +<rfc number="934" author="Marshall T. Rose and Einar A. Stefferud" + title="Proposed Standard for Message Encapsulation" + date="January 1985"> + + +<h3> RFC 1036 +<node> RFC 1036 +<p> +USENET $B$G$N(B message $B$N7A<0$rDj$a$?(B RFC. <a node="RFC 822">RFC 822</a> +$B$N(B subset $B$K$J$C$F$$$k!#(BInternet $B$NI8=`$G$O$J$$$,!"(BUSENET $B0J30$N(B +netnews $B$G$b$3$l$K=`$8$F$$$k$b$N$,B?$$!#(B + +<rfc name="USENET" number="1036" author="M. Horton and R. Adams" + title="Standard for Interchange of USENET Messages" + date="December 1987" obsolete="850"> + + +<h3> RFC 1153 +<node> RFC 1153 +<p> +$BJ#?t$N(B <a node="RFC 822">Internet mail</a> $B$r(B <a node="encapsulation"> +<concept>encapsulation</concept></a> $B$9$k$?$a$NJ}K!$rDj$a$?(B +RFC. <dref>RFC 934</dref> $B$rMQ$$$k!#(B +<p> +<dref>MIME</dref> $B$HL7=b$9$k$N$G!"8=:_$G$O(B <dref>message/rfc822</dref> +$B$rMQ$$$?(B <dref>multipart</dref> $B$rMQ$$$k$Y$-$G$"$k!#(B +<p> +<cf node="multipart/digest"> + +<rfc number="1153" author="F. Wancho" title="Digest Message Format" + date="April 1990"> + + +<h3> RFC 1557 +<node> RFC 1557 +<p> +<dref>euc-kr</dref> $B$H(B <dref>iso-2022-kr</dref> $B$H$$$&4Z9q8l$N$?$a$N(B +<a node="MIME charset">MIME charset</a> $B$rDj5A$7$F$$$k(B RFC. + +<rfc number="1557" type="Informational" author="U. Choi, K. Chon and + H. Park" title="Korean Character Encoding for Internet + Messages" date="December 1993"> + + +<h3> RFC 1922 +<node> RFC 1922 +<p> +<dref>iso-2022-cn</dref>, <dref>iso-2022-cn-ext</dref>, +<dref>cn-gb</dref>, <dref>cn-big5</dref> $B$H$$$C$?Cf9q8l$N$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$rDj5A$7$F$$$k(B RFC. +<p> +$B$3$l$K2C$($F!"(B<concept>charset-edition</concept> $B$H(B +<concept>charset-extension</concept> $B$H$$$&(B <dref>Content-Type +field</dref> $B$N(B parameter $B$rDj5A$7$F$$$k!#(B + +<rfc number="1922" type="Informational" author="Zhu, HF., Hu, DY., + Wang, ZG., Kao, TC., Chang, WCH. and Crispin, M." + title="Chinese Character Encoding for Internet Messages" + date="March 1996"> + + +<h3> RFC 2045 +<node> RFC 2045 +<p> +<rfc number="2045" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part One: Format of Internet Message + Bodies" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> RFC 2046 +<node> RFC 2046 +<p> +<rfc number="2046" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Two: Media Types" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2048 +<node> RFC 2048 +<p> +<rfc number="2048" type="Standards Track" author="N. Freed, J. Klensin + and J. Postel" title="Multipurpose Internet Mail + Extensions (MIME) Part Four: Registration Procedures" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2049 +<node> RFC 2049 +<p> +<rfc number="2049" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Five: Conformance Criteria and + Examples" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> plain text +<node> plain text +<p> +$B=qBN$dAHHG$K4X$9$k>pJs$r;}$?$J$$(B <a node="Coded character set">$BJ8;zId(B +$B9f(B</a>$B$N$_$GI=8=$5$l$k(B text $B>pJs!#(B<cf node="text/plain"> + + +<h3> Security multipart +<node> Security multipart +<p> +<a node="MIME">MIME</a> $B$G0E9f$dEE;R=qL>$rMQ$$$k$?$a$N7A<0!#(B<a +node="multipart/signed"><concept>multipart/signed</concept></a> $B$H(B <a +node="multipart/encrypted"><concept>multipart/encrypted</concept></a> +$B$H$$$&(B multipart $B$rMQ$$$k!#(BMOSS $B$d(B <a node="PGP/MIME">PGP/MIME</a> $B$O(B +$B$3$l$K4p$$$F$$$k!#(B + +<rfc name="Security multipart" number="1847" type="Standards Track" + author="James Galvin, Gale Murphy, Steve Crocker and Ned + Freed" title="Security Multiparts for MIME: + Multipart/Signed and Multipart/Encrypted" date="October + 1995"> + + +<h3> text/enriched +<node> text/enriched +<p> +RFC 1521 $B$GDj5A$5$l$?(B <concept>text/richtext</concept> $B$KBe$o$C$F!"=q(B +$BBN$dAHHG$K4X$9$k>pJs$r;}$C$?(B text$B$rI=8=$9$k$?$a$N(B <dref>media +type</dref>. + +<rfc name="text/enriched" number="1896" author="P. Resnick and + A. Walker" title="The text/enriched MIME Content-type" + date="February 1996" obsolete="1563"> + + +<h3> text/plain +<node> text/plain +<p> +<concept>text/plain</concept> is a <dref>media type</dref> for +<dref>plain text</dref>, defined in <dref>RFC 2046</dref>. +<p> +The default media type of ``text/plain; charset=us-ascii'' for +Internet mail describes existing Internet practice. That is, it is +the type of body defined by <dref>RFC 822</dref>. +<p> +<cf node="MIME charset"><cf node="us-ascii"> + + +<h3> tm-kernel, tm +<node> tm-kernel +<p> +Emacs $B$G(B <a node="MIME">MIME</a> $B$rMxMQ$9$k$?$a$N(B user interface $B$rDs(B +$B6!$9$k(B library $B72!#(B`tools for MIME' $B$NN,!#(B + +<memo title="$B$I$&$G$bNI$$$3$H(B(^-^;"> +<p> +<ul> + <li> tm $B$O(B ``tiny-mime'' $B$NN,$8$c$J$$$i$7$$$>(B (^-^; + <li> tm $B$O:n<T$N%$%K%7%c%k$8$c$J$$$i$7$$$>(B (^-^; + <li> ``Tools for MIME'' $B$NN,$H$$$&$N$O$3$8$D$1$i$7$$$>(B (^-^; +</ul> +</memo> + + +<h3> tm-MUA +<node> tm-MUA +<p> +<a node="tm-kernel">tm</a> $B$rMQ$$$?(B <a node="MUA">MUA</a> $B$b$7$/$O(B MUA +$B$KBP$9$k(B extender. +<p> +<concept>tm $BBg@9$j(B package</concept> $B$K$O(B + +<ul> +<li><a file="mh-e">mh-e</a> $BMQ$N(B <concept>tm-mh-e</concept> +<li>GNUS $BMQ$N(B <concept>tm-gnus</concept> +<li>Gnus $BMQ$N(B <a file="gnus-mime-en"><concept>gnus-mime</concept></a> +<li>VM $BMQ$N(B <concept>tm-vm</concept> +<li>RMAIL $BMQ$N(B <concept>tm-rmail</concept> +</ul> + +<noindent> +$B$,4^$^$l$F$$$k!#(B +<p> +$BFHN)$7$?(B MUA $B$H$7$F$O(B <a file="cmail">cmail</a> $B$,(B tm $B$rMxMQ2DG=$G$"$k!#(B + + +<h3> us-ascii +<node> us-ascii +<p> +$B%"%a%j%+O"K.$J$I$G;H$o$l$k1Q8l$J$I$rI=8=$9$k$?$a$N(B <a node="MIME +charset">MIME charset</a> $B$N#1$D!#(B +<p> +<dref>ASCII</dref> $B$N$_$+$i$J$j(B <dref>ISO 2022</dref> $B$K$h$k(B<a +node="Code extension">$BId9f3HD%(B</a>$B$O5v$5$l$J$$!#(B +<p> +Internet mail $B$K$*$1$kI8=`$N(B<a node="Coded character set">$BId9f2=J8;z=8(B +$B9g(B</a>$B$G$"$j!"L@<(E*$K(B MIME charset $B$,<($5$l$J$$>l9g$O86B'$H$7$F(B +<concept>us-ascii</concept> $B$,;H$o$l$k!#(B +<p> +$B$^$?!"(B<a node="RFC 822">RFC 822</a> $B$K$*$1$k(B <concept>ASCII</concept> +$B$O(B us-ascii $B$r;X$9$b$N$H2r<a$9$Y$-$G$"$k!#(B + + +<h1> Setting +<node> Setting +<p> +In the tm package, two files, <file>mime-setup.el</file> and +<file>tm-setup.el</file>, are provided to ease the setup. +<p> +The <file>mime-setup.el</file> is used for the whole MIME related +setup including MIME encoding using <file>tm-edit.el</file>, while +<file>tm-setup.el</file> is used to set up tm-MUA only. + + +<h2> Normal setting +<node> mime-setup +<p> +If you want normal setting, please use <concept>mime-setup</concept>. +For example, please insert following into <file>~/.emacs</file>: + +<lisp> +(load "mime-setup") +</lisp> + +<p> +As <file>mime-setup.el</file> loads <file>tm-setup.el</file>, you +don't need to load <file>tm-setup.el</file> when you use +<file>mime-setup.el</file> (Description of old version of Gnus FAQ is +wrong!) + + +<h3> signature +<node> signature +<p> +You can set up the <concept>automatic signature selection +tool</concept> using <file>mime-setup</file>. If you want to +automatically select the signature file depending on how the message +headers show, add lines like shown below to your .emacs (Refer to the +reference manual of <file>signature.el</file> for more details). + +<lisp> +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +</lisp> + + +<defvar name="mime-setup-use-signature"> +<p> +If it is not <code>nil</code>, <file>mime-setup.el</file> sets up for +<file>signature.el</file>. Its default value is <code>t</code>. +</defvar> + + +<defvar name="mime-setup-signature-key-alist"> +<p> +It defines key to bind signature inserting command for each +major-mode. Its default value is following: + +<lisp> + ((mail-mode . "\C-c\C-w")) +</lisp> + +<p> +If you want to change, please rewrite it. For example: + +<lisp> +(set-alist 'mime-setup-signature-key-alist + 'news-reply-mode "\C-c\C-w") +</lisp> + +</defvar> + + +<defvar name="mime-setup-default-signature-key"> +<p> +If key to bind signature inserting command for a major-mode is not +found from <code>mime-setup-signature-key-alist</code>, its value is +used as key. Its default value is <code>"\C-c\C-s"</code>. +</defvar> + + +<h3> Notices for GNUS +<node> Notice about GNUS +<p> +When <file>mime-setup.el</file> sets up for <file>signature.el</file>, +it sets variable <code>gnus-signature-file</code> to <code>nil</code>. +Therefore GNUS does not insert signature automatically when it is +sending a message. Reason of this setting is following: +<p> +GNUS inserts signature after <file>tm-edit.el</file> composed as MIME +message. Therefore signature inserted by GNUS is not processed as a +valid MIME part. In particular, for multipart message, signature +places in outside of MIME part. So MIME MUA might not display it. +<p> +Other notice is key bind. In historical reason, key bind to insert +signature is <kbd>C-c C-s</kbd> (like <a file="mh-e">mh-e</a>) instead +of <kbd>C-c C-w</kbd>. If you change to GNUS's default, please set +following: + +<lisp> +(set-alist 'mime-setup-signature-key-alist 'news-reply-mode "\C-c\C-w") +</lisp> + + +<h2> Setting not to use tm-edit +<node> tm-setup +<p> +<concept>tm-setup</concept> only sets up <a node="tm-MUA">tm-MUA</a>s. +In other words, it is a setting to avoid to use tm-edit. If you don't +want to compose MIME message or want to use other MIME composer, +please use it instead of <file>mime-setup.el</file>. +<p> +For example, please insert following into <file>~/.emacs</file>: + +<lisp> +(load "tm-setup") +</lisp> + +<p> + +<memo> +<p> +If you use <file>mime-setup.el</file>, you you don't need to load +<file>tm-setup.el</file>. +</memo> + + +<h2> Setting for VM +<node> setting for VM +<p> +If you use <concept>vm</concept>, please insert following in +<file>~/.vm</file>: + +<lisp> +(require 'tm-vm) +</lisp> + + +<memo title="Notice"> +<p> +If you use <concept>BBDB</concept>, please insert <code>(require +'tm-vm)</code> <bf>after</bf> <code>(bbdb-insinuate-vm)</code>. +</memo> + + +<h2> Setting up without loading provided setup files +<node> manual setting +<p> +You may find the valuable hints in <file>mime-setup.el</file> or +<file>tm-setup.el</file> if you want to set up MIME environment +without loading the tm-provided setup files. + +<memo> +<p> +Current tm provides some convenient features to expect tm-edit, and +they can not use if <file>mime-setup.el</file> is not used. If you +want to set up original setting to use tm-edit, please declare +following setting: + +<lisp> +(provide 'mime-setup) +</lisp> + +</memo> + + +<h1> How to report bug and about mailing list of tm +<node> Bug report +<p> +If you write bug-reports and/or suggestions for improvement, please +send them to the tm Mailing List: + +<ul> +<li> Japanese <mail>bug-tm-ja@chamonix.jaist.ac.jp</mail> +<li> English <mail>bug-tm-en@chamonix.jaist.ac.jp</mail> +</ul> + +<p> +Notice that, we does not welcome bug reports about too old version. +Bugs in old version might be fixed. So please try latest version at +first. +<p> +You should write <concept>good bug report</concept>. If you write +only ``tm does not work'', we can not find such situations. At least, +you should write name, type, variants and version of OS, emacs, tm and +MUA, and setting. In addition, if error occurs, to send backtrace is +very important. <cf file="emacs" node="Bugs"> +<p> +Bug may not appear only your environment, but also in a lot of +environment (otherwise it might not bug). Therefor if you send mail +to author directly, we must write a lot of mails. So please send mail +to address for tm bugs instead of author. +<p> +Via the tm ML, you can report tm bugs, obtain the latest release of +tm, and discuss future enhancements to tm. To join the tm ML, send +e-mail to: + +<ul> +<li> Japanese <mail>tm-ja-admin@chamonix.jaist.ac.jp</mail> +<li> English <mail>tm-en-admin@chamonix.jaist.ac.jp</mail> +</ul> + +<noindent> +Since the user registration is done manually, please write the mail +body in human-recognizable language (^_^). + + +<h1> Concept Index +<node> Concept Index + +<cindex> + + +<h1> Variable Index +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-en.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1998 @@ +\input texinfo.tex +@setfilename tm-en.info +@settitle{tm 7.90 Manual (English Version)} +@titlepage +@title tm 7.90 Manual (English Version) +@author MORIOKA Tomohiko <morioka@@jaist.ac.jp> +@subtitle 1996/10/15 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm 7.90 Manual (English Version) + +@ifinfo + +This file documents tm, a MIME package for GNU Emacs. +@end ifinfo + +@menu +* Introduction:: What is tm? +* Setting:: +* Bug report:: How to report bug and about mailing list of tm +* Concept Index:: +* Variable Index:: +@end menu + +@node Introduction, Setting, Top, Top +@chapter What is tm? + +The tm package is a set of modules to enjoy MIME on GNU Emacs. Using +tm, you can + +@itemize @bullet +@item + playback or view the MIME messages using tm-view +@item + compose MIME message using tm-edit +@item + use the enhanced MIME features with mh-e, GNUS, Gnus, RMAIL and VM +@end itemize + +@noindent +and more. + +Please read following about each topics: + +@itemize @bullet +@item +tm-MUA for Gnus (@ref{(gnus-mime-en)}) +@item +tm-MUA for GNUS (@ref{(tm-gnus-en)}) +@item +tm-MUA for mh-e (@ref{(tm-mh-e-en)}) +@item +mime/viewer-mode (@ref{(tm-view-en)}) +@item +mime/editor-mode (@ref{(tm-edit-en)}) +@end itemize + + + +@menu +* Glossary:: +@end menu + +@node Glossary, , Introduction, Introduction +@section Glossary + + +@menu +* 7bit:: +* 8bit:: +* 94-character set:: +* 96-character set:: +* 94x94-character set:: +* ASCII:: +* Base64:: +* binary:: +* graphic character set:: Graphic Character Set +* cn-gb:: cn-gb, gb2312 +* cn-big5:: cn-big5, big5 +* CNS:: CNS 11643-1992 +* coded character set:: Coded character set, Character code +* code extension:: Code extension +* Content-Disposition:: Content-Disposition field +* media type:: +* Content-Type field:: +* Emacs:: +* encoded-word:: +* encapsulation:: +* euc-kr:: +* FTP:: FTP +* GB 2312:: GB 2312-1980 +* GB 8565.2:: GB 8565.2-1988 +* hz-gb2312:: +* ISO 2022:: +* iso-2022-cn:: +* iso-2022-cn-ext:: +* iso-2022-jp:: +* iso-2022-jp-2:: +* iso-2022-kr:: +* ISO 646:: +* ISO 8859-1:: +* iso-8859-1:: +* ISO 8859-2:: +* iso-8859-2:: +* ISO 8859-3:: +* ISO 8859-4:: +* ISO 8859-5:: +* iso-8859-5:: +* ISO 8859-6:: +* ISO 8859-7:: +* iso-8859-7:: +* ISO 8859-8:: +* ISO 8859-9:: +* ISO-IR-165:: ISO-IR-165, CCITT Extended GB +* JIS X0201:: +* JIS C6226:: JIS C6226-1978 +* JIS X0208:: +* JIS X0212:: JIS X0212-1990 +* koi8-r:: +* KS C5601:: KS C5601-1987 +* message:: +* message/rfc822:: +* method:: +* MIME:: +* MIME charset:: +* MTA:: +* MUA:: +* MULE:: +* multipart:: Multipart +* multipart/alternative:: +* multipart/digest:: +* multipart/encrypted:: +* multipart/mixed:: +* multipart/parallel:: +* multipart/signed:: +* PGP:: +* PGP-kazu:: +* PGP/MIME:: +* Quoted-Printable:: +* RFC 821:: +* RFC 822:: +* RFC 934:: +* RFC 1036:: +* RFC 1153:: +* RFC 1557:: +* RFC 1922:: +* RFC 2045:: +* RFC 2046:: +* RFC 2048:: +* RFC 2049:: +* plain text:: +* Security multipart:: +* text/enriched:: +* text/plain:: +* tm-kernel:: tm-kernel, tm +* tm-MUA:: +* us-ascii:: +@end menu + +@node 7bit, 8bit, Glossary, Glossary +@subsection 7bit + +@cindex{7bit}@strong{7bit} means any integer between 0 .. 127.@refill + +Any data represented by 7bit integers is called @cindex{7bit +data}@strong{7bit data}.@refill + +Textual string consisted of Control characters between 0 .. 31 and 127, +and space represented by 32, and graphic characters between 33 .. 236 +are called @cindex{7bit (textual) string}@strong{7bit (textual) +string}.@refill + +Traditional Internet MTA (@ref{MTA}) can translate 7bit data, so it is +no need to translate by Quoted-Printable (@ref{Quoted-Printable}) or +Base64 (@ref{Base64}) for 7bit data.@refill + +However if there are too long lines, it can not translate by 7bit MTA +even if it is 7bit data. RFC 821 (@ref{RFC 821}) and RFC 2045 (@ref{RFC +2045}) require lines in 7bit data must be less than 998 bytes. So if a +``7bit data'' has a line more than 999 bytes, it is regarded as binary +(@ref{binary}). For example, Postscript file should be encoded by +Quoted-Printable. + + +@node 8bit, 94-character set, 7bit, Glossary +@subsection 8bit + +@cindex{8bit}@strong{8bit} means any integer between 0 .. 255.@refill + +Any data represented by 8bit integers is called @cindex{8bit +data}@strong{8bit data}.@refill + +Textual string consisted of Control characters between 0 .. 31, 127, and +128 .. 159, and space represented by 32, and graphic characters between +33 .. 236 and 160 .. 255 are called @cindex{8bit (textual) +string}@strong{8bit (textual) string}.@refill + +For example, iso-8859-1 (@ref{iso-8859-1}) or euc-kr (@ref{euc-kr}) are +coded-character-set represented by 8bit textual string.@refill + +Traditional Internet MTA (@ref{MTA}) can translate only 7bit +(@ref{7bit}) data, so if a 8bit data will be translated such MTA, it +must be encoded by Quoted-Printable (@ref{Quoted-Printable}) or Base64 +(@ref{Base64}).@refill + +However 8bit MTA are increasing today.@refill + +However if there are too long lines, it can not translate by 8bit MTA +even if it is 8bit data. RFC 2045 (@ref{RFC 2045}) require lines in +8bit data must be less than 998 bytes. So if a ``8bit data'' has a line +more than 999 bytes, it is regarded as binary (@ref{binary}), so it must +be encoded by Base64 or Quoted-Printable. + + +@node 94-character set, 96-character set, 8bit, Glossary +@subsection 94-character set + +@cindex{94-character set}@strong{94-character set} is a kind of 1 byte +graphic character set (@ref{graphic character set}), each characters are +in positions 02/01 (33) to 07/14 (126) or 10/01 (161) to 15/14 (254). +(ex. ASCII (@ref{ASCII}), JIS X0201-Latin) + + +@node 96-character set, 94x94-character set, 94-character set, Glossary +@subsection 96-character set + +@cindex{96-character set}@strong{96-character set} is a kind of 1 byte +graphic character set (@ref{graphic character set}), each characters are +in positions 02/00 (32) to 07/15 (126) or 10/00 (160) to 15/15 +(255). (ex. ISO 8859) + + +@node 94x94-character set, ASCII, 96-character set, Glossary +@subsection 94x94-character set + +@cindex{94x94-character set}@strong{94x94-character set} is a kind of 2 +byte graphic character set (@ref{graphic character set}), each bytes are +in positions 02/01 (33) to 07/14 (126) or 10/01 (161) to 15/14 (254). +(ex. JIS X0208 (@ref{JIS X0208}), GB 2312 (@ref{GB 2312})) + + +@node ASCII, Base64, 94x94-character set, Glossary +@subsection ASCII + +$B%"%a%j%+O"K.$G;H$o$l$kJ8;z$rId9f2=$7$?(B 94-character set +(@ref{94-character set}). A-Z, a-z $B$N(B Latin $BJ8;z$H?t;z!"4v$D$+$N5-9f$+(B +$B$i$J$k!#(BISO 646 (@ref{ISO 646}) $B$N0l$D!#(B + +@cindex{ASCII}@cindex{ANSI X3.4:1986} +@noindent +[ASCII] +@quotation +``Coded Character Set -- 7-Bit American Standard Code for Information +Interchange'', ANSI X3.4:1986. +@end quotation + + + +@node Base64, binary, ASCII, Glossary +@subsection Base64 + +@cindex{Base64}@strong{Base64} is a transfer encoding method of MIME +(@ref{MIME}) defined in RFC 2045 (@ref{RFC 2045}).@refill + +The encoding process represents 24-bit groups of input bits as output +strings of 4 encoded characters. Encoded characters represent integer 0 +.. 63 or @cindex{pad}@strong{pad}. Base64 data must be 4 * n bytes, so +pad is used to adjust size.@refill + +These 65 characters are subset of all versions of ISO 646, including +US-ASCII, and all versions of EBCDIC. So it is safe even if it is +translated by non-Internet gateways. + + +@node binary, graphic character set, Base64, Glossary +@subsection binary + +$BG$0U$N(B byte $BNs$r(B @cindex{binary}@strong{binary} $B$H8F$V$3$H$K$7$^$9!#(B +@refill + +8bit (@ref{8bit}) $B$H0[$J$k$N$O(B data $B$K9T$N9=B$$r2>Dj$7$J$$$3$H$G$9!#(B + +$B$^$?!"9T$N9=B$$,$"$C$F$b!"(B999 byte $B0J>e$+$i$J$k9T$,$"$k>l9g$b(B binary$B$H8F(B +$B$V$3$H$K$7$^$9!#(B@refill + +$B$A$J$_$K!"(B7bit (@ref{7bit}) $B$d(B 8bit $B$GI=8=$G$-$k(B data $B$O(B binary $B$G$bI=8=(B +$B$G$-$^$9!#$h$C$F!"(B@cindex{binary data}@strong{binary data} $B$H8@$C$?>l9g!"(B +$BG$0U$N(B data $B$r;X$9$3$H$,$"$j$^$9!#(B + + +@node graphic character set, cn-gb, binary, Glossary +@subsection Graphic Character Set + +Coded character set (@ref{Coded character set}) for graphic characters. + + +@node cn-gb, cn-big5, graphic character set, Glossary +@subsection cn-gb, gb2312 + +$BCf9qBgN&$G$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B MIME +charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code extension})$B$7(B +$B$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B + + +@node cn-big5, CNS, cn-gb, Glossary +@subsection cn-big5, big5 + +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +MIME charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$+$J$$(B 8bit (@ref{8bit}) $B$N(Bcoded character +set (@ref{coded character set})$B$G(B de-fact standard $B$G$"$k!#(BRFC 1922 +(@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B@refill + +cf. @cindex{BIG5} +@noindent +[BIG5] +@quotation +Institute for Information Industry, ``Chinese Coded Character Set in +Computer'', March 1984. +@end quotation + +CNS 11643-1986 (@ref{CNS}) $B$HBP1~4X78$,$"$k!#(B + + +@node CNS, coded character set, cn-big5, Glossary +@subsection CNS 11643-1992 + +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +$BJ8;z=89g(B(@ref{Character set})$B!#BfOQ$NI8=`!#8=:_!"(B94$B!_(B94 (@ref{94x94 +character set}) $B$NLL$,Bh#1LL$+$iBh#7LL$^$G$"$k!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O!"Bh#1LL$,(B `G', $BBh#2LL$,(B `H', $BBh(B +$B#3LL$,(B `I', $BBh#4LL$,(B `J', $BBh#5LL$,(B `K', $BBh#6LL$,(B `L', $BBh#7LL$,(B `M' $B$G$"(B +$B$k!#(B + +@cindex{CNS 11643-1992}@cindex{CNS 11643:1992} +@noindent +[CNS 11643-1992] +@quotation +``Standard Interchange Code for Generally-Used Chinese Characters'', CNS +11643:1992. +@end quotation + + + +@node coded character set, code extension, CNS, Glossary +@subsection Coded character set, Character code + +A set of unambiguous rules that establishes a character set and the +one-to-one relationship between the characters of the set and their +bit combinations. + + +@node code extension, Content-Disposition, coded character set, Glossary +@subsection Code extension + +The techniques for the encoding of characters that are not included in +the character set of a given code. (ex. ISO 2022 (@ref{ISO 2022})) + + +@node Content-Disposition, media type, code extension, Glossary +@subsection Content-Disposition field + +Content $B$NI=<($N;EJ}$d(B file $BL>$rI=8=$9$k$?$a$N(B field. MIME (@ref{MIME}) +$B$N3HD%$N#1$D!#(B@refill + +@cindex{Experimental}@cindex{RFC 1806} +@noindent +[RFC 1806] +@quotation +E R. Troost and S. Dorner, ``Communicating Presentation Information in +Internet Messages: The Content-Disposition Header'', June 1995, +Experimental. +@end quotation + + + +@node media type, Content-Type field, Content-Disposition, Glossary +@subsection media type + +@cindex{media type}@strong{media type} specifies the nature of the data +in the body of MIME (@ref{MIME}) entity (@ref{entity}). It consists of +@cindex{type}@strong{type} and @cindex{subtype}@strong{subtype}. It is +defined in RFC 2046 (@ref{RFC 2046}).@refill + +Currently there are following types: + +@itemize @bullet +@item +@cindex{text}@strong{text} +@item +@cindex{image}@strong{image} +@item +@cindex{audio}@strong{audio} +@item +@cindex{video}@strong{video} +@item +@cindex{application}@strong{application} +@item +@cindex{multipart}@strong{multipart} (@ref{multipart}) +@item +@cindex{message}@strong{message} +@end itemize + + +And there are various subtypes, for example, application/octet-stream, +audio/basic, image/jpeg, multipart/mixed (@ref{multipart/mixed}), +text/plain (@ref{text/plain}), video/mpeg...@refill + +You can refer registered media types at MEDIA TYPES +(ftp://ftp.isi.edu/in-notes/iana/assignments/media-types).@refill + +In addition, you can use private type or subtype using +@cindex{x-token}@strong{x-token}, which as the prefix `x-'. However you +can not use them in public.@refill + +(cf. @ref{Content-Type field}) + + + +@node Content-Type field, Emacs, media type, Glossary +@subsection Content-Type field + +Header field to represent information about body, such as media type +(@ref{media type}), MIME charset (@ref{MIME charset}). It is defined in +RFC 2045 (@ref{RFC 2045}). + +@noindent +@strong{[Memo]} +@quotation + +Historically, Content-Type field was proposed in RFC 1049. In it, +Content-Type did not distinguish type and subtype. However MIME parser +may be able to accept RFC 1049 based Content-Type as unknown type. +@end quotation + + +Content-Type field is defined as following: + +@quotation +``Content-Type'' ``:'' @cindex{type}@strong{type} ``/'' +@cindex{subtype}@strong{subtype} *( ``;'' @cindex{parameter}@strong{parameter} ) +@end quotation + + +For example: + +@quotation +@example +Content-Type: image/jpeg +@end example +@end quotation + + +@quotation +@example +Content-Type: text/plain; charset=iso-2022-jp +@end example +@end quotation + + +@noindent +@strong{[Memo]} +@quotation + +A part does not have content-type field is regarded as + +@quotation +@example +Content-Type: text/plain; charset=us-ascii +@end example +@end quotation + +@noindent +(cf. @ref{us-ascii}) + + +And a part has unknown type/subtype is regarded as + +@quotation +@example +Content-Type: application/octet-stream +@end example +@end quotation + +@end quotation + + + +@node Emacs, encoded-word, Content-Type field, Glossary +@subsection Emacs + +$B$3$3$G$O(B `Emacs' $B$G(B FSF $B$,G[I[$7$F$$$k(B GNU Emacs $B$r;X$7!"(B`emacs' $B$G(B +GNU Emacs $B$NJQ<o$NAm>N$H$9$k!#(B + + +@node encoded-word, encapsulation, Emacs, Glossary +@subsection encoded-word + +Representation non ASCII (@ref{ASCII}) characters in header. It is +defined in @cindex{RFC 2047}@strong{RFC 2047}.@refill + +@cindex{Standards Track}@cindex{RFC 2047} +@noindent +[RFC 2047] +@quotation +K. Moore, ``MIME (Multipurpose Internet Mail Extensions) Part Three: +Message Header Extensions for Non-ASCII Text'', November 1996, Standards +Track (obsolete RFC 1521,1522,1590). +@end quotation + + + +@node encapsulation, euc-kr, encoded-word, Glossary +@subsection encapsulation + +Internet mail (@ref{RFC 822}) $B$rB>$N5-;v$K$^$k$4$HF~$l$kJ}K!!#(B@refill + +$BNc$($P!"5-;v$rE>Aw$7$?$j$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{message/rfc822}) + + + +@node euc-kr, FTP, encapsulation, Glossary +@subsection euc-kr + +$B4Z9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(BKS C5601 +(@ref{KS C5601}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code extension}) +$B$7$F$$$k!#(B@refill + +RFC 1557 (@ref{RFC 1557}) $B$GDj5A$5$l$F$$$k!#(B@refill + +cf. @cindex{euc-kr}@cindex{KS C 5861:1992} +@noindent +[euc-kr] +@quotation +Korea Industrial Standards Association, ``Hangul Unix Environment'', KS +C 5861:1992. +@end quotation + + + +@node FTP, GB 2312, euc-kr, Glossary +@subsection FTP + +Internet $B$G(B file $B$rE>Aw$9$k$?$a$N(B protocol $B$N#1$D!#(BRFC 959 $B$GDj5A$5$l$F(B +$B$$$k!#(B@refill + +@cindex{FTP}@cindex{STD 9}@cindex{RFC 959} +@noindent +[FTP: RFC 959] +@quotation +Postel, J. and J. Reynolds, ``File Transfer Protocol'', October 1985, +STD 9. +@end quotation + + + +@node GB 2312, GB 8565.2, FTP, Glossary +@subsection GB 2312-1980 + +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=$9$?$a$N(B +94x94-character set (@ref{94x94-character set})$B!#Cf9q$N9q2HI8=`!#(BISO +2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `A'.@refill + +$B$3$l$O(B GB $B$K$*$1$k4pK\=8$G$"$k!#(B + +@cindex{GB 2312}@cindex{GB 2312:1980} +@noindent +[GB 2312] +@quotation +$B!X?.B)8r49MQ4A;zJTb{;zId=8(B -- $B4pK\=8!Y(B, ``Code of Chinese Graphic +Character Set for Information Interchange - Primary Set'', GB 2312:1980. +@end quotation + + + +@node GB 8565.2, hz-gb2312, GB 2312, Glossary +@subsection GB 8565.2-1988 + +$BCf9q8l$N$?$a$NJd=uJ8;z=89g(B(@ref{Character set})$B!#Cf9q$N9q2HI8=`!#(BGB 2312 +(@ref{GB 2312}) $B$N6u$-ItJ,$KJd=<$9$k$h$&$KDj5A$5$l$?$i$7$$!#(B + +@cindex{GB 8565.2}@cindex{GB 8565.2:1988} +@noindent +[GB 8565.2] +@quotation +``Information Processing - Coded Character Sets for Text Communication - +Part 2: Graphic Characters used with Primary Set'', GB 8565.2:1988. +@end quotation + + + +@node hz-gb2312, ISO 2022, GB 8565.2, Glossary +@subsection hz-gb2312 + +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B MIME +charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ASCII (@ref{ASCII}) $B$K(B GB 2312 (@ref{GB 2312}) $B$r(B 7bit $B$GId9f3HD%(B +(@ref{Code extension})$B$7$?$b$N$r(B ASCII printable $B$K$J$k$h$&$K9)IW$7$F$$(B +$B$k!#(B@refill + +RFC 1842, 1843 $B$GDj5A$5$l$F$$$k!#(B + +@cindex{Informational}@cindex{RFC 1842} +@noindent +[RFC 1842] +@quotation +Y. Wei, Y. Zhang, J. Li, J. Ding and Y. Jiang, ``ASCII Printable +Characters-Based Chinese Character Encoding for Internet Messages'', +August 1995, Informational. +@end quotation + +@cindex{Informational}@cindex{RFC 1843} +@noindent +[RFC 1843] +@quotation +F. Lee, ``HZ - A Data Format for Exchanging Files of Arbitrarily Mixed +Chinese and ASCII characters'', August 1995, Informational. +@end quotation + + + +@node ISO 2022, iso-2022-cn, hz-gb2312, Glossary +@subsection ISO 2022 + +$BId9f3HD%(B(@ref{Code extension})$B$N$?$a$N9q:]I8=`!#(B@refill + +$B$3$l$rMQ$$$FJ#?t$NJ8;z=89g(B(@ref{Character set})$B$rAH9g$;$F(B 7bit +(@ref{7bit}) $B$J$$$7(B 8bit (@ref{8bit}) $B$N(B $BId9f2=J8;z=89g(B(@ref{Coded +character set}) $B$r:n$k$3$H$,$G$-$k!#(B + +@cindex{ISO 2022}@cindex{ISO/IEC 2022:1994} +@noindent +[ISO 2022] +@quotation +International Organization for Standardization (ISO), ``Information +Processing: ISO 7-bit and 8-bit coded character sets: Code extension +techniques'', ISO/IEC 2022:1994. +@end quotation + + + +@node iso-2022-cn, iso-2022-cn-ext, ISO 2022, Glossary +@subsection iso-2022-cn + +$BCf9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}), CNS 11643 plain 1, plain 2 (@ref{CNS}) $B$r(B 7bit +(@ref{7bit}) $B$GId9f3HD%(B (@ref{Code extension})$B$7$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B + + +@node iso-2022-cn-ext, iso-2022-jp, iso-2022-cn, Glossary +@subsection iso-2022-cn-ext + +$BCf9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}), CNS 11643 plain 1 .. 7 (@ref{CNS}), ISO-IR-165 +(@ref{ISO-IR-165}) $BEy$r(B 7bit (@ref{7bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B@refill + +@noindent +@strong{[Memo]} +@quotation +MULE 2.3 $B$*$h$S!"8=:_$N(B XEmacs/mule $B$G$O@5$7$/07$&$3$H$O$G$-$J$$!#(B + +Emacs/mule $B$G$OMxMQ2DG=$G$"$k!#(B +@end quotation + + + +@node iso-2022-jp, iso-2022-jp-2, iso-2022-cn-ext, Glossary +@subsection iso-2022-jp + +$BF|K\8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N0l$D!#(B + +$B8E$$(B ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}), JIS +X0201-Latin, JIS X0208-1978 (@ref{JIS C6226-1978}), JIS X0208-1983 +(@ref{JIS X0208}) $B$r@Z$jBX$($k(B 7bit (@ref{7bit}) $BJ8;zId9f!#(B@refill + +RFC 1468 $B$GDj5A$5$l$F$$$k!#(B@refill + +@noindent +@strong{[Memo]} +@quotation +JIS X0208-1996? $B$G$O(B ISO 2022 (@ref{ISO 2022}) $B$HFHN)$KDj5A$5$l$kM=Dj!#(B +@end quotation + + +@cindex{iso-2022-jp}@cindex{RFC 1468} +@noindent +[iso-2022-jp: RFC 1468] +@quotation +Murai J., M. Crispin, and E. van der Poel, ``Japanese Character Encoding +for Internet Messages'', June 1993. +@end quotation + + + +@node iso-2022-jp-2, iso-2022-kr, iso-2022-jp, Glossary +@subsection iso-2022-jp-2 + +A MIME charset (@ref{MIME charset}), which is a multilingual extension +of iso-2022-jp (@ref{iso-2022-jp}).@refill + +It is defined in RFC 1554. + +@cindex{iso-2022-jp-2}@cindex{Informational}@cindex{RFC 1554} +@noindent +[iso-2022-jp-2: RFC 1554] +@quotation +Ohta M. and Handa K., ``ISO-2022-JP-2: Multilingual Extension of +ISO-2022-JP'', December 1993, Informational. +@end quotation + + + +@node iso-2022-kr, ISO 646, iso-2022-jp-2, Glossary +@subsection iso-2022-kr + +A MIME charset (@ref{MIME charset}) for Korean language (Hangul +script).@refill + +It is based on ISO 2022 (@ref{ISO 2022}) code extension (@ref{code +extension}) technique to extends ASCII (@ref{ASCII}) to use KS C5601 +(@ref{KS C5601}) as 7bit (@ref{7bit}) text.@refill + +It is defined in RFC 1557 (@ref{RFC 1557}). + + +@node ISO 646, ISO 8859-1, iso-2022-kr, Glossary +@subsection ISO 646 + +$B3F9q$G6&DL$K;H$($k:G>.8BEY$NJ8;z=89g(B(@ref{Character set})$B$rDj$a$?$b$N!#(B +94 $BJ8;z=89g(B (@ref{94 character set})$B$N#1$D!#(BISO 646 IRV$B!J9q:]4p=`HG!K$r(B +$B85$K4v$D$+$NJ8;z$O3F9q$G0c$&J8;z$r3dEv$k$3$H$r5v$7$F$$$F!"4v$D$+$NJQ<o$,(B +$BB8:_$9$k!#(BASCII (@ref{ASCII}) $B$d(B JIS X0201-Latin $B$O$=$N0l<o!#(B + +@cindex{ISO 646}@cindex{ISO/IEC 646:1991} +@noindent +[ISO 646] +@quotation +International Organization for Standardization (ISO), ``Information +technology: ISO 7-bit coded character set for information interchange'', +ISO/IEC 646:1991. +@end quotation + + + +@node ISO 8859-1, iso-8859-1, ISO 646, Glossary +@subsection ISO 8859-1 + +@cindex{ISO 8859-1}@cindex{ISO 8859-1:1987} +@noindent +[ISO 8859-1] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 1: +Latin Alphabet No.1'', ISO 8859-1:1987. +@end quotation + + + +@node iso-8859-1, ISO 8859-2, ISO 8859-1, Glossary +@subsection iso-8859-1 + +@cindex{iso-8859-1}@strong{iso-8859-1} is a MIME charset (@ref{MIME +charset}) for west-European languages written by Latin script.@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-1 +(@ref{ISO 8859-1}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +It is defined in RFC 2046 (@ref{RFC 2046}). + + +@node ISO 8859-2, iso-8859-2, iso-8859-1, Glossary +@subsection ISO 8859-2 + +@cindex{ISO 8859-2}@cindex{ISO 8859-2:1987} +@noindent +[ISO 8859-2] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 2: +Latin alphabet No.2'', ISO 8859-2:1987. +@end quotation + + + +@node iso-8859-2, ISO 8859-3, ISO 8859-2, Glossary +@subsection iso-8859-2 + +@cindex{iso-8859-2}@strong{iso-8859-2} is a MIME charset (@ref{MIME +charset}) for east-European languages written by Latin script.@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-2 +(@ref{ISO 8859-2}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +It is defined in RFC 2046 (@ref{RFC 2046}). + + +@node ISO 8859-3, ISO 8859-4, iso-8859-2, Glossary +@subsection ISO 8859-3 + +@cindex{ISO 8859-3}@cindex{ISO 8859-3:1988} +@noindent +[ISO 8859-3] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 3: +Latin alphabet No.3'', ISO 8859-3:1988. +@end quotation + + + +@node ISO 8859-4, ISO 8859-5, ISO 8859-3, Glossary +@subsection ISO 8859-4 + +@cindex{ISO 8859-4}@cindex{ISO 8859-4:1988} +@noindent +[ISO 8859-4] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 4: +Latin alphabet No.4'', ISO 8859-4:1988. +@end quotation + + + +@node ISO 8859-5, iso-8859-5, ISO 8859-4, Glossary +@subsection ISO 8859-5 + +@cindex{ISO 8859-5}@cindex{ISO 8859-5:1988} +@noindent +[ISO 8859-5] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 5: +Latin/Cyrillic alphabet'', ISO 8859-5:1988. +@end quotation + + + +@node iso-8859-5, ISO 8859-6, ISO 8859-5, Glossary +@subsection iso-8859-5 + +@cindex{iso-8859-5}@strong{iso-8859-5} is a MIME charset (@ref{MIME +charset}) for Cyrillic script.@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-5 +(@ref{ISO 8859-5}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +It is defined in RFC 2046 (@ref{RFC 2046}). + + +@node ISO 8859-6, ISO 8859-7, iso-8859-5, Glossary +@subsection ISO 8859-6 + +@cindex{ISO 8859-6}@cindex{ISO 8859-6:1987} +@noindent +[ISO 8859-6] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 6: +Latin/Arabic alphabet'', ISO 8859-6:1987. +@end quotation + + + +@node ISO 8859-7, iso-8859-7, ISO 8859-6, Glossary +@subsection ISO 8859-7 + +@cindex{ISO 8859-7}@cindex{ISO 8859-7:1987} +@noindent +[ISO 8859-7] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 7: +Latin/Greek alphabet'', ISO 8859-7:1987. +@end quotation + + + +@node iso-8859-7, ISO 8859-8, ISO 8859-7, Glossary +@subsection iso-8859-7 + +@cindex{iso-8859-7}@strong{iso-8859-7} is a MIME charset (@ref{MIME +charset}) for Greek script.@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-7 +(@ref{ISO 8859-7}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +It is defined in RFC 1947. + +@cindex{iso-8859-7}@cindex{Informational}@cindex{RFC 1947} +@noindent +[iso-8859-7: RFC 1947] +@quotation +D. Spinellis, ``Greek Character Encoding for Electronic Mail Messages'', +May 1996, Informational. +@end quotation + + + +@node ISO 8859-8, ISO 8859-9, iso-8859-7, Glossary +@subsection ISO 8859-8 + +@cindex{ISO 8859-8}@cindex{ISO 8859-8:1988} +@noindent +[ISO 8859-8] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 8: +Latin/Hebrew alphabet'', ISO 8859-8:1988. +@end quotation + + + +@node ISO 8859-9, ISO-IR-165, ISO 8859-8, Glossary +@subsection ISO 8859-9 + +@cindex{ISO 8859-9}@cindex{ISO 8859-9:1990} +@noindent +[ISO 8859-9] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 9: +Latin alphabet No.5'', ISO 8859-9:1990. +@end quotation + + + +@node ISO-IR-165, JIS X0201, ISO 8859-9, Glossary +@subsection ISO-IR-165, CCITT Extended GB + +CCITT $B$,EPO?$7$?!"Cf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=(B +$B$9$k$?$a$N(B 94x94-character set (@ref{94x94-character set})$B!#(B@refill + +GB 2312 (@ref{GB 2312}) $B$H(B GB 8565 $BI=#2(B (@ref{GB 8865.2}) $B$K(B 150 $BJ8;z$[(B +$B$I$rDI2C$7$?$b$N$i$7$$!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `E' $B$G$"$k!#(B + + +@node JIS X0201, JIS C6226, ISO-IR-165, Glossary +@subsection JIS X0201 + +ISO 646 (@ref{ISO 646}) $B$NJQ<o$N#1$D$G$"$k(B Latin $BJ8;z=89g$H(B 1 byte $B$N%+(B +$B%?%+%JJ8;z=89g$+$i$J$k!#(B@refill + +$B85$O(B @cindex{JIS C6220-1976}@strong{JIS C6220-1976} $B$H8@$C$?$,(B @cindex{JIS +X0201}@strong{JIS +X0201} $B$KHV9f$,JQ99$5$l$?!#(B + +@cindex{JIS X0201-1976}@cindex{JIS X 0201-1976:} +@noindent +[JIS X0201-1976] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQId9f!Y(B, ``Code +for Information Interchange'', JIS X 0201-1976:. +@end quotation + + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=P$kM=Dj!#(B + +@cindex{JIS X0201-1996?}@cindex{JIS X 0201:1996? draft} +@noindent +[JIS X0201-1996?] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X#7%S%C%H5Z$S#8%S%C%H$N>p(B +$BJs8r49MQId9f2=J8;z=89g!Y(B, ``7-bit and 8-bit coded character sets for +information interchange'', JIS X 0201:1996? draft. +@end quotation + + + +@node JIS C6226, JIS X0208, JIS X0201, Glossary +@subsection JIS C6226-1978 + +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B 94x94-character set (@ref{94x94-character +set})$B!#F|K\$N9q2HI8=`!#(BJIS X0208-1978 $B$H$b$$$&!#(B@refill + +(cf. @ref{JIS X0208}) + + + +@node JIS X0208, JIS X0212, JIS C6226, Glossary +@subsection JIS X0208 + +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B 94x94-character set (@ref{94x94-character +set})$B!#F|K\$N9q2HI8=`!#(B1978 $BG/HG!"(B1983 $BG/HG!"(B1990 $BG/HG$,$"$k$,!"(BInternet +$B$G$O(B 1983 $BG/HG$,$b$C$H$bNI$/;H$o$l$F$$$k!#(B@refill + +JIS X0208 $B$O5-9f!"?t;z!"%m!<%^;z!"$R$i$,$J!"%+%?%+%J!"%.%j%7%cJ8;z!"%-%j(B +$B%kJ8;z!"7S@~AG!"Bh#1?e=`!"Bh#2?e=`$N4A;z$,4^$^$l$k!#C"$7!"(B1983 $BG/HG$N0l(B +$BIt$N5-9f$H7S@~AG$O(B 1978 $BG/HG$K$O$J$$!#$^$?!"0lIt$N4A;z$N;z7A$,(B 1983 $BG/HG(B +$B$G$OJQ99$5$l!"$^$?!"Bh#1?e=`$HBh#2?e=`$,F~$lBX$o$C$F$$$?$j$9$k!#$3$N$?$a!"(B +1978 $BG/HG$H(B 1983 $BG/HG$O0[$J$kJ8;z=89g$H$7$F07$o$l$k!#(B@refill + +1990 $BG/$N2~Dj$G$O(B 1983 $BG/HG$KBP$9$kDI2C$,9T$o$l$?!#$3$N$?$a!"(B1990 $BG/HG(B +$B$r;X<($9$k>l9g$OA0$K99?7%7!<%1%s%9$rMQ$$$k!#(B + +@cindex{JIS X0208-1978}@cindex{JIS C6226:1978} +@noindent +[JIS X0208-1978] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQ4A;zId9f7O!Y(B, +``Code of the Japanese graphic character set for information +interchange'', JIS C6226:1978. +@end quotation + +@cindex{JIS X0208-1983,1990}@cindex{JIS X0208:1983,1990} +@noindent +[JIS X0208-1983,1990] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQ4A;zId9f7O!Y(B, +``Code of the Japanese graphic character set for information +interchange'', JIS X0208:1983,1990. +@end quotation + + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=PHG$5$l$kM=Dj!#!J;z7A$NJQ99$O9T$o$l$J$$$N$GJ8(B +$B;z=89g$H$7$F$O(B 1990 $BG/HG$HF10l$G$"$k!K(B + +@cindex{JIS X0208-1996?}@cindex{JIS X 0208:1996? draft} +@noindent +[JIS X0208-1996?] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X#7%S%C%H5Z$S#8%S%C%H$N(B +$B#2%P%$%H>pJs8r49MQId9f2=4A;z=89g!Y(B, ``7-bit and 8-bit double byte coded +Kanji sets for information interchange'', JIS X 0208:1996? draft. +@end quotation + + + +@node JIS X0212, koi8-r, JIS X0208, Glossary +@subsection JIS X0212-1990 + +JIS X0208 (@ref{JIS X0208}) $B$K$J$+$C$?J8;z$r=8$a$?(B 94x94-character set +(@ref{94x94-character set})$B!#!VJd=u4A;z!W$H$b8F$P$l$k!#F|K\$N9q2HI8=`!#(B +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `D'. + + +@node koi8-r, KS C5601, JIS X0212, Glossary +@subsection koi8-r + +A MIME charset (@ref{MIME charset}) for Cyrillic script for Russian or +other languages.@refill + +It is a 1 byte 8bit (@ref{8bit}) coded character set (@ref{coded +character set}), not based on ISO 2022 (@ref{ISO 2022}). It is a +de-fact standard.@refill + +It is defined in RFC 1489.@refill + +@cindex{RFC 1489} +@noindent +[RFC 1489] +@quotation +A. Chernov, ``Registration of a Cyrillic Character Set'', July 1993. +@end quotation + + + +@node KS C5601, message, koi8-r, Glossary +@subsection KS C5601-1987 + +A 94x94-character set (@ref{94x94-character set}) for Korean language +(Hangul script). Korean Standard. Final byte of ISO 2022 (@ref{ISO +2022}) is `C'. + +@cindex{KS C5601}@cindex{KS C 5601:1987} +@noindent +[KS C5601] +@quotation +Korea Industrial Standards Association, ``Code for Information +Interchange (Hangul and Hanja)'', KS C 5601:1987. +@end quotation + + + +@node message, message/rfc822, KS C5601, Glossary +@subsection message + +$B$3$3$G$O(B RFC 822 (@ref{RFC 822}) $B$GDj5A$5$l$k(B mail $B$H(B RFC 1036 (@ref{RFC +1036}) $B$GDj5A$5$l$k(B news $B5-;v$NAm>N$H$7$FMQ$$$k!#(B + + +@node message/rfc822, method, message, Glossary +@subsection message/rfc822 + +@cindex{message/rfc822}@strong{message/rfc822} indicates that the body +contains an encapsulated message, with the syntax of an RFC 822 +(@ref{RFC 822}) message. It is the replacement of traditional RFC 934 +(@ref{RFC 934}) encapsulation. It is defined in RFC 2046 (@ref{RFC +2046}). + + +@node method, MIME, message/rfc822, Glossary +@subsection method + +tm $B$GFCDj$N<oN`$N(B data $B$r:F@8$7$?$H$-<B:]$K$=$N=hM}$r9T$J$&(B +program. Emacs Lisp $B$G=q$+$l$?(B @cindex{internal method}@strong{internal +method} $B$H(B C $B$d(B script $B8@8l$J$I$G=q$+$l$?(B @cindex{external +method}@strong{external method} $B$,$"$k!#(B@refill + +(cf. @ref{(tm-view-en)method}) + + + +@node MIME, MIME charset, method, Glossary +@subsection MIME + +MIME stands for @cindex{Multipurpose Internet Mail +Extensions}@strong{Multipurpose Internet Mail Extensions}, it is an +extension for RFC 822 (@ref{RFC 822}).@refill + +According to RFC 2045:@refill + +STD 11, RFC 822, defines a message representation protocol specifying +considerable detail about US-ASCII message headers, and leaves the +message content, or message body, as flat US-ASCII text. This set of +documents, collectively called the Multipurpose Internet Mail +Extensions, or MIME, redefines the format of messages to allow +for@refill + +@enumerate +@item +textual message bodies in character sets other than US-ASCII, +@item +an extensible set of different formats for non-textual message +bodies, +@item +multi-part message bodies, and +@item +textual header information in character sets other than US-ASCII. +@end enumerate + + +It is defined in RFC 2045 (@ref{RFC 2045}), RFC 2046 (@ref{RFC 2046}), +RFC 2047 (@ref{encoded-word}), RFC 2048 (@ref{RFC 2048}) and RFC 2049 +(@ref{RFC 2049}). + + +@node MIME charset, MTA, MIME, Glossary +@subsection MIME charset + +Coded character set (@ref{Coded character set}) used in Content-Type +field (@ref{Content-Type field}) or charset parameter of encoded-word +(@ref{encoded-word}).@refill + +It is defined in RFC 2045 (@ref{RFC 2045}).@refill + +iso-2022-jp (@ref{iso-2022-jp}) $B$d(B euc-kr (@ref{euc-kr}) $B$O$=$N#1$D!#(B +$B!J$3$3$G$O!"(BMIME charset $B$OJ8;z=89g(B (@ref{Character set})$B$H6hJL$7$F>.J8(B +$B;z$G=q$$$F$$$k!K(B + + +@node MTA, MUA, MIME charset, Glossary +@subsection MTA + +@cindex{Message Transfer Agent}@strong{Message Transfer Agent} $B$NN,$G!"(B +sendmail $B$J$I$N(B mail $BG[Aw(B program $B$H(B news server $B$NAm>N!#(B@refill + +(cf. @ref{MUA}) + + + +@node MUA, MULE, MTA, Glossary +@subsection MUA + +@cindex{Message User Agent}@strong{Message User Agent} $B$NN,$G!"(Bmail +reader $B$H(B news reader $B$NAm>N!#(B@refill + +(cf. @ref{MTA}) + + + +@node MULE, multipart, MUA, Glossary +@subsection MULE + +$BH>ED(B $B7u0l;a$i$,:n$C$?!"B?8@8l$5$l$?(B Emacs (@ref{Emacs}).@refill + +[MULE] Nishikimi M., Handa K. and Tomura S., ``Mule: MULtilingual +Enhancement to GNU Emacs'', Proc. of INET'93, August, 1993.@refill + +$B8=:_!"(BMULE $B$N5!G=$r(B Emacs $B$K(B merge $B$9$k:n6H$,9T$o$l$F$*$j!"(Balpha $BHG(B +(ftp://etlport.etl.go.jp/pub/mule/mule-19.33-gamma.taz) $B$,B8:_$9$k!#(B + +$B$=$NB>!"(BXEmacs $B$K(B merge $B$7$?$b$N$bB8:_$9$k!#(B@refill + +$B$3$N$?$a!"8=:_$G$OB?8@8l(B Emacs $B$O!"85!9$N(B MULE $B$r4^$a$F#3<oN`$"$k$3$H$K(B +$B$J$k!#(B@refill + +$B$=$3$G!"$3$3$G$O!"B?8@8l(B Emacs $B$NAm>N$r(B @cindex{mule}@strong{mule}, $B85!9(B +$B$N(B MULE $B$r(B @cindex{MULE}@strong{MULE}, mule $B5!G=$r(B merge $B$7$?(B Emacs $B$r(B +@cindex{Emacs/mule}@strong{Emacs/mule}, mule $B5!G=$r(B merge $B$7$?(B XEmacs $B$r(B +@cindex{XEmacs/mule}@strong{XEmacs/mule} $B$H8F$V$3$H$K$9$k!#(B + + +@node multipart, multipart/alternative, MULE, Glossary +@subsection Multipart + +@cindex{multipart}@strong{multipart} means media type (@ref{media type}) +to insert multiple entities (@ref{entities}) in a single body. Or it +also indicates a message consists of multiple entities.@refill + +There are following subtypes registered in RFC 2046 (@ref{RFC 2046}): + +@itemize @bullet +@item +multipart/mixed (@ref{multipart/mixed}) +@item +multipart/alternative (@ref{multipart/alternative}) +@item +multipart/digest (@ref{multipart/digest}) +@item +multipart/parallel (@ref{multipart/parallel}) +@end itemize + +@noindent +and registered in RFC 1847 (@ref{Security multipart}): + +@itemize @bullet +@item +multipart/signed (@ref{multipart/signed}) +@item +multipart/encrypted (@ref{multipart/encrypted}) +@end itemize + + + +@node multipart/alternative, multipart/digest, multipart, Glossary +@subsection multipart/alternative + +@cindex{multipart/digest}@strong{multipart/digest} is one of multipart +(@ref{multipart}) media types. This type is syntactically identical to +multipart/mixed (@ref{multipart/mixed}), but the semantics are +different. In particular, each of the body parts is an ``alternative'' +version of the same information.@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/digest, multipart/encrypted, multipart/alternative, Glossary +@subsection multipart/digest + +@cindex{multipart/digest}@strong{multipart/digest} is one of multipart +(@ref{multipart}) media types. This type is syntactically identical to +multipart/mixed (@ref{multipart/mixed}), but the semantics are +different. In particular, in a digest, the default Content-Type value +for a body part is changed from text/plain (@ref{text/plain}) to +message/rfc822 (@ref{message/rfc822}).@refill + +This is the replacement of traditional RFC 1153 (@ref{RFC 1153}) based +encapsulation (@ref{encapsulation}).@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/encrypted, multipart/mixed, multipart/digest, Glossary +@subsection multipart/encrypted + +RFC 1847 $B$GDj5A$5$l$?(B Security multipart (@ref{Security multipart}) $B$N#1(B +$B$D$G!"0E9f2=$5$l$?(B message $B$rI=8=$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{PGP/MIME}) + + + +@node multipart/mixed, multipart/parallel, multipart/encrypted, Glossary +@subsection multipart/mixed + +Primary and default subtype of multipart (@ref{multipart}), it is used +when the body parts are independent and need to be bundled in a +particular order.@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/parallel, multipart/signed, multipart/mixed, Glossary +@subsection multipart/parallel + +@cindex{multipart/parallel}@strong{multipart/parallel} is a subtype of +multipart (@ref{multipart}). This type is syntactically identical to +multipart/mixed (@ref{multipart/mixed}), but the semantics are +different. In particular, in a parallel entity, the order of body parts +is not significant.@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/signed, PGP, multipart/parallel, Glossary +@subsection multipart/signed + +RFC 1847 $B$GDj5A$5$l$?(B Security multipart (@ref{Security multipart}) $B$N#1(B +$B$D$G!"EE;R=pL>$rI=8=$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{PGP/MIME}) + + + +@node PGP, PGP-kazu, multipart/signed, Glossary +@subsection PGP + +Phil Zimmermann $B;a$,:n@.$7$?8x3+800E9f=hM}7O$N#1$D!#(Bmessage +(@ref{message}) $B$N0E9f2=$dEE;R=pL>$r9T$&$3$H$,$G$-$k!#(BPretty Good +Privacy $B$NN,!#(B@refill + +$BEAE}E*$J(B PGP $B$G$O(B encapsulation (@ref{encapsulation}) $B$K(B RFC 934 +(@ref{RFC 934})$B$K=`$8$?J}K!$rMQ$$$k!#$3$l$O(B MIME (@ref{MIME}) $B$HL7=b$9$k(B +$B$N$G(B PGP/MIME (@ref{PGP/MIME}) $B$,Ds0F$5$l$F$$$k!#0lJ}!"(BMIME $B$K$*$$$F(B PGP +$B$N(Bencapsulation $B$rMQ$$$kJ}K!(B (cf. @ref{PGP-kazu}) + $B$bMxMQ$5$l$F$-$?!#$7$+$7!":#8e$O(B PGP/MIME $B$KE}0l$7$F$$$/J}$,K>$^$7$$!#(B +@refill + +@cindex{PGP}@cindex{Informational}@cindex{RFC 1991} +@noindent +[PGP: RFC 1991] +@quotation +D. Atkins, W. Stallings and P. Zimmermann, ``PGP Message Exchange +Formats'', August 1996, Informational. +@end quotation + + + + +@node PGP-kazu, PGP/MIME, PGP, Glossary +@subsection PGP-kazu + +$B;3K\(B $BOBI'(B $B;a$,Ds0F$7$?(B MIME (@ref{MIME}) $B$G(B PGP (@ref{PGP}) $B$rMxMQ$9$k$?(B +$B$a$NJ}K!$r$3$3$G$O(B @cindex{PGP-kazu}@strong{PGP-kazu} $B$H8F$V$3$H$K$9$k!#(B + +PGP-kazu $B$O(B @cindex{application/pgp}@strong{application/pgp} $B$H$$$&(B +content-type (@ref{content-type}) $B$rDj5A$9$k!#(B@refill + +application/pgp $B$N(B part $B$G$O(B PGP $B$N(B encapsulation (@ref{encapsulation}) +$B$,MQ$$$i$l$k!#(BPGP $B$N(B encapsulation (cf. @ref{RFC 934}) + $B$H(B MIME $B$N(B encapsulation $B$OL7=b$9$k$N$G!"(BPGP $B$N(B encapsulation $B$r2r$+$J(B +$B$$8B$j!"Cf$K4^$^$l$?(B MIME message $B$rFI$`$3$H$,$G$-$J$/$J$k!#B($A!"(B +PGP-kazu $B$KBP1~$7$F$$$J$$(B MIME $B$KBP1~$7$?(B MUA (@ref{MUA}) $B$O$=$N(B part $B$,(B +$BFI$a$J$/$J$k!#$=$NBe$o$j!"(BMIME $B$KBP1~$7$F$$$J$$(B PGP $BBP1~$N(B MUA +(@ref{MUA}) $B$G$b(B message $B$rFI$`$3$H$,$G$-$k!#(B@refill + +PGP-kazu $B$G$O(B MUA $B$O(B PGP $B$N$H(B MIME $B$N$H$$$$D$N(B encapsulation $B$rCN$i$J(B +$B$1$l$P$J$i$J$$!#$^$?!"(Bapplication/pgp part $B$r(B parse $B$9$k$?$a$K$O!"$^$:!"(B +pgp $B$N=hM}$r9T$o$J$1$l$P$J$i$J$$$N$G!"(Bparse $B=hM}$,J#;($K$J$k!#(B@refill + +$B$^$?!"(BInternet $B$G$O:#8e(B PGP/MIME (@ref{PGP/MIME}) $B$NJ}8~$GI8=`2=$7$F$$$3(B +$B$&$H$$$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP-kazu $B$OMQ$$$J$$$N$,K>(B +$B$^$7$$!#(B@refill + +[draft-kazu-pgp-mime-00.txt] Yamamoto K., ``PGP MIME Integration'', +October, 1995 + + +@node PGP/MIME, Quoted-Printable, PGP-kazu, Glossary +@subsection PGP/MIME + +Michael Elkins $B;a$,Ds0F$7$?(B MIME (@ref{MIME}) $B$G(B PGP (@ref{PGP}) $B$rMxMQ(B +$B$9$k$?$a$NJ}K!!#(B@refill + +RFC 1847 (@ref{Security multipart}) $B$K4p$-!"(BMIME $B$N(B multipart $B$K$h$k(B +encapsulation (@ref{encapsulation}) $B$r9T$&!#$3$N$?$a!"(BMIME $B$N<+A3$J3HD%(B +$B$K$J$C$F$$$k!#$7$+$7!"EAE}E*$J(B PGP$B$H$N8_49@-$,<:$o$l$F$$$k!#(B@refill + +PGP/MIME $B$G$O(B PGP-kazu (@ref{PGP-kazu}) $B$H0[$J$j!"(BMIME $B$N(B encapsulation +$B$N$_$rMQ$$$k!#$^$?!"$3$N$?$a!"(BPGP $B$N=hM}$r9T$&A0$K(B message $B$N(B parse $B$r9T(B +$B$&$3$H$,$G$-$k!#(B@refill + +Internet $B$G$O:#8e(B PGP/MIME (@ref{PGP/MIME}) $B$NJ}8~$GI8=`2=$7$F$$$3$&$H$$(B +$B$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP $B$rMQ$$$k>l9g$O(B PGP/MIME$B$rMQ(B +$B$$$k$N$,K>$^$7$$!#(B + +@cindex{PGP/MIME}@cindex{Standards Track}@cindex{RFC 2015} +@noindent +[PGP/MIME: RFC 2015] +@quotation +M. Elkins, ``MIME Security with Pretty Good Privacy (PGP)'', October +1996, Standards Track. +@end quotation + + + +@node Quoted-Printable, RFC 821, PGP/MIME, Glossary +@subsection Quoted-Printable + +@cindex{Quoted-Printable}@strong{Quoted-Printable} is a transfer +encoding method of MIME (@ref{MIME}) defined in RFC 2045 (@ref{RFC +2045}).@refill + +If the data being encoded are mostly US-ASCII text, the encoded form of +the data remains largely recognizable by humans.@refill + +(cf. @ref{Base64}) + + + +@node RFC 821, RFC 822, Quoted-Printable, Glossary +@subsection RFC 821 + +@cindex{SMTP}@strong{SMTP} $B$H8F$P$l$k(B Internet mail $B$NG[AwK!$NI8=`$rDj$a(B +$B$F$$$k(B RFC. + +@cindex{SMTP}@cindex{STD 10}@cindex{RFC 821} +@noindent +[SMTP: RFC 821] +@quotation +J. Postel, ``Simple Mail Transfer Protocol'', August 1982, STD 10. +@end quotation + + + +@node RFC 822, RFC 934, RFC 821, Glossary +@subsection RFC 822 + +Internet mail $B$N<g$K(B @cindex{message header}@strong{message header} $B$K4X$9$k7A<0$K(B +$B4X$9$kI8=`$rDj$a$F$$$k(B RFC. + +@noindent +@strong{[Memo]} +@quotation + +news message $B$b$3$l$K=`$8$F$$$k$N$G!"(B@cindex{Internet +mail}@strong{Internet mail} $B$H=q$/$h$j$b!"(B@cindex{Internet +message}@strong{Internet message} $B$H=q$$$?J}$,NI$$$+$b$7$l$J$$!#(B +@end quotation + + +@cindex{STD 11}@cindex{RFC 822} +@noindent +[RFC 822] +@quotation +D. Crocker, ``Standard for the Format of ARPA Internet Text Messages'', +August 1982, STD 11. +@end quotation + + + +@node RFC 934, RFC 1036, RFC 822, Glossary +@subsection RFC 934 + +Internet mail (@ref{RFC 822}) $B$N(B +@cindex{encapsulation}@strong{encapsulation} (@ref{encapsulation}) $B$NJ}(B +$BK!$rDj$a$?(B RFC.@refill + +MIME (@ref{MIME}) $B$HL7=b$9$k$N$G!"8=:_$G$O(B message/rfc822 +(@ref{message/rfc822}) $B$rMQ$$$k$Y$-$G$"$k!#(B + + +@cindex{RFC 934} +@noindent +[RFC 934] +@quotation +Marshall T. Rose and Einar A. Stefferud, ``Proposed Standard for Message +Encapsulation'', January 1985. +@end quotation + + + +@node RFC 1036, RFC 1153, RFC 934, Glossary +@subsection RFC 1036 + +USENET $B$G$N(B message $B$N7A<0$rDj$a$?(B RFC. RFC 822 (@ref{RFC 822})$B$N(B subset +$B$K$J$C$F$$$k!#(BInternet $B$NI8=`$G$O$J$$$,!"(BUSENET $B0J30$N(B netnews $B$G$b$3$l(B +$B$K=`$8$F$$$k$b$N$,B?$$!#(B + +@cindex{USENET}@cindex{RFC 1036} +@noindent +[USENET: RFC 1036] +@quotation +M. Horton and R. Adams, ``Standard for Interchange of USENET Messages'', +December 1987, (obsolete RFC 850). +@end quotation + + + +@node RFC 1153, RFC 1557, RFC 1036, Glossary +@subsection RFC 1153 + +$BJ#?t$N(B Internet mail (@ref{RFC 822}) $B$r(B +@cindex{encapsulation}@strong{encapsulation} (@ref{encapsulation}) $B$9$k(B +$B$?$a$NJ}K!$rDj$a$?(B RFC. RFC 934 (@ref{RFC 934}) $B$rMQ$$$k!#(B@refill + +MIME (@ref{MIME}) $B$HL7=b$9$k$N$G!"8=:_$G$O(B message/rfc822 +(@ref{message/rfc822}) $B$rMQ$$$?(B multipart (@ref{multipart}) $B$rMQ$$$k$Y$-(B +$B$G$"$k!#(B@refill + +(cf. @ref{multipart/digest}) + + +@cindex{RFC 1153} +@noindent +[RFC 1153] +@quotation +F. Wancho, ``Digest Message Format'', April 1990. +@end quotation + + + +@node RFC 1557, RFC 1922, RFC 1153, Glossary +@subsection RFC 1557 + +euc-kr (@ref{euc-kr}) $B$H(B iso-2022-kr (@ref{iso-2022-kr}) $B$H$$$&4Z9q8l$N(B +$B$?$a$N(B MIME charset (@ref{MIME charset}) $B$rDj5A$7$F$$$k(B RFC. + +@cindex{Informational}@cindex{RFC 1557} +@noindent +[RFC 1557] +@quotation +U. Choi, K. Chon and H. Park, ``Korean Character Encoding for Internet +Messages'', December 1993, Informational. +@end quotation + + + +@node RFC 1922, RFC 2045, RFC 1557, Glossary +@subsection RFC 1922 + +iso-2022-cn (@ref{iso-2022-cn}), iso-2022-cn-ext +(@ref{iso-2022-cn-ext}), cn-gb (@ref{cn-gb}), cn-big5 (@ref{cn-big5}) $B$H(B +$B$$$C$?Cf9q8l$N$?$a$N(B MIME charset (@ref{MIME charset}) $B$rDj5A$7$F$$$k(B +RFC.@refill + +$B$3$l$K2C$($F!"(B@cindex{charset-edition}@strong{charset-edition} $B$H(B +@cindex{charset-extension}@strong{charset-extension} $B$H$$$&(B Content-Type +field (@ref{Content-Type field}) $B$N(B parameter $B$rDj5A$7$F$$$k!#(B + +@cindex{Informational}@cindex{RFC 1922} +@noindent +[RFC 1922] +@quotation +Zhu, HF., Hu, DY., Wang, ZG., Kao, TC., Chang, WCH. and Crispin, M., +``Chinese Character Encoding for Internet Messages'', March 1996, +Informational. +@end quotation + + + +@node RFC 2045, RFC 2046, RFC 1922, Glossary +@subsection RFC 2045 + +@cindex{Standards Track}@cindex{RFC 2045} +@noindent +[RFC 2045] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part One: Format of Internet Message Bodies'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2046, RFC 2048, RFC 2045, Glossary +@subsection RFC 2046 + +@cindex{Standards Track}@cindex{RFC 2046} +@noindent +[RFC 2046] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part Two: Media Types'', November 1996, Standards Track (obsolete +RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2048, RFC 2049, RFC 2046, Glossary +@subsection RFC 2048 + +@cindex{Standards Track}@cindex{RFC 2048} +@noindent +[RFC 2048] +@quotation +N. Freed, J. Klensin and J. Postel, ``Multipurpose Internet Mail +Extensions (MIME) Part Four: Registration Procedures'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2049, plain text, RFC 2048, Glossary +@subsection RFC 2049 + +@cindex{Standards Track}@cindex{RFC 2049} +@noindent +[RFC 2049] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part Five: Conformance Criteria and Examples'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node plain text, Security multipart, RFC 2049, Glossary +@subsection plain text + +$B=qBN$dAHHG$K4X$9$k>pJs$r;}$?$J$$(B $BJ8;zId9f(B(@ref{Coded character set})$B$N$_(B +$B$GI=8=$5$l$k(B text $B>pJs!#(B(cf. @ref{text/plain}) + + + +@node Security multipart, text/enriched, plain text, Glossary +@subsection Security multipart + +MIME (@ref{MIME}) $B$G0E9f$dEE;R=qL>$rMQ$$$k$?$a$N7A<0!#(B +@cindex{multipart/signed}@strong{multipart/signed} +(@ref{multipart/signed}) $B$H(B +@cindex{multipart/encrypted}@strong{multipart/encrypted} +(@ref{multipart/encrypted}) $B$H$$$&(B multipart $B$rMQ$$$k!#(BMOSS $B$d(B PGP/MIME +(@ref{PGP/MIME}) $B$O$3$l$K4p$$$F$$$k!#(B + +@cindex{Security multipart}@cindex{Standards Track}@cindex{RFC 1847} +@noindent +[Security multipart: RFC 1847] +@quotation +James Galvin, Gale Murphy, Steve Crocker and Ned Freed, ``Security +Multiparts for MIME: Multipart/Signed and Multipart/Encrypted'', October +1995, Standards Track. +@end quotation + + + +@node text/enriched, text/plain, Security multipart, Glossary +@subsection text/enriched + +RFC 1521 $B$GDj5A$5$l$?(B @cindex{text/richtext}@strong{text/richtext} $B$KBe(B +$B$o$C$F!"=qBN$dAHHG$K4X$9$k>pJs$r;}$C$?(B text$B$rI=8=$9$k$?$a$N(B media type +(@ref{media type}). + +@cindex{text/enriched}@cindex{RFC 1896} +@noindent +[text/enriched: RFC 1896] +@quotation +P. Resnick and A. Walker, ``The text/enriched MIME Content-type'', +February 1996, (obsolete RFC 1563). +@end quotation + + + +@node text/plain, tm-kernel, text/enriched, Glossary +@subsection text/plain + +@cindex{text/plain}@strong{text/plain} is a media type (@ref{media +type}) for plain text (@ref{plain text}), defined in RFC 2046 (@ref{RFC +2046}).@refill + +The default media type of ``text/plain; charset=us-ascii'' for Internet +mail describes existing Internet practice. That is, it is the type of +body defined by RFC 822 (@ref{RFC 822}).@refill + +(cf. @ref{MIME charset}) (cf. @ref{us-ascii}) + + + +@node tm-kernel, tm-MUA, text/plain, Glossary +@subsection tm-kernel, tm + +Emacs $B$G(B MIME (@ref{MIME}) $B$rMxMQ$9$k$?$a$N(B user interface $B$rDs6!$9$k(B +library $B72!#(B`tools for MIME' $B$NN,!#(B + +@noindent +@strong{[$B$I$&$G$bNI$$$3$H(B(^-^;]} +@quotation + +@itemize @bullet +@item + tm $B$O(B ``tiny-mime'' $B$NN,$8$c$J$$$i$7$$$>(B (^-^; + +@item + tm $B$O:n<T$N%$%K%7%c%k$8$c$J$$$i$7$$$>(B (^-^; + +@item + ``Tools for MIME'' $B$NN,$H$$$&$N$O$3$8$D$1$i$7$$$>(B (^-^; +@end itemize +@end quotation + + + +@node tm-MUA, us-ascii, tm-kernel, Glossary +@subsection tm-MUA + +tm (@ref{tm-kernel}) $B$rMQ$$$?(B MUA (@ref{MUA}) $B$b$7$/$O(B MUA $B$KBP$9$k(B +extender.@refill + +@cindex{tm $BBg@9$j(B package}@strong{tm $BBg@9$j(B package} $B$K$O(B + +@itemize @bullet +@item +mh-e (@ref{(mh-e)}) $BMQ$N(B @cindex{tm-mh-e}@strong{tm-mh-e} +@item +GNUS $BMQ$N(B @cindex{tm-gnus}@strong{tm-gnus} +@item +Gnus $BMQ$N(B @cindex{gnus-mime}@strong{gnus-mime} (@ref{(gnus-mime-en)}) +@item +VM $BMQ$N(B @cindex{tm-vm}@strong{tm-vm} +@item +RMAIL $BMQ$N(B @cindex{tm-rmail}@strong{tm-rmail} +@end itemize + +@noindent +$B$,4^$^$l$F$$$k!#(B + +$BFHN)$7$?(B MUA $B$H$7$F$O(B cmail (@ref{(cmail)}) $B$,(B tm $B$rMxMQ2DG=$G$"$k!#(B + + +@node us-ascii, , tm-MUA, Glossary +@subsection us-ascii + +$B%"%a%j%+O"K.$J$I$G;H$o$l$k1Q8l$J$I$rI=8=$9$k$?$a$N(B MIME charset +(@ref{MIME charset}) $B$N#1$D!#(B@refill + +ASCII (@ref{ASCII}) $B$N$_$+$i$J$j(B ISO 2022 (@ref{ISO 2022}) $B$K$h$kId9f3H(B +$BD%(B (@ref{Code extension})$B$O5v$5$l$J$$!#(B@refill + +Internet mail $B$K$*$1$kI8=`$NId9f2=J8;z=89g(B(@ref{Coded character set})$B$G(B +$B$"$j!"L@<(E*$K(B MIME charset $B$,<($5$l$J$$>l9g$O86B'$H$7$F(B +@cindex{us-ascii}@strong{us-ascii} $B$,;H$o$l$k!#(B@refill + +$B$^$?!"(BRFC 822 (@ref{RFC 822}) $B$K$*$1$k(B @cindex{ASCII}@strong{ASCII} $B$O(B +us-ascii $B$r;X$9$b$N$H2r<a$9$Y$-$G$"$k!#(B + + +@node Setting, Bug report, Introduction, Top +@chapter Setting + +In the tm package, two files, @file{mime-setup.el} and +@file{tm-setup.el}, are provided to ease the setup.@refill + +The @file{mime-setup.el} is used for the whole MIME related +setup including MIME encoding using @file{tm-edit.el}, while +@file{tm-setup.el} is used to set up tm-MUA only. + + +@menu +* mime-setup:: Normal setting +* tm-setup:: Setting not to use tm-edit +* setting for VM:: Setting for VM +* manual setting:: Setting up without loading provided setup files +@end menu + +@node mime-setup, tm-setup, Setting, Setting +@section Normal setting + +If you want normal setting, please use @cindex{mime-setup}@strong{mime-setup}. +For example, please insert following into @file{~/.emacs}: + +@lisp +(load "mime-setup") +@end lisp + + +As @file{mime-setup.el} loads @file{tm-setup.el}, you +don't need to load @file{tm-setup.el} when you use +@file{mime-setup.el} (Description of old version of Gnus FAQ is +wrong!) + + +@menu +* signature:: +* Notice about GNUS:: Notices for GNUS +@end menu + +@node signature, Notice about GNUS, mime-setup, mime-setup +@subsection signature + +You can set up the @cindex{automatic signature selection +tool}@strong{automatic signature selection +tool} using @file{mime-setup}. If you want to +automatically select the signature file depending on how the message +headers show, add lines like shown below to your .emacs (Refer to the +reference manual of @file{signature.el} for more details). + +@lisp +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +@end lisp + + + +@defvar mime-setup-use-signature + +If it is not @code{nil}, @file{mime-setup.el} sets up for +@file{signature.el}. Its default value is @code{t}. +@end defvar + + + +@defvar mime-setup-signature-key-alist + +It defines key to bind signature inserting command for each +major-mode. Its default value is following: + +@lisp + ((mail-mode . "\C-c\C-w")) +@end lisp + + +If you want to change, please rewrite it. For example: + +@lisp +(set-alist 'mime-setup-signature-key-alist + 'news-reply-mode "\C-c\C-w") +@end lisp + +@end defvar + + + +@defvar mime-setup-default-signature-key + +If key to bind signature inserting command for a major-mode is not found +from @code{mime-setup-signature-key-alist}, its value is used as key. +Its default value is @code{"\C-c\C-s"}. +@end defvar + + + +@node Notice about GNUS, , signature, mime-setup +@subsection Notices for GNUS + +When @file{mime-setup.el} sets up for @file{signature.el}, it sets +variable @code{gnus-signature-file} to @code{nil}. Therefore GNUS does +not insert signature automatically when it is sending a message. Reason +of this setting is following:@refill + +GNUS inserts signature after @file{tm-edit.el} composed as MIME message. +Therefore signature inserted by GNUS is not processed as a valid MIME +part. In particular, for multipart message, signature places in outside +of MIME part. So MIME MUA might not display it.@refill + +Other notice is key bind. In historical reason, key bind to insert +signature is @kbd{C-c C-s} (like mh-e (@ref{(mh-e)})) instead of +@kbd{C-c C-w}. If you change to GNUS's default, please set following: + +@lisp +(set-alist 'mime-setup-signature-key-alist 'news-reply-mode "\C-c\C-w") +@end lisp + + + +@node tm-setup, setting for VM, mime-setup, Setting +@section Setting not to use tm-edit + +@cindex{tm-setup}@strong{tm-setup} only sets up tm-MUA (@ref{tm-MUA})s. +In other words, it is a setting to avoid to use tm-edit. If you don't +want to compose MIME message or want to use other MIME composer, please +use it instead of @file{mime-setup.el}.@refill + +For example, please insert following into @file{~/.emacs}: + +@lisp +(load "tm-setup") +@end lisp + + + +@noindent +@strong{[Memo]} +@quotation + +If you use @file{mime-setup.el}, you you don't need to load +@file{tm-setup.el}. +@end quotation + + + +@node setting for VM, manual setting, tm-setup, Setting +@section Setting for VM + +If you use @cindex{vm}@strong{vm}, please insert following in +@file{~/.vm}: + +@lisp +(require 'tm-vm) +@end lisp + + + +@noindent +@strong{[Notice]} +@quotation + +If you use @cindex{BBDB}@strong{BBDB}, please insert @code{(require +'tm-vm)} @strong{after} @code{(bbdb-insinuate-vm)}. +@end quotation + + + +@node manual setting, , setting for VM, Setting +@section Setting up without loading provided setup files + +You may find the valuable hints in @file{mime-setup.el} or +@file{tm-setup.el} if you want to set up MIME environment +without loading the tm-provided setup files. + +@noindent +@strong{[Memo]} +@quotation + +Current tm provides some convenient features to expect tm-edit, and +they can not use if @file{mime-setup.el} is not used. If you +want to set up original setting to use tm-edit, please declare +following setting: + +@lisp +(provide 'mime-setup) +@end lisp + +@end quotation + + + +@node Bug report, Concept Index, Setting, Top +@chapter How to report bug and about mailing list of tm + +If you write bug-reports and/or suggestions for improvement, please +send them to the tm Mailing List: + +@itemize @bullet +@item + Japanese <bug-tm-ja@@chamonix.jaist.ac.jp> +@item + English <bug-tm-en@@chamonix.jaist.ac.jp> +@end itemize + + +Notice that, we does not welcome bug reports about too old version. +Bugs in old version might be fixed. So please try latest version at +first.@refill + +You should write @cindex{good bug report}@strong{good bug report}. If +you write only ``tm does not work'', we can not find such situations. +At least, you should write name, type, variants and version of OS, +emacs, tm and MUA, and setting. In addition, if error occurs, to send +backtrace is very important. (cf. @ref{(emacs)Bugs}) @refill + +Bug may not appear only your environment, but also in a lot of +environment (otherwise it might not bug). Therefor if you send mail to +author directly, we must write a lot of mails. So please send mail to +address for tm bugs instead of author.@refill + +Via the tm ML, you can report tm bugs, obtain the latest release of +tm, and discuss future enhancements to tm. To join the tm ML, send +e-mail to: + +@itemize @bullet +@item + Japanese <tm-ja-admin@@chamonix.jaist.ac.jp> +@item + English <tm-en-admin@@chamonix.jaist.ac.jp> +@end itemize + +@noindent +Since the user registration is done manually, please write the mail +body in human-recognizable language (^_^). + + +@node Concept Index, Variable Index, Bug report, Top +@chapter Concept Index + +@printindex cp + +@node Variable Index, , Concept Index, Top +@chapter Variable Index + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-ja.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1628 @@ +<!doctype sinfo system> +<!-- $Id: tm-ja.sgml,v 1.1 1996/12/22 00:09:33 steve Exp $ --> +<head> +<title>tm 7.90 Manual$B!JF|K\8lHG!K(B +<author>$B<i2,(B $BCNI'(B <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/15 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm, a MIME package for GNU Emacs. +<p> +GNU Emacs $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$"$k(B `tm' $B$K$D$$$F@bL@$7$^(B +$B$9!#(B +</abstract> + +<h1> tm $B$C$F2?!)(B +<node> Introduction +<p> +tm $B$O(B GNU Emacs $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$9!#(Btm $B$r;H$&$H!"(B + +<ul> +<li> tm-view $B$K$h$k(B MIME message $B$N1\Mw!&:F@8(B +<li> tm-edit $B$K$h$k(B MIME message $B$N:n@.(B +<li> mh-e, GNUS, Gnus, RMAIL, VM $B$G$N(B MIME $B5!G=$N6/2=(B +</ul> + +<noindent> +$B$H$$$&$h$&$J$3$H$,9T$J$($^$9!#(B +<p> +$B8DJL$N9`L\$K$D$$$F$O0J2<$r8f;2>H2<$5$$!'(B + +<ul> +<li><a file="gnus-mime-ja">tm-MUA for Gnus</a> +<li><a file="tm-gnus-ja">tm-MUA for GNUS</a> +<li><a file="tm-mh-e-ja">tm-MUA for mh-e</a> +<li><a file="tm-view-ja">mime/viewer-mode</a> +<li><a file="tm-edit-ja">mime/editor-mode</a> +</ul> + + +<h2> $BMQ8l(B +<node> Glossary +<p> +tm $B$G;H$o$l$F$$$kMQ8l$K$D$$$F2r@b$7$^$9!#(B + +<h3> 7bit +<node> 7bit +<p> +$B$3$3$G$O(B 0 $B$+$i(B 127 $B$N@0?t$r;X$7$^$9!#(B +<p> +0 $B$+$i(B 127 $B$N@0?t$NNs$GI=8=$G$-$k$h$&$J(B data $B$r(B ``7bit $B$N(B data'' $B$H8F(B +$B$S$^$9!#(B +<p> +$B$^$?!"(B0 $B$+$i(B 31 $B$*$h$S(B 127 $B$GI=8=$5$l$k@)8fJ8;z$H(B 32 $B$GI=8=$5$l$k6uGr(B +$B$H(B 33 $B$+$i(B 126 $B$GI=8=$5$l$k?^7AJ8;z$+$i$J$kJ8;zNs$N$3$H$r(B ``7bit $B$NJ8(B +$B;zNs(B'' $B$H8F$S$^$9!J$3$l$O(B <a node="ISO 2022">ISO 2022</a> $B$N!V(B7 $BC10L7O!W(B +$B$HF1MM$G$9!K!#(B +<p> +$BEAE}E*$J(B Internet $B$N(B <a node="MTA">MTA</a> $B$O(B 7bit $B$N(B data $B$rE>Aw$G$-(B +$B$k$N$G!"(B7bit $B$N(B data $B$O(B <a +node="Quoted-Printable">Quoted-Printable</a> $B$d(B <a +node="Base64">Base64</a> $B$H$$$C$?JQ49$r9T$o$J$/$F$b$=$N$^$^E>Aw$G$-$^(B +$B$9!#(B +<p> +$B$7$+$7!"(B7bit $B$G$"$l$P$I$s$J(B data $B$G$bNI$$$H$O$$$($^$;$s!#$J$<$J$i!"#1(B +$B9T$ND9$5$,$"$^$j$KD9$$$H!"(BMTA $B$O$=$N(B message $B$rE>Aw$9$k$3$H$,$G$-$J$$(B +$B$+$i$G$9!#$A$J$_$K!"(B<a node="RFC 821">RFC 821</a> $B$O#19T$O2~9TJ8;z$r=|(B +$B$$$F(B 998 byte $B0JFb$G$"$k$3$H$r5a$a$F$$$^$9!#$h$C$F!"$3$l0J>e$N9T$,4^$^(B +$B$l$k2DG=@-$N$"$k(B data, $BNc$($P!"(BPostscript $B$N(B data $B$J$I$O(B +Quoted-Printable $BEy$G(B encode$B$9$kI,MQ$,$"$j$^$9!#(B + + +<h3> 8bit +<node> 8bit +<p> +$B$3$3$G$O(B 0 $B$+$i(B 255 $B$N@0?t$r;X$7$^$9!#(B +<p> +0 $B$+$i(B 255 $B$N@0?t$NNs$GI=8=$G$-$k$h$&$J(B data $B$r(B ``8bit $B$N(B data'' $B$H8F(B +$B$S$^$9!#(B +<p> +$B$^$?!"(B0 $B$+$i(B 31, 127 $B$*$h$S(B 128 $B$+$i(B 159 $B$GI=8=$5$l$k@)8fJ8;z$H(B 32 $B$G(B +$BI=8=$5$l$k6uGr$H(B 33 $B$+$i(B 126 $B$H(B 160 $B$+$i(B 255 $B$GI=8=$5$l$k?^7AJ8;z$+$i(B +$B$J$kJ8;zNs$N$3$H$r(B ``8bit $B$NJ8;zNs(B'' $B$H8F$S$^$9!J$3$l$O(B <a node="ISO +2022">ISO 2022</a> $B$N!V(B8 $BC10L7O!W$HF1MM$G$9!K!#(B +<p> +<a node="iso-8859-1">iso-8859-1</a> $B$d(B <a node="euc-kr">euc-kr</a> $B$H(B +$B$$$C$?Id9f2=J8;z=89g$O(B 8bit $B$NJ8;zNs$G$9!#(B +<p> +$BEAE}E*$J(B Internet $B$N(B <a node="MTA">MTA</a> $B$O(B <a node="7bit">7bit</a> +$B$N(B data $B$7$+E>Aw$G$-$J$$$N$G!"$=$&$7$?(B MTA $B$r7PM3$9$k>l9g!"(B<a +node="Quoted-Printable">Quoted-Printable</a> $B$d(B <a +node="Base64">Base64</a> $B$H$$$C$?JQ49$r9T$o$J$/$F$O$J$j$^$;$s!#(B +<p> +$B$7$+$7!":G6a$G$O(B 8bit $B$NJ8;zNs$r$=$N$^$^DL$9$3$H$,$G$-$k(B MTA $B$bEP>l$7(B +$B$F$-$?$N$G!"$=$N$^$^Aw$k$3$H$,$G$-$k>l9g$bA}$($F$-$^$7$?!#(B +<p> +$B$7$+$7!"(B8bit $B$G$"$l$P$I$s$J(B data $B$G$bNI$$$H$O$$$($^$;$s!#$J$<$J$i!"#1(B +$B9T$ND9$5$,$"$^$j$KD9$$$H!"(BMTA $B$O$=$N(B message $B$rE>Aw$9$k$3$H$,$G$-$J$$(B +$B$+$i$G$9!#$A$J$_$K!"(BRFC 821 $B$O#19T$O2~9TJ8;z$r=|$$$F(B 998 byte $B0JFb$G$"(B +$B$k$3$H$r5a$a$F$$$^$9!#$h$C$F!"$3$l0J>e$N9T$,4^$^$l$k2DG=@-$N$"$k(B data, +$BNc$($P!"(BPostscript $B$N(B data $B$J$I$O(B Quoted-Printable $BEy$G(B encode$B$9$kI,MQ(B +$B$,$"$j$^$9!#(B +<p> +$B$^$?!"$3$&$7$?M}M3$+$i!"#19T$,(B 999 byte $B0J>e$N9T$,B8:_$9$k2DG=@-$N$"$k(B +data $B$O(B <a node="binary"><concept>binary</concept></a> $B$H8F$V$3$H$K$7(B +$B$^$9!#(B +<p> +$B$A$J$_$K!"(B7bit $B$GI=8=$G$-$k(B data $B$O(B 8bit $B$G$bI=8=$G$-$^$9!#$h$C$F!"(B +``8bit'' $B$H8@$C$?>l9g!"#19T$,(B 998 byte $B0J2<$NG$0U$N(B data $B$r;X$9$3$H$,(B +$B$"$j$^$9!#(B + + +<h3> 94 $BJ8;z=89g(B +<node> 94 character set +<p> +33 $B$+$i(B 126 $B$NHO0O$N(B 1 byte $B$+$i$J$k(B <a node="Character set">$BJ8;z=89g(B +</a>$B!#(B<a node="ASCII">ASCII</a> $B$d(B JIS X0201-Latin $B$O$=$N0l<o!#(B + + +<h3> 96 $BJ8;z=89g(B +<node> 96 character set +<p> +32 $B$+$i(B 127 $B$NHO0O$N(B 1 byte $B$+$i$J$k(B <a node="Character set">$BJ8;z=89g(B +</a>$B!#(BISO 8859 $B%7%j!<%:$O$=$N0l<o!#(B + + +<h3> 94$B!_(B94 $BJ8;z=89g(B +<node> 94x94 character set +<p> +33 $B$+$i(B 126 $B$NHO0O$N(B 2 byte $B$+$i$J$k(B <a node="Character set">$BJ8;z=89g(B +</a>$B!#(B<a node="JIS X0208">JIS X0208</a> $B$d(B <a node="GB 2312">GB +2312</a> $B$O$=$N0l<o!#(B + + +<h3> ASCII +<node> ASCII +<p> +$B%"%a%j%+O"K.$G;H$o$l$kJ8;z$rId9f2=$7$?(B <a node="94 character set">94 +$BJ8;z=89g(B</a>$B!#(BA-Z, a-z $B$N(B Latin $BJ8;z$H?t;z!"4v$D$+$N5-9f$+$i$J$k!#(B<a +node="ISO 646">ISO 646</a> $B$N0l$D!#(B + +<standard abbrev="ASCII" title-en="Coded Character Set -- 7-Bit + American Standard Code for Information Interchange" + number="ANSI X3.4" year="1986"> + + +<h3> Base64 +<node> Base64 +<p> +<dref>RFC 2045</dref> $B$GDj5A$5$l$F$$$k(B <dref>MIME</dref> $B$K$*$1$k(B <a +node="binary">binary data</a> $B$N(B network $B$G$NJQ49K!$N#1$D!#(B +<p> +$B!X(B64 $B?J?t!Y$H$$$&0UL#$G!"(B3 byte $B$N(B data $B$r(B 0 $B$+$i(B 63 $B$N?t$rI=$9(B +<dref>ASCII</dref> 4 $BJ8;z$KJQ49$9$kJ}K!!#!J$b$7!"(B4 $BJ8;z$K$J$i$J$1$l$P(B +<concept>pad</concept> $B$H8F$P$l$k5M$aJ*$r$7$FD9$5$rD4@0$9$k!K(B +<p> +$B$3$N(B 65 $B<oN`$NJ8;z$O(B ASCII $B$H(B EBCDIC $B$N6&DLItJ,$+$iA*$P$l$F$*$j!"(B +Internet $B0J30$N(B network $B$r7PM3$9$k>l9g$G$b0BA4$KE>Aw$G$-$k$h$&$K@_7W$5(B +$B$l$F$$$k!#(B + + +<h3> binary +<node> binary +<p> +$BG$0U$N(B byte $BNs$r(B <concept>binary</concept> $B$H8F$V$3$H$K$7$^$9!#(B +<p> +<a node="8bit">8bit</a> $B$H0[$J$k$N$O(B data $B$K9T$N9=B$$r2>Dj$7$J$$$3$H$G(B +$B$9!#(B +<p> +$B$^$?!"9T$N9=B$$,$"$C$F$b!"(B999 byte $B0J>e$+$i$J$k9T$,$"$k>l9g$b(B binary +$B$H8F$V$3$H$K$7$^$9!#(B +<p> +$B$A$J$_$K!"(B<a node="7bit">7bit</a> $B$d(B 8bit $B$GI=8=$G$-$k(B data $B$O(B binary +$B$G$bI=8=$G$-$^$9!#$h$C$F!"(B<concept>binary data</concept> $B$H8@$C$?>l9g!"(B +$BG$0U$N(B data $B$r;X$9$3$H$,$"$j$^$9!#(B + + +<h3> Character Set$B!JJ8;z=89g!K(B +<node> Character Set +<p> +<a node="Coded character set">$BId9f2=J8;z=89g(B</a>$B!#C"$7!"$3$3$G$O(B <a +node="Code extension">$BId9f3HD%(B</a> $B$5$l$F$J$$J8;z=89g$H$$$&%K%e%"%s%9(B +$B$r9~$a$F$$$k!#(B + + +<h3> cn-gb, gb2312 +<node> cn-gb +<p> +$BCf9qBgN&$G$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a node="ASCII">ASCII</a> $B$K(B +<a node="GB 2312">GB 2312</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> cn-big5, big5 +<node> cn-big5 +<p> +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +<a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$+$J$$(B <a node="8bit">8bit</a> $B$N(B +<a node="Coded character set">$BId9f2=J8;z=89g(B</a>$B$G(B de-fact standard $B$G(B +$B$"$k!#(B<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +cf. <report abbrev="BIG5" author="Institute for Information Industry" + title-en="Chinese Coded Character Set in Computer" + date="March 1984"> +<p> +<a node="CNS">CNS 11643-1986</a> $B$HBP1~4X78$,$"$k!#(B + + +<h3> CNS 11643-1992 +<node> CNS +<p> +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +<a node="Character set">$BJ8;z=89g(B</a>$B!#BfOQ$NI8=`!#8=:_!"(B<a node="94x94 +character set">94$B!_(B94</a> $B$NLL$,Bh#1LL$+$iBh#7LL$^$G$"$k!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$G$N=*C<J8;z$O!"Bh#1LL$,(B `G', $BBh#2LL$,(B +`H', $BBh#3LL$,(B `I', $BBh#4LL$,(B `J', $BBh#5LL$,(B `K', $BBh#6LL$,(B `L', $BBh#7LL$,(B +`M' $B$G$"$k!#(B + +<standard abbrev="CNS 11643-1992" title-en="Standard Interchange Code + for Generally-Used Chinese Characters" number="CNS + 11643" year="1992"> + + +<h3> Coded character set$B!JId9f2=J8;z=89g!K(B, Character code$B!JJ8;zId9f!K(B +<node> Coded character set +<p> +$BJ8;z$H(B byte $BNs$H#1BP#1$KBP1~IU$1$k[#Kf$G$J$$5,B'$N=89g!#(B + + +<h3> Code extension$B!JId9f3HD%!K(B +<node> Code extension +<p> +$BM?$($i$l$?(B<a node="Character set">$BJ8;z=89g(B</a>$B$K4^$^$l$F$$$J$$J8;z$NId(B +$B9f2=$N$?$a$KMQ$$$k<jK!!#(B<a node="ISO 2022">ISO 2022</a> $B$O$=$N#1$D!#(B + + +<h3> Content-Disposition field +<node> Content-Disposition +<p> +Content $B$NI=<($N;EJ}$d(B file $BL>$rI=8=$9$k$?$a$N(B field. <a +node="MIME">MIME</a> $B$N3HD%$N#1$D!#(B +<p> +<rfc number="1806" type="Experimental" author="E R. Troost and + S. Dorner" title="Communicating Presentation Information + in Internet Messages: The Content-Disposition Header" + date="June 1995"> + + +<h3> media type +<node> media type +<p> +<dref>MIME</dref> $B$K$*$1$k(B <dref>entity</dref> $B$N<oN`!#(B +<concept>type</> $B$H(B <concept>subtype</concept> $B$+$i$J$k!#(B<dref>RFC +2046</dref> $B$GDj5A$5$l$F$$$k!#(B +<p> +type $B$OI8=`$G$O(B + +<ul> +<li><concept>text</concept> +</li> +<li><concept>image</concept> +</li> +<li><concept>audio</concept> +</li> +<li><concept>video</concept> +</li> +<li><concept>application</concept> +</li> +<li><a node="multipart"><concept>multipart</concept></a> +</li> +<li><concept>message</concept> +</ul> + +<noindent> +$B$,Dj5A$5$l!"$=$l$>$l$K$O(B application/octet-stream, audio/basic, +image/jpeg, <dref>multipart/mixed</dref>, <dref>text/plain</dref>, +video/mpeg $B$J$I$N$5$^$6$^$J(B subtype $B$,Dj5A$5$l$F$$$k!#(B + +<memo title="$BCm0U(B"> +<p> +$B$3$3$G$O!"(Btext/plain $B$J$I$N(B type/subtype $B$NAH$r$7$P$7$P(B +<concept>content-type/subtype</concept> $B$H=q$/!#(B +</memo> + +<p> +media type $B$O!"(BRFC 2046 $B$GDj5A$5$l$F$$$k$b$N$K2C$($F!"EPO?$9$k$3$H$b$G(B +$B$-$k!#8=:_!"EPO?$5$l$F$$$k$b$N$O(B <a +href="ftp://ftp.isi.edu/in-notes/iana/assignments/media-types">MEDIA +TYPES</a> $B$G;2>H$G$-$k!#(B +<p> +$B$^$?!"(Btype $B$b$7$/$O(B subtype $B$K!"A0$K(B `x-' $B$rIU$1$?(B +<concept>x-token</concept> $B$rMQ$$$k$3$H$K$h$j!"EPO?$5$l$F$$$J$$$b$N$r(B +$B;dE*$KMQ$$$k$3$H$b$G$-$k!#$7$+$7!"EvA3$N$3$H$J$,$i!"$3$&$7$?;dE*$J(B +content-type $B$ONJ2r$rF@$?<T$N4V$G$7$+2r<a$G$-$J$$$N$GMxMQ$K$OCm0U$9$k(B +$B$3$H!#(B +<p> +<cf node="Content-Type field"> + + +<h3> Content-Type field +<node> Content-Type field +<p> +<dref>media type</dref> $B$d(B <dref>MIME charset</dref> $B$J$I$N(B part $B$K4X(B +$B$9$k>pJs$rI=8=$9$k$?$a$N(B field. <dref>RFC 2045</dref> $B$GDj5A$5$l$F$$$k!#(B + +<memo> +<p> +$BNr;KE*$K$O(B RFC 1049 $B$G(B Content-Type field $B$,Ds0F$5$l$F$$$k!#C"$7!"$3$3(B +$B$G$O(B type $B$H(B subtype $B$N6hJL$O$J$$!#$7$+$7!"J8K!E*$K$O(B MIME parser $B$O(B +RFC 1049 $B$K4p$E$/(B message $B$rL$CN$N(B content-type $B$r;}$C$?(B message $B$H$7(B +$B$F(B parse $B$G$-$k$@$m$&!#(B +</memo> + +<p> +Content-Type field $B$O(B + +<quote> +``Content-Type'' ``:'' <concept>type</concept> ``/'' +<concept>subtype</concept> *( ``;'' <concept>parameter</concept> ) +</quote> + +<noindent> +$B$HDj5A$5$l$k!#(B +<p> +$BNc$($P!"(B + +<quote> +<verb> +Content-Type: image/jpeg +</verb> +</quote> + +<noindent> +$B$d(B + +<quote> +<verb> +Content-Type: text/plain; charset=iso-2022-jp +</verb> +</quote> + +<noindent> +$B$J$I$N$h$&$K=q$+$l$k!#(B + +<memo> +<p> +content-type $B$N$J$$(B part $B$O(B + +<quote> +<verb> +Content-Type: text/plain; charset=us-ascii +</verb> +</quote> + +<noindent> +$B$H$7$F2r<a$5$l$k!#(B<cf node="us-ascii"> +</memo> + + +<h3> Emacs +<node> Emacs +<p> +$B$3$3$G$O(B `Emacs' $B$G(B FSF $B$,G[I[$7$F$$$k(B GNU Emacs $B$r;X$7!"(B`emacs' $B$G(B +GNU Emacs $B$NJQ<o$NAm>N$H$9$k!#(B + + +<h3> encoded-word +<node> encoded-word +<p> +header $B$K$*$1$kHs(B <a node="ASCII">ASCII</a> $BJ8;z$NI=8=!#(B<concept>RFC +2047</concept> $B$GDj5A$5$l$F$$$k!#(B +<p> +<rfc number="2047" type="Standards Track" author="K. Moore" + title="MIME (Multipurpose Internet Mail Extensions) Part + Three: Message Header Extensions for Non-ASCII Text" + date="November 1996" obsolete="1521,1522,1590"> + + +<h3> encapsulation +<node> encapsulation +<p> +<a node="RFC 822">Internet mail</a> $B$rB>$N5-;v$K$^$k$4$HF~$l$kJ}K!!#(B +<p> +$BNc$($P!"5-;v$rE>Aw$7$?$j$9$k$N$KMQ$$$k!#(B +<p> +<cf node="message/rfc822"> + + +<h3> euc-kr +<node> euc-kr +<p> +$B4Z9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a node="ASCII">ASCII</a> $B$K(B +<a node="KS C5601">KS C5601</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1557">RFC 1557</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +cf. <standard abbrev="euc-kr" org="Korea Industrial Standards + Association" title-en="Hangul Unix Environment" + number="KS C 5861" year="1992"> + + +<h3> FTP <node> FTP +<p> +Internet $B$G(B file $B$rE>Aw$9$k$?$a$N(B protocol $B$N#1$D!#(BRFC 959 $B$GDj5A$5$l(B +$B$F$$$k!#(B +<p> +<rfc name="FTP" number="959" type="STD 9" author="Postel, J. and + J. Reynolds" title="File Transfer Protocol" + date="October 1985"> + + +<h3> GB 2312-1980 +<node> GB 2312 +<p> +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=$9$?$a$N(B <a +node="94x94 character set">94$B!_(B94 $BJ8;z=89g(B</a>$B!#Cf9q$N9q2HI8=`!#(B<a +node="ISO 2022">ISO 2022</a> $B$G$N=*C<J8;z$O(B `A'. +<p> +$B$3$l$O(B GB $B$K$*$1$k4pK\=8$G$"$k!#(B + +<standard abbrev="GB 2312" + title-cn="$B?.B)8r49MQ4A;zJTb{;zId=8(B -- $B4pK\=8(B" + title-en="Code of Chinese Graphic Character Set for + Information Interchange - Primary Set" number="GB 2312" + year="1980"> + + +<h3> GB 8565.2-1988 +<node> GB 8565.2 +<p> +$BCf9q8l$N$?$a$NJd=u(B<a node="Character set">$BJ8;z=89g(B</a>$B!#Cf9q$N9q2HI8=`!#(B +<a node="GB 2312">GB 2312</a> $B$N6u$-ItJ,$KJd=<$9$k$h$&$KDj5A$5$l$?$i$7(B +$B$$!#(B + +<standard abbrev="GB 8565.2" title-en="Information Processing - Coded + Character Sets for Text Communication - Part 2: Graphic + Characters used with Primary Set" number="GB 8565.2" + year="1988"> + + +<h3> hz-gb2312 +<node> hz-gb2312 +<p> +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ASCII">ASCII</a> $B$K(B <a node="GB 2312">GB 2312</a> $B$r(B 7bit $B$G(B +<a node="Code extension">$BId9f3HD%(B</a>$B$7$?$b$N$r(B ASCII printable $B$K$J$k(B +$B$h$&$K9)IW$7$F$$$k!#(B +<p> +RFC 1842, 1843 $B$GDj5A$5$l$F$$$k!#(B + +<rfc number="1842" type="Informational" author="Y. Wei, Y. Zhang, + J. Li, J. Ding and Y. Jiang" title="ASCII Printable + Characters-Based Chinese Character Encoding for Internet + Messages" date="August 1995"> +<rfc number="1843" type="Informational" author="F. Lee" title="HZ - A + Data Format for Exchanging Files of Arbitrarily Mixed + Chinese and ASCII characters" date="August 1995"> + + +<h3> ISO 2022 +<node> ISO 2022 +<p> +<a node="Code extension">$BId9f3HD%(B</a>$B$N$?$a$N9q:]I8=`!#(B +<p> +$B$3$l$rMQ$$$FJ#?t$N(B<a node="Character set">$BJ8;z=89g(B</a>$B$rAH9g$;$F(B <a +node="7bit">7bit</a> $B$J$$$7(B <a node="8bit">8bit</a> $B$N(B <a node="Coded +character set">$BId9f2=J8;z=89g(B</a> $B$r:n$k$3$H$,$G$-$k!#(B + +<standard abbrev="ISO 2022" org="International Organization for + Standardization (ISO)" title-en="Information Processing: + ISO 7-bit and 8-bit coded character sets: Code extension + techniques" number="ISO/IEC 2022" year="1994"> + + +<h3> iso-2022-cn +<node> iso-2022-cn +<p> +$BCf9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a node="ASCII">ASCII</a> $B$K(B +<a node="GB 2312">GB 2312</a>, <a node="CNS">CNS 11643 plain 1, plain +2</a> $B$r(B <a node="7bit">7bit</a> $B$G(B<a node="Code extension">$BId9f3HD%(B +</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> iso-2022-cn-ext +<node> iso-2022-cn-ext +<p> +$BCf9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a node="ASCII">ASCII</a> $B$K(B +<a node="GB 2312">GB 2312</a>, <a node="CNS">CNS 11643 plain 1 +.. 7</a>, <a node="ISO-IR-165">ISO-IR-165</a> $BEy$r(B <a +node="7bit">7bit</a> $B$G(B<a node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1922">RFC 1922</a> $B$GDj5A$5$l$F$$$k!#(B +<p> +<memo> +MULE 2.3 $B$*$h$S!"8=:_$N(B XEmacs/mule $B$G$O@5$7$/07$&$3$H$O$G$-$J$$!#(B +<p> +Emacs/mule $B$G$OMxMQ2DG=$G$"$k!#(B +</memo> + + +<h3> iso-2022-jp +<node> iso-2022-jp +<p> +$BF|K\8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N0l$D!#(B +<p> +$B8E$$(B <a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a +node="ASCII">ASCII</a>, JIS X0201-Latin, <a node="JIS C6226-1978">JIS +X0208-1978</a>, <a node="JIS X0208">JIS X0208-1983</a> $B$r@Z$jBX$($k(B <a +node="7bit">7bit</a> $BJ8;zId9f!#(B +<p> +RFC 1468 $B$GDj5A$5$l$F$$$k!#(B +<p> +<memo> +JIS X0208-1996? $B$G$O(B <a node="ISO 2022">ISO 2022</a> $B$HFHN)$KDj5A$5$l(B +$B$kM=Dj!#(B +</memo> + +<rfc name="iso-2022-jp" number="1468" author="Murai J., M. Crispin, + and E. van der Poel" title="Japanese Character Encoding + for Internet Messages" date="June 1993"> + + +<h3> iso-2022-jp-2 +<node> iso-2022-jp-2 +<p> +<a node="iso-2022-jp">iso-2022-jp</a> $B$r3HD%$7$?(B <a node="MIME +charset">MIME charset</a> $B$N0l$D!#(B +<p> +RFC 1554 $B$GDj5A$5$l$F$$$k!#(B + +<rfc name="iso-2022-jp-2" number="1554" type="Informational" + author="Ohta M. and Handa K." title="ISO-2022-JP-2: + Multilingual Extension of ISO-2022-JP" date="December + 1993"> + + +<h3> iso-2022-kr +<node> iso-2022-kr +<p> +$B4Z9q8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F(B <a node="ASCII">ASCII</a> $B$K(B +<a node="KS C5601">KS C5601</a> $B$r(B <a node="7bit">7bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<a node="RFC 1557">RFC 1557</a> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> ISO 646 +<node> ISO 646 +<p> +$B3F9q$G6&DL$K;H$($k:G>.8BEY$N(B<a node="Character set">$BJ8;z=89g(B</a>$B$rDj$a(B +$B$?$b$N!#(B<a node="94 character set">94 $BJ8;z=89g(B</a>$B$N#1$D!#(BISO 646 IRV +$B!J9q:]4p=`HG!K$r85$K4v$D$+$NJ8;z$O3F9q$G0c$&J8;z$r3dEv$k$3$H$r5v$7$F$$(B +$B$F!"4v$D$+$NJQ<o$,B8:_$9$k!#(B<a node="ASCII">ASCII</a> $B$d(B JIS +X0201-Latin $B$O$=$N0l<o!#(B + +<standard abbrev="ISO 646" org="International Organization for + Standardization (ISO)" title-en="Information technology: + ISO 7-bit coded character set for information + interchange" number="ISO/IEC 646" year="1991"> + + +<h3> ISO 8859-1 +<node> ISO 8859-1 +<p> +$B@>2$=t8l$GMQ$$$i$l$k3HD%(B Latin $BJ8;z$d5-9f$+$i$J$k(B <a node="96 +character set">96 $BJ8;z=89g(B</a>$B!#(B + +<standard abbrev="ISO 8859-1" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 1: Latin Alphabet No.1" number="ISO 8859-1" + year="1987"> + + +<h3> iso-8859-1 +<node> iso-8859-1 +<p> +$B@>2$=t8l$J$I$rI=8=$9$k$?$a$N(B <dref>MIME charset</dref> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F!"(B<a node="ASCII">ASCII</a> $B$K(B +<a node="ISO 8859-1">ISO 8859-1</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<dref>RFC 2046</dref> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> ISO 8859-2 +<node> ISO 8859-2 +<p> +$BEl2$=t8l$GMQ$$$i$l$k3HD%(B Latin $BJ8;z$d5-9f$+$i$J$k(B <a node="96 +character set">96 $BJ8;z=89g(B</a>$B!#(B + +<standard abbrev="ISO 8859-2" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 2: Latin alphabet No.2" number="ISO 8859-2" + year="1987"> + + +<h3> iso-8859-2 +<node> iso-8859-2 +<p> +$BEl2$=t8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N#1(B +$B$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F!"(B<a node="ASCII">ASCII</a> $B$K(B +<a node="ISO 8859-2">ISO 8859-2</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<dref>RFC 2046</dref> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> ISO 8859-3 +<node> ISO 8859-3 +<p> +<standard abbrev="ISO 8859-3" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 3: Latin alphabet No.3" + number="ISO 8859-3" year="1988"> + + +<h3> ISO 8859-4 +<node> ISO 8859-4 +<p> +<standard abbrev="ISO 8859-4" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 4: Latin alphabet No.4" + number="ISO 8859-4" year="1988"> + + +<h3> ISO 8859-5 +<node> ISO 8859-5 +<p> +$B%-%j%kJ8;z$d5-9f$+$i$J$k(B <a node="96 character set">96 $BJ8;z=89g(B</a>$B!#(B + +<standard abbrev="ISO 8859-5" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 5: Latin/Cyrillic alphabet" number="ISO 8859-5" + year="1988"> + + +<h3> iso-8859-5 +<node> iso-8859-5 +<p> +$B%-%j%kJ8;z$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N(B +$B#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F!"(B<a node="ASCII">ASCII</a> $B$K(B +<a node="ISO 8859-5">ISO 8859-5</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +<dref>RFC 2046</dref> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> ISO 8859-6 +<node> ISO 8859-6 +<p> +<standard abbrev="ISO 8859-6" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 6: Latin/Arabic alphabet" + number="ISO 8859-6" year="1987"> + + +<h3> ISO 8859-7 +<node> ISO 8859-7 +<p> +$B%.%j%7%"J8;z$d5-9f$+$i$J$k(B <a node="96 character set">96 $BJ8;z=89g(B</a>$B!#(B + +<standard abbrev="ISO 8859-7" org="International Organization for + Standardization (ISO)" title-en="Information Processing + -- 8-bit Single-Byte Coded Graphic Character Sets -- + Part 7: Latin/Greek alphabet" number="ISO 8859-7" + year="1987"> + + +<h3> iso-8859-7 +<node> iso-8859-7 +<p> +$B%.%j%7%"8l$rI=8=$9$k$?$a$N(B <a node="MIME charset">MIME charset</a> $B$N(B +$B#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$$$F!"(B<a node="ASCII">ASCII</a> $B$K(B +<a node="ISO 8859-7">ISO 8859-7</a> $B$r(B <a node="8bit">8bit</a> $B$G(B<a +node="Code extension">$BId9f3HD%(B</a>$B$7$F$$$k!#(B +<p> +RFC 1947 $B$GDj5A$5$l$F$$$k!#(B + +<rfc name="iso-8859-7" number="1947" type="Informational" + author="D. Spinellis" title="Greek Character Encoding + for Electronic Mail Messages" date="May 1996"> + + +<h3> ISO 8859-8 +<node> ISO 8859-8 +<p> +<standard abbrev="ISO 8859-8" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 8: Latin/Hebrew alphabet" + number="ISO 8859-8" year="1988"> + + +<h3> ISO 8859-9 +<node> ISO 8859-9 +<p> +<standard abbrev="ISO 8859-9" org="International Organization for + Standardization (ISO)" title-en="Information + Processing -- 8-bit Single-Byte Coded Graphic + Character Sets -- Part 9: Latin alphabet No.5" + number="ISO 8859-9" year="1990"> + + +<h3> ISO-IR-165, CCITT Extended GB <node> ISO-IR-165 +<p> +CCITT $B$,EPO?$7$?!"Cf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=(B +$B8=$9$k$?$a$N(B <a node="94x94 character set">94$B!_(B94 $BJ8;z=89g(B</a>$B!#(B +<p> +<a node="GB 2312">GB 2312</a> $B$H(B <a node="GB 8865.2">GB 8565 $BI=#2(B</a> +$B$K(B 150 $BJ8;z$[$I$rDI2C$7$?$b$N$i$7$$!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$G$N=*C<J8;z$O(B `E' $B$G$"$k!#(B + + +<h3> JIS X0201 +<node> JIS X0201 +<p> +<a node="ISO 646">ISO 646</a> $B$NJQ<o$N#1$D$G$"$k(B Latin $BJ8;z=89g$H(B 1 +byte $B$N%+%?%+%JJ8;z=89g$+$i$J$k!#(B +<p> +$B85$O(B <concept>JIS C6220-1976</concept> $B$H8@$C$?$,(B <concept>JIS +X0201</concept> $B$KHV9f$,JQ99$5$l$?!#(B + +<standard abbrev="JIS X0201-1976" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" title-ja="$B>pJs8r49MQId9f(B" + title-en="Code for Information Interchange" number="JIS + X 0201-1976"> + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=P$kM=Dj!#(B + +<standard abbrev="JIS X0201-1996?" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" + title-ja="$B#7%S%C%H5Z$S#8%S%C%H$N>pJs8r49MQId9f2=J8;z=89g(B" + title-en="7-bit and 8-bit coded character sets for + information interchange" number="JIS X 0201" year="1996? + draft"> + + +<h3> JIS C6226-1978 +<node> JIS C6226 +<p> +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B <a node="94x94 character set">94$B!_(B94 $BJ8;z=8(B +$B9g(B</a>$B!#F|K\$N9q2HI8=`!#(BJIS X0208-1978 $B$H$b$$$&!#(B +<p> +<cf node="JIS X0208"> + + +<h3> JIS X0208 +<node> JIS X0208 +<p> +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B <a node="94x94 character set">94$B!_(B94 $BJ8;z=8(B +$B9g(B</a>$B!#F|K\$N9q2HI8=`!#(B1978 $BG/HG!"(B1983 $BG/HG!"(B1990 $BG/HG$,$"$k$,!"(B +Internet $B$G$O(B 1983 $BG/HG$,$b$C$H$bNI$/;H$o$l$F$$$k!#(B +<p> +JIS X0208 $B$O5-9f!"?t;z!"%m!<%^;z!"$R$i$,$J!"%+%?%+%J!"%.%j%7%cJ8;z!"%-(B +$B%j%kJ8;z!"7S@~AG!"Bh#1?e=`!"Bh#2?e=`$N4A;z$,4^$^$l$k!#C"$7!"(B1983 $BG/HG(B +$B$N0lIt$N5-9f$H7S@~AG$O(B 1978 $BG/HG$K$O$J$$!#$^$?!"0lIt$N4A;z$N;z7A$,(B +1983 $BG/HG$G$OJQ99$5$l!"$^$?!"Bh#1?e=`$HBh#2?e=`$,F~$lBX$o$C$F$$$?$j$9(B +$B$k!#$3$N$?$a!"(B1978 $BG/HG$H(B 1983 $BG/HG$O0[$J$kJ8;z=89g$H$7$F07$o$l$k!#(B +<p> +1990 $BG/$N2~Dj$G$O(B 1983 $BG/HG$KBP$9$kDI2C$,9T$o$l$?!#$3$N$?$a!"(B1990 $BG/HG(B +$B$r;X<($9$k>l9g$OA0$K99?7%7!<%1%s%9$rMQ$$$k!#(B + +<standard abbrev="JIS X0208-1978" org="$BF|K\5,3J6(2q(B (Japanese Standards + Association)" title-ja="$B>pJs8r49MQ4A;zId9f7O(B" + title-en="Code of the Japanese graphic character set for + information interchange" number="JIS C6226" year="1978"> +<standard abbrev="JIS X0208-1983,1990" org="$BF|K\5,3J6(2q(B (Japanese Standards + Association)" title-ja="$B>pJs8r49MQ4A;zId9f7O(B" + title-en="Code of the Japanese graphic character set for + information interchange" number="JIS X0208" year="1983,1990"> + +<p> +$B$^$?!"(B1996 $BG/$K2~DjHG$,=PHG$5$l$kM=Dj!#!J;z7A$NJQ99$O9T$o$l$J$$$N$GJ8(B +$B;z=89g$H$7$F$O(B 1990 $BG/HG$HF10l$G$"$k!K(B + +<standard abbrev="JIS X0208-1996?" org="$BF|K\5,3J6(2q(B (Japanese + Standards Association)" title-ja="$B#7%S%C%H5Z$S#8%S%C%H$N(B + $B#2%P%$%H>pJs8r49MQId9f2=4A;z=89g(B" title-en="7-bit and + 8-bit double byte coded Kanji sets for information + interchange" number="JIS X 0208" year="1996? draft"> + + +<h3> JIS X0212-1990 +<node> JIS X0212 +<p> +<a node="JIS X0208">JIS X0208</a> $B$K$J$+$C$?J8;z$r=8$a$?(B <a +node="94x94 character set">94$B!_(B94 $BJ8;z=89g(B</a>$B!#!VJd=u4A;z!W$H$b8F$P$l(B +$B$k!#F|K\$N9q2HI8=`!#(B<a node="ISO 2022">ISO 2022</a> $B$G$N=*C<J8;z$O(B +`D'. + + +<h3> koi8-r +<node> koi8-r +<p> +$B%m%7%d8lEy$GMQ$$$i$l$k%-%j%kJ8;z$rI=8=$9$k$?$a$N(B <a node="MIME +charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ISO 2022">ISO 2022</a> $B$K4p$+$J$$(B <a node="8bit">8bit</a> $B$N(B +<a node="Coded character set">$BId9f2=J8;z=89g(B</a>$B$G(B de-fact standard $B$G(B +$B$"$k!#(B +<p> +RFC 1489 $B$GDj5A$5$l$F$$$k!#(B +<p> +<rfc number="1489" author="A. Chernov" title="Registration of a + Cyrillic Character Set" date="July 1993"> + + +<h3> KS C5601-1987 +<node> KS C5601 +<p> +$B4Z9q8l$rI=$9$?$a$N(B <a node="94x94 character set">94$B!_(B94 $BJ8;z=89g(B</a>$B!#(B +$B4Z9q$N9q2HI8=`!#(B<a node="ISO 2022">ISO 2022</a> $B$G$N=*C<J8;z$O(B `C'. + +<standard abbrev="KS C5601" org="Korea Industrial Standards + Association" title-en="Code for Information Interchange + (Hangul and Hanja)" number="KS C 5601" year="1987"> + + +<h3> message +<node> message +<p> +$B$3$3$G$O(B <dref>RFC 822</dref> $B$GDj5A$5$l$k(B mail $B$H(B <dref>RFC +1036</dref> $B$GDj5A$5$l$k(B news $B5-;v$NAm>N$H$7$FMQ$$$k!#(B + + +<h3> message/rfc822 +<node> message/rfc822 +<p> +$BEAE}E*$J(B <dref>RFC 934</dref> $B$KBe$o$j!"(B<dref>RFC 822</dref> $B$GDj5A$5(B +$B$l$k(B mail $B$rI=$9(B MIME $B$N7A<0!#(B<dref>RFC 2046</dref> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> method +<node> method +<p> +tm $B$GFCDj$N<oN`$N(B data $B$r:F@8$7$?$H$-<B:]$K$=$N=hM}$r9T$J$&(B +program. Emacs Lisp $B$G=q$+$l$?(B <concept>internal method</concept> $B$H(B C +$B$d(B script $B8@8l$J$I$G=q$+$l$?(B <concept>external method</concept> $B$,$"$k!#(B +<p> +<cf file="tm-view-ja" node="method"> + + +<h3> MIME +<node> MIME +<p> +<concept>Multipurpose Internet Mail Extensions</concept> $B$NN,$G!"(B +Internet $B$N(B mail $B$d(B news $B$G(B <a node="us-ascii">us-ascii plain text</a> +$B0J30$NJ8;z$r;H$&$?$a$N(B <dref>RFC 822</dref> $B$KBP$9$k3HD%!#(B +<p> +RFC 2045 $B$OKAF,$G<!$N$h$&$K=R$Y$F$$$k!'(B +<p> +STD 11, RFC 822 $B$O!"(BUS-ASCII message header $B$K4X$7$FHs>o$K>\:Y$K5,Dj$7(B +$B$?(B message $BI=8=(B protocol $B$rDj5A$7$F$$$k!#$7$+$7!"$=$l$OC1$K(B flat $B$J(B +US-ASCII text $B$N$_$KN1$^$j!"(Bmessage $B$NFbMF$d(B message body $B$K4X$9$k5,Dj(B +$B$O$J$5$l$F$$$J$$!#(BMultipurpose Internet Mail Extensions, $B$"$k$$$O(B MIME +$B$HAm>N$5$l$k!"$3$N0lO"$NJ8=q$O!"0J2<$N;v$r2DG=$H$9$k$?$a$K(B message $B$N(B +$B7A<0$r:FDj5A$7$?!'(B + +<ol> +<li>$BJ8=q(B message body $B$K$*$1$k(B US-ASCII $B0J30$NJ8;z=89g(B +</li> +<li>$BHsJ8=q(B message body +</li> +<li>$BJ#?t$NItJ,$+$i$J$k(B message body +</li> +<li>US-ASCII $B0J30$NJ8;z=89g$+$i$J$kJ8=q(B header $B>pJs(B +</ol> + +<p> +<dref>RFC 2045</dref>, <dref>RFC 2046</dref>, <a +node="encoded-word">RFC 2047</a>, <dref>RFC 2048</dref>, <dref>RFC +2049</dref> $B$GDj5A$5$l$F$$$k!#(B + + +<h3> MIME charset +<node> MIME charset +<p> +<dref>Content-Type field</dref> $B$d(B <a +node="encoded-word">encoded-word</a> $B$N(B charset parameter $B$GMQ$$$i$l$k(B +$BEPO?$5$l$?(B<a node="Coded character set">$BId9f2=J8;z=89g(B</a>$B!#(B +<p> +<dref>RFC 2045</dref> $B$GDj5A$5$l$F$$$k!#(B +<p> +<a node="iso-2022-jp">iso-2022-jp</a> $B$d(B <a node="euc-kr">euc-kr</a> +$B$O$=$N#1$D!#!J$3$3$G$O!"(BMIME charset $B$O(B<a node="Character set">$BJ8;z=8(B +$B9g(B</a>$B$H6hJL$7$F>.J8;z$G=q$$$F$$$k!K(B + + +<h3> MTA +<node> MTA +<p> +<concept>Message Transfer Agent</concept> $B$NN,$G!"(Bsendmail $B$J$I$N(B mail +$BG[Aw(B program $B$H(B news server $B$NAm>N!#(B +<p> +<cf node="MUA"> + + +<h3> MUA +<node> MUA +<p> +<concept>Message User Agent</concept> $B$NN,$G!"(Bmail reader $B$H(B news +reader $B$NAm>N!#(B +<p> +<cf node="MTA"> + + +<h3> MULE +<node> MULE +<p> +$BH>ED(B $B7u0l;a$i$,:n$C$?!"B?8@8l$5$l$?(B <a node="Emacs">Emacs</a>. +<p> +[MULE] Nishikimi M., Handa K. and Tomura S., ``Mule: MULtilingual +Enhancement to GNU Emacs'', Proc. of INET'93, August, 1993. +<p> +$B8=:_!"(BMULE $B$N5!G=$r(B Emacs $B$K(B merge $B$9$k:n6H$,9T$o$l$F$*$j!"(B<a +href="ftp://etlport.etl.go.jp/pub/mule/mule-19.33-gamma.taz"> alpha $BHG(B +</a> $B$,B8:_$9$k!#(B +<p> +$B$=$NB>!"(BXEmacs $B$K(B merge $B$7$?$b$N$bB8:_$9$k!#(B +<p> +$B$3$N$?$a!"8=:_$G$OB?8@8l(B Emacs $B$O!"85!9$N(B MULE $B$r4^$a$F#3<oN`$"$k$3$H(B +$B$K$J$k!#(B +<p> +$B$=$3$G!"$3$3$G$O!"B?8@8l(B Emacs $B$NAm>N$r(B <concept>mule</concept>, $B85!9(B +$B$N(B MULE $B$r(B <concept>MULE</concept>, mule $B5!G=$r(B merge $B$7$?(B Emacs $B$r(B +<concept>Emacs/mule</concept>, mule $B5!G=$r(B merge $B$7$?(B XEmacs $B$r(B +<concept>XEmacs/mule</concept> $B$H8F$V$3$H$K$9$k!#(B + + +<h3> Multipart +<node> multipart +<p> +$B#1$D$N(B <dref>message</dref> $B$KJ#?t$N(B <dref>entity</dref> $B$rF~$l$k$?$a(B +$B$N(B <dref>MIME</dref> $B$K$*$1$k(B <dref>media type</dref> $B$N#1$D!"$b$7$/$O!"(B +$BJ#?t$N(B entity $B$+$i$J$k(B message $B$r;X$9!#(B +<p> +$B8=:_!"Dj5A$5$l$F$$$k(B <concept>multipart</concept> $B$H$7$F$O!"(B<dref>RFC +2046</dref> $B$GDj5A$5$l$?(B + +<ul> +<li><dref>multipart/mixed</dref> +<li><dref>multipart/alternative</dref> +<li><dref>multipart/digest</dref> +<li><dref>multipart/parallel</dref> +</ul> + +<noindent> +$B$N$[$+(B <a node="Security multipart">RFC 1847</a> $B$GDj5A$5$l$?(B + +<ul> +<li><dref>multipart/signed</dref> +<li><dref>multipart/encrypted</dref> +</ul> + +<noindent> +$B$J$I$,$"$k!#(B + + +<h3> multipart/alternative +<node> multipart/alternative +<p> +<dref>multipart</dref> $B$N#1$D$G!"F1$8>pJs$r0[$C$?7A<0$GF~$l!"A*Br;h$H(B +$B$9$k>l9g$KMQ$$$k!#(B +<p> +<cf node="RFC 2046"> + + +<h3> multipart/digest +<node> multipart/digest +<p> +<dref>multipart</dref> $B$N#1$D$G!"4^$^$l$k(B <dref>entity</dref> $B$N(B +default $B$N(B<dref>media type</dref> $B$,(B <dref>multipart/mixed</dref> $B$J$I(B +$B$N>l9g(B <dref>text/plain</dref> $B$G$"$k$N$KBP$7!"(B +<concept>multipart/digest</concept>$B$G$O(B <dref>message/rfc822</dref> $B$,(B +$BMQ$$$i$l$kE@$,0[$J$k!#(B +<p> +$B$3$l$OEAE}E*$J(B <dref>RFC 1153</dref> $B$K4p$E$/(B +<dref>encapsulation</dref> $B$KBe$o$k$b$N$G$"$k!#(B +<p> +<cf node="RFC 2046"> + + +<h3> multipart/encrypted +<node> multipart/encrypted +<p> +RFC 1847 $B$GDj5A$5$l$?(B <dref>Security multipart</dref> $B$N#1$D$G!"0E9f2=(B +$B$5$l$?(B message $B$rI=8=$9$k$N$KMQ$$$k!#(B +<p> +<cf node="PGP/MIME"> + + +<h3> multipart/mixed +<node> multipart/mixed +<p> +<dref>multipart</dref> $B$N<gMW$J(B subtype $B$G!"J#?t$N(B part $B$r=g=xIU$1$FJB(B +$B$Y$k>l9g$KMQ$$$k!#(B +<p> +<cf node="RFC 2046"> + + +<h3> multipart/parallel +<node> multipart/parallel +<p> +<dref>multipart</dref> $B$N#1$D$G!"J#?t$N(B part $B$r=g=xIU$1$:$K4^$a$k>l9g(B +$B$KMQ$$$k!#(B +<p> +<cf node="RFC 2046"> + + +<h3> multipart/signed +<node> multipart/signed +<p> +RFC 1847 $B$GDj5A$5$l$?(B <dref>Security multipart</dref> $B$N#1$D$G!"EE;R=p(B +$BL>$rI=8=$9$k$N$KMQ$$$k!#(B +<p> +<cf node="PGP/MIME"> + + +<h3> PGP +<node> PGP +<p> +Phil Zimmermann $B;a$,:n@.$7$?8x3+800E9f=hM}7O$N#1$D!#(B +<dref>message</dref> $B$N0E9f2=$dEE;R=pL>$r9T$&$3$H$,$G$-$k!#(BPretty Good +Privacy $B$NN,!#(B +<p> +$BEAE}E*$J(B PGP $B$G$O(B <dref>encapsulation</dref> $B$K(B <dref>RFC 934</dref>$B$K(B +$B=`$8$?J}K!$rMQ$$$k!#$3$l$O(B <dref>MIME</dref> $B$HL7=b$9$k$N$G(B +<dref>PGP/MIME</dref> $B$,Ds0F$5$l$F$$$k!#0lJ}!"(BMIME $B$K$*$$$F(B PGP $B$N(B +encapsulation $B$rMQ$$$kJ}K!(B <cf node="PGP-kazu"> $B$bMxMQ$5$l$F$-$?!#$7$+(B +$B$7!":#8e$O(B PGP/MIME $B$KE}0l$7$F$$$/J}$,K>$^$7$$!#(B +<p> +<rfc name="PGP" number="1991" type="Informational" author="D. Atkins, + W. Stallings and P. Zimmermann" title="PGP Message + Exchange Formats" date="August 1996"> + + + +<h3> PGP-kazu +<node> PGP-kazu +<p> +$B;3K\(B $BOBI'(B $B;a$,Ds0F$7$?(B <a node="MIME">MIME</a> $B$G(B <a +node="PGP">PGP</a> $B$rMxMQ$9$k$?$a$NJ}K!$r$3$3$G$O(B +<concept>PGP-kazu</concept> $B$H8F$V$3$H$K$9$k!#(B +<p> +PGP-kazu $B$O(B <concept>application/pgp</concept> $B$H$$$&(B +<dref>content-type</dref> $B$rDj5A$9$k!#(B +<p> +application/pgp $B$N(B part $B$G$O(B PGP $B$N(B <dref>encapsulation</dref> $B$,MQ$$(B +$B$i$l$k!#(BPGP $B$N(B encapsulation <cf node="RFC 934"> $B$H(B MIME $B$N(B +encapsulation $B$OL7=b$9$k$N$G!"(BPGP $B$N(B encapsulation $B$r2r$+$J$$8B$j!"Cf(B +$B$K4^$^$l$?(B MIME message $B$rFI$`$3$H$,$G$-$J$/$J$k!#B($A!"(BPGP-kazu $B$KBP(B +$B1~$7$F$$$J$$(B MIME $B$KBP1~$7$?(B <dref>MUA</dref> $B$O$=$N(B part $B$,FI$a$J$/$J(B +$B$k!#$=$NBe$o$j!"(BMIME $B$KBP1~$7$F$$$J$$(B PGP $BBP1~$N(B <dref>MUA</dref> $B$G$b(B +message $B$rFI$`$3$H$,$G$-$k!#(B +<p> +PGP-kazu $B$G$O(B MUA $B$O(B PGP $B$N$H(B MIME $B$N$H$$$$D$N(B encapsulation $B$rCN$i(B +$B$J$1$l$P$J$i$J$$!#$^$?!"(Bapplication/pgp part $B$r(B parse $B$9$k$?$a$K$O!"$^(B +$B$:!"(Bpgp $B$N=hM}$r9T$o$J$1$l$P$J$i$J$$$N$G!"(Bparse $B=hM}$,J#;($K$J$k!#(B +<p> +$B$^$?!"(BInternet $B$G$O:#8e(B <dref>PGP/MIME</dref> $B$NJ}8~$GI8=`2=$7$F$$$3$&(B +$B$H$$$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP-kazu $B$OMQ$$$J$$$N$,K>(B +$B$^$7$$!#(B +<p> +[draft-kazu-pgp-mime-00.txt] Yamamoto K., ``PGP MIME Integration'', +October, 1995 + + +<h3> PGP/MIME +<node> PGP/MIME +<p> +Michael Elkins $B;a$,Ds0F$7$?(B <a node="MIME">MIME</a> $B$G(B <a +node="PGP">PGP</a> $B$rMxMQ$9$k$?$a$NJ}K!!#(B +<p> +<a node="Security multipart">RFC 1847</a> $B$K4p$-!"(BMIME $B$N(B multipart $B$K(B +$B$h$k(B <dref>encapsulation</dref> $B$r9T$&!#$3$N$?$a!"(BMIME $B$N<+A3$J3HD%$K(B +$B$J$C$F$$$k!#$7$+$7!"EAE}E*$J(B PGP$B$H$N8_49@-$,<:$o$l$F$$$k!#(B +<p> +PGP/MIME $B$G$O(B <dref>PGP-kazu</dref> $B$H0[$J$j!"(BMIME $B$N(B encapsulation $B$N(B +$B$_$rMQ$$$k!#$^$?!"$3$N$?$a!"(BPGP $B$N=hM}$r9T$&A0$K(B message $B$N(B parse $B$r9T(B +$B$&$3$H$,$G$-$k!#(B +<p> +Internet $B$G$O:#8e(B <dref>PGP/MIME</dref> $B$NJ}8~$GI8=`2=$7$F$$$3$&$H$$$&(B +$B$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP $B$rMQ$$$k>l9g$O(B PGP/MIME$B$rMQ(B +$B$$$k$N$,K>$^$7$$!#(B + +<rfc name="PGP/MIME" number="2015" type="Standards Track" + author="M. Elkins" title="MIME Security with Pretty Good + Privacy (PGP)" date="October 1996"> + + +<h3> Quoted-Printable +<node> Quoted-Printable +<p> +<dref>RFC 2045</dref> $B$GDj5A$5$l$F$$$k(B <dref>MIME</dref> $B$K$*$1$k(B +<dref>binary data</dref> $B$N(B network $B$G$NJQ49K!$N#1$D!#(B +<p> +`=' $B$d@)8fJ8;z$d(B 128 $B0J>e$NJ8;z$J$I$O(B `=AF' $B$N$h$&$K(B `=' $B$N8e$KB3$/(B 16 +$B?J?t$GI=8=$9$k!#$3$N$?$a!"(B<dref>ASCII</dref> $BJ8;zCf?4$N(B data $B$G$O(B +<dref>Base64</dref> $B$KHf$Y$k$H2DFI@-$,9b$/$J$k2DG=@-$,$"$k!#(B +<p> +$B$7$+$7$J$,$i!"(BEBCDIC $B$K$OB8:_$7$J$$J8;z$rMxMQ$9$k>l9g!"(BEBCDIC $B$rMxMQ$7(B +$B$F$$$k(B network $B$G$O0BA4$KE>Aw$9$k$3$H$,$G$-$:!"(BBase64 $B$KHf$Y$F0BA4@-$O(B +$BDc$$!#(B + + +<h3> RFC 821 +<node> RFC 821 +<p> +<concept>SMTP</concept> $B$H8F$P$l$k(B Internet mail $B$NG[AwK!$NI8=`$rDj$a(B +$B$F$$$k(B RFC. + +<rfc name="SMTP" number="821" type="STD 10" author="J. Postel" + title="Simple Mail Transfer Protocol" date="August + 1982"> + + +<h3> RFC 822 +<node> RFC 822 +<p> +Internet mail $B$N<g$K(B <concept>message header</concept> $B$K4X$9$k7A<0$K(B +$B4X$9$kI8=`$rDj$a$F$$$k(B RFC. + +<memo> +<p> +news message $B$b$3$l$K=`$8$F$$$k$N$G!"(B<concept>Internet mail</concept> +$B$H=q$/$h$j$b!"(B<concept>Internet message</concept> $B$H=q$$$?J}$,NI$$$+$b(B +$B$7$l$J$$!#(B +</memo> + +<rfc number="822" type="STD 11" author="D. Crocker" title="Standard + for the Format of ARPA Internet Text Messages" + date="August 1982"> + + +<h3> RFC 934 +<node> RFC 934 +<p> +<a node="RFC 822">Internet mail</a> $B$N(B <a node="encapsulation"> +<concept>encapsulation</concept></a> $B$NJ}K!$rDj$a$?(B RFC. +<p> +<dref>MIME</dref> $B$HL7=b$9$k$N$G!"8=:_$G$O(B <dref>message/rfc822</dref> +$B$rMQ$$$k$Y$-$G$"$k!#(B + + +<rfc number="934" author="Marshall T. Rose and Einar A. Stefferud" + title="Proposed Standard for Message Encapsulation" + date="January 1985"> + + +<h3> RFC 1036 +<node> RFC 1036 +<p> +USENET $B$G$N(B message $B$N7A<0$rDj$a$?(B RFC. <a node="RFC 822">RFC 822</a> +$B$N(B subset $B$K$J$C$F$$$k!#(BInternet $B$NI8=`$G$O$J$$$,!"(BUSENET $B0J30$N(B +netnews $B$G$b$3$l$K=`$8$F$$$k$b$N$,B?$$!#(B + +<rfc name="USENET" number="1036" author="M. Horton and R. Adams" + title="Standard for Interchange of USENET Messages" + date="December 1987" obsolete="850"> + + +<h3> RFC 1153 +<node> RFC 1153 +<p> +$BJ#?t$N(B <a node="RFC 822">Internet mail</a> $B$r(B <a node="encapsulation"> +<concept>encapsulation</concept></a> $B$9$k$?$a$NJ}K!$rDj$a$?(B +RFC. <dref>RFC 934</dref> $B$rMQ$$$k!#(B +<p> +<dref>MIME</dref> $B$HL7=b$9$k$N$G!"8=:_$G$O(B <dref>message/rfc822</dref> +$B$rMQ$$$?(B <dref>multipart</dref> $B$rMQ$$$k$Y$-$G$"$k!#(B +<p> +<cf node="multipart/digest"> + +<rfc number="1153" author="F. Wancho" title="Digest Message Format" + date="April 1990"> + + +<h3> RFC 1557 +<node> RFC 1557 +<p> +<dref>euc-kr</dref> $B$H(B <dref>iso-2022-kr</dref> $B$H$$$&4Z9q8l$N$?$a$N(B +<a node="MIME charset">MIME charset</a> $B$rDj5A$7$F$$$k(B RFC. + +<rfc number="1557" type="Informational" author="U. Choi, K. Chon and + H. Park" title="Korean Character Encoding for Internet + Messages" date="December 1993"> + + +<h3> RFC 1922 +<node> RFC 1922 +<p> +<dref>iso-2022-cn</dref>, <dref>iso-2022-cn-ext</dref>, +<dref>cn-gb</dref>, <dref>cn-big5</dref> $B$H$$$C$?Cf9q8l$N$?$a$N(B <a +node="MIME charset">MIME charset</a> $B$rDj5A$7$F$$$k(B RFC. +<p> +$B$3$l$K2C$($F!"(B<concept>charset-edition</concept> $B$H(B +<concept>charset-extension</concept> $B$H$$$&(B <dref>Content-Type +field</dref> $B$N(B parameter $B$rDj5A$7$F$$$k!#(B + +<rfc number="1922" type="Informational" author="Zhu, HF., Hu, DY., + Wang, ZG., Kao, TC., Chang, WCH. and Crispin, M." + title="Chinese Character Encoding for Internet Messages" + date="March 1996"> + + +<h3> RFC 2045 +<node> RFC 2045 +<p> +<rfc number="2045" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part One: Format of Internet Message + Bodies" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> RFC 2046 +<node> RFC 2046 +<p> +<rfc number="2046" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Two: Media Types" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2048 +<node> RFC 2048 +<p> +<rfc number="2048" type="Standards Track" author="N. Freed, J. Klensin + and J. Postel" title="Multipurpose Internet Mail + Extensions (MIME) Part Four: Registration Procedures" + date="November 1996" obsolete="1521, 1522, 1590"> + + +<h3> RFC 2049 +<node> RFC 2049 +<p> +<rfc number="2049" type="Standards Track" author="N. Freed and + N. Borenstein" title="Multipurpose Internet Mail + Extensions (MIME) Part Five: Conformance Criteria and + Examples" date="November 1996" obsolete="1521, 1522, + 1590"> + + +<h3> plain text +<node> plain text +<p> +$B=qBN$dAHHG$K4X$9$k>pJs$r;}$?$J$$(B <a node="Coded character set">$BJ8;zId(B +$B9f(B</a>$B$N$_$GI=8=$5$l$k(B text $B>pJs!#(B<cf node="text/plain"> + + +<h3> Security multipart +<node> Security multipart +<p> +<a node="MIME">MIME</a> $B$G0E9f$dEE;R=qL>$rMQ$$$k$?$a$N7A<0!#(B<a +node="multipart/signed"><concept>multipart/signed</concept></a> $B$H(B <a +node="multipart/encrypted"><concept>multipart/encrypted</concept></a> +$B$H$$$&(B multipart $B$rMQ$$$k!#(BMOSS $B$d(B <a node="PGP/MIME">PGP/MIME</a> $B$O(B +$B$3$l$K4p$$$F$$$k!#(B + +<rfc name="Security multipart" number="1847" type="Standards Track" + author="James Galvin, Gale Murphy, Steve Crocker and Ned + Freed" title="Security Multiparts for MIME: + Multipart/Signed and Multipart/Encrypted" date="October + 1995"> + + +<h3> text/enriched +<node> text/enriched +<p> +RFC 1521 $B$GDj5A$5$l$?(B <concept>text/richtext</concept> $B$KBe$o$C$F!"=q(B +$BBN$dAHHG$K4X$9$k>pJs$r;}$C$?(B text$B$rI=8=$9$k$?$a$N(B <dref>media +type</dref>. + +<rfc name="text/enriched" number="1896" author="P. Resnick and + A. Walker" title="The text/enriched MIME Content-type" + date="February 1996" obsolete="1563"> + + +<h3> text/plain +<node> text/plain +<p> +<dref>RFC 2046</dref> $B$GDj5A$5$l$?!"(B<dref>plain text</dref> $B$rI=8=$9$k(B +$B$?$a$N(B <dref>media type</dref>. +<p> +$BHs(B MIME message $B$J$I$N(B content-type $B$,Dj5A$5$l$J$$(B part $B$O(B <dref>MIME +charset</dref> $B$,(B <dref>us-ascii</dref> $B$G$"$k(B +<concept>text/plain</concept> $B$N(B part $B$G$"$k$H8+Pv$5$l$k$3$H$K$J$C$F$$(B +$B$k!#(B + + +<h3> tm-kernel, tm +<node> tm-kernel +<p> +Emacs $B$G(B <a node="MIME">MIME</a> $B$rMxMQ$9$k$?$a$N(B user interface $B$rDs(B +$B6!$9$k(B library $B72!#(B`tools for MIME' $B$NN,!#(B + +<memo title="$B$I$&$G$bNI$$$3$H(B(^-^;"> +<p> +<ul> + <li> tm $B$O(B ``tiny-mime'' $B$NN,$8$c$J$$$i$7$$$>(B (^-^; + <li> tm $B$O:n<T$N%$%K%7%c%k$8$c$J$$$i$7$$$>(B (^-^; + <li> ``Tools for MIME'' $B$NN,$H$$$&$N$O$3$8$D$1$i$7$$$>(B (^-^; +</ul> +</memo> + + +<h3> tm-MUA +<node> tm-MUA +<p> +<a node="tm-kernel">tm</a> $B$rMQ$$$?(B <a node="MUA">MUA</a> $B$b$7$/$O(B MUA +$B$KBP$9$k(B extender. +<p> +<concept>tm $BBg@9$j(B package</concept> $B$K$O(B + +<ul> +<li><a file="mh-e">mh-e</a> $BMQ$N(B <concept>tm-mh-e</concept> +<li>GNUS $BMQ$N(B <concept>tm-gnus</concept> +<li>Gnus $BMQ$N(B <a file="gnus-mime-ja"><concept>gnus-mime</concept></a> +<li>VM $BMQ$N(B <concept>tm-vm</concept> +<li>RMAIL $BMQ$N(B <concept>tm-rmail</concept> +</ul> + +<noindent> +$B$,4^$^$l$F$$$k!#(B +<p> +$BFHN)$7$?(B MUA $B$H$7$F$O(B <a file="cmail">cmail</a> $B$,(B tm $B$rMxMQ2DG=$G$"$k!#(B + + +<h3> us-ascii +<node> us-ascii +<p> +$B%"%a%j%+O"K.$J$I$G;H$o$l$k1Q8l$J$I$rI=8=$9$k$?$a$N(B <a node="MIME +charset">MIME charset</a> $B$N#1$D!#(B +<p> +<a node="ASCII">ASCII</a> $B$N$_$+$i$J$j(B <a node="ISO 2022">ISO 2022</a> +$B$K$h$k(B<a node="Code extension">$BId9f3HD%(B</a>$B$O5v$5$l$J$$!#(B +<p> +Internet mail $B$K$*$1$kI8=`$N(B<a node="Coded character set">$BId9f2=J8;z=8(B +$B9g(B</a>$B$G$"$j!"L@<(E*$K(B MIME charset $B$,<($5$l$J$$>l9g$O86B'$H$7$F(B +<concept>us-ascii</concept> $B$,;H$o$l$k!#(B +<p> +$B$^$?!"(B<a node="RFC 822">RFC 822</a> $B$K$*$1$k(B <concept>ASCII</concept> +$B$O(B us-ascii $B$r;X$9$b$N$H2r<a$9$Y$-$G$"$k!#(B + + +<h1> $B@_Dj(B +<node> Setting +<p> +$B$3$N(B package $B$K$O(B <file>mime-setup.el</file> $B$H(B +<file>tm-setup.el</file> $B$H$$$&4J0W@_Dj(B file $B$,ImB0$7$F$$$^$9!#(B + +<p> +<file>mime-setup.el</file> $B$G$O(B <file>tm-edit.el</file> $B$r;H$C$?(B MIME +message $B$N:n@.$b4^$a$?(B MIME $BA4HL$N@_Dj$r9T$J$$!"(B +<file>tm-setup.el</file> $B$G$O(B tm-MUA $B$K4X$9$k(BMIME message $B$N1\Mw$N@_Dj(B +$B$N$_$r9T$J$$$^$9!#(B + + +<h2> $BI8=`E*$J@_Dj(B +<node> mime-setup +<p> +tm $B$N0lHLE*$J@_Dj$r9T$$$?$$>l9g$O!"(B<concept>mime-setup</concept> $B$H$$(B +$B$&I8=`@_Dj(B file $B$r;H$C$F$/$@$5$$!#Nc$($P!"(B<file>~/.emacs</file> $BEy$G!"(B +<p> +<lisp> +(load "mime-setup") +</lisp> +<p> +<noindent> +$B$H$9$k$@$1$G(B OK $B$G$9!#(B + +<p> +<file>mime-setup.el</file> $B$O(B <file>tm-setup.el</file> $B$r8F$s$G$$$k$N(B +$B$G!"(B<file>tm-setup.el</file> $B$r(B load $B$9$kI,MW$O$"$j$^$;$s!#!J2a5n$N(B +Gnus FAQ $B$N5-=R$O4V0c$C$F$$$^$9!*!K(B + + +<h3> signature.el +<node> signature +<p> +tm $B$K$O(B <concept>signature</concept> $B$H$$$&(B signature $B$N<+F0@ZBX$((B +tool $B$,ImB0$7$F$*$j!"(B<file>mime-setup.el</file> $B$O$3$N@_Dj$b9T$J$$$^$9!#(B +message header $B$N(B field $B$K9g$o$;$F(B signature $B$N<+F0@ZBX$r9T$J$$$?$$>l(B +$B9g$O(B <file>~/.emacs</file> $B$K0J2<$N$h$&$J$b$N$rF~$l$F2<$5$$!#!J>\$7$/(B +$B$O(B signature.el $B$N@bL@=q$r;2>H$7$F2<$5$$!K(B + +<lisp> +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +</lisp> + + +<defvar name="mime-setup-use-signature"> +<p> +$B$3$NJQ?t$,(B <code>nil</code> $B0J30$N;~!"(B<file>signature.el</file> $B$r;H$$(B +$B$^$9!#4{DjCM$O(B <code>t</code> $B$G$9!#(B +</defvar> + + +<defvar name="mime-setup-signature-key-alist"> +<p> +$B3F(B major-mode $B$K$*$$$F(B signature $BA^F~L?Na$r@_Dj$9$Y$-(B key $B$r;XDj$7$^$9!#(B +$B4{DjCM$O(B + +<lisp> + ((mail-mode . "\C-c\C-w")) +</lisp> + +$B$G$9!#(B + +<p> +$B$3$l$rJQ99$7$?$$>l9g$O!"4X?t(B set-alist $B$J$I$r;H$C$F$3$NJQ?t$r=q$-49$((B +$B$F2<$5$$!#(B + +<lisp> +(set-alist 'mime-setup-signature-key-alist + 'news-reply-mode "\C-c\C-w") +</lisp> + +</defvar> + +<defvar name="mime-setup-default-signature-key"> +<p> +$B$"$k(B major-mode $B$K$*$$$F(B signature $BA^F~L?Na$r@_Dj$9$Y$-(B key $B$,8+$D$+$i(B +$B$J$$>l9g!"$3$NJQ?t$K@_Dj$5$l$?(B key $B$,MQ$$$i$l$^$9!#4{DjCM$O!"(B +<code>"\C-c\C-s"</code> $B$G$9!#(B +</defvar> + + +<h3> GNUS $B$N>l9g$NCm0U(B +<node> Notice about GNUS +<p> +<file>signature.el</file> $B$r;H$&>l9g!"(B<file>mime-setup.el</file> $B$OJQ(B +$B?t(B <code>gnus-signature-file</code> $B$r(B <code>nil</code> $B$K@_Dj$7$^$9!#(B +$B$h$C$F!"Aw?.;~$K<+F0E*$K(B <code>signature</code> $B$,IU$/5!G=$OM^@)$5$l$^(B +$B$9!#$3$N$h$&$J$3$H$r$7$F$$$k$N$O0J2<$NM}M3$+$i$G$9!#(B + +<p> +GNUS $B$,(B signature $B$rIU$1$k$N$O(B <code>tm-edit.el</code> $B$K$h$C$F(B MIME +message $B$,:n@.$5$l$?8e$G$9!#$h$C$F!"(BGNUS $B$,IU$1$?(B signature $B$O(B MIME +message $B$H$7$F@5$7$/=hM}$5$l$F$$$^$;$s!#Nc$($P(B multipart message $B$N>l(B +$B9g!"(BMIME message $B$N30$NHs(B MIME part $B$KIU$-$^$9!#$h$C$F!"(BMIME $BBP1~(B MUA +$B$G8+$?>l9g!"(Bsignature $B$OI=<($5$l$J$$$+$bCN$l$^$;$s!#(B + +<p> +$B$b$&0l$D$NCm0U$OI8=`@_Dj$G$O(B signature $B$rA^F~$9$k(B key $B$O(B <kbd>C-c +C-w</kbd> $B$G$O$J$/(B <a file="mh-e">mh-e</a> $B$HF1$8(B <kbd>C-c C-s</kbd> +$B$K3d$jEv$F$i$l$F$$$k$3$H$G$9!#$3$l$O(B + +<lisp> +(set-alist 'mime-setup-signature-key-alist 'news-reply-mode "\C-c\C-w") +</lisp> + +<noindent> +$B$K$h$C$F(B GNUS $B$NI8=`$KLa$9$3$H$,$G$-$^$9!#(B + + +<h2> tm-edit $B$r;H$o$J$$@_Dj(B +<node> tm-setup + +<p> +<concept>tm-setup</concept> $B$O(B <a node="tm-MUA">tm-MUA</a> $B$N@_Dj$N$_(B +$B$r9T$J$&(B module $B$G$9!#$3$N@_Dj(B file $B$G$O(B <a +file="tm-edit-ja">tm-edit</a> $B$r;H$C$?(B MIME message $B$N:n@.$K4X$9$k@_Dj(B +$B$O9T$o$l$:!"(BMIME message $B$N1\Mw$K4X$9$k@_Dj$N$_$,9T$o$l$^$9!#(BMIME +message $B$rFI$_$?$$$,<+J,$G$O:n@.$7$J$$$H$+!"(Btm-edit $B0J30$N(B MIME +composer $B$r;H$$$?$$>l9g$K$O(B mime-setup.el $B$NBe$o$j$K$3$N@_Dj(B file $B$r;H$C(B +$B$F$/$@$5$$!#(B + +<p> +$BNc$($P!"(B<file>~/.emacs</file> $BEy$K(B + +<lisp> +(load "tm-setup") +</lisp> + +<noindent> +$B$rF~$l$l$P(B OK $B$G$9!#(B + +<p> + +<memo> +<p> +<file>mime-setup.el</file> $B$r(B load $B$7$F$$$k>l9g!"$3$l$rM[$K(B load $B$9$k(B +$BI,MW$O$"$j$^$;$s!#(B +</memo> + + +<h2> VM $B$r;H$&>l9g$N@_Dj(B +<node> setting for VM + +<p> +<concept>vm</concept> $B$r;H$&>l9g$O(B <file>~/.vm</file> $B$K(B + +<lisp> +(require 'tm-vm) +</lisp> + +<noindent> +$B$rF~$l$F2<$5$$!#(B + + +<memo title="$BCm0U(B"> +<p> +<concept>BBDB</concept> $B$r;H$&>l9g$O(B <code>(bbdb-insinuate-vm)</code> +$B$N(B <bf>$B8e(B</bf> $B$K(B <code>(require 'tm-vm)</code> $B$rF~$l$F$/$@$5$$!#(B +</memo> + + +<h2> $B@_Dj(B file $B$r;H$o$J$$>l9g(B +<node> manual setting + +<p> +<file>mime-setup.el</file> $B$d(B <file>tm-setup.el</file> $B$r;29M$K$7$F2<(B +$B$5$$!#(B + + +<memo> +<p> +$B8=:_$N(B tm $B$G$O(B tm-edit $B$N;HMQ$r2>Dj$7$?4v$D$+$NJXMx$J5!G=$,B8:_$7!"$3(B +$B$l$i$N5!G=$O(B <file>mime-setup.el</file> $B$r;H$o$J$$$HMxMQ$G$-$^$;$s!#$b(B +$B$7!"(Btm-edit $B$r;H$&FH<+$N@_Dj$r9T$&>l9g$O!"(B + +<lisp> +(provide 'mime-setup) +</lisp> + +<noindent> +$B$H$$$&@k8@$r9T$C$F$/$@$5$$!#(B +</memo> + + +<h1> bug $BJs9p$N;EJ}(B +<node> Bug report +<p> +tm $B$N%P%0$r8+$D$1$?$i!"0J2<$N(B address $B$K(B mail $B$rAw$C$F$/$@$5$$!'(B + +<ul> +<li> $BF|K\8l(B <mail>bug-tm-ja@chamonix.jaist.ac.jp</mail> +<li> $B1Q8l(B <mail>bug-tm-en@chamonix.jaist.ac.jp</mail> +</ul> + +<p> +$BC"$7!"$"$^$j$K$b8E$$HG$K4X$9$kJs9p$O4?7^$5$l$^$;$s!#8E$$HG$N(B bug $B$O!"(B +$B?7$7$$HG$G$O<#$C$F$$$k$+$b$7$l$^$;$s!#$^$:!":G?7HG$G3NG'$7$F$_$^$7$g$&!#(B +<p> +$B$=$l$+$i!"E,@Z$JJs9p$r$7$^$7$g$&!#C1$K!V$&$^$/F0$+$J$$!W$H8@$o$l$F$b$I(B +$B$&$$$&>u67$J$N$+$O$5$C$Q$jH=$j$^$;$s!#:GDc8B!"(BOS, emacs, tm, $B;H$C$F$$(B +$B$k(B MUA $B$N<oN`$*$h$SHG!"@_Dj$r=q$/I,MW$,$"$j$^$9!#$^$?!"(Berror $B$,5/$C$F(B +$B$$$k>l9g$O(B backtrace $B$rAw$k$3$H$b=EMW$G$9!#(B<cf file="emacs" +node="Bugs"> +<p> +$B$^$?!"(Bbug $B$OBgDqJ#?t$N?M$,Ax6x$9$k$b$N$G$9!J$=$&$G$J$1$l$P!"(Bbug $B$G$O$J(B +$B$$2DG=@-$,$"$j$^$9!K!#$@$+$i!":n<T$KD>@\(B mail $B$rAw$k$H:n<T$OF1$8(B mail +$B$r2?DL$b=q$/1)L\$K$J$j$^$9!#$@$+$i!"I,$:(B bug $BJs9p$O>e5-$N(B address $B$KAw$C(B +$B$F$/$@$5$$!#(B + +<p> +tm ML $B$G$O(B tm $B$N%P%0>pJs$N8r49$d:G?7HG$NG[I[!"(Btm $B$N2~NI$K4X$9$k5DO@$r(B +$B9T$J$C$F$$$^$9!#(Btm ML $B$K;22C$7$?$$J}$O(B + +<ul> +<li> $BF|K\8l(B <mail>tm-ja-admin@chamonix.jaist.ac.jp</mail> +<li> $B1Q8l(B <mail>tm-en-admin@chamonix.jaist.ac.jp</mail> +</ul> + +<noindent> +$B$^$G(B mail $B$rAw$C$F2<$5$$!#EPO?$O<jF0$G$9$N$G!"$G$-$l$P!"<+A38@8l$G=q$$(B +$B$F2<$5$$!#(B(^_^) + + +<h1> $B35G0:w0z(B +<node> Concept Index + +<cindex> + + +<h1> $BJQ?t:w0z(B +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-ja.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,2016 @@ +\input texinfo.tex +@setfilename tm-ja.info +@settitle{tm 7.90 Manual$B!JF|K\8lHG!K(B} +@titlepage +@title tm 7.90 Manual$B!JF|K\8lHG!K(B +@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp> +@subtitle 1996/10/15 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm 7.90 Manual$B!JF|K\8lHG!K(B + +@ifinfo + +This file documents tm, a MIME package for GNU Emacs.@refill + +GNU Emacs $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$"$k(B `tm' $B$K$D$$$F@bL@$7$^$9!#(B +@end ifinfo + +@menu +* Introduction:: tm $B$C$F2?!)(B +* Setting:: $B@_Dj(B +* Bug report:: bug $BJs9p$N;EJ}(B +* Concept Index:: $B35G0:w0z(B +* Variable Index:: $BJQ?t:w0z(B +@end menu + +@node Introduction, Setting, Top, Top +@chapter tm $B$C$F2?!)(B + +tm $B$O(B GNU Emacs $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$9!#(Btm $B$r;H$&$H!"(B + +@itemize @bullet +@item + tm-view $B$K$h$k(B MIME message $B$N1\Mw!&:F@8(B +@item + tm-edit $B$K$h$k(B MIME message $B$N:n@.(B +@item + mh-e, GNUS, Gnus, RMAIL, VM $B$G$N(B MIME $B5!G=$N6/2=(B +@end itemize + +@noindent +$B$H$$$&$h$&$J$3$H$,9T$J$($^$9!#(B + +$B8DJL$N9`L\$K$D$$$F$O0J2<$r8f;2>H2<$5$$!'(B + +@itemize @bullet +@item +tm-MUA for Gnus (@ref{(gnus-mime-ja)}) +@item +tm-MUA for GNUS (@ref{(tm-gnus-ja)}) +@item +tm-MUA for mh-e (@ref{(tm-mh-e-ja)}) +@item +mime/viewer-mode (@ref{(tm-view-ja)}) +@item +mime/editor-mode (@ref{(tm-edit-ja)}) +@end itemize + + + +@menu +* Glossary:: $BMQ8l(B +@end menu + +@node Glossary, , Introduction, Introduction +@section $BMQ8l(B + +tm $B$G;H$o$l$F$$$kMQ8l$K$D$$$F2r@b$7$^$9!#(B + +@menu +* 7bit:: +* 8bit:: +* 94 character set:: 94 $BJ8;z=89g(B +* 96 character set:: 96 $BJ8;z=89g(B +* 94x94 character set:: 94$B!_(B94 $BJ8;z=89g(B +* ASCII:: +* Base64:: +* binary:: +* Character Set:: Character Set$B!JJ8;z=89g!K(B +* cn-gb:: cn-gb, gb2312 +* cn-big5:: cn-big5, big5 +* CNS:: CNS 11643-1992 +* Coded character set:: Coded character set$B!JId9f2=J8;z=89g!K(B, Character code$B!JJ8;zId9f!K(B +* Code extension:: Code extension$B!JId9f3HD%!K(B +* Content-Disposition:: Content-Disposition field +* media type:: +* Content-Type field:: +* Emacs:: +* encoded-word:: +* encapsulation:: +* euc-kr:: +* FTP:: FTP +* GB 2312:: GB 2312-1980 +* GB 8565.2:: GB 8565.2-1988 +* hz-gb2312:: +* ISO 2022:: +* iso-2022-cn:: +* iso-2022-cn-ext:: +* iso-2022-jp:: +* iso-2022-jp-2:: +* iso-2022-kr:: +* ISO 646:: +* ISO 8859-1:: +* iso-8859-1:: +* ISO 8859-2:: +* iso-8859-2:: +* ISO 8859-3:: +* ISO 8859-4:: +* ISO 8859-5:: +* iso-8859-5:: +* ISO 8859-6:: +* ISO 8859-7:: +* iso-8859-7:: +* ISO 8859-8:: +* ISO 8859-9:: +* ISO-IR-165:: ISO-IR-165, CCITT Extended GB +* JIS X0201:: +* JIS C6226:: JIS C6226-1978 +* JIS X0208:: +* JIS X0212:: JIS X0212-1990 +* koi8-r:: +* KS C5601:: KS C5601-1987 +* message:: +* message/rfc822:: +* method:: +* MIME:: +* MIME charset:: +* MTA:: +* MUA:: +* MULE:: +* multipart:: Multipart +* multipart/alternative:: +* multipart/digest:: +* multipart/encrypted:: +* multipart/mixed:: +* multipart/parallel:: +* multipart/signed:: +* PGP:: +* PGP-kazu:: +* PGP/MIME:: +* Quoted-Printable:: +* RFC 821:: +* RFC 822:: +* RFC 934:: +* RFC 1036:: +* RFC 1153:: +* RFC 1557:: +* RFC 1922:: +* RFC 2045:: +* RFC 2046:: +* RFC 2048:: +* RFC 2049:: +* plain text:: +* Security multipart:: +* text/enriched:: +* text/plain:: +* tm-kernel:: tm-kernel, tm +* tm-MUA:: +* us-ascii:: +@end menu + +@node 7bit, 8bit, Glossary, Glossary +@subsection 7bit + +$B$3$3$G$O(B 0 $B$+$i(B 127 $B$N@0?t$r;X$7$^$9!#(B@refill + +0 $B$+$i(B 127 $B$N@0?t$NNs$GI=8=$G$-$k$h$&$J(B data $B$r(B ``7bit $B$N(B data'' $B$H8F$S(B +$B$^$9!#(B@refill + +$B$^$?!"(B0 $B$+$i(B 31 $B$*$h$S(B 127 $B$GI=8=$5$l$k@)8fJ8;z$H(B 32 $B$GI=8=$5$l$k6uGr$H(B +33 $B$+$i(B 126 $B$GI=8=$5$l$k?^7AJ8;z$+$i$J$kJ8;zNs$N$3$H$r(B ``7bit $B$NJ8;zNs(B'' +$B$H8F$S$^$9!J$3$l$O(B ISO 2022 (@ref{ISO 2022}) $B$N!V(B7 $BC10L7O!W$HF1MM$G$9!K!#(B + +$BEAE}E*$J(B Internet $B$N(B MTA (@ref{MTA}) $B$O(B 7bit $B$N(B data $B$rE>Aw$G$-$k$N$G!"(B +7bit $B$N(B data $B$O(B Quoted-Printable (@ref{Quoted-Printable}) $B$d(B Base64 +(@ref{Base64}) $B$H$$$C$?JQ49$r9T$o$J$/$F$b$=$N$^$^E>Aw$G$-$^$9!#(B@refill + +$B$7$+$7!"(B7bit $B$G$"$l$P$I$s$J(B data $B$G$bNI$$$H$O$$$($^$;$s!#$J$<$J$i!"#19T(B +$B$ND9$5$,$"$^$j$KD9$$$H!"(BMTA $B$O$=$N(B message $B$rE>Aw$9$k$3$H$,$G$-$J$$$+$i(B +$B$G$9!#$A$J$_$K!"(BRFC 821 (@ref{RFC 821}) $B$O#19T$O2~9TJ8;z$r=|$$$F(B 998 +byte $B0JFb$G$"$k$3$H$r5a$a$F$$$^$9!#$h$C$F!"$3$l0J>e$N9T$,4^$^$l$k2DG=@-(B +$B$N$"$k(B data, $BNc$($P!"(BPostscript $B$N(B data $B$J$I$O(B Quoted-Printable $BEy$G(B +encode$B$9$kI,MQ$,$"$j$^$9!#(B + + +@node 8bit, 94 character set, 7bit, Glossary +@subsection 8bit + +$B$3$3$G$O(B 0 $B$+$i(B 255 $B$N@0?t$r;X$7$^$9!#(B@refill + +0 $B$+$i(B 255 $B$N@0?t$NNs$GI=8=$G$-$k$h$&$J(B data $B$r(B ``8bit $B$N(B data'' $B$H8F$S(B +$B$^$9!#(B@refill + +$B$^$?!"(B0 $B$+$i(B 31, 127 $B$*$h$S(B 128 $B$+$i(B 159 $B$GI=8=$5$l$k@)8fJ8;z$H(B 32 $B$GI=(B +$B8=$5$l$k6uGr$H(B 33 $B$+$i(B 126 $B$H(B 160 $B$+$i(B 255 $B$GI=8=$5$l$k?^7AJ8;z$+$i$J$k(B +$BJ8;zNs$N$3$H$r(B ``8bit $B$NJ8;zNs(B'' $B$H8F$S$^$9!J$3$l$O(B ISO 2022 (@ref{ISO +2022}) $B$N!V(B8 $BC10L7O!W$HF1MM$G$9!K!#(B@refill + +iso-8859-1 (@ref{iso-8859-1}) $B$d(B euc-kr (@ref{euc-kr}) $B$H$$$C$?Id9f2=J8(B +$B;z=89g$O(B 8bit $B$NJ8;zNs$G$9!#(B@refill + +$BEAE}E*$J(B Internet $B$N(B MTA (@ref{MTA}) $B$O(B 7bit (@ref{7bit}) $B$N(B data $B$7$+E>(B +$BAw$G$-$J$$$N$G!"$=$&$7$?(B MTA $B$r7PM3$9$k>l9g!"(BQuoted-Printable +(@ref{Quoted-Printable}) $B$d(B Base64 (@ref{Base64}) $B$H$$$C$?JQ49$r9T$o$J$/(B +$B$F$O$J$j$^$;$s!#(B@refill + +$B$7$+$7!":G6a$G$O(B 8bit $B$NJ8;zNs$r$=$N$^$^DL$9$3$H$,$G$-$k(B MTA $B$bEP>l$7$F(B +$B$-$?$N$G!"$=$N$^$^Aw$k$3$H$,$G$-$k>l9g$bA}$($F$-$^$7$?!#(B@refill + +$B$7$+$7!"(B8bit $B$G$"$l$P$I$s$J(B data $B$G$bNI$$$H$O$$$($^$;$s!#$J$<$J$i!"#19T(B +$B$ND9$5$,$"$^$j$KD9$$$H!"(BMTA $B$O$=$N(B message $B$rE>Aw$9$k$3$H$,$G$-$J$$$+$i(B +$B$G$9!#$A$J$_$K!"(BRFC 821 $B$O#19T$O2~9TJ8;z$r=|$$$F(B 998 byte $B0JFb$G$"$k$3$H(B +$B$r5a$a$F$$$^$9!#$h$C$F!"$3$l0J>e$N9T$,4^$^$l$k2DG=@-$N$"$k(B data, $BNc$($P!"(B +Postscript $B$N(B data $B$J$I$O(B Quoted-Printable $BEy$G(B encode$B$9$kI,MQ$,$"$j$^$9!#(B +@refill + +$B$^$?!"$3$&$7$?M}M3$+$i!"#19T$,(B 999 byte $B0J>e$N9T$,B8:_$9$k2DG=@-$N$"$k(B +data $B$O(B @cindex{binary}@strong{binary} (@ref{binary}) $B$H8F$V$3$H$K$7$^$9!#(B + +$B$A$J$_$K!"(B7bit $B$GI=8=$G$-$k(B data $B$O(B 8bit $B$G$bI=8=$G$-$^$9!#$h$C$F!"(B +``8bit'' $B$H8@$C$?>l9g!"#19T$,(B 998 byte $B0J2<$NG$0U$N(B data $B$r;X$9$3$H$,(B +$B$"$j$^$9!#(B + + +@node 94 character set, 96 character set, 8bit, Glossary +@subsection 94 $BJ8;z=89g(B + +33 $B$+$i(B 126 $B$NHO0O$N(B 1 byte $B$+$i$J$k(B $BJ8;z=89g(B(@ref{Character set})$B!#(B +ASCII (@ref{ASCII}) $B$d(B JIS X0201-Latin $B$O$=$N0l<o!#(B + + +@node 96 character set, 94x94 character set, 94 character set, Glossary +@subsection 96 $BJ8;z=89g(B + +32 $B$+$i(B 127 $B$NHO0O$N(B 1 byte $B$+$i$J$k(B $BJ8;z=89g(B(@ref{Character set})$B!#(BISO +8859 $B%7%j!<%:$O$=$N0l<o!#(B + + +@node 94x94 character set, ASCII, 96 character set, Glossary +@subsection 94$B!_(B94 $BJ8;z=89g(B + +33 $B$+$i(B 126 $B$NHO0O$N(B 2 byte $B$+$i$J$k(B $BJ8;z=89g(B(@ref{Character set})$B!#(BJIS +X0208 (@ref{JIS X0208}) $B$d(B GB 2312 (@ref{GB 2312}) $B$O$=$N0l<o!#(B + + +@node ASCII, Base64, 94x94 character set, Glossary +@subsection ASCII + +$B%"%a%j%+O"K.$G;H$o$l$kJ8;z$rId9f2=$7$?(B 94 $BJ8;z=89g(B(@ref{94 character +set})$B!#(BA-Z, a-z $B$N(B Latin $BJ8;z$H?t;z!"4v$D$+$N5-9f$+$i$J$k!#(BISO 646 +(@ref{ISO 646}) $B$N0l$D!#(B + +@cindex{ASCII}@cindex{ANSI X3.4:1986} +@noindent +[ASCII] +@quotation +``Coded Character Set -- 7-Bit American Standard Code for Information +Interchange'', ANSI X3.4:1986. +@end quotation + + + +@node Base64, binary, ASCII, Glossary +@subsection Base64 + +RFC 2045 (@ref{RFC 2045}) $B$GDj5A$5$l$F$$$k(B MIME (@ref{MIME}) $B$K$*$1$k(B +binary data (@ref{binary}) $B$N(B network $B$G$NJQ49K!$N#1$D!#(B@refill + +$B!X(B64 $B?J?t!Y$H$$$&0UL#$G!"(B3 byte $B$N(B data $B$r(B 0 $B$+$i(B 63 $B$N?t$rI=$9(B ASCII +(@ref{ASCII}) 4 $BJ8;z$KJQ49$9$kJ}K!!#!J$b$7!"(B4 $BJ8;z$K$J$i$J$1$l$P(B +@cindex{pad}@strong{pad} $B$H8F$P$l$k5M$aJ*$r$7$FD9$5$rD4@0$9$k!K(B@refill + +$B$3$N(B 65 $B<oN`$NJ8;z$O(B ASCII $B$H(B EBCDIC $B$N6&DLItJ,$+$iA*$P$l$F$*$j!"(B +Internet $B0J30$N(B network $B$r7PM3$9$k>l9g$G$b0BA4$KE>Aw$G$-$k$h$&$K@_7W$5(B +$B$l$F$$$k!#(B + + +@node binary, Character Set, Base64, Glossary +@subsection binary + +$BG$0U$N(B byte $BNs$r(B @cindex{binary}@strong{binary} $B$H8F$V$3$H$K$7$^$9!#(B +@refill + +8bit (@ref{8bit}) $B$H0[$J$k$N$O(B data $B$K9T$N9=B$$r2>Dj$7$J$$$3$H$G$9!#(B + +$B$^$?!"9T$N9=B$$,$"$C$F$b!"(B999 byte $B0J>e$+$i$J$k9T$,$"$k>l9g$b(B binary$B$H8F(B +$B$V$3$H$K$7$^$9!#(B@refill + +$B$A$J$_$K!"(B7bit (@ref{7bit}) $B$d(B 8bit $B$GI=8=$G$-$k(B data $B$O(B binary $B$G$bI=8=(B +$B$G$-$^$9!#$h$C$F!"(B@cindex{binary data}@strong{binary data} $B$H8@$C$?>l9g!"(B +$BG$0U$N(B data $B$r;X$9$3$H$,$"$j$^$9!#(B + + +@node Character Set, cn-gb, binary, Glossary +@subsection Character Set$B!JJ8;z=89g!K(B + +$BId9f2=J8;z=89g(B(@ref{Coded character set})$B!#C"$7!"$3$3$G$O(B $BId9f3HD%(B +(@ref{Code extension}) $B$5$l$F$J$$J8;z=89g$H$$$&%K%e%"%s%9$r9~(B +$B$a$F$$$k!#(B + + +@node cn-gb, cn-big5, Character Set, Glossary +@subsection cn-gb, gb2312 + +$BCf9qBgN&$G$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B MIME +charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code extension})$B$7(B +$B$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B + + +@node cn-big5, CNS, cn-gb, Glossary +@subsection cn-big5, big5 + +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +MIME charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$+$J$$(B 8bit (@ref{8bit}) $B$NId9f2=J8;z=89g(B +(@ref{Coded character set})$B$G(B de-fact standard $B$G$"$k!#(BRFC 1922 +(@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B@refill + +cf. @cindex{BIG5} +@noindent +[BIG5] +@quotation +Institute for Information Industry, ``Chinese Coded Character Set in +Computer'', March 1984. +@end quotation + +CNS 11643-1986 (@ref{CNS}) $B$HBP1~4X78$,$"$k!#(B + + +@node CNS, Coded character set, cn-big5, Glossary +@subsection CNS 11643-1992 + +$BBfOQ$d9a9A$GMQ$$$i$l$F$$$k<g$KHKBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B +$BJ8;z=89g(B(@ref{Character set})$B!#BfOQ$NI8=`!#8=:_!"(B94$B!_(B94 (@ref{94x94 +character set}) $B$NLL$,Bh#1LL$+$iBh#7LL$^$G$"$k!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O!"Bh#1LL$,(B `G', $BBh#2LL$,(B `H', $BBh(B +$B#3LL$,(B `I', $BBh#4LL$,(B `J', $BBh#5LL$,(B `K', $BBh#6LL$,(B `L', $BBh#7LL$,(B `M' $B$G$"(B +$B$k!#(B + +@cindex{CNS 11643-1992}@cindex{CNS 11643:1992} +@noindent +[CNS 11643-1992] +@quotation +``Standard Interchange Code for Generally-Used Chinese Characters'', CNS +11643:1992. +@end quotation + + + +@node Coded character set, Code extension, CNS, Glossary +@subsection Coded character set$B!JId9f2=J8;z=89g!K(B, Character code$B!JJ8;zId9f!K(B + +$BJ8;z$H(B byte $BNs$H#1BP#1$KBP1~IU$1$k[#Kf$G$J$$5,B'$N=89g!#(B + + +@node Code extension, Content-Disposition, Coded character set, Glossary +@subsection Code extension$B!JId9f3HD%!K(B + +$BM?$($i$l$?J8;z=89g(B(@ref{Character set})$B$K4^$^$l$F$$$J$$J8;z$NId9f2=$N$?(B +$B$a$KMQ$$$k<jK!!#(BISO 2022 (@ref{ISO 2022}) $B$O$=$N#1$D!#(B + + +@node Content-Disposition, media type, Code extension, Glossary +@subsection Content-Disposition field + +Content $B$NI=<($N;EJ}$d(B file $BL>$rI=8=$9$k$?$a$N(B field. MIME (@ref{MIME}) +$B$N3HD%$N#1$D!#(B@refill + +@cindex{Experimental}@cindex{RFC 1806} +@noindent +[RFC 1806] +@quotation +E R. Troost and S. Dorner, ``Communicating Presentation Information in +Internet Messages: The Content-Disposition Header'', June 1995, +Experimental. +@end quotation + + + +@node media type, Content-Type field, Content-Disposition, Glossary +@subsection media type + +MIME (@ref{MIME}) $B$K$*$1$k(B entity (@ref{entity}) $B$N<oN`!#(B +@cindex{type}@strong{type} $B$H(B @cindex{subtype}@strong{subtype} $B$+$i$J$k!#(B +RFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$F$$$k!#(B@refill + +type $B$OI8=`$G$O(B + +@itemize @bullet +@item +@cindex{text}@strong{text} +@item +@cindex{image}@strong{image} +@item +@cindex{audio}@strong{audio} +@item +@cindex{video}@strong{video} +@item +@cindex{application}@strong{application} +@item +@cindex{multipart}@strong{multipart} (@ref{multipart}) +@item +@cindex{message}@strong{message} +@end itemize + +@noindent +$B$,Dj5A$5$l!"$=$l$>$l$K$O(B application/octet-stream, audio/basic, +image/jpeg, multipart/mixed (@ref{multipart/mixed}), text/plain +(@ref{text/plain}), video/mpeg $B$J$I$N$5$^$6$^$J(B subtype $B$,Dj5A$5$l$F$$$k!#(B + +@noindent +@strong{[$BCm0U(B]} +@quotation + +$B$3$3$G$O!"(Btext/plain $B$J$I$N(B type/subtype $B$NAH$r$7$P$7$P(B +@cindex{content-type/subtype}@strong{content-type/subtype} $B$H=q$/!#(B +@end quotation + + +media type $B$O!"(BRFC 2046 $B$GDj5A$5$l$F$$$k$b$N$K2C$($F!"EPO?$9$k$3$H$b$G$-(B +$B$k!#8=:_!"EPO?$5$l$F$$$k$b$N$O(B MEDIA TYPES +(ftp://ftp.isi.edu/in-notes/iana/assignments/media-types) $B$G;2>H$G$-$k!#(B + +$B$^$?!"(Btype $B$b$7$/$O(B subtype $B$K!"A0$K(B `x-' $B$rIU$1$?(B +@cindex{x-token}@strong{x-token} $B$rMQ$$$k$3$H$K$h$j!"EPO?$5$l$F$$$J$$$b(B +$B$N$r;dE*$KMQ$$$k$3$H$b$G$-$k!#$7$+$7!"EvA3$N$3$H$J$,$i!"$3$&$7$?;dE*$J(B +content-type $B$ONJ2r$rF@$?<T$N4V$G$7$+2r<a$G$-$J$$$N$GMxMQ$K$OCm0U$9$k$3(B +$B$H!#(B@refill + +(cf. @ref{Content-Type field}) + + + +@node Content-Type field, Emacs, media type, Glossary +@subsection Content-Type field + +media type (@ref{media type}) $B$d(B MIME charset (@ref{MIME charset}) $B$J$I(B +$B$N(B part $B$K4X$9$k>pJs$rI=8=$9$k$?$a$N(B field. RFC 2045 (@ref{RFC 2045}) $B$G(B +$BDj5A$5$l$F$$$k!#(B + +@noindent +@strong{[Memo]} +@quotation + +$BNr;KE*$K$O(B RFC 1049 $B$G(B Content-Type field $B$,Ds0F$5$l$F$$$k!#C"$7!"$3$3$G(B +$B$O(B type $B$H(B subtype $B$N6hJL$O$J$$!#$7$+$7!"J8K!E*$K$O(B MIME parser $B$O(B RFC +1049 $B$K4p$E$/(B message $B$rL$CN$N(B content-type $B$r;}$C$?(B message $B$H$7$F(B +parse $B$G$-$k$@$m$&!#(B +@end quotation + + +Content-Type field $B$O(B + +@quotation +``Content-Type'' ``:'' @cindex{type}@strong{type} ``/'' +@cindex{subtype}@strong{subtype} *( ``;'' @cindex{parameter}@strong{parameter} ) +@end quotation + +@noindent +$B$HDj5A$5$l$k!#(B + +$BNc$($P!"(B + +@quotation +@example +Content-Type: image/jpeg +@end example +@end quotation + +@noindent +$B$d(B + +@quotation +@example +Content-Type: text/plain; charset=iso-2022-jp +@end example +@end quotation + +@noindent +$B$J$I$N$h$&$K=q$+$l$k!#(B + +@noindent +@strong{[Memo]} +@quotation + +content-type $B$N$J$$(B part $B$O(B + +@quotation +@example +Content-Type: text/plain; charset=us-ascii +@end example +@end quotation + +@noindent +$B$H$7$F2r<a$5$l$k!#(B(cf. @ref{us-ascii}) +@end quotation + + + +@node Emacs, encoded-word, Content-Type field, Glossary +@subsection Emacs + +$B$3$3$G$O(B `Emacs' $B$G(B FSF $B$,G[I[$7$F$$$k(B GNU Emacs $B$r;X$7!"(B`emacs' $B$G(B +GNU Emacs $B$NJQ<o$NAm>N$H$9$k!#(B + + +@node encoded-word, encapsulation, Emacs, Glossary +@subsection encoded-word + +header $B$K$*$1$kHs(B ASCII (@ref{ASCII}) $BJ8;z$NI=8=!#(B@cindex{RFC +2047}@strong{RFC 2047} $B$GDj5A$5$l$F$$$k!#(B@refill + +@cindex{Standards Track}@cindex{RFC 2047} +@noindent +[RFC 2047] +@quotation +K. Moore, ``MIME (Multipurpose Internet Mail Extensions) Part Three: +Message Header Extensions for Non-ASCII Text'', November 1996, Standards +Track (obsolete RFC 1521,1522,1590). +@end quotation + + + +@node encapsulation, euc-kr, encoded-word, Glossary +@subsection encapsulation + +Internet mail (@ref{RFC 822}) $B$rB>$N5-;v$K$^$k$4$HF~$l$kJ}K!!#(B@refill + +$BNc$($P!"5-;v$rE>Aw$7$?$j$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{message/rfc822}) + + + +@node euc-kr, FTP, encapsulation, Glossary +@subsection euc-kr + +$B4Z9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(BKS C5601 +(@ref{KS C5601}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code extension}) +$B$7$F$$$k!#(B@refill + +RFC 1557 (@ref{RFC 1557}) $B$GDj5A$5$l$F$$$k!#(B@refill + +cf. @cindex{euc-kr}@cindex{KS C 5861:1992} +@noindent +[euc-kr] +@quotation +Korea Industrial Standards Association, ``Hangul Unix Environment'', KS +C 5861:1992. +@end quotation + + + +@node FTP, GB 2312, euc-kr, Glossary +@subsection FTP + +Internet $B$G(B file $B$rE>Aw$9$k$?$a$N(B protocol $B$N#1$D!#(BRFC 959 $B$GDj5A$5$l$F(B +$B$$$k!#(B@refill + +@cindex{FTP}@cindex{STD 9}@cindex{RFC 959} +@noindent +[FTP: RFC 959] +@quotation +Postel, J. and J. Reynolds, ``File Transfer Protocol'', October 1985, +STD 9. +@end quotation + + + +@node GB 2312, GB 8565.2, FTP, Glossary +@subsection GB 2312-1980 + +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=$9$?$a$N(B 94$B!_(B94 $BJ8;z(B +$B=89g(B(@ref{94x94 character set})$B!#Cf9q$N9q2HI8=`!#(BISO 2022 (@ref{ISO +2022}) $B$G$N=*C<J8;z$O(B `A'.@refill + +$B$3$l$O(B GB $B$K$*$1$k4pK\=8$G$"$k!#(B + +@cindex{GB 2312}@cindex{GB 2312:1980} +@noindent +[GB 2312] +@quotation +$B!X?.B)8r49MQ4A;zJTb{;zId=8(B -- $B4pK\=8!Y(B, ``Code of Chinese Graphic +Character Set for Information Interchange - Primary Set'', GB 2312:1980. +@end quotation + + + +@node GB 8565.2, hz-gb2312, GB 2312, Glossary +@subsection GB 8565.2-1988 + +$BCf9q8l$N$?$a$NJd=uJ8;z=89g(B(@ref{Character set})$B!#Cf9q$N9q2HI8=`!#(BGB 2312 +(@ref{GB 2312}) $B$N6u$-ItJ,$KJd=<$9$k$h$&$KDj5A$5$l$?$i$7$$!#(B + +@cindex{GB 8565.2}@cindex{GB 8565.2:1988} +@noindent +[GB 8565.2] +@quotation +``Information Processing - Coded Character Sets for Text Communication - +Part 2: Graphic Characters used with Primary Set'', GB 8565.2:1988. +@end quotation + + + +@node hz-gb2312, ISO 2022, GB 8565.2, Glossary +@subsection hz-gb2312 + +$BCf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=$9$k$?$a$N(B MIME +charset (@ref{MIME charset}) $B$N#1$D!#(B@refill + +ASCII (@ref{ASCII}) $B$K(B GB 2312 (@ref{GB 2312}) $B$r(B 7bit $B$GId9f3HD%(B +(@ref{Code extension})$B$7$?$b$N$r(B ASCII printable $B$K$J$k$h$&$K9)IW$7$F$$(B +$B$k!#(B@refill + +RFC 1842, 1843 $B$GDj5A$5$l$F$$$k!#(B + +@cindex{Informational}@cindex{RFC 1842} +@noindent +[RFC 1842] +@quotation +Y. Wei, Y. Zhang, J. Li, J. Ding and Y. Jiang, ``ASCII Printable +Characters-Based Chinese Character Encoding for Internet Messages'', +August 1995, Informational. +@end quotation + +@cindex{Informational}@cindex{RFC 1843} +@noindent +[RFC 1843] +@quotation +F. Lee, ``HZ - A Data Format for Exchanging Files of Arbitrarily Mixed +Chinese and ASCII characters'', August 1995, Informational. +@end quotation + + + +@node ISO 2022, iso-2022-cn, hz-gb2312, Glossary +@subsection ISO 2022 + +$BId9f3HD%(B(@ref{Code extension})$B$N$?$a$N9q:]I8=`!#(B@refill + +$B$3$l$rMQ$$$FJ#?t$NJ8;z=89g(B(@ref{Character set})$B$rAH9g$;$F(B 7bit +(@ref{7bit}) $B$J$$$7(B 8bit (@ref{8bit}) $B$N(B $BId9f2=J8;z=89g(B(@ref{Coded +character set}) $B$r:n$k$3$H$,$G$-$k!#(B + +@cindex{ISO 2022}@cindex{ISO/IEC 2022:1994} +@noindent +[ISO 2022] +@quotation +International Organization for Standardization (ISO), ``Information +Processing: ISO 7-bit and 8-bit coded character sets: Code extension +techniques'', ISO/IEC 2022:1994. +@end quotation + + + +@node iso-2022-cn, iso-2022-cn-ext, ISO 2022, Glossary +@subsection iso-2022-cn + +$BCf9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}), CNS 11643 plain 1, plain 2 (@ref{CNS}) $B$r(B 7bit +(@ref{7bit}) $B$GId9f3HD%(B (@ref{Code extension})$B$7$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B + + +@node iso-2022-cn-ext, iso-2022-jp, iso-2022-cn, Glossary +@subsection iso-2022-cn-ext + +$BCf9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B GB 2312 +(@ref{GB 2312}), CNS 11643 plain 1 .. 7 (@ref{CNS}), ISO-IR-165 +(@ref{ISO-IR-165}) $BEy$r(B 7bit (@ref{7bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 1922 (@ref{RFC 1922}) $B$GDj5A$5$l$F$$$k!#(B@refill + +@noindent +@strong{[Memo]} +@quotation +MULE 2.3 $B$*$h$S!"8=:_$N(B XEmacs/mule $B$G$O@5$7$/07$&$3$H$O$G$-$J$$!#(B + +Emacs/mule $B$G$OMxMQ2DG=$G$"$k!#(B +@end quotation + + + +@node iso-2022-jp, iso-2022-jp-2, iso-2022-cn-ext, Glossary +@subsection iso-2022-jp + +$BF|K\8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N0l$D!#(B + +$B8E$$(B ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}), JIS +X0201-Latin, JIS X0208-1978 (@ref{JIS C6226-1978}), JIS X0208-1983 +(@ref{JIS X0208}) $B$r@Z$jBX$($k(B 7bit (@ref{7bit}) $BJ8;zId9f!#(B@refill + +RFC 1468 $B$GDj5A$5$l$F$$$k!#(B@refill + +@noindent +@strong{[Memo]} +@quotation +JIS X0208-1996? $B$G$O(B ISO 2022 (@ref{ISO 2022}) $B$HFHN)$KDj5A$5$l$kM=Dj!#(B +@end quotation + + +@cindex{iso-2022-jp}@cindex{RFC 1468} +@noindent +[iso-2022-jp: RFC 1468] +@quotation +Murai J., M. Crispin, and E. van der Poel, ``Japanese Character Encoding +for Internet Messages'', June 1993. +@end quotation + + + +@node iso-2022-jp-2, iso-2022-kr, iso-2022-jp, Glossary +@subsection iso-2022-jp-2 + +iso-2022-jp (@ref{iso-2022-jp}) $B$r3HD%$7$?(B MIME charset (@ref{MIME +charset}) $B$N0l$D!#(B@refill + +RFC 1554 $B$GDj5A$5$l$F$$$k!#(B + +@cindex{iso-2022-jp-2}@cindex{Informational}@cindex{RFC 1554} +@noindent +[iso-2022-jp-2: RFC 1554] +@quotation +Ohta M. and Handa K., ``ISO-2022-JP-2: Multilingual Extension of +ISO-2022-JP'', December 1993, Informational. +@end quotation + + + +@node iso-2022-kr, ISO 646, iso-2022-jp-2, Glossary +@subsection iso-2022-kr + +$B4Z9q8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F(B ASCII (@ref{ASCII}) $B$K(B KS C5601 +(@ref{KS C5601}) $B$r(B 7bit (@ref{7bit}) $B$GId9f3HD%(B (@ref{Code extension}) +$B$7$F$$$k!#(B@refill + +RFC 1557 (@ref{RFC 1557}) $B$GDj5A$5$l$F$$$k!#(B + + +@node ISO 646, ISO 8859-1, iso-2022-kr, Glossary +@subsection ISO 646 + +$B3F9q$G6&DL$K;H$($k:G>.8BEY$NJ8;z=89g(B(@ref{Character set})$B$rDj$a$?$b$N!#(B +94 $BJ8;z=89g(B (@ref{94 character set})$B$N#1$D!#(BISO 646 IRV$B!J9q:]4p=`HG!K$r(B +$B85$K4v$D$+$NJ8;z$O3F9q$G0c$&J8;z$r3dEv$k$3$H$r5v$7$F$$$F!"4v$D$+$NJQ<o$,(B +$BB8:_$9$k!#(BASCII (@ref{ASCII}) $B$d(B JIS X0201-Latin $B$O$=$N0l<o!#(B + +@cindex{ISO 646}@cindex{ISO/IEC 646:1991} +@noindent +[ISO 646] +@quotation +International Organization for Standardization (ISO), ``Information +technology: ISO 7-bit coded character set for information interchange'', +ISO/IEC 646:1991. +@end quotation + + + +@node ISO 8859-1, iso-8859-1, ISO 646, Glossary +@subsection ISO 8859-1 + +$B@>2$=t8l$GMQ$$$i$l$k3HD%(B Latin $BJ8;z$d5-9f$+$i$J$k(B 96 $BJ8;z=89g(B(@ref{96 +character set})$B!#(B + +@cindex{ISO 8859-1}@cindex{ISO 8859-1:1987} +@noindent +[ISO 8859-1] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 1: +Latin Alphabet No.1'', ISO 8859-1:1987. +@end quotation + + + +@node iso-8859-1, ISO 8859-2, ISO 8859-1, Glossary +@subsection iso-8859-1 + +$B@>2$=t8l$J$I$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-1 +(@ref{ISO 8859-1}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$F$$$k!#(B + + +@node ISO 8859-2, iso-8859-2, iso-8859-1, Glossary +@subsection ISO 8859-2 + +$BEl2$=t8l$GMQ$$$i$l$k3HD%(B Latin $BJ8;z$d5-9f$+$i$J$k(B 96 $BJ8;z=89g(B(@ref{96 +character set})$B!#(B + +@cindex{ISO 8859-2}@cindex{ISO 8859-2:1987} +@noindent +[ISO 8859-2] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 2: +Latin alphabet No.2'', ISO 8859-2:1987. +@end quotation + + + +@node iso-8859-2, ISO 8859-3, ISO 8859-2, Glossary +@subsection iso-8859-2 + +$BEl2$=t8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-2 +(@ref{ISO 8859-2}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$F$$$k!#(B + + +@node ISO 8859-3, ISO 8859-4, iso-8859-2, Glossary +@subsection ISO 8859-3 + +@cindex{ISO 8859-3}@cindex{ISO 8859-3:1988} +@noindent +[ISO 8859-3] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 3: +Latin alphabet No.3'', ISO 8859-3:1988. +@end quotation + + + +@node ISO 8859-4, ISO 8859-5, ISO 8859-3, Glossary +@subsection ISO 8859-4 + +@cindex{ISO 8859-4}@cindex{ISO 8859-4:1988} +@noindent +[ISO 8859-4] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 4: +Latin alphabet No.4'', ISO 8859-4:1988. +@end quotation + + + +@node ISO 8859-5, iso-8859-5, ISO 8859-4, Glossary +@subsection ISO 8859-5 + +$B%-%j%kJ8;z$d5-9f$+$i$J$k(B 96 $BJ8;z=89g(B(@ref{96 character set})$B!#(B + +@cindex{ISO 8859-5}@cindex{ISO 8859-5:1988} +@noindent +[ISO 8859-5] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 5: +Latin/Cyrillic alphabet'', ISO 8859-5:1988. +@end quotation + + + +@node iso-8859-5, ISO 8859-6, ISO 8859-5, Glossary +@subsection iso-8859-5 + +$B%-%j%kJ8;z$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-5 +(@ref{ISO 8859-5}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$F$$$k!#(B + + +@node ISO 8859-6, ISO 8859-7, iso-8859-5, Glossary +@subsection ISO 8859-6 + +@cindex{ISO 8859-6}@cindex{ISO 8859-6:1987} +@noindent +[ISO 8859-6] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 6: +Latin/Arabic alphabet'', ISO 8859-6:1987. +@end quotation + + + +@node ISO 8859-7, iso-8859-7, ISO 8859-6, Glossary +@subsection ISO 8859-7 + +$B%.%j%7%"J8;z$d5-9f$+$i$J$k(B 96 $BJ8;z=89g(B(@ref{96 character set})$B!#(B + +@cindex{ISO 8859-7}@cindex{ISO 8859-7:1987} +@noindent +[ISO 8859-7] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 7: +Latin/Greek alphabet'', ISO 8859-7:1987. +@end quotation + + + +@node iso-8859-7, ISO 8859-8, ISO 8859-7, Glossary +@subsection iso-8859-7 + +$B%.%j%7%"8l$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME charset}) $B$N#1$D!#(B + +ISO 2022 (@ref{ISO 2022}) $B$K4p$$$F!"(BASCII (@ref{ASCII}) $B$K(B ISO 8859-7 +(@ref{ISO 8859-7}) $B$r(B 8bit (@ref{8bit}) $B$GId9f3HD%(B (@ref{Code +extension})$B$7$F$$$k!#(B@refill + +RFC 1947 $B$GDj5A$5$l$F$$$k!#(B + +@cindex{iso-8859-7}@cindex{Informational}@cindex{RFC 1947} +@noindent +[iso-8859-7: RFC 1947] +@quotation +D. Spinellis, ``Greek Character Encoding for Electronic Mail Messages'', +May 1996, Informational. +@end quotation + + + +@node ISO 8859-8, ISO 8859-9, iso-8859-7, Glossary +@subsection ISO 8859-8 + +@cindex{ISO 8859-8}@cindex{ISO 8859-8:1988} +@noindent +[ISO 8859-8] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 8: +Latin/Hebrew alphabet'', ISO 8859-8:1988. +@end quotation + + + +@node ISO 8859-9, ISO-IR-165, ISO 8859-8, Glossary +@subsection ISO 8859-9 + +@cindex{ISO 8859-9}@cindex{ISO 8859-9:1990} +@noindent +[ISO 8859-9] +@quotation +International Organization for Standardization (ISO), ``Information +Processing -- 8-bit Single-Byte Coded Graphic Character Sets -- Part 9: +Latin alphabet No.5'', ISO 8859-9:1990. +@end quotation + + + +@node ISO-IR-165, JIS X0201, ISO 8859-9, Glossary +@subsection ISO-IR-165, CCITT Extended GB + +CCITT $B$,EPO?$7$?!"Cf9qBgN&$GMQ$$$i$l$F$$$k4JBN;z$GI=5-$5$l$kCf9q8l$rI=8=(B +$B$9$k$?$a$N(B 94$B!_(B94 $BJ8;z=89g(B(@ref{94x94 character set})$B!#(B@refill + +GB 2312 (@ref{GB 2312}) $B$H(B GB 8565 $BI=#2(B (@ref{GB 8865.2}) $B$K(B 150 $BJ8;z$[(B +$B$I$rDI2C$7$?$b$N$i$7$$!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `E' $B$G$"$k!#(B + + +@node JIS X0201, JIS C6226, ISO-IR-165, Glossary +@subsection JIS X0201 + +ISO 646 (@ref{ISO 646}) $B$NJQ<o$N#1$D$G$"$k(B Latin $BJ8;z=89g$H(B 1 byte $B$N%+(B +$B%?%+%JJ8;z=89g$+$i$J$k!#(B@refill + +$B85$O(B @cindex{JIS C6220-1976}@strong{JIS C6220-1976} $B$H8@$C$?$,(B @cindex{JIS +X0201}@strong{JIS +X0201} $B$KHV9f$,JQ99$5$l$?!#(B + +@cindex{JIS X0201-1976}@cindex{JIS X 0201-1976:} +@noindent +[JIS X0201-1976] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQId9f!Y(B, ``Code +for Information Interchange'', JIS X 0201-1976:. +@end quotation + + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=P$kM=Dj!#(B + +@cindex{JIS X0201-1996?}@cindex{JIS X 0201:1996? draft} +@noindent +[JIS X0201-1996?] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X#7%S%C%H5Z$S#8%S%C%H$N>p(B +$BJs8r49MQId9f2=J8;z=89g!Y(B, ``7-bit and 8-bit coded character sets for +information interchange'', JIS X 0201:1996? draft. +@end quotation + + + +@node JIS C6226, JIS X0208, JIS X0201, Glossary +@subsection JIS C6226-1978 + +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B 94$B!_(B94 $BJ8;z=89g(B(@ref{94x94 character set})$B!#(B +$BF|K\$N9q2HI8=`!#(BJIS X0208-1978 $B$H$b$$$&!#(B@refill + +(cf. @ref{JIS X0208}) + + + +@node JIS X0208, JIS X0212, JIS C6226, Glossary +@subsection JIS X0208 + +$BF|K\8l$rI=$9$?$a$K:n$i$l$?(B 94$B!_(B94 $BJ8;z=89g(B(@ref{94x94 character set})$B!#(B +$BF|K\$N9q2HI8=`!#(B1978 $BG/HG!"(B1983 $BG/HG!"(B1990 $BG/HG$,$"$k$,!"(BInternet $B$G$O(B +1983 $BG/HG$,$b$C$H$bNI$/;H$o$l$F$$$k!#(B@refill + +JIS X0208 $B$O5-9f!"?t;z!"%m!<%^;z!"$R$i$,$J!"%+%?%+%J!"%.%j%7%cJ8;z!"%-%j(B +$B%kJ8;z!"7S@~AG!"Bh#1?e=`!"Bh#2?e=`$N4A;z$,4^$^$l$k!#C"$7!"(B1983 $BG/HG$N0l(B +$BIt$N5-9f$H7S@~AG$O(B 1978 $BG/HG$K$O$J$$!#$^$?!"0lIt$N4A;z$N;z7A$,(B 1983 $BG/HG(B +$B$G$OJQ99$5$l!"$^$?!"Bh#1?e=`$HBh#2?e=`$,F~$lBX$o$C$F$$$?$j$9$k!#$3$N$?$a!"(B +1978 $BG/HG$H(B 1983 $BG/HG$O0[$J$kJ8;z=89g$H$7$F07$o$l$k!#(B@refill + +1990 $BG/$N2~Dj$G$O(B 1983 $BG/HG$KBP$9$kDI2C$,9T$o$l$?!#$3$N$?$a!"(B1990 $BG/HG(B +$B$r;X<($9$k>l9g$OA0$K99?7%7!<%1%s%9$rMQ$$$k!#(B + +@cindex{JIS X0208-1978}@cindex{JIS C6226:1978} +@noindent +[JIS X0208-1978] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQ4A;zId9f7O!Y(B, +``Code of the Japanese graphic character set for information +interchange'', JIS C6226:1978. +@end quotation + +@cindex{JIS X0208-1983,1990}@cindex{JIS X0208:1983,1990} +@noindent +[JIS X0208-1983,1990] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X>pJs8r49MQ4A;zId9f7O!Y(B, +``Code of the Japanese graphic character set for information +interchange'', JIS X0208:1983,1990. +@end quotation + + +$B$^$?!"(B1996 $BG/$K2~DjHG$,=PHG$5$l$kM=Dj!#!J;z7A$NJQ99$O9T$o$l$J$$$N$GJ8(B +$B;z=89g$H$7$F$O(B 1990 $BG/HG$HF10l$G$"$k!K(B + +@cindex{JIS X0208-1996?}@cindex{JIS X 0208:1996? draft} +@noindent +[JIS X0208-1996?] +@quotation +$BF|K\5,3J6(2q(B (Japanese Standards Association),$B!X#7%S%C%H5Z$S#8%S%C%H$N(B +$B#2%P%$%H>pJs8r49MQId9f2=4A;z=89g!Y(B, ``7-bit and 8-bit double byte coded +Kanji sets for information interchange'', JIS X 0208:1996? draft. +@end quotation + + + +@node JIS X0212, koi8-r, JIS X0208, Glossary +@subsection JIS X0212-1990 + +JIS X0208 (@ref{JIS X0208}) $B$K$J$+$C$?J8;z$r=8$a$?(B 94$B!_(B94 $BJ8;z=89g(B +(@ref{94x94 character set})$B!#!VJd=u4A;z!W$H$b8F$P$l$k!#F|K\$N9q2HI8=`!#(B +ISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `D'. + + +@node koi8-r, KS C5601, JIS X0212, Glossary +@subsection koi8-r + +$B%m%7%d8lEy$GMQ$$$i$l$k%-%j%kJ8;z$rI=8=$9$k$?$a$N(B MIME charset (@ref{MIME +charset}) $B$N#1$D!#(B@refill + +ISO 2022 (@ref{ISO 2022}) $B$K4p$+$J$$(B 8bit (@ref{8bit}) $B$NId9f2=J8;z=89g(B +(@ref{Coded character set})$B$G(B de-fact standard $B$G$"$k!#(B + +RFC 1489 $B$GDj5A$5$l$F$$$k!#(B@refill + +@cindex{RFC 1489} +@noindent +[RFC 1489] +@quotation +A. Chernov, ``Registration of a Cyrillic Character Set'', July 1993. +@end quotation + + + +@node KS C5601, message, koi8-r, Glossary +@subsection KS C5601-1987 + +$B4Z9q8l$rI=$9$?$a$N(B 94$B!_(B94 $BJ8;z=89g(B(@ref{94x94 character set})$B!#4Z9q$N9q(B +$B2HI8=`!#(BISO 2022 (@ref{ISO 2022}) $B$G$N=*C<J8;z$O(B `C'. + +@cindex{KS C5601}@cindex{KS C 5601:1987} +@noindent +[KS C5601] +@quotation +Korea Industrial Standards Association, ``Code for Information +Interchange (Hangul and Hanja)'', KS C 5601:1987. +@end quotation + + + +@node message, message/rfc822, KS C5601, Glossary +@subsection message + +$B$3$3$G$O(B RFC 822 (@ref{RFC 822}) $B$GDj5A$5$l$k(B mail $B$H(B RFC 1036 (@ref{RFC +1036}) $B$GDj5A$5$l$k(B news $B5-;v$NAm>N$H$7$FMQ$$$k!#(B + + +@node message/rfc822, method, message, Glossary +@subsection message/rfc822 + +$BEAE}E*$J(B RFC 934 (@ref{RFC 934}) $B$KBe$o$j!"(BRFC 822 (@ref{RFC 822}) $B$GDj(B +$B5A$5$l$k(B mail $B$rI=$9(B MIME $B$N7A<0!#(BRFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$F(B +$B$$$k!#(B + + +@node method, MIME, message/rfc822, Glossary +@subsection method + +tm $B$GFCDj$N<oN`$N(B data $B$r:F@8$7$?$H$-<B:]$K$=$N=hM}$r9T$J$&(B +program. Emacs Lisp $B$G=q$+$l$?(B @cindex{internal method}@strong{internal +method} $B$H(B C $B$d(B script $B8@8l$J$I$G=q$+$l$?(B @cindex{external +method}@strong{external method} $B$,$"$k!#(B@refill + +(cf. @ref{(tm-view-ja)method}) + + + +@node MIME, MIME charset, method, Glossary +@subsection MIME + +@cindex{Multipurpose Internet Mail Extensions}@strong{Multipurpose +Internet Mail Extensions} $B$NN,$G!"(BInternet $B$N(B mail $B$d(B news $B$G(B us-ascii +plain text (@ref{us-ascii}) $B0J30$NJ8;z$r;H$&$?$a$N(B RFC 822 (@ref{RFC +822}) $B$KBP$9$k3HD%!#(B@refill + +RFC 2045 $B$OKAF,$G<!$N$h$&$K=R$Y$F$$$k!'(B@refill + +STD 11, RFC 822 $B$O!"(BUS-ASCII message header $B$K4X$7$FHs>o$K>\:Y$K5,Dj$7(B +$B$?(B message $BI=8=(B protocol $B$rDj5A$7$F$$$k!#$7$+$7!"$=$l$OC1$K(B flat $B$J(B +US-ASCII text $B$N$_$KN1$^$j!"(Bmessage $B$NFbMF$d(B message body $B$K4X$9$k5,Dj(B +$B$O$J$5$l$F$$$J$$!#(BMultipurpose Internet Mail Extensions, $B$"$k$$$O(B MIME +$B$HAm>N$5$l$k!"$3$N0lO"$NJ8=q$O!"0J2<$N;v$r2DG=$H$9$k$?$a$K(B message $B$N(B +$B7A<0$r:FDj5A$7$?!'(B + +@enumerate +@item +$BJ8=q(B message body $B$K$*$1$k(B US-ASCII $B0J30$NJ8;z=89g(B +@item +$BHsJ8=q(B message body +@item +$BJ#?t$NItJ,$+$i$J$k(B message body +@item +US-ASCII $B0J30$NJ8;z=89g$+$i$J$kJ8=q(B header $B>pJs(B +@end enumerate + + +RFC 2045 (@ref{RFC 2045}), RFC 2046 (@ref{RFC 2046}), RFC 2047 +(@ref{encoded-word}), RFC 2048 (@ref{RFC 2048}), RFC 2049 (@ref{RFC +2049}) $B$GDj5A$5$l$F$$$k!#(B + + +@node MIME charset, MTA, MIME, Glossary +@subsection MIME charset + +Content-Type field (@ref{Content-Type field}) $B$d(B encoded-word +(@ref{encoded-word}) $B$N(B charset parameter $B$GMQ$$$i$l$kEPO?$5$l$?Id9f2=J8(B +$B;z=89g(B (@ref{Coded character set})$B!#(B@refill + +RFC 2045 (@ref{RFC 2045}) $B$GDj5A$5$l$F$$$k!#(B@refill + +iso-2022-jp (@ref{iso-2022-jp}) $B$d(B euc-kr (@ref{euc-kr}) $B$O$=$N#1$D!#(B +$B!J$3$3$G$O!"(BMIME charset $B$OJ8;z=89g(B (@ref{Character set})$B$H6hJL$7$F>.J8(B +$B;z$G=q$$$F$$$k!K(B + + +@node MTA, MUA, MIME charset, Glossary +@subsection MTA + +@cindex{Message Transfer Agent}@strong{Message Transfer Agent} $B$NN,$G!"(B +sendmail $B$J$I$N(B mail $BG[Aw(B program $B$H(B news server $B$NAm>N!#(B@refill + +(cf. @ref{MUA}) + + + +@node MUA, MULE, MTA, Glossary +@subsection MUA + +@cindex{Message User Agent}@strong{Message User Agent} $B$NN,$G!"(Bmail +reader $B$H(B news reader $B$NAm>N!#(B@refill + +(cf. @ref{MTA}) + + + +@node MULE, multipart, MUA, Glossary +@subsection MULE + +$BH>ED(B $B7u0l;a$i$,:n$C$?!"B?8@8l$5$l$?(B Emacs (@ref{Emacs}).@refill + +[MULE] Nishikimi M., Handa K. and Tomura S., ``Mule: MULtilingual +Enhancement to GNU Emacs'', Proc. of INET'93, August, 1993.@refill + +$B8=:_!"(BMULE $B$N5!G=$r(B Emacs $B$K(B merge $B$9$k:n6H$,9T$o$l$F$*$j!"(Balpha $BHG(B +(ftp://etlport.etl.go.jp/pub/mule/mule-19.33-gamma.taz) $B$,B8:_$9$k!#(B + +$B$=$NB>!"(BXEmacs $B$K(B merge $B$7$?$b$N$bB8:_$9$k!#(B@refill + +$B$3$N$?$a!"8=:_$G$OB?8@8l(B Emacs $B$O!"85!9$N(B MULE $B$r4^$a$F#3<oN`$"$k$3$H$K(B +$B$J$k!#(B@refill + +$B$=$3$G!"$3$3$G$O!"B?8@8l(B Emacs $B$NAm>N$r(B @cindex{mule}@strong{mule}, $B85!9(B +$B$N(B MULE $B$r(B @cindex{MULE}@strong{MULE}, mule $B5!G=$r(B merge $B$7$?(B Emacs $B$r(B +@cindex{Emacs/mule}@strong{Emacs/mule}, mule $B5!G=$r(B merge $B$7$?(B XEmacs $B$r(B +@cindex{XEmacs/mule}@strong{XEmacs/mule} $B$H8F$V$3$H$K$9$k!#(B + + +@node multipart, multipart/alternative, MULE, Glossary +@subsection Multipart + +$B#1$D$N(B message (@ref{message}) $B$KJ#?t$N(B entity (@ref{entity}) $B$rF~$l$k$?(B +$B$a$N(B MIME (@ref{MIME}) $B$K$*$1$k(B media type (@ref{media type}) $B$N#1$D!"$b(B +$B$7$/$O!"J#?t$N(B entity $B$+$i$J$k(B message $B$r;X$9!#(B@refill + +$B8=:_!"Dj5A$5$l$F$$$k(B @cindex{multipart}@strong{multipart} $B$H$7$F$O!"(BRFC +2046 (@ref{RFC 2046}) $B$GDj5A$5$l$?(B + +@itemize @bullet +@item +multipart/mixed (@ref{multipart/mixed}) +@item +multipart/alternative (@ref{multipart/alternative}) +@item +multipart/digest (@ref{multipart/digest}) +@item +multipart/parallel (@ref{multipart/parallel}) +@end itemize + +@noindent +$B$N$[$+(B RFC 1847 (@ref{Security multipart}) $B$GDj5A$5$l$?(B + +@itemize @bullet +@item +multipart/signed (@ref{multipart/signed}) +@item +multipart/encrypted (@ref{multipart/encrypted}) +@end itemize + +@noindent +$B$J$I$,$"$k!#(B + + +@node multipart/alternative, multipart/digest, multipart, Glossary +@subsection multipart/alternative + +multipart (@ref{multipart}) $B$N#1$D$G!"F1$8>pJs$r0[$C$?7A<0$GF~$l!"A*Br;h(B +$B$H$9$k>l9g$KMQ$$$k!#(B@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/digest, multipart/encrypted, multipart/alternative, Glossary +@subsection multipart/digest + +multipart (@ref{multipart}) $B$N#1$D$G!"4^$^$l$k(B entity (@ref{entity}) $B$N(B +default $B$N(Bmedia type (@ref{media type}) $B$,(B multipart/mixed +(@ref{multipart/mixed}) $B$J$I$N>l9g(B text/plain (@ref{text/plain}) $B$G$"$k(B +$B$N$KBP$7!"(B@cindex{multipart/digest}@strong{multipart/digest}$B$G$O(B +message/rfc822 (@ref{message/rfc822}) $B$,MQ$$$i$l$kE@$,0[$J$k!#(B@refill + +$B$3$l$OEAE}E*$J(B RFC 1153 (@ref{RFC 1153}) $B$K4p$E$/(B encapsulation +(@ref{encapsulation}) $B$KBe$o$k$b$N$G$"$k!#(B@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/encrypted, multipart/mixed, multipart/digest, Glossary +@subsection multipart/encrypted + +RFC 1847 $B$GDj5A$5$l$?(B Security multipart (@ref{Security multipart}) $B$N#1(B +$B$D$G!"0E9f2=$5$l$?(B message $B$rI=8=$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{PGP/MIME}) + + + +@node multipart/mixed, multipart/parallel, multipart/encrypted, Glossary +@subsection multipart/mixed + +multipart (@ref{multipart}) $B$N<gMW$J(B subtype $B$G!"J#?t$N(B part $B$r=g=xIU$1(B +$B$FJB$Y$k>l9g$KMQ$$$k!#(B@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/parallel, multipart/signed, multipart/mixed, Glossary +@subsection multipart/parallel + +multipart (@ref{multipart}) $B$N#1$D$G!"J#?t$N(B part $B$r=g=xIU$1$:$K4^$a$k>l(B +$B9g$KMQ$$$k!#(B@refill + +(cf. @ref{RFC 2046}) + + + +@node multipart/signed, PGP, multipart/parallel, Glossary +@subsection multipart/signed + +RFC 1847 $B$GDj5A$5$l$?(B Security multipart (@ref{Security multipart}) $B$N#1(B +$B$D$G!"EE;R=pL>$rI=8=$9$k$N$KMQ$$$k!#(B@refill + +(cf. @ref{PGP/MIME}) + + + +@node PGP, PGP-kazu, multipart/signed, Glossary +@subsection PGP + +Phil Zimmermann $B;a$,:n@.$7$?8x3+800E9f=hM}7O$N#1$D!#(Bmessage +(@ref{message}) $B$N0E9f2=$dEE;R=pL>$r9T$&$3$H$,$G$-$k!#(BPretty Good +Privacy $B$NN,!#(B@refill + +$BEAE}E*$J(B PGP $B$G$O(B encapsulation (@ref{encapsulation}) $B$K(B RFC 934 +(@ref{RFC 934})$B$K=`$8$?J}K!$rMQ$$$k!#$3$l$O(B MIME (@ref{MIME}) $B$HL7=b$9$k(B +$B$N$G(B PGP/MIME (@ref{PGP/MIME}) $B$,Ds0F$5$l$F$$$k!#0lJ}!"(BMIME $B$K$*$$$F(B PGP +$B$N(Bencapsulation $B$rMQ$$$kJ}K!(B (cf. @ref{PGP-kazu}) + $B$bMxMQ$5$l$F$-$?!#$7$+$7!":#8e$O(B PGP/MIME $B$KE}0l$7$F$$$/J}$,K>$^$7$$!#(B +@refill + +@cindex{PGP}@cindex{Informational}@cindex{RFC 1991} +@noindent +[PGP: RFC 1991] +@quotation +D. Atkins, W. Stallings and P. Zimmermann, ``PGP Message Exchange +Formats'', August 1996, Informational. +@end quotation + + + + +@node PGP-kazu, PGP/MIME, PGP, Glossary +@subsection PGP-kazu + +$B;3K\(B $BOBI'(B $B;a$,Ds0F$7$?(B MIME (@ref{MIME}) $B$G(B PGP (@ref{PGP}) $B$rMxMQ$9$k$?(B +$B$a$NJ}K!$r$3$3$G$O(B @cindex{PGP-kazu}@strong{PGP-kazu} $B$H8F$V$3$H$K$9$k!#(B + +PGP-kazu $B$O(B @cindex{application/pgp}@strong{application/pgp} $B$H$$$&(B +content-type (@ref{content-type}) $B$rDj5A$9$k!#(B@refill + +application/pgp $B$N(B part $B$G$O(B PGP $B$N(B encapsulation (@ref{encapsulation}) +$B$,MQ$$$i$l$k!#(BPGP $B$N(B encapsulation (cf. @ref{RFC 934}) + $B$H(B MIME $B$N(B encapsulation $B$OL7=b$9$k$N$G!"(BPGP $B$N(B encapsulation $B$r2r$+$J(B +$B$$8B$j!"Cf$K4^$^$l$?(B MIME message $B$rFI$`$3$H$,$G$-$J$/$J$k!#B($A!"(B +PGP-kazu $B$KBP1~$7$F$$$J$$(B MIME $B$KBP1~$7$?(B MUA (@ref{MUA}) $B$O$=$N(B part $B$,(B +$BFI$a$J$/$J$k!#$=$NBe$o$j!"(BMIME $B$KBP1~$7$F$$$J$$(B PGP $BBP1~$N(B MUA +(@ref{MUA}) $B$G$b(B message $B$rFI$`$3$H$,$G$-$k!#(B@refill + +PGP-kazu $B$G$O(B MUA $B$O(B PGP $B$N$H(B MIME $B$N$H$$$$D$N(B encapsulation $B$rCN$i$J(B +$B$1$l$P$J$i$J$$!#$^$?!"(Bapplication/pgp part $B$r(B parse $B$9$k$?$a$K$O!"$^$:!"(B +pgp $B$N=hM}$r9T$o$J$1$l$P$J$i$J$$$N$G!"(Bparse $B=hM}$,J#;($K$J$k!#(B@refill + +$B$^$?!"(BInternet $B$G$O:#8e(B PGP/MIME (@ref{PGP/MIME}) $B$NJ}8~$GI8=`2=$7$F$$$3(B +$B$&$H$$$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP-kazu $B$OMQ$$$J$$$N$,K>(B +$B$^$7$$!#(B@refill + +[draft-kazu-pgp-mime-00.txt] Yamamoto K., ``PGP MIME Integration'', +October, 1995 + + +@node PGP/MIME, Quoted-Printable, PGP-kazu, Glossary +@subsection PGP/MIME + +Michael Elkins $B;a$,Ds0F$7$?(B MIME (@ref{MIME}) $B$G(B PGP (@ref{PGP}) $B$rMxMQ(B +$B$9$k$?$a$NJ}K!!#(B@refill + +RFC 1847 (@ref{Security multipart}) $B$K4p$-!"(BMIME $B$N(B multipart $B$K$h$k(B +encapsulation (@ref{encapsulation}) $B$r9T$&!#$3$N$?$a!"(BMIME $B$N<+A3$J3HD%(B +$B$K$J$C$F$$$k!#$7$+$7!"EAE}E*$J(B PGP$B$H$N8_49@-$,<:$o$l$F$$$k!#(B@refill + +PGP/MIME $B$G$O(B PGP-kazu (@ref{PGP-kazu}) $B$H0[$J$j!"(BMIME $B$N(B encapsulation +$B$N$_$rMQ$$$k!#$^$?!"$3$N$?$a!"(BPGP $B$N=hM}$r9T$&A0$K(B message $B$N(B parse $B$r9T(B +$B$&$3$H$,$G$-$k!#(B@refill + +Internet $B$G$O:#8e(B PGP/MIME (@ref{PGP/MIME}) $B$NJ}8~$GI8=`2=$7$F$$$3$&$H$$(B +$B$&$3$H$G9g0U$,<h$l$F$$$k!#$h$C$F!":#8e$O(B PGP $B$rMQ$$$k>l9g$O(B PGP/MIME$B$rMQ(B +$B$$$k$N$,K>$^$7$$!#(B + +@cindex{PGP/MIME}@cindex{Standards Track}@cindex{RFC 2015} +@noindent +[PGP/MIME: RFC 2015] +@quotation +M. Elkins, ``MIME Security with Pretty Good Privacy (PGP)'', October +1996, Standards Track. +@end quotation + + + +@node Quoted-Printable, RFC 821, PGP/MIME, Glossary +@subsection Quoted-Printable + +RFC 2045 (@ref{RFC 2045}) $B$GDj5A$5$l$F$$$k(B MIME (@ref{MIME}) $B$K$*$1$k(B +binary data (@ref{binary data}) $B$N(B network $B$G$NJQ49K!$N#1$D!#(B@refill + +`=' $B$d@)8fJ8;z$d(B 128 $B0J>e$NJ8;z$J$I$O(B `=AF' $B$N$h$&$K(B `=' $B$N8e$KB3$/(B 16 +$B?J?t$GI=8=$9$k!#$3$N$?$a!"(BASCII (@ref{ASCII}) $BJ8;zCf?4$N(B data $B$G$O(B +Base64 (@ref{Base64}) $B$KHf$Y$k$H2DFI@-$,9b$/$J$k2DG=@-$,$"$k!#(B@refill + +$B$7$+$7$J$,$i!"(BEBCDIC $B$K$OB8:_$7$J$$J8;z$rMxMQ$9$k>l9g!"(BEBCDIC $B$rMxMQ$7(B +$B$F$$$k(B network $B$G$O0BA4$KE>Aw$9$k$3$H$,$G$-$:!"(BBase64 $B$KHf$Y$F0BA4@-$O(B +$BDc$$!#(B + + +@node RFC 821, RFC 822, Quoted-Printable, Glossary +@subsection RFC 821 + +@cindex{SMTP}@strong{SMTP} $B$H8F$P$l$k(B Internet mail $B$NG[AwK!$NI8=`$rDj$a(B +$B$F$$$k(B RFC. + +@cindex{SMTP}@cindex{STD 10}@cindex{RFC 821} +@noindent +[SMTP: RFC 821] +@quotation +J. Postel, ``Simple Mail Transfer Protocol'', August 1982, STD 10. +@end quotation + + + +@node RFC 822, RFC 934, RFC 821, Glossary +@subsection RFC 822 + +Internet mail $B$N<g$K(B @cindex{message header}@strong{message header} $B$K4X$9$k7A<0$K(B +$B4X$9$kI8=`$rDj$a$F$$$k(B RFC. + +@noindent +@strong{[Memo]} +@quotation + +news message $B$b$3$l$K=`$8$F$$$k$N$G!"(B@cindex{Internet +mail}@strong{Internet mail} $B$H=q$/$h$j$b!"(B@cindex{Internet +message}@strong{Internet message} $B$H=q$$$?J}$,NI$$$+$b$7$l$J$$!#(B +@end quotation + + +@cindex{STD 11}@cindex{RFC 822} +@noindent +[RFC 822] +@quotation +D. Crocker, ``Standard for the Format of ARPA Internet Text Messages'', +August 1982, STD 11. +@end quotation + + + +@node RFC 934, RFC 1036, RFC 822, Glossary +@subsection RFC 934 + +Internet mail (@ref{RFC 822}) $B$N(B +@cindex{encapsulation}@strong{encapsulation} (@ref{encapsulation}) $B$NJ}(B +$BK!$rDj$a$?(B RFC.@refill + +MIME (@ref{MIME}) $B$HL7=b$9$k$N$G!"8=:_$G$O(B message/rfc822 +(@ref{message/rfc822}) $B$rMQ$$$k$Y$-$G$"$k!#(B + + +@cindex{RFC 934} +@noindent +[RFC 934] +@quotation +Marshall T. Rose and Einar A. Stefferud, ``Proposed Standard for Message +Encapsulation'', January 1985. +@end quotation + + + +@node RFC 1036, RFC 1153, RFC 934, Glossary +@subsection RFC 1036 + +USENET $B$G$N(B message $B$N7A<0$rDj$a$?(B RFC. RFC 822 (@ref{RFC 822})$B$N(B subset +$B$K$J$C$F$$$k!#(BInternet $B$NI8=`$G$O$J$$$,!"(BUSENET $B0J30$N(B netnews $B$G$b$3$l(B +$B$K=`$8$F$$$k$b$N$,B?$$!#(B + +@cindex{USENET}@cindex{RFC 1036} +@noindent +[USENET: RFC 1036] +@quotation +M. Horton and R. Adams, ``Standard for Interchange of USENET Messages'', +December 1987, (obsolete RFC 850). +@end quotation + + + +@node RFC 1153, RFC 1557, RFC 1036, Glossary +@subsection RFC 1153 + +$BJ#?t$N(B Internet mail (@ref{RFC 822}) $B$r(B +@cindex{encapsulation}@strong{encapsulation} (@ref{encapsulation}) $B$9$k(B +$B$?$a$NJ}K!$rDj$a$?(B RFC. RFC 934 (@ref{RFC 934}) $B$rMQ$$$k!#(B@refill + +MIME (@ref{MIME}) $B$HL7=b$9$k$N$G!"8=:_$G$O(B message/rfc822 +(@ref{message/rfc822}) $B$rMQ$$$?(B multipart (@ref{multipart}) $B$rMQ$$$k$Y$-(B +$B$G$"$k!#(B@refill + +(cf. @ref{multipart/digest}) + + +@cindex{RFC 1153} +@noindent +[RFC 1153] +@quotation +F. Wancho, ``Digest Message Format'', April 1990. +@end quotation + + + +@node RFC 1557, RFC 1922, RFC 1153, Glossary +@subsection RFC 1557 + +euc-kr (@ref{euc-kr}) $B$H(B iso-2022-kr (@ref{iso-2022-kr}) $B$H$$$&4Z9q8l$N(B +$B$?$a$N(B MIME charset (@ref{MIME charset}) $B$rDj5A$7$F$$$k(B RFC. + +@cindex{Informational}@cindex{RFC 1557} +@noindent +[RFC 1557] +@quotation +U. Choi, K. Chon and H. Park, ``Korean Character Encoding for Internet +Messages'', December 1993, Informational. +@end quotation + + + +@node RFC 1922, RFC 2045, RFC 1557, Glossary +@subsection RFC 1922 + +iso-2022-cn (@ref{iso-2022-cn}), iso-2022-cn-ext +(@ref{iso-2022-cn-ext}), cn-gb (@ref{cn-gb}), cn-big5 (@ref{cn-big5}) $B$H(B +$B$$$C$?Cf9q8l$N$?$a$N(B MIME charset (@ref{MIME charset}) $B$rDj5A$7$F$$$k(B +RFC.@refill + +$B$3$l$K2C$($F!"(B@cindex{charset-edition}@strong{charset-edition} $B$H(B +@cindex{charset-extension}@strong{charset-extension} $B$H$$$&(B Content-Type +field (@ref{Content-Type field}) $B$N(B parameter $B$rDj5A$7$F$$$k!#(B + +@cindex{Informational}@cindex{RFC 1922} +@noindent +[RFC 1922] +@quotation +Zhu, HF., Hu, DY., Wang, ZG., Kao, TC., Chang, WCH. and Crispin, M., +``Chinese Character Encoding for Internet Messages'', March 1996, +Informational. +@end quotation + + + +@node RFC 2045, RFC 2046, RFC 1922, Glossary +@subsection RFC 2045 + +@cindex{Standards Track}@cindex{RFC 2045} +@noindent +[RFC 2045] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part One: Format of Internet Message Bodies'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2046, RFC 2048, RFC 2045, Glossary +@subsection RFC 2046 + +@cindex{Standards Track}@cindex{RFC 2046} +@noindent +[RFC 2046] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part Two: Media Types'', November 1996, Standards Track (obsolete +RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2048, RFC 2049, RFC 2046, Glossary +@subsection RFC 2048 + +@cindex{Standards Track}@cindex{RFC 2048} +@noindent +[RFC 2048] +@quotation +N. Freed, J. Klensin and J. Postel, ``Multipurpose Internet Mail +Extensions (MIME) Part Four: Registration Procedures'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node RFC 2049, plain text, RFC 2048, Glossary +@subsection RFC 2049 + +@cindex{Standards Track}@cindex{RFC 2049} +@noindent +[RFC 2049] +@quotation +N. Freed and N. Borenstein, ``Multipurpose Internet Mail Extensions +(MIME) Part Five: Conformance Criteria and Examples'', November 1996, +Standards Track (obsolete RFC 1521, 1522, 1590). +@end quotation + + + +@node plain text, Security multipart, RFC 2049, Glossary +@subsection plain text + +$B=qBN$dAHHG$K4X$9$k>pJs$r;}$?$J$$(B $BJ8;zId9f(B(@ref{Coded character set})$B$N$_(B +$B$GI=8=$5$l$k(B text $B>pJs!#(B(cf. @ref{text/plain}) + + + +@node Security multipart, text/enriched, plain text, Glossary +@subsection Security multipart + +MIME (@ref{MIME}) $B$G0E9f$dEE;R=qL>$rMQ$$$k$?$a$N7A<0!#(B +@cindex{multipart/signed}@strong{multipart/signed} +(@ref{multipart/signed}) $B$H(B +@cindex{multipart/encrypted}@strong{multipart/encrypted} +(@ref{multipart/encrypted}) $B$H$$$&(B multipart $B$rMQ$$$k!#(BMOSS $B$d(B PGP/MIME +(@ref{PGP/MIME}) $B$O$3$l$K4p$$$F$$$k!#(B + +@cindex{Security multipart}@cindex{Standards Track}@cindex{RFC 1847} +@noindent +[Security multipart: RFC 1847] +@quotation +James Galvin, Gale Murphy, Steve Crocker and Ned Freed, ``Security +Multiparts for MIME: Multipart/Signed and Multipart/Encrypted'', October +1995, Standards Track. +@end quotation + + + +@node text/enriched, text/plain, Security multipart, Glossary +@subsection text/enriched + +RFC 1521 $B$GDj5A$5$l$?(B @cindex{text/richtext}@strong{text/richtext} $B$KBe(B +$B$o$C$F!"=qBN$dAHHG$K4X$9$k>pJs$r;}$C$?(B text$B$rI=8=$9$k$?$a$N(B media type +(@ref{media type}). + +@cindex{text/enriched}@cindex{RFC 1896} +@noindent +[text/enriched: RFC 1896] +@quotation +P. Resnick and A. Walker, ``The text/enriched MIME Content-type'', +February 1996, (obsolete RFC 1563). +@end quotation + + + +@node text/plain, tm-kernel, text/enriched, Glossary +@subsection text/plain + +RFC 2046 (@ref{RFC 2046}) $B$GDj5A$5$l$?!"(Bplain text (@ref{plain text}) $B$r(B +$BI=8=$9$k$?$a$N(B media type (@ref{media type}).@refill + +$BHs(B MIME message $B$J$I$N(B content-type $B$,Dj5A$5$l$J$$(B part $B$O(B MIME charset +(@ref{MIME charset}) $B$,(B us-ascii (@ref{us-ascii}) $B$G$"$k(B +@cindex{text/plain}@strong{text/plain} $B$N(B part $B$G$"$k$H8+Pv$5$l$k$3$H$K(B +$B$J$C$F$$$k!#(B + + +@node tm-kernel, tm-MUA, text/plain, Glossary +@subsection tm-kernel, tm + +Emacs $B$G(B MIME (@ref{MIME}) $B$rMxMQ$9$k$?$a$N(B user interface $B$rDs6!$9$k(B +library $B72!#(B`tools for MIME' $B$NN,!#(B + +@noindent +@strong{[$B$I$&$G$bNI$$$3$H(B(^-^;]} +@quotation + +@itemize @bullet +@item + tm $B$O(B ``tiny-mime'' $B$NN,$8$c$J$$$i$7$$$>(B (^-^; + +@item + tm $B$O:n<T$N%$%K%7%c%k$8$c$J$$$i$7$$$>(B (^-^; + +@item + ``Tools for MIME'' $B$NN,$H$$$&$N$O$3$8$D$1$i$7$$$>(B (^-^; +@end itemize +@end quotation + + + +@node tm-MUA, us-ascii, tm-kernel, Glossary +@subsection tm-MUA + +tm (@ref{tm-kernel}) $B$rMQ$$$?(B MUA (@ref{MUA}) $B$b$7$/$O(B MUA $B$KBP$9$k(B +extender.@refill + +@cindex{tm $BBg@9$j(B package}@strong{tm $BBg@9$j(B package} $B$K$O(B + +@itemize @bullet +@item +mh-e (@ref{(mh-e)}) $BMQ$N(B @cindex{tm-mh-e}@strong{tm-mh-e} +@item +GNUS $BMQ$N(B @cindex{tm-gnus}@strong{tm-gnus} +@item +Gnus $BMQ$N(B @cindex{gnus-mime}@strong{gnus-mime} (@ref{(gnus-mime-ja)}) +@item +VM $BMQ$N(B @cindex{tm-vm}@strong{tm-vm} +@item +RMAIL $BMQ$N(B @cindex{tm-rmail}@strong{tm-rmail} +@end itemize + +@noindent +$B$,4^$^$l$F$$$k!#(B + +$BFHN)$7$?(B MUA $B$H$7$F$O(B cmail (@ref{(cmail)}) $B$,(B tm $B$rMxMQ2DG=$G$"$k!#(B + + +@node us-ascii, , tm-MUA, Glossary +@subsection us-ascii + +$B%"%a%j%+O"K.$J$I$G;H$o$l$k1Q8l$J$I$rI=8=$9$k$?$a$N(B MIME charset +(@ref{MIME charset}) $B$N#1$D!#(B@refill + +ASCII (@ref{ASCII}) $B$N$_$+$i$J$j(B ISO 2022 (@ref{ISO 2022}) $B$K$h$kId9f3H(B +$BD%(B (@ref{Code extension})$B$O5v$5$l$J$$!#(B@refill + +Internet mail $B$K$*$1$kI8=`$NId9f2=J8;z=89g(B(@ref{Coded character set})$B$G(B +$B$"$j!"L@<(E*$K(B MIME charset $B$,<($5$l$J$$>l9g$O86B'$H$7$F(B +@cindex{us-ascii}@strong{us-ascii} $B$,;H$o$l$k!#(B@refill + +$B$^$?!"(BRFC 822 (@ref{RFC 822}) $B$K$*$1$k(B @cindex{ASCII}@strong{ASCII} $B$O(B +us-ascii $B$r;X$9$b$N$H2r<a$9$Y$-$G$"$k!#(B + + +@node Setting, Bug report, Introduction, Top +@chapter $B@_Dj(B + +$B$3$N(B package $B$K$O(B @file{mime-setup.el} $B$H(B +@file{tm-setup.el} $B$H$$$&4J0W@_Dj(B file $B$,ImB0$7$F$$$^$9!#(B + +@file{mime-setup.el} $B$G$O(B @file{tm-edit.el} $B$r;H$C$?(B MIME +message $B$N:n@.$b4^$a$?(B MIME $BA4HL$N@_Dj$r9T$J$$!"(B +@file{tm-setup.el} $B$G$O(B tm-MUA $B$K4X$9$k(BMIME message $B$N1\Mw$N@_Dj(B +$B$N$_$r9T$J$$$^$9!#(B + + +@menu +* mime-setup:: $BI8=`E*$J@_Dj(B +* tm-setup:: tm-edit $B$r;H$o$J$$@_Dj(B +* setting for VM:: VM $B$r;H$&>l9g$N@_Dj(B +* manual setting:: $B@_Dj(B file $B$r;H$o$J$$>l9g(B +@end menu + +@node mime-setup, tm-setup, Setting, Setting +@section $BI8=`E*$J@_Dj(B + +tm $B$N0lHLE*$J@_Dj$r9T$$$?$$>l9g$O!"(B +@cindex{mime-setup}@strong{mime-setup} $B$H$$$&I8=`@_Dj(B file $B$r;H$C$F$/$@(B +$B$5$$!#Nc$($P!"(B@file{~/.emacs} $BEy$G!"(B@refill + +@lisp +(load "mime-setup") +@end lisp + +@noindent +$B$H$9$k$@$1$G(B OK $B$G$9!#(B + +@file{mime-setup.el} $B$O(B @file{tm-setup.el} $B$r8F$s$G$$$k$N(B +$B$G!"(B@file{tm-setup.el} $B$r(B load $B$9$kI,MW$O$"$j$^$;$s!#!J2a5n$N(B +Gnus FAQ $B$N5-=R$O4V0c$C$F$$$^$9!*!K(B + + +@menu +* signature:: signature.el +* Notice about GNUS:: GNUS $B$N>l9g$NCm0U(B +@end menu + +@node signature, Notice about GNUS, mime-setup, mime-setup +@subsection signature.el + +tm $B$K$O(B @cindex{signature}@strong{signature} $B$H$$$&(B signature $B$N<+F0@ZBX$((B +tool $B$,ImB0$7$F$*$j!"(B@file{mime-setup.el} $B$O$3$N@_Dj$b9T$J$$$^$9!#(B +message header $B$N(B field $B$K9g$o$;$F(B signature $B$N<+F0@ZBX$r9T$J$$$?$$>l(B +$B9g$O(B @file{~/.emacs} $B$K0J2<$N$h$&$J$b$N$rF~$l$F2<$5$$!#!J>\$7$/(B +$B$O(B signature.el $B$N@bL@=q$r;2>H$7$F2<$5$$!K(B + +@lisp +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +@end lisp + + + +@defvar mime-setup-use-signature + +$B$3$NJQ?t$,(B @code{nil} $B0J30$N;~!"(B@file{signature.el} $B$r;H$$$^$9!#4{DjCM$O(B +@code{t} $B$G$9!#(B +@end defvar + + + +@defvar mime-setup-signature-key-alist + +$B3F(B major-mode $B$K$*$$$F(B signature $BA^F~L?Na$r@_Dj$9$Y$-(B key $B$r;XDj$7$^$9!#(B +$B4{DjCM$O(B + +@lisp + ((mail-mode . "\C-c\C-w")) +@end lisp + + +$B$G$9!#(B + +$B$3$l$rJQ99$7$?$$>l9g$O!"4X?t(B set-alist $B$J$I$r;H$C$F$3$NJQ?t$r=q$-49$((B +$B$F2<$5$$!#(B + +@lisp +(set-alist 'mime-setup-signature-key-alist + 'news-reply-mode "\C-c\C-w") +@end lisp + +@end defvar + + +@defvar mime-setup-default-signature-key + +$B$"$k(B major-mode $B$K$*$$$F(B signature $BA^F~L?Na$r@_Dj$9$Y$-(B key $B$,8+$D$+$i$J(B +$B$$>l9g!"$3$NJQ?t$K@_Dj$5$l$?(B key $B$,MQ$$$i$l$^$9!#4{DjCM$O!"(B +@code{"\C-c\C-s"} $B$G$9!#(B +@end defvar + + + +@node Notice about GNUS, , signature, mime-setup +@subsection GNUS $B$N>l9g$NCm0U(B + +@file{signature.el} $B$r;H$&>l9g!"(B@file{mime-setup.el} $B$OJQ(B +$B?t(B @code{gnus-signature-file} $B$r(B @code{nil} $B$K@_Dj$7$^$9!#(B +$B$h$C$F!"Aw?.;~$K<+F0E*$K(B @code{signature} $B$,IU$/5!G=$OM^@)$5$l$^(B +$B$9!#$3$N$h$&$J$3$H$r$7$F$$$k$N$O0J2<$NM}M3$+$i$G$9!#(B + +GNUS $B$,(B signature $B$rIU$1$k$N$O(B @code{tm-edit.el} $B$K$h$C$F(B MIME +message $B$,:n@.$5$l$?8e$G$9!#$h$C$F!"(BGNUS $B$,IU$1$?(B signature $B$O(B MIME +message $B$H$7$F@5$7$/=hM}$5$l$F$$$^$;$s!#Nc$($P(B multipart message $B$N>l(B +$B9g!"(BMIME message $B$N30$NHs(B MIME part $B$KIU$-$^$9!#$h$C$F!"(BMIME $BBP1~(B MUA +$B$G8+$?>l9g!"(Bsignature $B$OI=<($5$l$J$$$+$bCN$l$^$;$s!#(B + +$B$b$&0l$D$NCm0U$OI8=`@_Dj$G$O(B signature $B$rA^F~$9$k(B key $B$O(B @kbd{C-c C-w} +$B$G$O$J$/(B mh-e (@ref{(mh-e)}) $B$HF1$8(B @kbd{C-c C-s} $B$K3d$jEv$F$i$l$F$$$k$3(B +$B$H$G$9!#$3$l$O(B + +@lisp +(set-alist 'mime-setup-signature-key-alist 'news-reply-mode "\C-c\C-w") +@end lisp + +@noindent +$B$K$h$C$F(B GNUS $B$NI8=`$KLa$9$3$H$,$G$-$^$9!#(B + + +@node tm-setup, setting for VM, mime-setup, Setting +@section tm-edit $B$r;H$o$J$$@_Dj(B + + +@cindex{tm-setup}@strong{tm-setup} $B$O(B tm-MUA (@ref{tm-MUA}) $B$N@_Dj$N$_$r(B +$B9T$J$&(B module $B$G$9!#$3$N@_Dj(B file $B$G$O(B tm-edit (@ref{(tm-edit-ja)}) $B$r;H$C(B +$B$?(B MIME message $B$N:n@.$K4X$9$k@_Dj$O9T$o$l$:!"(BMIME message $B$N1\Mw$K4X$9(B +$B$k@_Dj$N$_$,9T$o$l$^$9!#(BMIME message $B$rFI$_$?$$$,<+J,$G$O:n@.$7$J$$$H$+!"(B +tm-edit $B0J30$N(B MIME composer $B$r;H$$$?$$>l9g$K$O(B mime-setup.el $B$NBe$o$j$K(B +$B$3$N@_Dj(B file $B$r;H$C$F$/$@$5$$!#(B@refill + +$BNc$($P!"(B@file{~/.emacs} $BEy$K(B + +@lisp +(load "tm-setup") +@end lisp + +@noindent +$B$rF~$l$l$P(B OK $B$G$9!#(B + + +@noindent +@strong{[Memo]} +@quotation + +@file{mime-setup.el} $B$r(B load $B$7$F$$$k>l9g!"$3$l$rM[$K(B load $B$9$kI,MW$O$"(B +$B$j$^$;$s!#(B +@end quotation + + + +@node setting for VM, manual setting, tm-setup, Setting +@section VM $B$r;H$&>l9g$N@_Dj(B + + +@cindex{vm}@strong{vm} $B$r;H$&>l9g$O(B @file{~/.vm} $B$K(B + +@lisp +(require 'tm-vm) +@end lisp + +@noindent +$B$rF~$l$F2<$5$$!#(B + + +@noindent +@strong{[$BCm0U(B]} +@quotation + +@cindex{BBDB}@strong{BBDB} $B$r;H$&>l9g$O(B @code{(bbdb-insinuate-vm)} $B$N(B +@strong{$B8e(B} $B$K(B @code{(require 'tm-vm)} $B$rF~$l$F$/$@$5$$!#(B +@end quotation + + + +@node manual setting, , setting for VM, Setting +@section $B@_Dj(B file $B$r;H$o$J$$>l9g(B + + +@file{mime-setup.el} $B$d(B @file{tm-setup.el} $B$r;29M$K$7$F2<(B +$B$5$$!#(B + + +@noindent +@strong{[Memo]} +@quotation + +$B8=:_$N(B tm $B$G$O(B tm-edit $B$N;HMQ$r2>Dj$7$?4v$D$+$NJXMx$J5!G=$,B8:_$7!"$3(B +$B$l$i$N5!G=$O(B @file{mime-setup.el} $B$r;H$o$J$$$HMxMQ$G$-$^$;$s!#$b(B +$B$7!"(Btm-edit $B$r;H$&FH<+$N@_Dj$r9T$&>l9g$O!"(B + +@lisp +(provide 'mime-setup) +@end lisp + +@noindent +$B$H$$$&@k8@$r9T$C$F$/$@$5$$!#(B +@end quotation + + + +@node Bug report, Concept Index, Setting, Top +@chapter bug $BJs9p$N;EJ}(B + +tm $B$N%P%0$r8+$D$1$?$i!"0J2<$N(B address $B$K(B mail $B$rAw$C$F$/$@$5$$!'(B + +@itemize @bullet +@item + $BF|K\8l(B <bug-tm-ja@@chamonix.jaist.ac.jp> +@item + $B1Q8l(B <bug-tm-en@@chamonix.jaist.ac.jp> +@end itemize + + +$BC"$7!"$"$^$j$K$b8E$$HG$K4X$9$kJs9p$O4?7^$5$l$^$;$s!#8E$$HG$N(B bug $B$O!"?7(B +$B$7$$HG$G$O<#$C$F$$$k$+$b$7$l$^$;$s!#$^$:!":G?7HG$G3NG'$7$F$_$^$7$g$&!#(B +@refill + +$B$=$l$+$i!"E,@Z$JJs9p$r$7$^$7$g$&!#C1$K!V$&$^$/F0$+$J$$!W$H8@$o$l$F$b$I$&(B +$B$$$&>u67$J$N$+$O$5$C$Q$jH=$j$^$;$s!#:GDc8B!"(BOS, emacs, tm, $B;H$C$F$$$k(B +MUA $B$N<oN`$*$h$SHG!"@_Dj$r=q$/I,MW$,$"$j$^$9!#$^$?!"(Berror $B$,5/$C$F$$$k>l(B +$B9g$O(B backtrace $B$rAw$k$3$H$b=EMW$G$9!#(B(cf. @ref{(emacs)Bugs}) @refill + +$B$^$?!"(Bbug $B$OBgDqJ#?t$N?M$,Ax6x$9$k$b$N$G$9!J$=$&$G$J$1$l$P!"(Bbug $B$G$O$J(B +$B$$2DG=@-$,$"$j$^$9!K!#$@$+$i!":n<T$KD>@\(B mail $B$rAw$k$H:n<T$OF1$8(B mail +$B$r2?DL$b=q$/1)L\$K$J$j$^$9!#$@$+$i!"I,$:(B bug $BJs9p$O>e5-$N(B address $B$KAw$C(B +$B$F$/$@$5$$!#(B + +tm ML $B$G$O(B tm $B$N%P%0>pJs$N8r49$d:G?7HG$NG[I[!"(Btm $B$N2~NI$K4X$9$k5DO@$r(B +$B9T$J$C$F$$$^$9!#(Btm ML $B$K;22C$7$?$$J}$O(B + +@itemize @bullet +@item + $BF|K\8l(B <tm-ja-admin@@chamonix.jaist.ac.jp> +@item + $B1Q8l(B <tm-en-admin@@chamonix.jaist.ac.jp> +@end itemize + +@noindent +$B$^$G(B mail $B$rAw$C$F2<$5$$!#EPO?$O<jF0$G$9$N$G!"$G$-$l$P!"<+A38@8l$G=q$$(B +$B$F2<$5$$!#(B(^_^) + + +@node Concept Index, Variable Index, Bug report, Top +@chapter $B35G0:w0z(B + +@printindex cp + +@node Variable Index, , Concept Index, Top +@chapter $BJQ?t:w0z(B + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-mh-e-en.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,200 @@ +<!doctype sinfo system> +<!-- $Id: tm-mh-e-en.sgml,v 1.1 1996/12/22 00:09:34 steve Exp $ --> +<head> +<title>tm-mh-e 7.71 Reference Manual (English Version) +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/15 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-mh-e, a MIME extension for GNUS. +</abstract> + + +<h1> What is tm-mh-e? +<node> Introduction +<p> +<concept>tm-mh-e</concept> is a <a file="mh-e">mh-e</a> extender to +use <dref file="tm-en">MIME</dref> feature using <a file="tm-en" +node="tm-kernel">tm</a>. +<p> +tm-mh-e extends following features: + +<ul> +<li>automatic MIME preview using <a file="tm-view-en">tm-view</a> +<li>composing MIME message using <a file="tm-edit-en">tm-edit</a> +</ul> + + +<h1> Extension for MH-Folder mode +<node> mh-folder-mode +<p> +<kl> +<kt>M-t +<kd> +Toggle whether to do automatic MIME preview or not. +</kd> +<kt>v +<kd>Enter <code>mime/viewer-mode</code> to view a message. +</kd> +<kt>. +<kd> +Display current message. +</kd> +<kt>, +<kd> +Display current message with showing all fields. +</kd> +<kt>M-, +<kd> +Display current ``raw'' message. +</kl> + +<p> +<dref file="tm-view-en">mime/viewer-mode</dref> is a major-mode to +view and navigate MIME message. In this mode, you can move in a +message or play a content, interactively. + + +<h1> Inline display for MIME message +<node> Automatic MIME Preview +<p> +<concept>automatic MIME preview</concept> feature is available in +tm-mh-e. In automatic MIME preview mode, when reading an article in +<a file="mh-e" node="Reading Mail"> +MH-Folder mode</a>, tm-mh-e displays preview buffer processed by <a +file="tm-view-en">tm-view</a> instead of raw show buffer. +<p> +Therefore if an article is encoded by <dref file="tm-en">Base64</dref> +or <dref file="tm-en">Quoted-Printable</dref>, a decoded article is +displayed. Or rich text article, such as <dref +file="tm-en">text/enriched</dref> format, is automatic formated. Of +course, <dref file="tm-en">multipart</dref> article is dealt with +correctly. +<p> +In addition, in <concept>XEmacs</concept>, images are displayed in +preview buffer as same as text. +<p> +Different from using metamail, speaker does not roar just then read an +article includes audio content, video player does not play just then +read an article includes video content, it does not do anonymous <dref +file="tm-en">ftp</dref> or send mail when read an article includes +external-message. These contents are played when you do decoding +command in preview buffer. +<p> +However if you use a slow machine, or are just really impatient, you +can stop automatic MIME preview. + + +<defvar name="tm-mh-e/automatic-mime-preview"> +<p> +If it is not <code>nil</code>, tm-mh-e is in automatic MIME preview +mode. +</defvar> + + +<h1> Internationalization +<node> mule +<p> +For emacs variants includes mule feature, such as <dref +file="tm-en">MULE</dref>, XEmacs/mule and Emacs/mule(*1), tm-mh-e +supports code-conversion by <dref file="tm-en">MIME charset</dref>. + +<memo> +(*1) It means next generation of Emacs includes mule features. Now +(October 1996), HANDA Ken'ichi and RMS are developing it. +</memo> + +<p> +Detail of code conversion is following: + +<ol> +<li>If a part of a MIME message has charset parameter of <dref +file="tm-en">Content-Type field</dref>, it is code-converted by the +MIME charset. +</li> +<li><dref file="tm-en">encoded-word</dref> are code-converted by their +specified <dref file="tm-en">MIME charset</dref>. +</li> +<li>When there are no specified MIME charset, such as message header +or non-MIME message, they are code-converted by +<code>default-mime-charset</code> in Summary Buffer. +</ol> + + +<h2> Don't use MIME charset +<node> evil environment +<p> +If <dref file="tm-en">MTA</dref> convert character encoding of +messages from network code to local code, such as EUC or Shift_JIS, +MIME charset does not work, so tm-mh-e can not display correct +message. It is quite evil environment. It does not break only MIME +charset, but also electric signature by PGP. +<p> +If you can manage your environment, you should fix it. Otherwise you +should persuade the administration. +<p> +Unfortunately you are in such environment and you can not it, +following descriptions may be available. + + +<h3> for non-MIME message or non-charset +<p> +For non-MIME message, please set the character encoding to variable +<code>default-mime-charset</code>. For example, if you use Japanese EUC: + +<lisp> +(setq default-mime-charset 'euc-japan) +</lisp> + + +<h3> To disable MIME charset +<p> +If for a text part specified <dref file="tm-en">MIME charset</dref>, +one way is to set variable +<code>mime-charset-coding-system-alist</code> to specify the +coding-system corresponding the primary MIME charset. For example, to +specify <code>*sjis*</code> or <code>*euc-japan*</code> as +<code>iso-2022-jp</code>. However it breaks texts encoded by Base64 +or Quoted-Printable. +<p> +So it is better to redefine function +<code>tm-mh-e/decode-charset-buffer</code>. For example, if your MTA +converts iso-2022-jp to Japanese EUC, following definition may work: + +<lisp> +(defun tm-mh-e/decode-charset-buffer (charset &optional encoding) + (decode-mime-charset-region (point-min)(point-max) 'euc-japan) + ) +</lisp> + + +<h1> Composing MIME message +<node> MIME-Edit +<p> +If using <dref file="tm-en">mime-setup</dref>, you can edit MIME +message in <a file="mh-e" node="Draft Editing">MH-Letter mode</a> +using <a file="tm-edit-en">tm-edit</a>. +<p> +In addition, <kbd>f</kbd> is used for <dref +file="tm-en">message/rfc822</dref> style forwarding instead of <dref +file="tm-en">RFC 934</dref> style forwarding. + + +<h1> Concept Index +<node> Concept Index + +<cindex> + + +<h1> Variable Index +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-mh-e-en.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,215 @@ +\input texinfo.tex +@setfilename tm-mh-e-en.info +@settitle{tm-mh-e 7.71 Reference Manual (English Version)} +@titlepage +@title tm-mh-e 7.71 Reference Manual (English Version) +@author MORIOKA Tomohiko <morioka@@jaist.ac.jp> +@subtitle 1996/10/15 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-mh-e 7.71 Reference Manual (English Version) + +@ifinfo + +This file documents tm-mh-e, a MIME extension for GNUS. +@end ifinfo + +@menu +* Introduction:: What is tm-mh-e? +* mh-folder-mode:: Extension for MH-Folder mode +* Automatic MIME Preview:: Inline display for MIME message +* mule:: Internationalization +* MIME-Edit:: Composing MIME message +* Concept Index:: +* Variable Index:: +@end menu + +@node Introduction, mh-folder-mode, Top, Top +@chapter What is tm-mh-e? + +@cindex{tm-mh-e}@strong{tm-mh-e} is a mh-e (@ref{(mh-e)}) extender to +use MIME (@ref{(tm-en)MIME}) feature using tm +(@ref{(tm-en)tm-kernel}).@refill + +tm-mh-e extends following features: + +@itemize @bullet +@item +automatic MIME preview using tm-view (@ref{(tm-view-en)}) +@item +composing MIME message using tm-edit (@ref{(tm-edit-en)}) +@end itemize + + + +@node mh-folder-mode, Automatic MIME Preview, Introduction, Top +@chapter Extension for MH-Folder mode + +@table @kbd +@item @key{M-t} +Toggle whether to do automatic MIME preview or not. + +@item @key{v} +Enter @code{mime/viewer-mode} to view a message. + +@item @key{.} +Display current message. + +@item @key{,} +Display current message with showing all fields. + +@item @key{M-,} +Display current ``raw'' message. + +@end table + + +mime/viewer-mode (@ref{(tm-view-en)mime/viewer-mode}) is a major-mode to +view and navigate MIME message. In this mode, you can move in a message +or play a content, interactively. + + +@node Automatic MIME Preview, mule, mh-folder-mode, Top +@chapter Inline display for MIME message + +@cindex{automatic MIME preview}@strong{automatic MIME preview} feature +is available in tm-mh-e. In automatic MIME preview mode, when reading +an article in MH-Folder mode (@ref{(mh-e)Reading Mail}), tm-mh-e +displays preview buffer processed by tm-view (@ref{(tm-view-en)}) +instead of raw show buffer.@refill + +Therefore if an article is encoded by Base64 (@ref{(tm-en)Base64}) or +Quoted-Printable (@ref{(tm-en)Quoted-Printable}), a decoded article is +displayed. Or rich text article, such as text/enriched +(@ref{(tm-en)text/enriched}) format, is automatic formated. Of course, +multipart (@ref{(tm-en)multipart}) article is dealt with +correctly.@refill + +In addition, in @cindex{XEmacs}@strong{XEmacs}, images are displayed in +preview buffer as same as text.@refill + +Different from using metamail, speaker does not roar just then read an +article includes audio content, video player does not play just then +read an article includes video content, it does not do anonymous ftp +(@ref{(tm-en)ftp}) or send mail when read an article includes +external-message. These contents are played when you do decoding +command in preview buffer.@refill + +However if you use a slow machine, or are just really impatient, you +can stop automatic MIME preview. + + +@defvar tm-mh-e/automatic-mime-preview + +If it is not @code{nil}, tm-mh-e is in automatic MIME preview mode. +@end defvar + + + +@node mule, MIME-Edit, Automatic MIME Preview, Top +@chapter Internationalization + +For emacs variants includes mule feature, such as MULE +(@ref{(tm-en)MULE}), XEmacs/mule and Emacs/mule(*1), tm-mh-e supports +code-conversion by MIME charset (@ref{(tm-en)MIME charset}). + +@noindent +@strong{[Memo]} +@quotation +(*1) It means next generation of Emacs includes mule features. Now +(October 1996), HANDA Ken'ichi and RMS are developing it. +@end quotation + + +Detail of code conversion is following: + +@enumerate +@item +If a part of a MIME message has charset parameter of Content-Type field +(@ref{(tm-en)Content-Type field}), it is code-converted by the MIME +charset. +@item +encoded-word (@ref{(tm-en)encoded-word}) are code-converted by their +specified MIME charset (@ref{(tm-en)MIME charset}). +@item +When there are no specified MIME charset, such as message header +or non-MIME message, they are code-converted by +@code{default-mime-charset} in Summary Buffer. +@end enumerate + + + +@menu +* evil environment:: Don't use MIME charset +@end menu + +@node evil environment, , mule, mule +@section Don't use MIME charset + +If MTA (@ref{(tm-en)MTA}) convert character encoding of messages from +network code to local code, such as EUC or Shift_JIS, MIME charset does +not work, so tm-mh-e can not display correct message. It is quite evil +environment. It does not break only MIME charset, but also electric +signature by PGP.@refill + +If you can manage your environment, you should fix it. Otherwise you +should persuade the administration.@refill + +Unfortunately you are in such environment and you can not it, +following descriptions may be available. + + +@subsection for non-MIME message or non-charset + +For non-MIME message, please set the character encoding to variable +@code{default-mime-charset}. For example, if you use Japanese EUC: + +@lisp +(setq default-mime-charset 'euc-japan) +@end lisp + + + +@subsection To disable MIME charset + +If for a text part specified MIME charset (@ref{(tm-en)MIME charset}), +one way is to set variable @code{mime-charset-coding-system-alist} to +specify the coding-system corresponding the primary MIME charset. For +example, to specify @code{*sjis*} or @code{*euc-japan*} as +@code{iso-2022-jp}. However it breaks texts encoded by Base64 or +Quoted-Printable.@refill + +So it is better to redefine function +@code{tm-mh-e/decode-charset-buffer}. For example, if your MTA +converts iso-2022-jp to Japanese EUC, following definition may work: + +@lisp +(defun tm-mh-e/decode-charset-buffer (charset &optional encoding) + (decode-mime-charset-region (point-min)(point-max) 'euc-japan) + ) +@end lisp + + + +@node MIME-Edit, Concept Index, mule, Top +@chapter Composing MIME message + +If using mime-setup (@ref{(tm-en)mime-setup}), you can edit MIME message +in MH-Letter mode (@ref{(mh-e)Draft Editing}) using tm-edit +(@ref{(tm-edit-en)}).@refill + +In addition, @kbd{f} is used for message/rfc822 +(@ref{(tm-en)message/rfc822}) style forwarding instead of RFC 934 +(@ref{(tm-en)RFC 934}) style forwarding. + + +@node Concept Index, Variable Index, MIME-Edit, Top +@chapter Concept Index + +@printindex cp + +@node Variable Index, , Concept Index, Top +@chapter Variable Index + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-mh-e-ja.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,213 @@ +<!doctype sinfo system> +<!-- $Id: tm-mh-e-ja.sgml,v 1.1 1996/12/22 00:09:34 steve Exp $ --> +<head> +<title>tm-mh-e 7.71 $B@bL@=q!JF|K\8lHG!K(B +<author>$B<i2,(B $BCNI'(B <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/15 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-mh-e, a MIME extension for GNUS. +<p> +mh-e $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$"$k(B `tm-mh-e' $B$K$D$$$F@bL@$7$^(B +$B$9!#(B +</abstract> + + +<h1> tm-mh-e $B$C$F2?!)(B +<node> Introduction +<p> +<concept>tm-mh-e</concept> $B$O(B <a file="tm-ja" node="tm-kernel">tm</a> +$B$r;H$C$F(B <a file="mh-e">mh-e</a> $B$N(B <dref file="tm-ja">MIME</dref> $B5!(B +$BG=$r6/2=$9$k$?$a$N(B package $B$G$9!#(B +<p> +tm-mh-e $B$K$h$C$F6/2=$5$l$k5!G=$O<!$NDL$j$G$9!'(B + +<ul> +<li><a file="tm-view-ja">tm-view</a> $B$r;H$C$?(B automatic MIME preview +<li><a file="tm-edit-ja">tm-edit</a> $B$r;H$C$?(B MIME message $B$N:n@.(B +</ul> + + +<h1> MH-Folder mode $B$K3HD%$5$l$k5!G=(B +<node> mh-folder-mode +<p> +<kl> +<kt>M-t +<kd> +automatic MIME preview $B$r9T$J$&$+$I$&$+$N(B toggle +</kd> +<kt>v +<kd><code>mime/viewer-mode</code> $B$KF~$j!"(BMIME message $B$rA`:n$9$k(B +</kd> +<kt>. +<kd> +message $B$rI=<($9$k(B +</kd> +<kt>, +<kd> +$BA4$F$N(B field $B$rI=<($7$?>uBV$G!"(Bmessage $B$rI=<($9$k(B +</kd> +<kt>M-, +<kd> +automatic MIME preview $B$r9T$&A0$N@8$N(B message $B$rI=<($9$k(B +</kl> + +<p> +<dref file="tm-view-ja">mime/viewer-mode</dref> $B$O(B MIME message $B$r1\Mw(B +$B$9$k$?$a$N(B mode $B$G!"(Bmessage $B$NCf$r0\F0$7$?$j!"BPOCE*$K(B message $B$NCf$N(B +$B3F(B content $B$r:F@8$7$?$j$9$k$3$H$,$G$-$^$9!#(B + + +<h1> MIME message $B$N(B inline $BI=<((B +<node> Automatic MIME Preview +<p> +tm-mh-e $B$G$O(B <concept>automatic MIME preview</concept> $B5!G=$rMxMQ$9$k(B +$B$3$H$,$G$-$^$9!#$3$N5!G=$r;H$&$H(B <a file="mh-e" node="Reading Mail"> +MH-Folder mode</a> $B$G5-;v$rFI$`;~!"DL>oI=<($5$l$k(B show buffer $B$NBe$o$j(B +$B$K(B <a file="tm-view-ja">tm-view</a> $B$G=hM}$5$l$?(B preview buffer $B$rI=<((B +$B$7$^$9!#(B +<p> +<p> +$B$3$N$?$a!"(B<dref file="tm-ja">Quoted-Printable</dref> $B$d(B <dref +file="tm-ja">Base64</dref> $B$G(B encode $B$5$l$?5-;v$r(B decode $B$7$FI=<($9$k(B +$B$3$H$,$G$-$^$9!#$"$k$$$O!"(B<dref file="tm-ja">text/enriched</dref> $B7A<0(B +$B$N$h$&$J=qBN$dAHHG$K4X$9$k>pJs$r;}$C$?5-;v$r@07A$7$FI=<($G$-$^$9!#EvA3(B +$B$N$3$H$J$,$i!"(B<dref file="tm-ja">multipart</dref> $B$N5-;v$b@5$7$/=hM}$G(B +$B$-$^$9!#(B +<p> +$B$^$?!"(B<concept>XEmacs</concept> $B$G$O(B text $B$HF1MM$K3($b(B preview buffer +$BFb$GI=<($9$k$3$H$,$G$-$^$9!#(B +<p> +metamail $B$r;H$C$?>l9g$H0[$J$j!"2;$NF~$C$?5-;v$rFI$s$@$H$?$s!"$$$-$J$j!"(B +$B2;$,LD$j=P$7$?$j!"(Bvideo $B$NF~$C$?5-;v$rFI$`$?$S$K(B video $B$,:F@8$5$l$?$j!"(B +anonymous <dref file="tm-ja">ftp</dref> $B$d(B mail-server $B$rMxMQ$7$?(B +external-message $B$NF~$C$?5-;v$rFI$`$?$S$K(B anonymous ftp $B$r<B9T$7$?$j!"(B +mail $B$rAw$C$?$j$9$k$3$H$,KI$2$^$9!#$3$&$7$?(B content $B$O(B preview buffer +$B$NCf$KF~$C$F:F@8(B command $B$r<B9T$7$?;~$N$_:F@8$5$l$^$9!#(B +<p> +$B$7$+$7$J$,$i!"CY$$(B machine $B$r;H$C$F$$$F!"(BMIME $B=hM}$N(B overhead $B$,5$$K$J(B +$B$k>l9g!"(Bautomatic MIME preview $B$rM^;_$9$k$3$H$,$G$-$^$9!#(B + + +<defvar name="tm-mh-e/automatic-mime-preview"> +<p> +<code>nil</code> $B$G$J$$>l9g!"(Bautomatic MIME preview $B$r9T$$$^$9!#(B +</defvar> + + +<h1> $B9q:]2=(B +<node> mule +<p> +<a file="tm-ja" node="mule">MULE</a>, XEmacs/mule, $B$*$h$S!"(Bmule $BE}9gHG(B +Emacs (*1) $B$J$I$N(B mule $B5!G=$r;}$C$?(B emacs $B$G$O(B <dref file="tm-ja">MIME +charset</dref> $B$*$h$S!"Hs(B MIME message/part $B$KBP$9$k(B newsgroup $BKh$K;X(B +$BDj$5$l$?(B <code>default-mime-charset</code> $B$G$N(B code $BJQ49$,9T$o$l$^$9!#(B + +<memo> +(*1) 1996 $BG/(B 10 $B7n8=:_!"H>ED(B $B7u0l(B $B;a$H(B RMS $B;a$,3+H/Cf$N(B Emacs $B$G!"(BMULE +$B$N5!G=$N$&$A!"B?8@8l2=$H9q:]2=$K4X$9$k5!G=$,(B merge $B$5$l$?$b$N$r;X$7$F(B +$B$$$^$9!#(B +</memo> + +<p> +$B6qBNE*$K$O!"(Bcode $BJQ49$O<!$N$h$&$K9T$o$l$^$9!'(B + +<ol> +<li> +$B$b$7!"$"$k(B MIME message $B$N$"$k(B part $B$,(B <dref file="tm-ja">Content-Type +field</dref> $B$K(B charset parameter $B$r;}$C$F$$$l$P!"$=$N(B MIME charset $B$r(B +$BMQ$$$F(B code $BJQ49$r9T$&!#(B +<p> +<li> +message header $B$dHs(B MIME message $B$J$I!"(Bcharset $B$,@k8@$5$l$F$$$J$$>l9g!"(B +Summary Buffer $B>e$N(B <code>default-mime-charset</code> $B$NCM$G(B code $BJQ49(B +$B$5$l$k!#(B +</ol> + + +<h2> MTA $B$G(B code $BJQ49$r9T$C$F$$$k>l9g(B +<node> evil environment +<p> +<dref file="tm-ja">MTA</dref> $B$G(B EUC $B$d(B Shift_JIS $B$J$I$K(B code $BJQ49$7$F(B +$B$$$k>l9g!"(Btm-mh-e $B$N(B default $B$N@_Dj$G$OJ8;z2=$1$7$^$9!#$O$C$-$j8@$C$F!"(B +$B$3$&$7$?$3$H$r9T$J$&$3$H$O$"$^$j4+$a$i$l$?$3$H$G$O$J$$$G$9!#(BMIME$B$N(B +charset $B@k8@$,$*$+$7$/$J$k$[$+$K!"EE;R=qL>$,$*$+$7$/$J$k$J$I!"$5$^$6$^(B +$B$JJ@32$,$"$j$^$9!#(B +<p> +$B$h$C$F!"$b$7!"$"$J$?$,4IM}<T$G$3$&$$$&@_Dj$r$7$F$$$k$N$G$"$l$PB(9o$d$a(B +$B$^$7$g$&!#$^$?!"$I$&$7$F$b$=$&$$$&$3$H$r$7$?$$$N$J$i(B user $B$,(B MTA $B$G$N(B +code $BJQ49$r$d$a$i$l$k$h$&$JJ}K!$K$7$^$7$g$&!#$^$?!"$"$J$?$,4IM}<T$G$J(B +$B$$$J$i4IM}<T$r@bF@$7$^$7$g$&!#$^$?!"6H<T$,$=$&$$$&@_Dj$r$7$J$$$h$&$KCm(B +$BJ8$7$^$7$g$&!#J9$/$H$3$m$K$h$k$H!"$=$&$$$&@_Dj$r$9$k8+<1$N$J$$(B WS +maker $B$,$"$k$=$&$G$9$,!"(BSE $B$K$$$C$F$=$&$$$&@_Dj$r$5$;$J$$$h$&$K$7$^$7$g(B +$B$&!#$^$?!"$I$&$7$F$bJ9$+$J$$$J$i$=$&$$$&6H<T$H$O1o$r@Z$j$^$7$g$&!#(B +<p> +$B$7$+$7!"$"$J$?$,IT9,$K$7$F$I$&$7$F$b$3$&$$$&4D6-$G;H$o$6$k$rF@$J$$$N$G(B +$B$"$l$P!"0J2<$N5-=R$r;29M$K$7$F$/$@$5$$!#(B + + +<h3> $BHs(B MIME message $B$^$?$O(B charset $B$,B8:_$7$J$$>l9g$N$_$NBP:v(B +<p> +$BHs(B MIME message $B$N>l9g!"JQ?t(B default-mime-charset $B$KJ8;z(B code $B$r@_Dj$9(B +$B$l$P(B OK $B$G$9!#Nc$($P!"F|K\8l(B EUC $B$N>l9g$O(B + +<lisp> +(setq default-mime-charset 'euc-japan) +</lisp> + +<noindent> +$B$H$7$F2<$5$$!#(B + + +<h3> MIME charset $B$,B8:_$9$k>l9g$b4^$a$?BP:v(B +<p> +<dref file="tm-ja">MIME charset</dref> $B$,B8:_$9$k>l9g!"JQ?t(B +<code>mime-charset-coding-system-alist</code> $B$K(B +<code>iso-2022-jp</code> $B$KBP1~$9$k(B coding-system $B$r(B +<code>*sjis*</code> $B$d(B <code>*euc-japan*</code> $BEy$NJQ49$5$l$?(B code $B$K(B +$BJQ$($k$H$$$&$N$,#1$D$NJ}K!$G$9!#C"$7!"$3$N>l9g!"(Bencode $B$5$l$F85$NJ8;z(B +code $B$,J]B8$5$l$F$$$k>l9g$KJ8;z2=$1$9$k$3$H$K$J$j$^$9!#(B +<p> +$B$3$N$3$H$r9MN8$9$k$H!"4X?t(B <code>tm-mh-e/decode-charset-buffer</code> +$B$r:FDj5A$9$k$N$,NI$$$H$$$($^$9!#$*$=$i$/!"(Biso-2022-jp $B0J30$NJ8;z(B code +$B$OJ]B8$5$l$J$$$G$7$g$&$+$i!"Nc$($PF|K\8l(B EUC $B$KJQ49$5$l$F$$$k>l9g!"0J(B +$B2<$N$h$&$JDj5A$G==J,$G$7$g$&!#(B + +<lisp> +(defun tm-mh-e/decode-charset-buffer (charset &optional encoding) + (decode-mime-charset-region (point-min)(point-max) 'euc-japan) + ) +</lisp> + + +<h1> MIME message $B$N:n@.(B +<node> MIME-Edit +<p> +<dref file="tm-ja">mime-setup</dref> $B$r;H$C$F$$$k>l9g!"(B<a file="mh-e" +node="Draft Editing">MH-Letter mode</a> $B$K$*$$$F!"(B<a +file="tm-edit-ja">tm-edit</a> $B$rMQ$$$?(B MIME message $B$N:n@.$r9T$&$3$H$,(B +$B$G$-$^$9!#(B +<p> +$B$^$?!"(BMH-Folder mode $B$G(B <kbd>f</kbd> $B$r2!$9$H!"(B<dref file="tm-ja">RFC +934</dref> $B$K$h$k(B forward $B$NBe$j$K(B <dref +file="tm-ja">message/rfc822</dref> $B7A<0$K$h$k(B forward $B$,9T$($^$9!#(B + + +<h1> $B35G0:w0z(B +<node> Concept Index + +<cindex> + + +<h1> $BJQ?t:w0z(B +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-mh-e-ja.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,223 @@ +\input texinfo.tex +@setfilename tm-mh-e-ja.info +@settitle{tm-mh-e 7.71 $B@bL@=q!JF|K\8lHG!K(B} +@titlepage +@title tm-mh-e 7.71 $B@bL@=q!JF|K\8lHG!K(B +@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp> +@subtitle 1996/10/15 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-mh-e 7.71 $B@bL@=q!JF|K\8lHG!K(B + +@ifinfo + +This file documents tm-mh-e, a MIME extension for GNUS.@refill + +mh-e $B$G(B MIME $B$r3Z$7$`$?$a$N(B package $B$G$"$k(B `tm-mh-e' $B$K$D$$$F@bL@$7$^$9!#(B +@end ifinfo + +@menu +* Introduction:: tm-mh-e $B$C$F2?!)(B +* mh-folder-mode:: MH-Folder mode $B$K3HD%$5$l$k5!G=(B +* Automatic MIME Preview:: MIME message $B$N(B inline $BI=<((B +* mule:: $B9q:]2=(B +* MIME-Edit:: MIME message $B$N:n@.(B +* Concept Index:: $B35G0:w0z(B +* Variable Index:: $BJQ?t:w0z(B +@end menu + +@node Introduction, mh-folder-mode, Top, Top +@chapter tm-mh-e $B$C$F2?!)(B + +@cindex{tm-mh-e}@strong{tm-mh-e} $B$O(B tm (@ref{(tm-ja)tm-kernel}) $B$r;H$C$F(B +mh-e (@ref{(mh-e)}) $B$N(B MIME (@ref{(tm-ja)MIME}) $B5!G=$r6/2=$9$k$?$a$N(B +package $B$G$9!#(B@refill + +tm-mh-e $B$K$h$C$F6/2=$5$l$k5!G=$O<!$NDL$j$G$9!'(B + +@itemize @bullet +@item +tm-view (@ref{(tm-view-ja)}) $B$r;H$C$?(B automatic MIME preview +@item +tm-edit (@ref{(tm-edit-ja)}) $B$r;H$C$?(B MIME message $B$N:n@.(B +@end itemize + + + +@node mh-folder-mode, Automatic MIME Preview, Introduction, Top +@chapter MH-Folder mode $B$K3HD%$5$l$k5!G=(B + +@table @kbd +@item @key{M-t} +automatic MIME preview $B$r9T$J$&$+$I$&$+$N(B toggle + +@item @key{v} +@code{mime/viewer-mode} $B$KF~$j!"(BMIME message $B$rA`:n$9$k(B + +@item @key{.} +message $B$rI=<($9$k(B + +@item @key{,} +$BA4$F$N(B field $B$rI=<($7$?>uBV$G!"(Bmessage $B$rI=<($9$k(B + +@item @key{M-,} +automatic MIME preview $B$r9T$&A0$N@8$N(B message $B$rI=<($9$k(B + +@end table + + +mime/viewer-mode (@ref{(tm-view-ja)mime/viewer-mode}) $B$O(B MIME message $B$r(B +$B1\Mw$9$k$?$a$N(B mode $B$G!"(Bmessage $B$NCf$r0\F0$7$?$j!"BPOCE*$K(B message $B$NCf(B +$B$N3F(B content $B$r:F@8$7$?$j$9$k$3$H$,$G$-$^$9!#(B + + +@node Automatic MIME Preview, mule, mh-folder-mode, Top +@chapter MIME message $B$N(B inline $BI=<((B + +tm-mh-e $B$G$O(B @cindex{automatic MIME preview}@strong{automatic MIME +preview} $B5!G=$rMxMQ$9$k$3$H$,$G$-$^$9!#$3$N5!G=$r;H$&$H(B MH-Folder mode +(@ref{(mh-e)Reading Mail}) $B$G5-;v$rFI$`;~!"DL>oI=<($5$l$k(B show buffer $B$N(B +$BBe$o$j$K(B tm-view (@ref{(tm-view-ja)}) $B$G=hM}$5$l$?(B preview buffer $B$rI=<((B +$B$7$^$9!#(B@refill + + +$B$3$N$?$a!"(BQuoted-Printable (@ref{(tm-ja)Quoted-Printable}) $B$d(B Base64 +(@ref{(tm-ja)Base64}) $B$G(B encode $B$5$l$?5-;v$r(B decode $B$7$FI=<($9$k$3$H$,$G(B +$B$-$^$9!#$"$k$$$O!"(Btext/enriched (@ref{(tm-ja)text/enriched}) $B7A<0$N$h$&(B +$B$J=qBN$dAHHG$K4X$9$k>pJs$r;}$C$?5-;v$r@07A$7$FI=<($G$-$^$9!#EvA3$N$3$H$J(B +$B$,$i!"(Bmultipart (@ref{(tm-ja)multipart}) $B$N5-;v$b@5$7$/=hM}$G$-$^$9!#(B + +$B$^$?!"(B@cindex{XEmacs}@strong{XEmacs} $B$G$O(B text $B$HF1MM$K3($b(B preview +buffer $BFb$GI=<($9$k$3$H$,$G$-$^$9!#(B@refill + +metamail $B$r;H$C$?>l9g$H0[$J$j!"2;$NF~$C$?5-;v$rFI$s$@$H$?$s!"$$$-$J$j!"(B +$B2;$,LD$j=P$7$?$j!"(Bvideo $B$NF~$C$?5-;v$rFI$`$?$S$K(B video $B$,:F@8$5$l$?$j!"(B +anonymous ftp (@ref{(tm-ja)ftp}) $B$d(B mail-server $B$rMxMQ$7$?(B +external-message $B$NF~$C$?5-;v$rFI$`$?$S$K(B anonymous ftp $B$r<B9T$7$?$j!"(B +mail $B$rAw$C$?$j$9$k$3$H$,KI$2$^$9!#$3$&$7$?(B content $B$O(B preview buffer $B$N(B +$BCf$KF~$C$F:F@8(B command $B$r<B9T$7$?;~$N$_:F@8$5$l$^$9!#(B@refill + +$B$7$+$7$J$,$i!"CY$$(B machine $B$r;H$C$F$$$F!"(BMIME $B=hM}$N(B overhead $B$,5$$K$J(B +$B$k>l9g!"(Bautomatic MIME preview $B$rM^;_$9$k$3$H$,$G$-$^$9!#(B + + +@defvar tm-mh-e/automatic-mime-preview + +@code{nil} $B$G$J$$>l9g!"(Bautomatic MIME preview $B$r9T$$$^$9!#(B +@end defvar + + + +@node mule, MIME-Edit, Automatic MIME Preview, Top +@chapter $B9q:]2=(B + +MULE (@ref{(tm-ja)mule}), XEmacs/mule, $B$*$h$S!"(Bmule $BE}9gHG(B Emacs (*1) $B$J(B +$B$I$N(B mule $B5!G=$r;}$C$?(B emacs $B$G$O(B MIME charset (@ref{(tm-ja)MIME +charset}) $B$*$h$S!"Hs(B MIME message/part $B$KBP$9$k(B newsgroup $BKh$K;XDj$5$l$?(B +@code{default-mime-charset} $B$G$N(B code $BJQ49$,9T$o$l$^$9!#(B + +@noindent +@strong{[Memo]} +@quotation +(*1) 1996 $BG/(B 10 $B7n8=:_!"H>ED(B $B7u0l(B $B;a$H(B RMS $B;a$,3+H/Cf$N(B Emacs $B$G!"(BMULE +$B$N5!G=$N$&$A!"B?8@8l2=$H9q:]2=$K4X$9$k5!G=$,(B merge $B$5$l$?$b$N$r;X$7$F(B +$B$$$^$9!#(B +@end quotation + + +$B6qBNE*$K$O!"(Bcode $BJQ49$O<!$N$h$&$K9T$o$l$^$9!'(B + +@enumerate +@item +$B$b$7!"$"$k(B MIME message $B$N$"$k(B part $B$,(B Content-Type field +(@ref{(tm-ja)Content-Type field}) $B$K(B charset parameter $B$r;}$C$F$$$l$P!"(B +$B$=$N(B MIME charset $B$rMQ$$$F(B code $BJQ49$r9T$&!#(B + +@item +message header $B$dHs(B MIME message $B$J$I!"(Bcharset $B$,@k8@$5$l$F$$$J$$>l9g!"(B +Summary Buffer $B>e$N(B @code{default-mime-charset} $B$NCM$G(B code $BJQ49(B +$B$5$l$k!#(B +@end enumerate + + + +@menu +* evil environment:: MTA $B$G(B code $BJQ49$r9T$C$F$$$k>l9g(B +@end menu + +@node evil environment, , mule, mule +@section MTA $B$G(B code $BJQ49$r9T$C$F$$$k>l9g(B + +MTA (@ref{(tm-ja)MTA}) $B$G(B EUC $B$d(B Shift_JIS $B$J$I$K(B code $BJQ49$7$F$$$k>l9g!"(B +tm-mh-e $B$N(B default $B$N@_Dj$G$OJ8;z2=$1$7$^$9!#$O$C$-$j8@$C$F!"$3$&$7$?$3(B +$B$H$r9T$J$&$3$H$O$"$^$j4+$a$i$l$?$3$H$G$O$J$$$G$9!#(BMIME$B$N(B charset $B@k8@$,(B +$B$*$+$7$/$J$k$[$+$K!"EE;R=qL>$,$*$+$7$/$J$k$J$I!"$5$^$6$^$JJ@32$,$"$j$^$9!#(B + +$B$h$C$F!"$b$7!"$"$J$?$,4IM}<T$G$3$&$$$&@_Dj$r$7$F$$$k$N$G$"$l$PB(9o$d$a$^(B +$B$7$g$&!#$^$?!"$I$&$7$F$b$=$&$$$&$3$H$r$7$?$$$N$J$i(B user $B$,(B MTA $B$G$N(B code +$BJQ49$r$d$a$i$l$k$h$&$JJ}K!$K$7$^$7$g$&!#$^$?!"$"$J$?$,4IM}<T$G$J$$$J$i4I(B +$BM}<T$r@bF@$7$^$7$g$&!#$^$?!"6H<T$,$=$&$$$&@_Dj$r$7$J$$$h$&$KCmJ8$7$^$7$g(B +$B$&!#J9$/$H$3$m$K$h$k$H!"$=$&$$$&@_Dj$r$9$k8+<1$N$J$$(B WS maker $B$,$"$k$=$&(B +$B$G$9$,!"(BSE $B$K$$$C$F$=$&$$$&@_Dj$r$5$;$J$$$h$&$K$7$^$7$g$&!#$^$?!"$I$&$7(B +$B$F$bJ9$+$J$$$J$i$=$&$$$&6H<T$H$O1o$r@Z$j$^$7$g$&!#(B@refill + +$B$7$+$7!"$"$J$?$,IT9,$K$7$F$I$&$7$F$b$3$&$$$&4D6-$G;H$o$6$k$rF@$J$$$N$G(B +$B$"$l$P!"0J2<$N5-=R$r;29M$K$7$F$/$@$5$$!#(B + + +@subsection $BHs(B MIME message $B$^$?$O(B charset $B$,B8:_$7$J$$>l9g$N$_$NBP:v(B + +$BHs(B MIME message $B$N>l9g!"JQ?t(B default-mime-charset $B$KJ8;z(B code $B$r@_Dj$9(B +$B$l$P(B OK $B$G$9!#Nc$($P!"F|K\8l(B EUC $B$N>l9g$O(B + +@lisp +(setq default-mime-charset 'euc-japan) +@end lisp + +@noindent +$B$H$7$F2<$5$$!#(B + + +@subsection MIME charset $B$,B8:_$9$k>l9g$b4^$a$?BP:v(B + +MIME charset (@ref{(tm-ja)MIME charset}) $B$,B8:_$9$k>l9g!"JQ?t(B +@code{mime-charset-coding-system-alist} $B$K(B @code{iso-2022-jp} $B$KBP1~$9$k(B +coding-system $B$r(B @code{*sjis*} $B$d(B @code{*euc-japan*} $BEy$NJQ49$5$l$?(B code +$B$KJQ$($k$H$$$&$N$,#1$D$NJ}K!$G$9!#C"$7!"$3$N>l9g!"(Bencode $B$5$l$F85$NJ8;z(B +code $B$,J]B8$5$l$F$$$k>l9g$KJ8;z2=$1$9$k$3$H$K$J$j$^$9!#(B@refill + +$B$3$N$3$H$r9MN8$9$k$H!"4X?t(B @code{tm-mh-e/decode-charset-buffer} +$B$r:FDj5A$9$k$N$,NI$$$H$$$($^$9!#$*$=$i$/!"(Biso-2022-jp $B0J30$NJ8;z(B code +$B$OJ]B8$5$l$J$$$G$7$g$&$+$i!"Nc$($PF|K\8l(B EUC $B$KJQ49$5$l$F$$$k>l9g!"0J(B +$B2<$N$h$&$JDj5A$G==J,$G$7$g$&!#(B + +@lisp +(defun tm-mh-e/decode-charset-buffer (charset &optional encoding) + (decode-mime-charset-region (point-min)(point-max) 'euc-japan) + ) +@end lisp + + + +@node MIME-Edit, Concept Index, mule, Top +@chapter MIME message $B$N:n@.(B + +mime-setup (@ref{(tm-ja)mime-setup}) $B$r;H$C$F$$$k>l9g!"(BMH-Letter mode +(@ref{(mh-e)Draft Editing}) $B$K$*$$$F!"(Btm-edit (@ref{(tm-edit-ja)}) $B$rMQ(B +$B$$$?(B MIME message $B$N:n@.$r9T$&$3$H$,$G$-$^$9!#(B@refill + +$B$^$?!"(BMH-Folder mode $B$G(B @kbd{f} $B$r2!$9$H!"(BRFC 934 (@ref{(tm-ja)RFC 934}) +$B$K$h$k(B forward $B$NBe$j$K(B message/rfc822 (@ref{(tm-ja)message/rfc822}) $B7A(B +$B<0$K$h$k(B forward $B$,9T$($^$9!#(B + + +@node Concept Index, Variable Index, MIME-Edit, Top +@chapter $B35G0:w0z(B + +@printindex cp + +@node Variable Index, , Concept Index, Top +@chapter $BJQ?t:w0z(B + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-view-en.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,994 @@ +<!doctype sinfo system> +<!-- $Id: tm-view-en.sgml,v 1.1 1996/12/22 00:09:35 steve Exp $ --> +<head> +<title>tm-view 7.77 Reference Manual (English Version) +<author>MORIOKA Tomohiko <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/11 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-view, a MIME Viewer for GNU Emacs. +</abstract> + + +<h1> What is tm-view? +<node> Introduction +<p> +The tm-view is a general MIME viewer running on GNU Emacs. +<p> +tm-view provides the major-mode called <a +node="mime/viewer-mode"><code>mime/viewer-mode</code> </a> to read +MIME message for MUA. <a file="tm-en" node="MUA">MUA</a> implementer +can use it to add MIME function. +<p> +tm-view is a user interface kernel to view and navigate MIME message. +tm-view drives some programs to navigate each <dref +file="tm-en">content-type</dref>s, they are called <a +node="method"><concept>method</concept></a>. tm-view calls some +programs to display each contents and headers in preview buffer, they +are called <a node="Two buffers for an +article"><concept>filter</concept></a>. Method and filters are +tm-view application program. They expand tm-view to treat various +kinds of MIME types. + + +<h1> Structure of display in mime/viewer-mode +<node> MIME display +<p> +In <a node="mime/viewer-mode">mime/viewer-mode</a>, following are +displayed for each parts: +<p> +<verb> + [content-button] + (content-header) + + (content-body) + (content-separator) +</verb> +<p> +You can change design or stop to display if you specify for each +conditions, such as content-types. +<p> +Example: + +<verb> +From: morioka@jaist.ac.jp (MORIOKA Tomohiko) +Subject: Re: Question +Newsgroups: zxr.message.mime +Date: 22 Oct 93 11:02:44 +Mime-Version: 1.0 +Organization: Japan Advanced Institute of Science and Technology, + Ishikawa, Japan + +[1 (text/plain)] + How to compose MIME message in MIME-Edit mode. + + Press `C-c C-x ?' then help message will be displayed: + +C-c C-x C-t insert a text message. +C-c C-x TAB insert a (binary) file. +C-c C-x C-e insert a reference to external body. +C-c C-x C-v insert a voice message. +C-c C-x C-y insert a mail or news message. +C-c C-x RET insert a mail message. +C-c C-x C-s insert a signature file at end. +C-c C-x t insert a new MIME tag. +C-c C-x a enclose as multipart/alternative. +C-c C-x p enclose as multipart/parallel. +C-c C-x m enclose as multipart/mixed. +C-c C-x d enclose as multipart/digest. +C-c C-x s enclose as PGP signed. +C-c C-x e enclose as PGP encrypted. +C-c C-x C-k insert PGP public key. +C-c C-x C-p preview editing MIME message. +... + +So press `C-c C-x C-i' and specify file name you want to include. + + MIME encoding for binary file is normally Base64. + +[2 (image/gif)] + +[3 (text/plain)] + + In this way, it is finish a message attaching a picture. + +======================== A cup of Russian tea ======================== +============ * not by jam, not by marmalade, by honey * ============ +============ MORIOKA Tomohiko ============ +=============== Internet E-mail: <morioka@jaist.ac.jp> =============== +</verb> + + +<h2> content-button +<node> content-button +<p> +content-subject displays abstract for the part. It is placed in top +of the part. +<p> +In default, it is displayed following design: + +<verb> + [1.3 test (text/plain)] +</verb> + +<p> +First number field represents position of a content in the part. It +is called <concept>content-number</concept>. It can be considered as +the chapter number in the message. +<p> +Second string part represents title. It is created by following: + +<ol> +<li>name paramater or x-name parameter in <dref +file="tm-en">Content-Type field</dref> +</li> +<li><dref file="tm-en">Content-Description field</dref> or Subject +field +</li> +<li> filename of uuencode +</ol> + +<p> +If they are not exists, space is displayed. +<p> +Third parenthesis part represents content-type/subtype of the part. +If it is non-MIME part, <code>nil</code> is displayed. +<p> +Content-button is used like icon when <dref>content-header</dref> and +<dref>content-body</dref> are hidden. For example: + +<verb> + [2 (image/gif)] +</verb> + +<noindent> +if you press <kbd>v</kbd> key, GIF image is displayed. +<p> +If mouse operations are available, you can press content-button by +mouse button-2 (center button of 3 button-mouse) to play, similarly to +press <kbd>v</kbd> key. <cf node="mime/viewer-mode"> +<p> +By the way, it is annoying to display content-button if content-header +is displayed. So tm-view provides a mechanism to specify conditions +to display content-button. + + +<defvar name="mime-viewer/content-button-ignored-ctype-list"> +<p> +List of content-types. +<p> +If content-type of a part is a member of this list, its content-button +is not displayed. +</defvar> + + +<h2> content-header +<node> content-header +<p> +A content header displays the header portion of a part in the +preview-buffer. However it is annoying to display header for every +parts, so tm-view provides a mechanism to specify its condition. +<p> +When the function <code>mime-viewer/header-visible-p</code> returns +<code>t</code> for reversed-content-number of a part, content-header +is displayed. +<p> +This judge function returns <code>t</code> when a part is root or +content-type of its parent is a member of the variable +<code>mime-viewer/childrens-header-showing-Content-Type-list</code>. +<p> +If you want to change this condition, please redefine it. Notice that +it refers variable +<code>mime-viewer/childrens-header-showing-Content-Type-list</code>, +however if you redefine function +<code>mime-viewer/header-visible-p</code>, it may not work. So if you +want to redefine it, it should be refer variable +<code>mime-viewer/childrens-header-showing-Content-Type-list</code>. +<p> +When content-header is displayed, content-header are formated by the +program called by <concept>content-header-filter</concept>. +Content-header-filter is searched from variable +<code>mime-viewer/content-header-filter-alist</code>. Its key is +major-mode of the <a node="raw-article-buffer">raw-article-buffer</a>. +If not found, function +<code>mime-viewer/default-content-header-filter</code> is called. +<p> + +<defvar name="mime-viewer/childrens-header-showing-Content-Type-list"> +<p> +List of content-types. If content-type of parent of a part is a +member of this variable, its content-header is displayed. Default +value is <code>'("message/rfc822" "message/news")</code>. +<p> +This variable is referred by the function +<code>mime-viewer/header-visible-p</code>. +</defvar> + + +<defun name="mime-viewer/header-visible-p"> +<args> rcnum cinfo <opts> ctype +<p> +Returns <code>t</code> if a part which reversed-content-number is +<var>rcnum</var> in content-info <var>cinfo</var> is displayed. +<p> +If you know content-type, you can specify by <var>ctype</var>. +</defun> + + +<defvar name="mime-viewer/content-header-filter-alist"> +<p> +Association-list whose key is major-mode of a raw-article-buffer, +value is content-header-filter. +</defvar> + + +<defun name="mime-viewer/default-content-header-filter"> +<p> +It is called when content-header-filter is not found in variable +<code>mime-viewer/content-header-filter-alist</code>. +<p> +It refers <code>mime-viewer/ignored-field-regexp</code>. +</defun> + + +<defvar name="mime-viewer/ignored-field-list"> +<p> +List of regular expression to represent invisible fields even if +content-header is displayed. +<p> +Variable <code>mime-viewer/ignored-field-regexp</code> is created from +it. +<p> +Please use function <code>tm:add-fields</code> or +<code>tm:delete-fields</code> to set it. +</defvar> + + +<h2> content-body +<node> content-body +<p> +<concept>content-body</concept> represents content of the part. +<p> +tm-view does not display raw content body. For example, if a content +has binary, it is hidden. If a content has text/enriched, it is +formated. Namely content body is hidden or formated. +<p> +Function <code>mime-viewer/body-visible-p</code> is a judge function +whether content-body of a content is displayed. If it returns +<code>nil</code>, content-body is hidden. In default, it returns +non-<code>nil</code> when content-type of a part is a member of +variable <code>mime-viewer/default-showing-Content-Type-list</code>. +<p> +When content-body of a content is displayed, content-body is formated +by <concept>content-filter</concept>. Content-filter is searched from +variable <code>mime-viewer/content-filter-alist</code>. At this time, +major-mode of the <dref>raw-article-buffer</dref> is used as the key. + +If it is not found, function +<code>mime-viewer/default-content-filter</code> is called. + + +<defvar name="mime-viewer/default-showing-Content-Type-list"> +<p> +List of content-type. If content-type of a part is a member of this +variable, its body is displayed. +</defvar> + + +<defun name="mime-viewer/body-visible-p"> +<args> rcnum cinfo <opts> ctype +<p> +Return non-<code>nil</code>, if content-type of a part is displayed. +<var>rcnum</var> is reversed-content-number of a part. +<var>cinfo</var> is content-info of the message. If you know +content-type of a part, you can specify it as argument +<var>ctype</var>. +</defun> + + +<defvar name="mime-viewer/content-filter-alist"> +<p> +Association-list whose key is major-mode of a raw-article-buffer, +value is content-filter. +</defvar> + + +<defun name="mime-viewer/default-content-filter"> +<args> rcnum cinfo ctype params subj +<p> +It is called when content-body of a part should be displayed and +content-filter is not found in +<code>mime-viewer/content-filter-alist</code>. +<p> +In default, it does nothing. +</defun> + + +<h2> content-separator +<node> content-separator +<p> +<concept>content-separator</concept> is displayed to represent +boundary of contents. +<p> +Content-separator is displayed by function +<code>mime-viewer/default-content-separator</code>. In default, it +displays line-break when content-header and content-body are not +displayed. +<p> +If you want to change this condition, please redefine this function. + + +<defun name="mime-viewer/default-content-separator"> +<args> rcnum cinfo ctype params subj +<p> +Display content-separator. <var>cnum</var> is content-number of a +content. <var>cinfo</var> is content-info of the message. +<var>ctype</var> is content-type of a content. <var>params</var> is +Content-Type field parameters of a content. <var>subj</var> is +subject. +<p> +In default, it displays line-break when content-header and +content-body are not displayed. +</defun> + + +<h1> Navigation in mime/viewer-mode +<node> mime/viewer-mode +<p> +<code>mime/viewer-mode</code> has following functions: +<p> +<kl> +<kt>u +<kd> +goes to the upper content (returns to the Summary mode if the cursor +is sitting on the top content (*1)) +</kd> +<kt>p +<kd> +goes to the previous content +</kd> +<kt>n +<kd> +goes to the next content +</kd> +<kt>SPC +<kd> +scrolls up +</kd> +<kt>M-SPC +<kd> +scrolls down +</kd> +<kt>DEL +<kd> +scrolls down +</kd> +<kt>RET +<kd> +goes to the next line +</kd> +<kt>M-RET +<kd> +goes to the previous line +</kd> +<kt>< +<kd> +goes to the beginning of message +</kd> +<kt>> +<kd> +goes to the end of message +</kd> +<kt>v +<kd> +playbacks a part (*2) +</kd> +<kt>e +<kd> +extracts a file from a part (*2) +</kd> +<kt>C-c C-p +<kd> +prints a part (*2) +</kd> +<kt>f +<kd> +displays X-Face in the message +</kd> +<kt>mouse-button-2 +<kd> +drives mouse button in preview-buffer. +<p> +For content-button, it playbacks a part (*2) +<p> +For URL-button, it drives WWW browser +</kd> +</kl> +<p> +<memo title="Notice"> +<p> +(*1) Not return to the Summary mode unless tm-view has been setup +using tm-mh-e, tm-vm, gnus-mime, tm-gnus, tm-rmail etc. +<p> +(*2) Actual playback/extract/print will be performed by a method. +</memo> + + +<h1> Mechanism of decoding +<node> method +<p> +In <code>mime/viewer-mode</code>, you can do play (<kbd>v</kbd>), +extract (<kbd>e</kbd>), or print (<kbd>C-c C-p</kbd>) for each parts. +These operations are called <concept>decoding operation(s) (for a +part)</concept>. And kind of decoding operations are called +<concept>decoding-mode</concept>. +<p> +When decoding operation is driven, tm-view calls a procedure matched +for the condition, such as <dref file="tm-en">content-type</dref> of +the part or its environment. This procedure is called +<concept>method</concept>. +<p> +There are two kinds of methods. One is Emacs Lisp function, called +<concept>internal method</concept>. Another one is external program, +called <concept>external method</concept>. +<p> +Internal method operates in Emacs, so it can do carefully. +<p> +External method is called as asynchronous process, so Emacs does not +wait while method is running. So it is good for big data, such as +audio, image or video. + + +<h2> Setting decoding condition for parts +<node> decoding-condition +<p> +When decoding operation is driven, tm-view calls a method matched for +the condition searched from the variable +<code>mime/content-decoding-condition</code>. +<p> +Variable <code>mime/content-decoding-condition</code> is defined as a +list with the following syntax: +<p> +<lisp> + (condition_1 condition_2 ...) +</lisp> +<p> +Each condition are association-list with the following syntax: +<p> +<lisp> + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +</lisp> +<p> +For example, if you want to call the external method named tm-plain to +decode every <dref file="tm-en">text/plain</dref> type parts, you can +define the condition like: +<p> +<lisp> + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +</lisp> +<p> +This condition definition will match all parts whose <dref +file="tm-en">content-type</dref> are text/plain. Here is an another +example: +<p> +<lisp> + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +</lisp> +<p> +This will match the part whose type is text/plain and the mode is +play. +<p> +Here is an another example: +<p> +<lisp> + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +</lisp> +<p> +This will match all parts which have a mode of play. +<p> +The conditions defined in a variable +<code>mime/content-decoding-condition</code> are examined from top to +bottom. The first matching condition becomes valid and the method +specified in that condition definition will be executed. + + +<h3> Format of method value +<node> method value +<p> +You can specify the method field of the decoding-condition definition +in two different ways, +<p> +<lisp> + (method . SYMBOL) +</lisp> +<p> +<noindent> +or +<p> +<lisp> + (method STRING FLAG arg1 arg2 ...) +</lisp> +<p> +<noindent> +can be accepted. +<p> +When a symbol is specified in the method field, a function whose name +is SYMBOL will be called as an internal method. +<p> +When a list is specified in the method field, it will be called as an +external method. +<p> +The list below shows the meaning of the parameters when the external +method is specified in the method field. +<p> +<dl> +<dt>STRING +<dd>name of an external method +</dd> +<dt>FLAG +<dd>If <code>t</code>, both the content-header and the content-body +are passed to an external method. +<p> +If <code>nil</code>, only the content-body is passed to an external +method. +</dd> +<dt>ARGUMENTs +<dd>list of arguments passed to an external method +</dd> +</dl> +<p> +An argument passed to an external method can be in one of the +following formats: +<p> +<dl> +<dt>STRING +<dd>string itself +</dd> +<dt>'SYMBOL +<dd>value gotten using SYMBOL as a key from decoding-condition +</dd> +<dt>'STRING +<dd>value gotten using STRING as a key from decoding-condition +</dd> +</dl> +<p> +<code>'SYMBOL</code> can be one of the following: +<p> +<dl> +<dt>'file +<dd>name of a file holding the original content +</dd> +<dt>'type +<dd>content-type/sub-type of Content-Type field +</dd> +<dt>'encoding +<dd>field body of Content-Transfer-Encoding field +</dd> +<dt>'mode +<dd>decoding-mode +</dd> +<dt>'name +<dd>name of a file created by decode operation +</dd> +</dl> + +<p> +<code>'STRING</code> is used to search a parameter of the Content-Type +field whose name matches with it, and pass the value of that parameter +to the external method. + + +<h3> Example of decoding-condition +<node> Example of decoding-condition +<p> +Following is an example of decoding-condition: + +<lisp> +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +</lisp> + +<p> +For example, if you want to use metamail to decode any contents, + +<lisp> +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +</lisp> + +<noindent> +will work. +<p> +Variable <code>mime/content-decoding-condition</code> provides you of +very flexible way to define the conditions of decoding. It can be +simple if you only need the a few decoding methods, while it can be +very complicated if you want to use the separate decoding method for +each type/mode combination. +<p> +Following function may be useful to set decoding-condition. It is a +function of <file>tl-atype.el</file>. + + +<defun name="set-atype"> +<args> symbol alist +<p> +Add condition <var>alist</var> to <var>symbol</var>. + +<memo title="Example"> +<p> +<lisp> +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +</lisp> +</memo> +</defun> + + +<h2> Environment variables +<node> environment variables +<p> +Standard methods of tm-view reference some environment variables. You +can specify them to customize. + +<vl> +<dt>TM_TMP_DIR +<dd> +Directory for temporary files or extracted files. If it is omitted, +<file>/tmp/</file> is used. +</dd> +<dt>VIDEO_DITHER +<dd> +Dither for mpeg_play. If it is omitted, `gray' is used. +</dd> +<dt>TM_WWW_BROWSER +<dd> +WWW browser name. If it is omitted, `netscape' is used. +</vl> + + +<h1> raw-article-buffer and preview-buffer +<node> Two buffers for an article +<p> +tm-view managements two buffers, one is for raw message called +<concept>raw-article-buffer</concept>, another one is to preview for +user called <concept>preview-buffer</concept>. major-mode of +raw-article-buffer is same as major-mode for article of original MUA, +major-mode of preview-buffer is <a +node="mime/viewer-mode"><code>mime/viewer-mode</code></a>. +<p> +When called <code>mime/viewer-mode</code>, tm-view analyzes +raw-article-buffer, and sets its result to the variable +<code>mime::article/content-info</code>. +<p> +After that, tm-view create a preview-buffer corresponded to the +raw-article-buffer. As this time, tm-view modifies header and body of +each parts of the message by specified conditions. Filter program for +header is called <a +node="content-header"><concept>header-filter</concept></a>, filter +program for body is called <a +node="content-body"><concept>content-filter</concept></a>, and they +are called <concept>filter</concept>. +<p> +When preview-buffer is made, buffer local variable of preview-buffer +<code>mime::preview/content-list</code> is made to register structure +of preview-buffer. tm-view manages message by +<code>mime::article/content-info</code> in raw-article-buffer and +<code>mime::preview/content-list</code> in preview-buffer. +<p> +<memo title="Notice"> +In this document, I call ``content-type'' as content-type/subtype of +Content-Type field. +</memo> + + +<h2> buffer local variables of raw-article-buffer +<node> raw-article-buffer +<p> +<define type="Structure" name="mime::content-info"> +<args> rcnum point-min point-max type parameters encoding children +<p> +structure to represent MIME content in raw-article-buffer. It is +called by <concept>content-info</concept>. +<p> +Please use reference function +<code>mime::content-info/SLOT-NAME</code> to reference slot of +content-info. Their argument is only content-info. +<p> +Following is a list of slots of the structure: + +<vl> +<dt>rcnum<dd>``reversed content-number'' (list) +</dd> +<dt>point-min<dd>beginning point of region in raw-article-buffer +</dd> +<dt>point-max<dd>end point of region in raw-article-buffer +</dd> +<dt>type<dd>content-type/sub-type (string or nil) +</dd> +<dt>parameters<dd>parameter of Content-Type field (association list) +</dd> +<dt>encoding<dd>Content-Transfer-Encoding (string or nil) +</dd> +<dt>children<dd>parts included in this part (list of content-infos) +</dd> +</vl> +<p> +If a part includes other parts in its contents, such as multipart or +message/rfc822, content-infos of other parts are included in +<var>children</var>, so content-info become a tree. +</define> + +<defvar name="mime::article/content-info"> +<p> +result of MIME parsing of raw-article-buffer (content-info) +</defvar> + +<defvar name="mime::article/preview-buffer"> +<p> +preview-buffer corresponded by this buffer +</defvar> + +<defun name="mime-article/point-content-number"> +<args> point <opts> cinfo +<p> +In a region managed by content-info <var>cinfo</var>, it returns +content-number corresponded by <var>point</var>. +<p> +If <var>cinfo</var> is omitted, +<code>mime::article/content-info</code> is used as default value. +</defun> + +<defun name="mime-article/rcnum-to-cinfo"> +<args> rcnum <opts> cinfo +<p> +In a region managed by content-info <var>cinfo</var>, it returns +content-info corresponded by reversed-content-number <var>rcnum</var>. +<p> +If <var>cinfo</var> is omitted, +<code>mime::article/content-info</code> is used as default value. +</defun> + +<defun name="mime-article/cnum-to-cinfo"> +<args> rcnum <opts> cinfo +<p> +In a region managed by content-info <var>cinfo</var>, it returns +content-info corresponded by content-number <var>rcnum</var>. +<p> +If <var>cinfo</var> is omitted, +<code>mime::article/content-info</code> is used as default value. +</defun> + +<defun name="mime/flatten-content-info"> +<args> <opts> cinfo +<p> +It returns flatten list of content-info from content-info +<var>cinfo</var> tree. +<p> +If <var>cinfo</var> is omitted, +<code>mime::article/content-info</code> is used as default value. +</defun> + + +<h2> Buffer local variables of preview-buffer +<node> preview-buffer +<p> +<defvar name="mime::preview/mother-buffer"> +<p> +Mother buffer of this preview-buffer. +</defvar> + +<define type="Structure" name="mime::preview-content-info"> +<args> point-min point-max buffer content-info +<p> +structure to represent MIME content in preview-buffer. It is called +by <concept>preview-content-info</concept>. +<p> +Please use reference function +<code>mime::preview-content-info/SLOT-NAME</code> to reference slot of +preview-content-info. Their argument is only preview-content-info. +<p> +Following is a list of slots of the structure: + +<vl> +<dt>point-min<dd>beginning point of region in preview-buffer +</dd> +<dt> point-max<dd>end point of region in preview-buffer +</dd> +<dt>buffer<dd>raw-article-buffer corresponding a part +</dd> +<dt>content-info<dd>content-info corresponding a part +</dd> +</vl> +</define> + + +<defvar name="mime::preview/content-list"> +<p> +List of preview-content-info to represent structure of this +preview-buffer. +</defvar> + + +<defvar name="mime::preview/article-buffer"> +<p> +raw-article-buffer corresponded by this preview-buffer. +</defvar> + + +<defvar name="mime::preview/original-major-mode"> +<p> +major-mode of original buffer. +</defvar> + + +<defvar name="mime::preview/original-window-configuration"> +<p> +window-configuration just before made this preview-buffer. +</defvar> + + +<defun name="mime-preview/point-pcinfo"> +<args> point <opts> pcl +<p> +In a region of preview-buffer managed by preview-content-info +<var>pcl</var>, it returns preview-content-info corresponded by +<var>point</var>. +<p> +If <var>cinfo</var> is omitted, +<code>mime::preview/content-list</code> is used. +</defun> + + +<h1> Functions to decode MIME message +<node> API +<p> +tm-view provides some available functions to decode and navigate MIME +message to each <a file="tm-en" node="MUA">MUA</a>s. +<p> +There are 2 kinds of functions, one is for MIME preview, another one +is to decode RFC 1522 <dref file="tm-en">encoded-word</dref>. + + +<h2> Function to preview MIME message +<node> API about MIME preview +<p> + +<define type="Command" name="mime/viewer-mode"> +<opts> mother ctl encoding ibuf obuf mother-keymap +<p> +Parse <var>ibuf</var> as a MIME message, and create preview-buffer +into <var>obuf</var> to display to user, then enter <a +node="mime/viewer-mode"><code>mime/viewer-mode</code></a>. +<p> +If <var>ibuf</var> is omitted, current buffer is used. +<p> +<var>mother</var> is used to specify original raw-article-buffer. It +may be useful when a raw-article-buffer is assembled from +message/partial messages. +<p> +<var>ctl</var> is used to specify <dref file="tm-en">Content-Type +field</dref> information. Its format is output format of +<code>mime/Content-Type</code>. When <var>ctl</var> is specified, +tm-view uses it instead of Content-Type field of the +raw-article-buffer. +<p> +<var>encoding</var> is used to specify field-body of +Content-Transfer-Encoding field. When is is specified, tm-view uses +it instead of Content-Type field of the raw-article-buffer. +<p> +If <var>mother-keymap</var> is specified, keymap of +<code>mime/viewer-mode</code> includes it. +</define> + + +<h2> encoded-word decoder +<node> encoded-word decoding +<p> +tm-view has functions to decode RFC 1522 <dref +file="tm-en">encoded-word</dref>. + + +<define type="Command" name="mime/decode-message-header"> +<p> +It decodes encoded-words in message header of current buffer. +<p> +If an encoded-word is broken or invalid, or it has non supported <a +file="tm-en" node="MIME charset">MIME charset</a>, it is not decoded. +</define> + + +<define type="Command" name="mime-eword/decode-region"> +<args> start end <opts> unfolding must-unfold +<p> +It decodes encoded-words in region <var>start</var> to <var>end</var>. +<p> +If an encoded-word is broken or invalid, or it has non supported <a +file="tm-en" node="MIME charset">MIME charset</a>, it is not decoded. +<p> +If <var>unfolding</var> is non-nil, it unfolds folded fields. +<p> +If <var>must-fold</var> is non-nil and decoded result of an +encoded-word has folding or raw CR or LF, it unfolds or delete raw CR +or LF. +</define> + + +<defun name="mime-eword/decode-string"> +<args> string <opts> must-unfold +<p> +It decodes encoded-words in <var>string</var> and returns decoded +string. +<p> +If an encoded-word is broken or invalid, or it has non supported <a +file="tm-en" node="MIME charset">MIME charset</a>, it is not decoded. +<p> +If <var>string</var> is folded, it unfolds <var>string</var> before +decoding. +<p> +If <var>must-fold</var> is non-nil and decoded result of an +encoded-word has folding or raw CR or LF, it unfolds or delete raw CR +or LF. +</defun> + + +<h1> Concept Index +<node> Concept Index + +<cindex> + + +<h1> Function Index +<node> Function Index + +<findex> + + +<h1> Variable Index +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-view-en.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1045 @@ +\input texinfo.tex +@setfilename tm-view-en.info +@settitle{tm-view 7.77 Reference Manual (English Version)} +@titlepage +@title tm-view 7.77 Reference Manual (English Version) +@author MORIOKA Tomohiko <morioka@@jaist.ac.jp> +@subtitle 1996/10/11 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-view 7.77 Reference Manual (English Version) + +@ifinfo + +This file documents tm-view, a MIME Viewer for GNU Emacs. +@end ifinfo + +@menu +* Introduction:: What is tm-view? +* MIME display:: Structure of display in mime/viewer-mode +* mime/viewer-mode:: Navigation in mime/viewer-mode +* method:: Mechanism of decoding +* Two buffers for an article:: raw-article-buffer and preview-buffer +* API:: Functions to decode MIME message +* Concept Index:: +* Function Index:: +* Variable Index:: +@end menu + +@node Introduction, MIME display, Top, Top +@chapter What is tm-view? + +The tm-view is a general MIME viewer running on GNU Emacs.@refill + +tm-view provides the major-mode called @code{mime/viewer-mode} +(@ref{mime/viewer-mode}) to read MIME message for MUA. MUA +(@ref{(tm-en)MUA}) implementer can use it to add MIME function.@refill + +tm-view is a user interface kernel to view and navigate MIME message. +tm-view drives some programs to navigate each content-type +(@ref{(tm-en)content-type})s, they are called +@cindex{method}@strong{method} (@ref{method}). tm-view calls some +programs to display each contents and headers in preview buffer, they +are called @cindex{filter}@strong{filter} (@ref{Two buffers for an +article}). Method and filters are tm-view application program. They +expand tm-view to treat various kinds of MIME types. + + +@node MIME display, mime/viewer-mode, Introduction, Top +@chapter Structure of display in mime/viewer-mode + +In mime/viewer-mode (@ref{mime/viewer-mode}), following are displayed +for each parts:@refill + +@example + [content-button] + (content-header) + + (content-body) + (content-separator) +@end example + +You can change design or stop to display if you specify for each +conditions, such as content-types.@refill + +Example: + +@example +From: morioka@@jaist.ac.jp (MORIOKA Tomohiko) +Subject: Re: Question +Newsgroups: zxr.message.mime +Date: 22 Oct 93 11:02:44 +Mime-Version: 1.0 +Organization: Japan Advanced Institute of Science and Technology, + Ishikawa, Japan + +[1 (text/plain)] + How to compose MIME message in MIME-Edit mode. + + Press `C-c C-x ?' then help message will be displayed: + +C-c C-x C-t insert a text message. +C-c C-x TAB insert a (binary) file. +C-c C-x C-e insert a reference to external body. +C-c C-x C-v insert a voice message. +C-c C-x C-y insert a mail or news message. +C-c C-x RET insert a mail message. +C-c C-x C-s insert a signature file at end. +C-c C-x t insert a new MIME tag. +C-c C-x a enclose as multipart/alternative. +C-c C-x p enclose as multipart/parallel. +C-c C-x m enclose as multipart/mixed. +C-c C-x d enclose as multipart/digest. +C-c C-x s enclose as PGP signed. +C-c C-x e enclose as PGP encrypted. +C-c C-x C-k insert PGP public key. +C-c C-x C-p preview editing MIME message. +... + +So press `C-c C-x C-i' and specify file name you want to include. + + MIME encoding for binary file is normally Base64. + +[2 (image/gif)] + +[3 (text/plain)] + + In this way, it is finish a message attaching a picture. + +======================== A cup of Russian tea ======================== +============ * not by jam, not by marmalade, by honey * ============ +============ MORIOKA Tomohiko ============ +=============== Internet E-mail: <morioka@@jaist.ac.jp> =============== +@end example + + + +@menu +* content-button:: +* content-header:: +* content-body:: +* content-separator:: +@end menu + +@node content-button, content-header, MIME display, MIME display +@section content-button + +content-subject displays abstract for the part. It is placed in top of +the part.@refill + +In default, it is displayed following design: + +@example + [1.3 test (text/plain)] +@end example + + +First number field represents position of a content in the part. It is +called @cindex{content-number}@strong{content-number}. It can be +considered as the chapter number in the message.@refill + +Second string part represents title. It is created by following: + +@enumerate +@item +name paramater or x-name parameter in Content-Type field +(@ref{(tm-en)Content-Type field}) +@item +Content-Description field (@ref{(tm-en)Content-Description field}) or +Subject field +@item + filename of uuencode +@end enumerate + + +If they are not exists, space is displayed.@refill + +Third parenthesis part represents content-type/subtype of the part. If +it is non-MIME part, @code{nil} is displayed.@refill + +Content-button is used like icon when content-header +(@ref{content-header}) and content-body (@ref{content-body}) are hidden. +For example: + +@example + [2 (image/gif)] +@end example + +@noindent +if you press @kbd{v} key, GIF image is displayed. + +If mouse operations are available, you can press content-button by mouse +button-2 (center button of 3 button-mouse) to play, similarly to press +@kbd{v} key. (cf. @ref{mime/viewer-mode}) @refill + +By the way, it is annoying to display content-button if content-header +is displayed. So tm-view provides a mechanism to specify conditions +to display content-button. + + +@defvar mime-viewer/content-button-ignored-ctype-list + +List of content-types.@refill + +If content-type of a part is a member of this list, its content-button +is not displayed. +@end defvar + + + +@node content-header, content-body, content-button, MIME display +@section content-header + +A content header displays the header portion of a part in the +preview-buffer. However it is annoying to display header for every +parts, so tm-view provides a mechanism to specify its condition.@refill + +When the function @code{mime-viewer/header-visible-p} returns @code{t} +for reversed-content-number of a part, content-header is +displayed.@refill + +This judge function returns @code{t} when a part is root or content-type +of its parent is a member of the variable +@code{mime-viewer/childrens-header-showing-Content-Type-list}.@refill + +If you want to change this condition, please redefine it. Notice that +it refers variable +@code{mime-viewer/childrens-header-showing-Content-Type-list}, however +if you redefine function @code{mime-viewer/header-visible-p}, it may not +work. So if you want to redefine it, it should be refer variable +@code{mime-viewer/childrens-header-showing-Content-Type-list}.@refill + +When content-header is displayed, content-header are formated by the +program called by +@cindex{content-header-filter}@strong{content-header-filter}. +Content-header-filter is searched from variable +@code{mime-viewer/content-header-filter-alist}. Its key is major-mode +of the raw-article-buffer (@ref{raw-article-buffer}). If not found, +function @code{mime-viewer/default-content-header-filter} is +called.@refill + + +@defvar mime-viewer/childrens-header-showing-Content-Type-list + +List of content-types. If content-type of parent of a part is a member +of this variable, its content-header is displayed. Default value is +@code{'("message/rfc822" "message/news")}.@refill + +This variable is referred by the function +@code{mime-viewer/header-visible-p}. +@end defvar + + + +@defun mime-viewer/header-visible-p rcnum cinfo &optional ctype + +Returns @code{t} if a part which reversed-content-number is @var{rcnum} +in content-info @var{cinfo} is displayed.@refill + +If you know content-type, you can specify by @var{ctype}. +@end defun + + + +@defvar mime-viewer/content-header-filter-alist + +Association-list whose key is major-mode of a raw-article-buffer, value +is content-header-filter. +@end defvar + + + +@defun mime-viewer/default-content-header-filter + +It is called when content-header-filter is not found in variable +@code{mime-viewer/content-header-filter-alist}.@refill + +It refers @code{mime-viewer/ignored-field-regexp}. +@end defun + + + +@defvar mime-viewer/ignored-field-list + +List of regular expression to represent invisible fields even if +content-header is displayed.@refill + +Variable @code{mime-viewer/ignored-field-regexp} is created from +it.@refill + +Please use function @code{tm:add-fields} or @code{tm:delete-fields} to +set it. +@end defvar + + + +@node content-body, content-separator, content-header, MIME display +@section content-body + +@cindex{content-body}@strong{content-body} represents content of the +part.@refill + +tm-view does not display raw content body. For example, if a content +has binary, it is hidden. If a content has text/enriched, it is +formated. Namely content body is hidden or formated.@refill + +Function @code{mime-viewer/body-visible-p} is a judge function whether +content-body of a content is displayed. If it returns @code{nil}, +content-body is hidden. In default, it returns non-@code{nil} when +content-type of a part is a member of variable +@code{mime-viewer/default-showing-Content-Type-list}.@refill + +When content-body of a content is displayed, content-body is formated by +@cindex{content-filter}@strong{content-filter}. Content-filter is +searched from variable @code{mime-viewer/content-filter-alist}. At this +time, major-mode of the raw-article-buffer (@ref{raw-article-buffer}) is +used as the key. + +If it is not found, function +@code{mime-viewer/default-content-filter} is called. + + +@defvar mime-viewer/default-showing-Content-Type-list + +List of content-type. If content-type of a part is a member of this +variable, its body is displayed. +@end defvar + + + +@defun mime-viewer/body-visible-p rcnum cinfo &optional ctype + +Return non-@code{nil}, if content-type of a part is displayed. +@var{rcnum} is reversed-content-number of a part. @var{cinfo} is +content-info of the message. If you know content-type of a part, you +can specify it as argument @var{ctype}. +@end defun + + + +@defvar mime-viewer/content-filter-alist + +Association-list whose key is major-mode of a raw-article-buffer, value +is content-filter. +@end defvar + + + +@defun mime-viewer/default-content-filter rcnum cinfo ctype params subj + +It is called when content-body of a part should be displayed and +content-filter is not found in +@code{mime-viewer/content-filter-alist}.@refill + +In default, it does nothing. +@end defun + + + +@node content-separator, , content-body, MIME display +@section content-separator + +@cindex{content-separator}@strong{content-separator} is displayed to +represent boundary of contents.@refill + +Content-separator is displayed by function +@code{mime-viewer/default-content-separator}. In default, it displays +line-break when content-header and content-body are not +displayed.@refill + +If you want to change this condition, please redefine this function. + + +@defun mime-viewer/default-content-separator rcnum cinfo ctype params subj + +Display content-separator. @var{cnum} is content-number of a content. +@var{cinfo} is content-info of the message. @var{ctype} is content-type +of a content. @var{params} is Content-Type field parameters of a +content. @var{subj} is subject.@refill + +In default, it displays line-break when content-header and content-body +are not displayed. +@end defun + + + +@node mime/viewer-mode, method, MIME display, Top +@chapter Navigation in mime/viewer-mode + +@code{mime/viewer-mode} has following functions:@refill + +@table @kbd +@item @key{u} +goes to the upper content (returns to the Summary mode if the cursor +is sitting on the top content (*1)) + +@item @key{p} +goes to the previous content + +@item @key{n} +goes to the next content + +@item @key{SPC} +scrolls up + +@item @key{M-SPC} +scrolls down + +@item @key{DEL} +scrolls down + +@item @key{RET} +goes to the next line + +@item @key{M-RET} +goes to the previous line + +@item @key{<} +goes to the beginning of message + +@item @key{>} +goes to the end of message + +@item @key{v} +playbacks a part (*2) + +@item @key{e} +extracts a file from a part (*2) + +@item @key{C-c C-p} +prints a part (*2) + +@item @key{f} +displays X-Face in the message + +@item @key{mouse-button-2} +drives mouse button in preview-buffer. + +For content-button, it playbacks a part (*2)@refill + +For URL-button, it drives WWW browser@refill + +@end table + +@noindent +@strong{[Notice]} +@quotation + +(*1) Not return to the Summary mode unless tm-view has been setup using +tm-mh-e, tm-vm, gnus-mime, tm-gnus, tm-rmail etc.@refill + +(*2) Actual playback/extract/print will be performed by a method. +@end quotation + + + +@node method, Two buffers for an article, mime/viewer-mode, Top +@chapter Mechanism of decoding + +In @code{mime/viewer-mode}, you can do play (@kbd{v}), extract +(@kbd{e}), or print (@kbd{C-c C-p}) for each parts. These operations +are called @cindex{decoding operation(s) (for a part)}@strong{decoding +operation(s) (for a part)}. And kind of decoding operations are called +@cindex{decoding-mode}@strong{decoding-mode}.@refill + +When decoding operation is driven, tm-view calls a procedure matched for +the condition, such as content-type (@ref{(tm-en)content-type}) of the +part or its environment. This procedure is called +@cindex{method}@strong{method}.@refill + +There are two kinds of methods. One is Emacs Lisp function, called +@cindex{internal method}@strong{internal method}. Another one is +external program, called @cindex{external method}@strong{external +method}.@refill + +Internal method operates in Emacs, so it can do carefully.@refill + +External method is called as asynchronous process, so Emacs does not +wait while method is running. So it is good for big data, such as +audio, image or video. + + +@menu +* decoding-condition:: Setting decoding condition for parts +* environment variables:: Environment variables +@end menu + +@node decoding-condition, environment variables, method, method +@section Setting decoding condition for parts + +When decoding operation is driven, tm-view calls a method matched for +the condition searched from the variable +@code{mime/content-decoding-condition}.@refill + +Variable @code{mime/content-decoding-condition} is defined as a list +with the following syntax:@refill + +@lisp + (condition_1 condition_2 ...) +@end lisp + +Each condition are association-list with the following syntax:@refill + +@lisp + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +@end lisp + +For example, if you want to call the external method named tm-plain to +decode every text/plain (@ref{(tm-en)text/plain}) type parts, you can +define the condition like:@refill + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +@end lisp + +This condition definition will match all parts whose content-type +(@ref{(tm-en)content-type}) are text/plain. Here is an another +example:@refill + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +@end lisp + +This will match the part whose type is text/plain and the mode is +play.@refill + +Here is an another example:@refill + +@lisp + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +@end lisp + +This will match all parts which have a mode of play.@refill + +The conditions defined in a variable +@code{mime/content-decoding-condition} are examined from top to +bottom. The first matching condition becomes valid and the method +specified in that condition definition will be executed. + + +@menu +* method value:: Format of method value +* Example of decoding-condition:: +@end menu + +@node method value, Example of decoding-condition, decoding-condition, decoding-condition +@subsection Format of method value + +You can specify the method field of the decoding-condition definition in +two different ways,@refill + +@lisp + (method . SYMBOL) +@end lisp + +@noindent +or + +@lisp + (method STRING FLAG arg1 arg2 ...) +@end lisp + +@noindent +can be accepted. + +When a symbol is specified in the method field, a function whose name is +SYMBOL will be called as an internal method.@refill + +When a list is specified in the method field, it will be called as an +external method.@refill + +The list below shows the meaning of the parameters when the external +method is specified in the method field.@refill + +@table @samp +@item STRING +name of an external method + +@item FLAG +If @code{t}, both the content-header and the content-body +are passed to an external method. + +If @code{nil}, only the content-body is passed to an external +method.@refill + +@item ARGUMENTs +list of arguments passed to an external method + +@end table + +An argument passed to an external method can be in one of the following +formats:@refill + +@table @samp +@item STRING +string itself + +@item 'SYMBOL +value gotten using SYMBOL as a key from decoding-condition + +@item 'STRING +value gotten using STRING as a key from decoding-condition + +@end table + +@code{'SYMBOL} can be one of the following:@refill + +@table @samp +@item 'file +name of a file holding the original content + +@item 'type +content-type/sub-type of Content-Type field + +@item 'encoding +field body of Content-Transfer-Encoding field + +@item 'mode +decoding-mode + +@item 'name +name of a file created by decode operation + +@end table + + +@code{'STRING} is used to search a parameter of the Content-Type +field whose name matches with it, and pass the value of that parameter +to the external method. + + +@node Example of decoding-condition, , method value, decoding-condition +@subsection Example of decoding-condition + +Following is an example of decoding-condition: + +@lisp +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +@end lisp + + +For example, if you want to use metamail to decode any contents, + +@lisp +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +@end lisp + +@noindent +will work. + +Variable @code{mime/content-decoding-condition} provides you of very +flexible way to define the conditions of decoding. It can be simple if +you only need the a few decoding methods, while it can be very +complicated if you want to use the separate decoding method for each +type/mode combination.@refill + +Following function may be useful to set decoding-condition. It is a +function of @file{tl-atype.el}. + + +@defun set-atype symbol alist + +Add condition @var{alist} to @var{symbol}. + +@noindent +@strong{[Example]} +@quotation + +@lisp +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +@end lisp +@end quotation +@end defun + + + +@node environment variables, , decoding-condition, method +@section Environment variables + +Standard methods of tm-view reference some environment variables. You +can specify them to customize. + +@table @var +@item TM_TMP_DIR +Directory for temporary files or extracted files. If it is omitted, +@file{/tmp/} is used. + +@item VIDEO_DITHER +Dither for mpeg_play. If it is omitted, `gray' is used. + +@item TM_WWW_BROWSER +WWW browser name. If it is omitted, `netscape' is used. + +@end table + + + +@node Two buffers for an article, API, method, Top +@chapter raw-article-buffer and preview-buffer + +tm-view managements two buffers, one is for raw message called +@cindex{raw-article-buffer}@strong{raw-article-buffer}, another one is +to preview for user called +@cindex{preview-buffer}@strong{preview-buffer}. major-mode of +raw-article-buffer is same as major-mode for article of original MUA, +major-mode of preview-buffer is @code{mime/viewer-mode} +(@ref{mime/viewer-mode}).@refill + +When called @code{mime/viewer-mode}, tm-view analyzes +raw-article-buffer, and sets its result to the variable +@code{mime::article/content-info}.@refill + +After that, tm-view create a preview-buffer corresponded to the +raw-article-buffer. As this time, tm-view modifies header and body of +each parts of the message by specified conditions. Filter program for +header is called @cindex{header-filter}@strong{header-filter} +(@ref{content-header}), filter program for body is called +@cindex{content-filter}@strong{content-filter} (@ref{content-body}), and +they are called @cindex{filter}@strong{filter}.@refill + +When preview-buffer is made, buffer local variable of preview-buffer +@code{mime::preview/content-list} is made to register structure of +preview-buffer. tm-view manages message by +@code{mime::article/content-info} in raw-article-buffer and +@code{mime::preview/content-list} in preview-buffer.@refill + +@noindent +@strong{[Notice]} +@quotation +In this document, I call ``content-type'' as content-type/subtype of +Content-Type field. +@end quotation + + + +@menu +* raw-article-buffer:: buffer local variables of raw-article-buffer +* preview-buffer:: Buffer local variables of preview-buffer +@end menu + +@node raw-article-buffer, preview-buffer, Two buffers for an article, Two buffers for an article +@section buffer local variables of raw-article-buffer + +@deffn{Structure} mime::content-info rcnum point-min point-max type parameters encoding children + +structure to represent MIME content in raw-article-buffer. It is called +by @cindex{content-info}@strong{content-info}.@refill + +Please use reference function @code{mime::content-info/SLOT-NAME} to +reference slot of content-info. Their argument is only +content-info.@refill + +Following is a list of slots of the structure: + +@table @var +@item rcnum +``reversed content-number'' (list) + +@item point-min +beginning point of region in raw-article-buffer + +@item point-max +end point of region in raw-article-buffer + +@item type +content-type/sub-type (string or nil) + +@item parameters +parameter of Content-Type field (association list) + +@item encoding +Content-Transfer-Encoding (string or nil) + +@item children +parts included in this part (list of content-infos) + +@end table + +If a part includes other parts in its contents, such as multipart or +message/rfc822, content-infos of other parts are included in +@var{children}, so content-info become a tree. +@end deffn + + +@defvar mime::article/content-info + +result of MIME parsing of raw-article-buffer (content-info) +@end defvar + + +@defvar mime::article/preview-buffer + +preview-buffer corresponded by this buffer +@end defvar + + +@defun mime-article/point-content-number point &optional cinfo + +In a region managed by content-info @var{cinfo}, it returns +content-number corresponded by @var{point}.@refill + +If @var{cinfo} is omitted, @code{mime::article/content-info} is used as +default value. +@end defun + + +@defun mime-article/rcnum-to-cinfo rcnum &optional cinfo + +In a region managed by content-info @var{cinfo}, it returns content-info +corresponded by reversed-content-number @var{rcnum}.@refill + +If @var{cinfo} is omitted, @code{mime::article/content-info} is used as +default value. +@end defun + + +@defun mime-article/cnum-to-cinfo rcnum &optional cinfo + +In a region managed by content-info @var{cinfo}, it returns content-info +corresponded by content-number @var{rcnum}.@refill + +If @var{cinfo} is omitted, @code{mime::article/content-info} is used as +default value. +@end defun + + +@defun mime/flatten-content-info &optional cinfo + +It returns flatten list of content-info from content-info @var{cinfo} +tree.@refill + +If @var{cinfo} is omitted, @code{mime::article/content-info} is used as +default value. +@end defun + + + +@node preview-buffer, , raw-article-buffer, Two buffers for an article +@section Buffer local variables of preview-buffer + +@defvar mime::preview/mother-buffer + +Mother buffer of this preview-buffer. +@end defvar + + +@deffn{Structure} mime::preview-content-info point-min point-max buffer content-info + +structure to represent MIME content in preview-buffer. It is called by +@cindex{preview-content-info}@strong{preview-content-info}.@refill + +Please use reference function +@code{mime::preview-content-info/SLOT-NAME} to reference slot of +preview-content-info. Their argument is only +preview-content-info.@refill + +Following is a list of slots of the structure: + +@table @var +@item point-min +beginning point of region in preview-buffer + +@item point-max +end point of region in preview-buffer + +@item buffer +raw-article-buffer corresponding a part + +@item content-info +content-info corresponding a part + +@end table +@end deffn + + + +@defvar mime::preview/content-list + +List of preview-content-info to represent structure of this +preview-buffer. +@end defvar + + + +@defvar mime::preview/article-buffer + +raw-article-buffer corresponded by this preview-buffer. +@end defvar + + + +@defvar mime::preview/original-major-mode + +major-mode of original buffer. +@end defvar + + + +@defvar mime::preview/original-window-configuration + +window-configuration just before made this preview-buffer. +@end defvar + + + +@defun mime-preview/point-pcinfo point &optional pcl + +In a region of preview-buffer managed by preview-content-info @var{pcl}, +it returns preview-content-info corresponded by @var{point}.@refill + +If @var{cinfo} is omitted, @code{mime::preview/content-list} is used. +@end defun + + + +@node API, Concept Index, Two buffers for an article, Top +@chapter Functions to decode MIME message + +tm-view provides some available functions to decode and navigate MIME +message to each MUA (@ref{(tm-en)MUA})s.@refill + +There are 2 kinds of functions, one is for MIME preview, another one is +to decode RFC 1522 encoded-word (@ref{(tm-en)encoded-word}). + + +@menu +* API about MIME preview:: Function to preview MIME message +* encoded-word decoding:: encoded-word decoder +@end menu + +@node API about MIME preview, encoded-word decoding, API, API +@section Function to preview MIME message + + +@deffn{Command} mime/viewer-mode &optional mother ctl encoding ibuf obuf mother-keymap + +Parse @var{ibuf} as a MIME message, and create preview-buffer into +@var{obuf} to display to user, then enter @code{mime/viewer-mode} +(@ref{mime/viewer-mode}).@refill + +If @var{ibuf} is omitted, current buffer is used.@refill + +@var{mother} is used to specify original raw-article-buffer. It may be +useful when a raw-article-buffer is assembled from message/partial +messages.@refill + +@var{ctl} is used to specify Content-Type field +(@ref{(tm-en)Content-Type field}) information. Its format is output +format of @code{mime/Content-Type}. When @var{ctl} is specified, +tm-view uses it instead of Content-Type field of the +raw-article-buffer.@refill + +@var{encoding} is used to specify field-body of +Content-Transfer-Encoding field. When is is specified, tm-view uses it +instead of Content-Type field of the raw-article-buffer.@refill + +If @var{mother-keymap} is specified, keymap of @code{mime/viewer-mode} +includes it. +@end deffn + + + +@node encoded-word decoding, , API about MIME preview, API +@section encoded-word decoder + +tm-view has functions to decode RFC 1522 encoded-word +(@ref{(tm-en)encoded-word}). + + +@deffn{Command} mime/decode-message-header + +It decodes encoded-words in message header of current buffer.@refill + +If an encoded-word is broken or invalid, or it has non supported MIME +charset (@ref{(tm-en)MIME charset}), it is not decoded. +@end deffn + + + +@deffn{Command} mime-eword/decode-region start end &optional unfolding must-unfold + +It decodes encoded-words in region @var{start} to @var{end}.@refill + +If an encoded-word is broken or invalid, or it has non supported MIME +charset (@ref{(tm-en)MIME charset}), it is not decoded.@refill + +If @var{unfolding} is non-nil, it unfolds folded fields.@refill + +If @var{must-fold} is non-nil and decoded result of an encoded-word has +folding or raw CR or LF, it unfolds or delete raw CR or LF. +@end deffn + + + +@defun mime-eword/decode-string string &optional must-unfold + +It decodes encoded-words in @var{string} and returns decoded +string.@refill + +If an encoded-word is broken or invalid, or it has non supported MIME +charset (@ref{(tm-en)MIME charset}), it is not decoded.@refill + +If @var{string} is folded, it unfolds @var{string} before +decoding.@refill + +If @var{must-fold} is non-nil and decoded result of an encoded-word has +folding or raw CR or LF, it unfolds or delete raw CR or LF. +@end defun + + + +@node Concept Index, Function Index, API, Top +@chapter Concept Index + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter Function Index + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter Variable Index + +@printindex vr +@bye
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-view-ja.sgml Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,963 @@ +<!doctype sinfo system> +<!-- $Id: tm-view-ja.sgml,v 1.1 1996/12/22 00:09:35 steve Exp $ --> +<head> +<title>tm-view 7.77 Reference Manual$B!JF|K\8lHG!K(B +<author>$B<i2,(B $BCNI'(B <mail>morioka@jaist.ac.jp</mail> +<date>1996/10/11 + +<toc> +</head> + +<body> + +<abstract> +<p> +This file documents tm-view, a MIME Viewer for GNU Emacs. +<p> +GNU Emacs $BMQ$N(B MIME Viewer $B$G$"$k(B `tm-view' $B$K$D$$$F@bL@$7$^$9!#(B +</abstract> + + +<h1> tm-view $B$C$F2?!)(B +<node> Introduction +<p> +tm-view $B$O(B GNU Emacs $B$GF0:n$9$kHFMQE*$J(B MIME viewer $B$G$9!#(B +<p> +tm-view $B$O(B <a node="mime/viewer-mode"><code>mime/viewer-mode</code> +</a> $B$H$$$&(B MIME message $B$r8+$k$?$a$N(B major-mode $B$r(B <a file="tm-ja" +node="MUA">MUA</a> $B$KBP$7$FDs6!$7$^$9!#(BMUA $B$N@_7W<T$O$3$N(B mode $B$rMxMQ(B +$B$9$k$3$H$G$=$N(B MUA $B$K(B MIME $B5!G=$rIU2C$9$k$3$H$,$G$-$^$9!#(B +<p> +tm-view $B$O(B MIME message $B$r1\Mw$9$k$?$a$N(B user interface $B$N3K$G$"$j!"$=(B +$B$N>e$G3F(B <dref file="tm-ja">content-type</dref> $B$r07$&$?$a$N(B <a +node="method"><concept>method</concept></a> $B$H8F$P$l$k%W%m%0%i%`$rF0:n(B +$B$5$;$^$9!#$^$?!"(BMIME message $B$NI=<($N;EJ}$r7h$a$k(B <a node="Two buffers +for an article"><concept>filter</concept></a> $B$H8F$P$l$k%W%m%0%i%`$r5/(B +$BF0;~$K8F$S=P$7$^$9!#(Bmethod $B$H(B filter $B$r(B tm-view $B$KAH$_9~$`;v$K$h$C$F!"(B +<code>mime/viewer-mode</code> $B$G$5$^$6$^$J(B MIME content-type $B$r07$&;v(B +$B$,$G$-$^$9!#(B + + +<h1> mime/viewer-mode $B$N2hLL9=@.(B +<node> MIME display +<p> +<a node="mime/viewer-mode">mime/viewer-mode</a> $B$G$O3F(B part $B$KBP$7$F(B +<p> +<verb> + [content-button] + (content-header) + + (content-body) + (content-separator) +</verb> +<p> +<noindent> +$B$H$$$&>pJs$rI=<($7$^$9!#$3$l$i$O>r7o$K=>$C$F(B design $B$rJQ99$7$?$j!"I=<((B +$B$rM^@)$9$k$3$H$,$G$-$^$9!#(B +<p> +$B0J2<$K!"I=<(Nc$r<($7$^$9!#(B + + +<verb> +From: morioka@jaist.ac.jp ($B<i2,(B $BCNI'(B / MORIOKA Tomohiko) +Subject: Re: $B<ALd!)(B +Newsgroups: zxr.message.mime +Date: 22 Oct 93 11:02:44 +Mime-Version: 1.0 +Organization: Japan Advanced Institute of Science and Technology, + Ishikawa, Japan + +[1 (text/plain)] + MIME-Edit mode $B$K$*$1$k!"(BMIME message $B$N:n$jJ}!#(B + + C-c C-x ? $B$r2!$9$H(B help $B$,=P$F$/$k!#(B + +C-c C-x C-t insert a text message. +C-c C-x TAB insert a (binary) file. +C-c C-x C-e insert a reference to external body. +C-c C-x C-v insert a voice message. +C-c C-x C-y insert a mail or news message. +C-c C-x RET insert a mail message. +C-c C-x C-s insert a signature file at end. +C-c C-x t insert a new MIME tag. +C-c C-x a enclose as multipart/alternative. +C-c C-x p enclose as multipart/parallel. +C-c C-x m enclose as multipart/mixed. +C-c C-x d enclose as multipart/digest. +C-c C-x s enclose as PGP signed. +C-c C-x e enclose as PGP encrypted. +C-c C-x C-k insert PGP public key. +C-c C-x C-p preview editing MIME message. +... + +$B$C$FLu$G!"(BC-c C-x C-i $B$r2!$7$F!"A^F~$7$?$$(B binary file $B$r;XDj$7$^$9!#(B + + binary file $B$N(B MIME encoding $B$K$O!"IaDL!"(BBase64 $B$r;XDj$7$^$9!#(B + +[2 (image/gif)] + +[3 (text/plain)] + + $B$3$s$JIw$K!"3(F~$j(B message $B$N$G$->e$,$j!#(B + +$B".".".".".".".".".".".(B $B%m%7%"%s!&%F%#!<$r0lGU!#(B $B".".".".".".".".".".".(B +$B".".".".".(B $B!y(B $B%8%c%`$G$O$J$/%^!<%^%l!<%I$G$b$J$/K*L*$G(B $B!y(B $B".".".".".(B +$B".".".".".(B $B'.'0'2$$'0','!(B $B'4'0'.'0'7'*','0(B $B".".".".".(B +$B".".".".".".".(B Internet E-mail: <morioka@jaist.ac.jp> $B".".".".".".".(B +</verb> + + +<h2> content-button +<node> content-button +<p> +<concept>content-button</concept> $B$O(B part $B$N@hF,$K$"$C$F!"$=$N(B part $B$K(B +$B4X$9$kBg$^$+$J>pJs$rI=<($9$kItJ,$G$9!#(B +<p> +$BI8=`$G$O(B + +<verb> + [1.3 test (text/plain)] +</verb> + +<noindent> +$B$N$h$&$J46$8$KI=<($5$l$^$9!#(B +<p> +$B:G=i$N?t;z$O(B message $BCf$N$3$N(B part $B$N0LCV$r@aHV9f$N$h$&$KI=$7$?$b$N$G!"(B +<concept>content-number</concept> $B$H8F$S$^$9!#(B +<p> +$B#2HVL\$NJ8;zNs$OI=Bj$rI=$7$^$9!#$3$N>pJs$O!"(B + +<ol> +<li><dref file="tm-ja">Content-Type field</dref> $B$N(B name paramater $B$b(B +$B$7$/$O(B x-name parameter $B$K=q$+$l$?(B file $BL>(B +</li> +<li><dref file="tm-ja">Content-Description field</dref> $B$b$7$/$O(B +Subject field $B$K=q$+$l$?I=Bj(B +</li> +<li> uuencode $B$N>l9g$N(B file $BL>(B +</ol> + +<noindent> +$B$+$i:n$j$^$9!#$I$l$bB8:_$7$J$$>l9g$O6uGr$,I=<($5$l$^$9!#(B +<p> +$B#3HVL\$N3g8L$NCf$N>pJs$O$=$N(B part $B$N(B content-type/subtype $B$rI=$7$^$9!#(B +$BHs(B MIME part $B$N>l9g!"(B<code>nil</code> $B$,I=<($5$l$^$9!#(B +<p> +$B$3$N(B content-button $B$O(B <a node="content-header">content-header</a>, <a +node="content-body">content-body</a> $B$rI=<($7$J$$>l9g!"(Bicon $B$N$h$&$JLr(B +$B3d$r2L$?$7$^$9!#Nc$($P!"(B + +<verb> + [2 (image/gif)] +</verb> + +<noindent> +$B$N>e$G(B <kbd>v</kbd> $B$r2!$;$P$3$3$KF~$C$F$$$k3($,I=<($5$l$^$9!#(B +<p> +$B$^$?!"(Bmouse $BA`:n$,2DG=$J>l9g!"(Bcontent-button $B$rBh#2%\%?%s!J(B3 button +mouse $B$N>l9g!"Cf1{$N%\%?%s!K$G2!$;$P!"F1MM$K$=$N3($,I=<($5$l$^$9!#(B +(<ref node="mime/viewer-mode">) +<p> +$B$H$3$m$G!"(Bcontent-button $B$rI=<($9$k$N$O]5F+$7$$>l9g$,$"$k$N$G!"(B +content-button $B$NI=<($r>r7o$K$h$C$FM^@)$9$k$3$H$,$G$-$^$9!#(B + + +<defvar name="mime-viewer/content-button-ignored-ctype-list"> +<p> +content-button $B$rI=<($7$J$$(B content-type $B$rMWAG$H$9$k(B list. +</defvar> + + +<h2> content-header +<node> content-header +<p> +<concept>content-header</concept> $B$O$"$k(B part $B$N(B header $B$rI=<($9$kItJ,(B +$B$G$9!#$7$+$7!"A4$F$N(B part $B$N(B content-header $B$rI=<($9$k$N$O]5F+$7$$$N$G!"(B +$B0J2<$N$h$&$J(B mechanism $B$K$h$C$FI=<($9$k$+$7$J$$$+$r7h$a$F$$$^$9!#(B +<p> +$B$"$k(B part $B$N(B reversed-content-number $B$r4X?t(B +<code>mime-viewer/header-visible-p</code> $B$KM?$($?;~$NJV$jCM$,(B +<code>t</code> $B$K$J$k>l9g!"$=$N(B part $B$N(B content-header $B$,I=<($5$l$^$9!#(B +<p> +$B$3$NH=Dj4X?t$O!"0lHV>e$N(B part $B$G$J$/!"$=$N(B part $B$N?F$N(B <dref +file="tm-ja">content-type</dref> $B$,JQ?t(B +<code>mime-viewer/childrens-header-showing-Content-Type-list</code> $B$G(B +$B;XDj$5$l$F$$$k>l9g$K(B <code>t</code> $B$rJV$7$^$9!#(B +<p> +$B$3$N>r7o$rJQ$($?$$>l9g$O!"$3$N4X?t$r:FDj5A$7$F2<$5$$!#C"$7!"I8=`$G$O!"(B +$BJQ?t(B +<code>mime-viewer/childrens-header-showing-Content-Type-list</code> $B$r(B +$B;2>H$7$^$9$,!":FDj5A$7$?>l9g!"$3$NJQ?t$NM-8z@-$OJ]>Z$5$l$J$$$N$GCm0U$7(B +$B$F2<$5$$!#(B +<p> +content-header $B$,I=<($5$l$k>l9g!"(Bcontent-header $B$O(B +<concept>content-header-filter</concept> $B$H8F$P$l$k(B program $B$K$h$C$F@0(B +$B7A$5$l$^$9!#(Bcontent-header-filter $B$O(B <a +node="raw-article-buffer">raw-article-buffer</a> $B$N(B major-mode $B$r(B key +$B$H$7$FJQ?t(B <code>mime-viewer/content-header-filter-alist</code> $B$+$iC5(B +$B$5$l$^$9!#$b$7!"(Bcontent-header-filter $B$,8+$D$+$i$J$+$C$?>l9g!"4X?t(B +<code>mime-viewer/default-content-header-filter</code> $B$,8F$P$l$^$9!#(B +<p> + +<defvar name="mime-viewer/childrens-header-showing-Content-Type-list"> +<p> +$B$"$k(B part $B$N;R$KEv$?$k(B content $B$N(B content-header $B$rI=<($9$Y$-(B +Content-Type $B$r<}$a$?(B list. $B4{DjCM$O(B <code>"message/rfc822"</code> $B$G(B +$B$"$k!#(B +<p> +$B$3$NJQ?t$O4X?t(B <code>mime-viewer/header-visible-p</code> $B$K$h$C$F;2>H(B +$B$5$l$k!#(B +</defvar> + + +<defun name="mime-viewer/header-visible-p"> +<args> rcnum cinfo <opts> ctype +<p> +content-info <var>cinfo</var> $BCf$N(B reversed-content-number $B$,(B +<var>rcnum</var> $B$G$"$k(B part $B$N(B header $B$,I=<($5$l$k>l9g!"(B +<code>t</code> $B$rJV$9!#$=$N(B part $B$N(B content-type $B$,$"$i$+$8$a$o$+$C$F(B +$B$$$k>l9g!"(B<var>ctype</var> $B$K0z?t$H$7$FEO$9$3$H$,$G$-$k!#(B +</defun> + + +<defvar name="mime-viewer/content-header-filter-alist"> +<p> +raw-article-buffer $B$N(B major-mode $B$r(B key $B$H$7$?O"A[%j%9%H$G!"CMIt$K$O(B +content-header-filter $B$,F~$C$F$$$k!#(B +</defvar> + + +<defun name="mime-viewer/default-content-header-filter"> +<p> +$B$"$k(B part $B$N(B content-header $B$rI=<($9$Y$-;~!"JQ?t(B +<code>mime-viewer/content-header-filter-alist</code> $B$NCf$K(B +content-header-filter $B$,8+$D$+$i$J$+$C$?>l9g$K8F$S=P$5$l$k!#(B +<p> +$BJQ?t(B <code>mime-viewer/ignored-field-regexp</code> $B$r;2>H$9$k!#(B +</defun> + + +<defvar name="mime-viewer/ignored-field-list"> +<p> +content-header $B$rI=<($9$k;~$K!"I=<($7$J$$(B field $B$r;XDj$9$k!#(B +<p> +$B@55,I=8=$N(B list $B$K$J$C$F$*$j!"$3$NCM$r85$KJQ?t(B +<code>mime-viewer/ignored-field-regexp</code> $B$,:n$i$l$k!#(B +<p> +$B$3$NJQ?t$OD>@\A`:n$;$:!"4X?t(B <code>tm:add-fields</code> $B$d(B +<code>tm:delete-fields</code> $B$r;H$C$FA`:n$9$k!#(B +</defvar> + + +<h2> content-body +<node> content-body +<p> +<concept>content-body</concept> $B$O(B part $B$NFbMF$rI=<($9$kItJ,$G$9!#(B +<p> +$BA4$F$N(B part $B$NFbMF$rI=<($G$-$k$H$O8B$i$J$$$7!"$^$?!"I=<($7$?$/$J$$(B +part $B$bB8:_$9$k$N$G!"0J2<$N$h$&$JJ}K!$GI=<($9$k$+$7$J$$$+$r7h$a$F$$$^(B +$B$9!#(B +<p> +$B$"$k(B part $B$N(B content-body $B$rI=<($9$k$+$I$&$+$O!"4X?t(B +<code>mime-viewer/body-visible-p</code> $B$,(B <code>t</code> $B$K$J$k$+$I$&(B +$B$+$G7h$^$j$^$9!#I8=`$G$O!"$"$k(B part $B$N(B content-type $B$,JQ?t(B +<code>mime-viewer/default-showing-Content-Type-list</code> $B$K@_Dj$5$l(B +$B$F$$$k;~$KI=<($5$l$^$9!#(B +<p> +$B$"$k(B part $B$N(B content-body $B$,I=<($5$l$k;~!"(Bpreview buffer $B$K$O(B part $B$N(B +$BFbMF$r(B <concept>content-filter</concept> $B$H8F$P$l$k(B program $B$K$h$C$F@0(B +$B7A$5$l$?$b$N$,I=<($5$l$^$9!#8F$P$l$k(B content-filter $B$O(B <a +node="raw-article-buffer">raw-article-buffer</a> $B$N(B major-mode $B$r(B key +$B$H$7$FJQ?t(B <code>mime-viewer/content-filter-alist</code> $B$+$iC5$5$l$^(B +$B$9!#$b$7!"$3$NJQ?t$KEPO?$5$l$F$$$J$+$C$?>l9g!"4X?t(B +<code>mime-viewer/default-content-filter</code> $B$,8F$P$l$^$9!#(B + + +<defvar name="mime-viewer/default-showing-Content-Type-list"> +<p> +content-body $B$rI=<($9$Y$-(B content-type $B$rMWAG$H$9$k(B list. +</defvar> + + +<defun name="mime-viewer/body-visible-p"> +<args> rcnum cinfo <opts> ctype +<p> +reversed-content-number $B$,(B <var>rcnum</var> $B$G$"$k(B part $B$,I=<($5$l$k>l(B +$B9g!"(B<code>t</code> $B$rJV$9!#$=$N(B part $B$N(B content-type $B$,$"$i$+$8$a$o$+$C(B +$B$F$$$k>l9g!"(B<var>ctype</var> $B$K0z?t$H$7$FEO$9$3$H$,$G$-$k!#(B +</defun> + + +<defvar name="mime-viewer/content-filter-alist"> +<p> +raw-article-buffer $B$N(B major-mode $B$r(B key $B$H$7$?O"A[%j%9%H$G!"CMIt$K$O(B +content-filter $B$,F~$C$F$$$k!#(B +</defvar> + + +<defun name="mime-viewer/default-content-filter"> +<args> rcnum cinfo ctype params subj +<p> +$B$"$k(B part $B$N(B content-body $B$rI=<($9$Y$-;~!"JQ?t(B +<code>mime-viewer/content-filter-alist</code> $B$NCf$K(B content-filter $B$,(B +$B8+$D$+$i$J$+$C$?>l9g$K8F$S=P$5$l$k!#(B +<p> +$BI8=`$G$O2?$b$7$J$$!#(B +</defun> + + + +<h2> content-separator +<node> content-separator +<p> +<concept>content-separator</concept> $B$O(B part $B$N0lHV:G8e$K(B part $B4V$N6-(B +$BL\$rL@$i$+$K$9$k$?$a$KI=<($5$l$^$9!#(B +<p> +content-separator $B$O4X?t(B +<code>mime-viewer/default-content-separator</code>$B$K$h$C$FI=<($5$l$^$9!#(B +$BI8=`$G$O!"(Bcontent-header $B$b(B content-body $B$bI=<($5$l$J$$>l9g$N$_!"2~9T(B +$B$rI=<($7$^$9!#(B +<p> +content-separator $B$N@_Dj$rJQ99$7$?$$>l9g$O!"$3$N4X?t$r:FDj5A$7$F2<$5$$!#(B +<p> + +<defun name="mime-viewer/default-content-separator"> +<args> rcnum cinfo ctype params subj +<p> +content-number $B$,(B <var>cnum</var> $B$G$"$k(B part $B$N(B content-separator $B$r(B +$BI=<($9$k!#I8=`$G$O!"(Bcontent-header $B$b(B content-body $B$bI=<($5$l$J$$>l9g(B +$B$N$_!"2~9T$rI=<($9$k!#(B +</defun> + + +<h1> mime/viewer-mode $B$G$NA`:n(B +<node> mime/viewer-mode +<p> +mime/viewer-mode $B$K$O0J2<$N5!G=$,$"$j$^$9!#(B +<p> +<kl> +<kt>u +<kd> +$B>e$N(B part $B$KLa$k!J(Bmessage $B$N0lHV>e$N(B part $B$G$3$l$r9T$J$&$H(B Summary +mode $B$KLa$k(B (*1)$B!K(B +</kd> +<kt>p<kd>$BA0$N(B part $B$K0\F0$9$k(B +</kd> +<kt>n<kd>$B<!$N(B part $B$K0\F0$9$k(B +</kd> +<kt>SPC<kd>scroll up $B$9$k(B +</kd> +<kt>M-SPC<kd>scroll down $B$9$k(B +</kd> +<kt>DEL<kd>scroll down $B$9$k(B +</kd> +<kt>RET<kd>$B<!$N9T$K0\F0$9$k(B +</kd> +<kt>M-RET<kd>$BA0$N9T$K0\F0$9$k(B +</kd> +<kt>M-RET<kd>$BA0$N9T$K0\F0$9$k(B +</kd> +<kt><<kd>message $B$N@hF,$K0\F0$9$k(B +</kd> +<kt>><kd>message $B$NKvHx$K0\F0$9$k(B +</kd> +<kt>v<kd>part $B$r:F@8$9$k(B (*2) +</kd> +<kt>e<kd>part $B$+$i(B file $B$r<h$j=P$9(B (*2) +</kd> +<kt>C-c C-p<kd>part $B$r0u:~$9$k(B (*2) +</kd> +<kt>f<kd>message $BCf$N(B X-Face $B$rI=<($9$k(B +</kd> +<kt>mouse-button-2 +<kd> +preview-buffer $BCf$N(B mouse button $B$r5/F0$9$k(B +<p> +content-button $B$r2!$;$P!"$=$N(B part $B$,:F@8$5$l$k(B(*2) +<p> +URL-button $B$r2!$;$P!"$=$N(B WWW browser $B$,5/F0$5$l$k(B +</kd> +</kl> +<p> +<memo title="$BCm0U(B"> +<p> +(*1) tm-MUA $B$G(B tm-view $B$N@_Dj$r$7$F$$$J$$>l9g!"(BSummary mode $B$K$OLa$j$^(B +$B$;$s!#(B +<p> +(*2) $B<B:]$NF0:n$OBP1~$9$k(B method $B$K0M$j$^$9!#(B +</memo> + + +<h1> $B:F@8=hM}$N<B8=(B +<node> method +<p> +<code>mime/viewer-mode</code> $B$G$O!"3F(B part $B$KBP$7$F!"(Bplay +(<kbd>v</kbd>), extract (<kbd>e</kbd>), print (<kbd>C-c C-p</kbd>) $B$H(B +$B$$$&A`:n$r9T$J$&$3$H$,$G$-$^$9!#$3$&$7$?A`:n$N$3$H$r!X!J(Bpart $B$KBP$9$k!K(B +decode $BA`:n!Y$H8F$V$3$H$K$7$^$9!#$^$?!"(Bplay, extract, print $B$H$$$&(B +decode $BA`:n$N<oN`$N$3$H$r(B <concept>decoding-mode</concept> $B$H8F$V$3$H(B +$B$K$7$^$9!#(B +<p> +decode $BA`:n$,9T$J$o$l$?;~!"$=$N(B part $B$N(B <dref +file="tm-ja">content-type</dref> $B$J$I$N>r7o$d$=$N>l$N4D6-$K1~$8$F<B:](B +$B$K$=$NA`:n$r<B9T$9$k<jB3$-$,8F$P$l$^$9!#$3$N<jB3$-$N$3$H$r(B +<concept>method</concept> $B$H8F$S$^$9!#(B +<p> +method $B$K$O!"(BEmacs Lisp $B$G=q$+$l$?(B <concept>$BFbIt(B method</concept> $B$H!"(B +$B30It(B program $B$G<B8=$5$l$?(B <concept>$B30It(B method</concept> $B$,$"$j$^$9!#(B +$BFbIt(B method $B$O(B Emacs $B$N5!G=$r;H$C$F$-$a:Y$+$$=hM}$r9T$J$&$3$H$,$G$-$^(B +$B$9!#30It(B method $B$OHsF14|%W%m%;%98F$S=P$7$r;H$C$F<B8=$5$l$F$$$k$N$G!"<B(B +$B9TCfBT$?$5$l$:$K$9$_$^$9!#$3$N$?$a!"@E;_2h$dF02h$J$I$N5pBg$J(B data $B$r:F(B +$B@8$9$k$N$KNI$$$G$7$g$&!#(B + + +<h2> part $B$N:F@8$K4X$9$k>r7o$N@_Dj(B +<node> decoding-condition +<p> +tm-view $B$O(B decode $BA`:n$,9T$J$o$l$k$H!"JQ?t(B +<code>mime/content-decoding-condition</code> $B$+$i$=$N;~$N>r7o$K9gCW$7(B +$B$?(B method $B$rA\$7=P$7$F!"$=$l$r8F$S=P$7$^$9!#(B +<p> +$BJQ?t(B <code>mime/content-decoding-condition</code> $B$O(B +<p> +<lisp> + ($B>r7o(B1 $B>r7o(B2 ...) +</lisp> +<p> +<noindent> +$B$H$$$&7A$r$7$?(B list $B$G!"3F>r7o$O(B +<p> +<lisp> + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +</lisp> +<p> +<noindent> +$B$H$$$&7A$NO"A[(B list $B$K$J$C$F$$$^$9!#(B +<p> +$BNc$($P!"(B<dref file="tm-ja">text/plain</dref> $B$N;~!"(Btm-plain $B$r5/F0$9$k(B +$B;~!"(B +<p> +<lisp> + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +</lisp> +<p> +<noindent> +$B$H$$$&>r7o$r=q$-$^$9!#$3$N(B method $B$N(B value $BIt$N=q<0$K$D$$$F$O8e$G>\$7(B +$B$/=R$Y$^$9!#(B +<p> +$B$3$N>r7o$O(B <dref file="tm-ja">content-type</dref> $B$,(B text/plain $B$G$"$k(B +part $B$J$iA4$F$N(B decoding-mode $B$GM-8z$G$9!#$7$+$7!"(B +<p> +<lisp> + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +</lisp> +<p> +<noindent> +$B$J$i!"(Bplay mode $B$N;~$7$+M-8z$K$J$j$^$;$s!#(B +<p> +$B5U$K!"(B +<p> +<lisp> + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +</lisp> +<p> +<noindent> +$B$J$i!"A4$F$N(B content-type $B$N(B play mode $B$GM-8z$K$J$j$^$9!#(B +<p> +$B$3$&$7$F3F>r7o$rA0$+$i8+$F9T$-!":G=i$KM-8z$K$J$C$?>r7o$,<B9T$5$l$^$9!#(B + + +<h3> method $B$NCMIt$N=q<0(B +<node> method value +<p> +decode-condition $B$N(B method field $B$O(B +<p> +<lisp> + (method . SYMBOL) +</lisp> +<p> +<noindent> +$B$+(B +<p> +<lisp> + (method $BJ8;zNs(B FLAG $B0z?t(B1 $B0z?t(B2 ...) +</lisp> +<p> +<noindent> +$B$H$$$&7A$r$7$F$$$^$9!#(B +<p> +$BA0<T$OFbIt(B method $B$r;XDj$9$k$?$a$N7A<0$G!"(Bdecode $BA`:n$,9T$J$o$l$?;~!"(B +SYMBOL $B$H$$$&4X?t$,4X?t8F$S=P$7$K$h$C$FFbIt(B method $B$H$7$F8F$S=P$5$l$^(B +$B$9!#(B +<p> +$B8e<T$O30It(B method $B$r;XDj$9$k$?$a$N7A<0$G!"(Bdecode $BA`:n$,9T$J$o$l$?;~!"(B +$BJ8;zNs$G;XDj$5$l$?30It(B program $B$,HsF14|%W%m%;%98F$S=P$7$K$h$C$F30It(B +method $B$H$7$F8F$S=P$5$l$^$9!#(B +<p> +$B30It(B method $B$r;XDj$9$k>l9g$N(B method field $B$N=q<0$O0J2<$NDL$j$G$9!#(B +<p> +<dl> +<dt>$BJ8;zNs(B +<dd>$B30It(B method $B$NL>A0(B +</dd> +<dt>FLAG +<dd><code>t</code> $B$J$i(B content-header $B$b30It(B method $B$KEO$9!#(B +<p> +<code>nil</code> $B$J$i(B content-body $B$N$_$rEO$9!#(B +</dd> +<dt>$B0z?tNs(B +<dd>$B30It(B method $B$N0z?t(B +</dd> +</dl> +<p> +$B$^$?!"30It(B method $B$N0z?t$O<!$N$h$&$J7A<0$G=q$-$^$9!#(B +<p> +<dl> +<dt>$BJ8;zNs(B +<dd>$B$=$NJ8;zNs$rEO$9(B +</dd> +<dt>'SYMBOL +<dd>SYMBOL $B$r(B key $B$H$7$?(B decoding-condition $B$NCM$rEO$9(B +</dd> +<dt>'$BJ8;zNs(B +<dd>$BJ8;zNs$r(B key $B$H$7$?(B decoding-condition $B$NCM$rEO$9(B +</dd> +</dl> +<p> +'SYMBOL $B$G;XDj$G$-$k$b$N$K$O!"(B +<p> +<dl> +<dt>'file +<dd>part $B$N>pJs$rEO$9$?$a$N(B file $BL>(B +</dd> +<dt>'type +<dd>Content-Type field $B$N(B content-type/subtype +</dd> +<dt>'encoding +<dd>Content-Transfer-Encoding field $B$N(B field body +</dd> +<dt>'mode +<dd>decoding-mode +</dd> +<dt>'name +<dd>file $B$KMn$9>l9g$N(B file $BL>(B +</dd> +</dl> + +<noindent> +$B$J$I$,$"$j!"(B<code>'$BJ8;zNs(B</code> $B$G$O(B Content-Type field $B$N(B parameter +$B$NCM$,;XDj$G$-$^$9!#(B + + +<h3> decoding-condition $B$NNc(B +<node> Example of decoding-condition +<p> +$B0J2<$K(B decoding-condition $B$N@_DjNc$r<($7$^$9!#(B + +<lisp> +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +</lisp> + +<p> +$BNc$($P!"!VA4It(B metamail $B;H$&$s$d!W$H$$$&>l9g!"(B + +<lisp> +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +</lisp> + +<noindent> +$B$H$9$l$P(B OK $B$G$9!#(B +<p> +$B9)IW$9$l$P!"$+$J$jJ#;($J>r7o$,=q$1$k$G$7$g$&!#(B +<p> +$B0J2<$K!"(Bdecoding-condition $B$r@_Dj$9$k$?$a$NM-MQ$J4X?t$r>R2p$7$^$9!#(B + + +<defun name="set-atype"> +<args> symbol alist +<p> +<var>symbol</var> $B$K>r7o(B <var>alist</var> $B$rDI2C$7$^$9!#(B + +<memo title="$BNc(B"> +<p> +<lisp> +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +</lisp> +</memo> +</defun> + + +<h2> $B4D6-JQ?t(B +<node> environment variables +<p> +$B0J2<$K(B tm-view $B$NI8=`(B method $B$,;2>H$9$k4D6-JQ?t$r<($7$^$9!#(B + +<vl> +<dt>TM_TMP_DIR +<dd> +$B0l;~E*$K:n@.$5$l$k(B file $B$d(B file $B=PNO$9$k>l9g$N(B default $B$N=PNO@h$H$7$F(B +$BMQ$$$i$l$k(B directory $B$r;XDj$9$k!#>JN,$5$l$?>l9g!"(B<file>/tmp/</file> $B$,(B +$BMQ$$$i$l$k!#(B +</dd> +<dt>VIDEO_DITHER +<dd> +mpeg_play $B$G$N(B dither $B$N$+$1J}$r;XDj$9$k!#4{DjCM$O(B `gray'. +</dd> +<dt>TM_WWW_BROWSER +<dd> +WWW browser $B$r;XDj$9$k!#4{DjCM$O(B `netscape'. +</vl> + + +<h1> raw-article-buffer $B$H(B preview-buffer +<node> Two buffers for an article +<p> +tm-view $B$O!"(BMIME $B=hM}$r9T$J$&A0$N@8$N(B message $B$,F~$C$F$$$k(B +<concept>raw-article-buffer</concept> $B$H$=$NFbMF$r(B user $B$K4J7i$KI=<($7!"(B +user $B$,A`:n$9$k$?$a$N(B <concept>preview-buffer</concept> $B$H$$$$D$N(B +buffer $B$r4IM}$7$^$9!#(Braw-article-buffer $B$N(B major-mode $B$O$b$H$b$H$N(B MUA +$B$N(B article $BI=<(MQ$N(B major-mode $B$G$"$j!"(Bpreview-buffer $B$N(B major-mode $B$O(B +<a node="mime/viewer-mode"><code>mime/viewer-mode</code></a> $B$H$J$j$^(B +$B$9!#(B +<p> +<code>mime/viewer-mode</code> $B$r<B9T$9$k$H!"(Btm-view $B$O$^$:(B +raw-article-buffer $B$NFbMF$r2r@O$7!"$=$N(B message $B$N9=B$$r(B +raw-article-buffer $B$N(B buffer local $BJQ?t(B +<code>mime::article/content-info</code> $B$K5-O?$7$^$9!#(B +<p> +$B<!$K!"$3$N7k2L$r85$K(B raw-article-buffer $B$KBP1~$9$k(B preview-buffer $B$r:n(B +$B$j$^$9!#$3$N:]!"(Bcontent-type $B$K1~$8$F!"(Bpart $BC10L$G(B header $B$d(B body $B$r2C(B +$B9)$9$k$3$H$,$G$-$^$9!#$3$N(B header $B$r2C9)$9$k%W%m%0%i%`$r(B <a +node="content-header"><concept>header-filter</concept></a>, body $B$r2C(B +$B9)$9$k%W%m%0%i%`$r(B <a +node="content-body"><concept>content-filter</concept></a> $B$H8F$S!"$3$l(B +$B$i$rAm>N$7$F(B <concept>filter</concept> $B$H8F$S$^$9!#(B +<p> +preview-buffer $B$r:n@.$9$k;~$K!"(Bmessage $B$NI=<(>e$N9=B$$r5-O?$7$?(B +preview-buffer $B$N(B buffer local $BJQ?t(B +<code>mime::preview/content-list</code> $B$,:n$i$l$^$9!#(Btm-view $B$O(B +raw-article-buffer $B>e$N(B <code>mime::article/content-info</code> $B$H(B +preview-buffer $B>e$N(B <code>mime::preview/content-list</code> $B$rMQ$$$F(B +message $B$r4IM}$7$^$9!#(B +<p> +<memo title="$BCm0U(B"> +$B$3$N@bL@=q$G$O!"(BContent-Type field $B$N(B content-type/subtype $B$N$3$H$r>N(B +$B$7$F(B ``content-type'' $B$H8F$S$^$9!#(B +</memo> + + +<h2> raw-article-buffer $B$N(B buffer local $BJQ?t(B +<node> raw-article-buffer +<p> +<define type="Structure" name="mime::content-info"> +<args> rcnum point-min point-max type parameters encoding children +<p> +raw-article-buffer $B$K$*$1$k(B MIME part $B$K4X$9$k>pJs$r3JG<$9$k$?$a$N9=B$(B +$BBN!#C1$K(B <concept>content-info</concept> $B$H$b8F$V!#(B +<p> +$B$3$N9=B$BN$r;2>H$9$k$K$O!"(B<code>mime::content-info/$B%9%m%C%HL>(B</code> +$B$H$$$&(B content-info $B$r0z?t$K$H$k4X?t$rMQ$$$k!#(B +<p> +$B$3$N9=B$BN$N%9%m%C%H$O0J2<$NDL$j$G$"$k!'(B + +<vl> +<dt>rcnum<dd>``reversed content-number'' (list) +</dd> +<dt>point-min<dd>raw-article-buffer $B$K$*$1$k@hF,(B point +</dd> +<dt>point-max<dd>raw-article-buffer $B$K$*$1$kKvHx(B point +</dd> +<dt>type<dd>content-type/sub-type$B!JJ8;zNs!"$^$?$O!"(Bnil$B!K(B +</dd> +<dt>parameters<dd>Content-Type field $B$N(B parameter $B!JO"A[(B list$B!K(B +</dd> +<dt>encoding<dd>Content-Transfer-Encoding$B!JJ8;zNs!"$^$?$O!"(Bnil$B!K(B +</dd> +<dt>children<dd>$B$3$N(B part $B$K4^$^$l$k(B part$B!J(Bcontent-info $B$N(B list$B!K(B +</dd> +</vl> +<p> +$B$"$k(B part $B$,(B multipart $B$b$7$/$O(B message/rfc822 $B$J$I$NJL$N(B part $B$r4^$`(B +$B$h$&$J(B part $B$G$"$C$?>l9g!"(B<var>children</var> $B$KJL$N(B part $B$N(B +content-info $B$,4^$^$l$k;v$K$h$C$F!"(Bcontent-info $B$OLZ9=B$$K$J$k!#(B +</define> + +<defvar name="mime::article/content-info"> +<p> +raw-article-buffer $B$r(B MIME message $B$H$7$F2r@O$7$?7k2L(B (content-info) +</defvar> + +<defvar name="mime::article/preview-buffer"> +<p> +raw-article-buffer $B$KBP1~$9$k(B preview-buffer. +</defvar> + +<defun name="mime-article/point-content-number"> +<args> point <opts> cinfo +<p> +content-info <var>cinfo</var> $B$G4IM}$5$l$kNN0h$K$*$$$F!"(B +<var>point</var> $B$KBP1~$9$k(B content-number $B$rJV$9!#(B +<p> +<var>cinfo</var> $B$,>JN,$5$l$?>l9g$O!"(B +<code>mime::article/content-info</code>$B$,MQ$$$i$l$k!#(B +</defun> + +<defun name="mime-article/rcnum-to-cinfo"> +<args> rcnum <opts> cinfo +<p> +content-info <var>cinfo</var> $B$G4IM}$5$l$kNN0h$K$*$$$F!"(B +reversed-content-number <var>rcnum</var> $B$KBP1~$9$k(B content-info $B$rJV(B +$B$9!#(B +<p> +<var>cinfo</var> $B$,>JN,$5$l$?>l9g$O!"(B +<code>mime::article/content-info</code> $B$,MQ$$$i$l$k!#(B +</defun> + +<defun name="mime-article/cnum-to-cinfo"> +<args> rcnum <opts> cinfo +<p> +content-info <var>cinfo</var> $B$G4IM}$5$l$kNN0h$K$*$$$F!"(Bcontent-number +<var>rcnum</var> $B$KBP1~$9$k(B content-info $B$rJV$9!#(B +<p> +<var>cinfo</var> $B$,>JN,$5$l$?>l9g$O!"(B +<code>mime::article/content-info</code> $B$,MQ$$$i$l$k!#(B +</defun> + +<defun name="mime/flatten-content-info"> +<args> <opts> cinfo +<p> +content-info <var>cinfo</var> $BCf$KG<$a$i$l$?A4(B part $B$N(B content-info $B$N(B +list $B$rJV$9!#(B +<p> +<var>cinfo</var> $B$,>JN,$5$l$?>l9g$O!"(B +<code>mime::article/content-info</code> $B$,MQ$$$i$l$k!#(B +</defun> + + +<h2> preview-buffer $B$N(B buffer local $BJQ?t(B +<node> preview-buffer +<p> +<defvar name="mime::preview/mother-buffer"> +<p> +$B$3$N(B preview-buffer $B$N?F$KAjEv$9$k(B buffer. +</defvar> + +<define type="Structure" name="mime::preview-content-info"> +<args> point-min point-max buffer content-info +<p> +preview-buffer $B$K$*$1$k(B MIME content $B$K4X$9$k>pJs$r3JG<$9$k$?$a$N9=B$(B +$BBN!#C1$K(B <concept>preview-content-info</concept> $B$H$b8F$V!#(B +<p> +$B$3$N9=B$BN$r;2>H$9$k$K$O!"(B<code>mime::content-info/$B%9%m%C%HL>(B</code> +$B$H$$$&(Bcontent-info $B$r0z?t$K$H$k4X?t$rMQ$$$k!#(B +<p> +$B$3$N9=B$BN$N%9%m%C%H$O0J2<$NDL$j$G$"$k!#(B + +<vl> +<dt>point-min<dd>preview-buffer $B$K$*$1$k@hF,(B point +</dd> +<dt> point-max<dd>preview-buffer $B$K$*$1$kKvHx(B point +</dd> +<dt>buffer<dd>$B$3$N(B part $B$KBP1~$9$k(B raw-article-buffer +</dd> +<dt>content-info<dd>$B$3$N(B part $B$KBP1~$9$k(B content-info +</dd> +</vl> +</define> + +<defvar name="mime::preview/content-list"> +<p> +$B$3$N(B preview-buffer $B$N9=B$$r$"$i$o$9(B preview-content-info $B$N(B list. +</defvar> +<p> +<defvar name="mime::preview/article-buffer"> +<p> +$B$3$N(B preview-buffer $B$KBP1~$9$k(B raw-article-buffer. +</defvar> + +<defvar name="mime::preview/original-major-mode"> +<p> +$B$3$N(B preview-buffer $B$N$b$H$K$J$C$?(B buffer $B$N(B major-mode. +</defvar> + +<defvar name="mime::preview/original-window-configuration"> +<p> +<code>mime/viewer-mode</code> $B$r<B9T$7$F!"$3$N(B preview-buffer $B:n$kD>A0(B +$B$N(B window-configuration. +</defvar> + +<defun name="mime-preview/point-pcinfo"> +<args> point <opts> pcl +<p> +preview-content-info <var>pcl</var> $B$G4IM}$5$l$k(B preview-buffer $BCf$NNN(B +$B0h$K$*$$$F!"(B<var>point</var> $B$KBP1~$9$k(B part $B$N(B preview-content-info +$B$rJV$9!#(B +<p> +<var>cinfo</var> $B$,>JN,$5$l$?>l9g$O!"(B +<code>mime::preview/content-list</code> $B$,MQ$$$i$l$k!#(B +</defun> + + +<h1> MIME message $B$N(B decode $B$K4X$9$k4X?t(B +<node> API +<p> +tm-view $B$NDs6!$9$k4X?t$r3F(B <a file="tm-ja" node="MUA">MUA</a> $B$KAH$_9~(B +$B$`;v$K$h$C$F!"3F(B MUA $B$K(B MIME $B:F@85!G=$rIU2C$9$k;v$,$G$-$^$9!#(B +<p> +tm-view $B$,3F(B MUA $B$KDs6!$9$k4X?t$O!"(BMIME preview $B$r9T$&$?$a$N4X?t(B +<code>mime/viewer-mode</code> $B$H(B <dref +file="tm-ja">encoded-word</dref> $B$r(B decode $B$9$k$?$a$N4X?t72$G$9!#(B + + +<h2> MIME preview $B$K4X$9$k4X?t(B +<node> API about MIME preview +<p> + +<define type="Command" name="mime/viewer-mode"> +<opts> mother ctl encoding ibuf obuf mother-keymap +<p> +<var>ibuf</var> $B$r(B MIME message $B$H$7$F2r@O$7$F!"$=$NFbMF$r1\Mw$9$k$?$a(B +$B$N(B preview-buffer $B$r(B <var>obuf</var> $B$K:n@.$7!"(B +<a node="mime/viewer-mode"> +<code>mime/viewer-mode</code> +</a> +$B$KF~$j$^$9!#(B +<p> +<var>ibuf</var> $B$,>JN,$5$l$?>l9g!"(Bcurrent buffer $B$rMQ$$$^$9!#(B +<p> +<var>mother</var> $B$O!"2r@O$NBP>]$H$9$k(B raw-article-buffer $B$,(B +message/partial $B7A<0$NJ,3d$5$l$?(B message $B$r7k9g$7$F:n@.$7$?>l9g$J$I$K(B +$B$*$1$k85$N(B buffer $B$r;XDj$9$k$?$a$K;H$$$^$9!#(B +<p> +<var>ctl</var> $B$O(B <dref file="tm-ja">Content-Type field</dref> $B$N(B +field-body $B$r(B <code>mime/Content-Type</code> $B$N=PNO@5<0$K$7$?$b$N$rF~(B +$B$l$^$9!#$3$N0z?t$,$"$k>l9g!"(Braw-article-buffer $B$N(B Content-Type field +$B$h$j$b$3$N0z?t$rM%@h$7$^$9!#(B +<p> +<var>encoding</var> $B$O(B Content-Transfer-Encoding field $B$N(B field-body +$B$rF~$l$^$9!#$3$N0z?t$,$"$k>l9g!"(Braw-article-buffer $B$N(B +Content-Transfer-Encoding field $B$h$j$b$3$N0z?t$rM%@h$7$^$9!#(B +<p> +<var>mother-keymap</var> $B$,;XDj$5$l$?>l9g!"(B +<code>mime/viewer-mode</code> $B$N(B keymap $B$O$3$N(B keymap $B$K2C$($?$b$N$H$J(B +$B$j$^$9!#(B +</define> + + +<h2> encoded-word $B$NI|85(B +<node> encoded-word decoding +<p> +tm-view $B$O(B RFC 1522 $B$G5,Dj$5$l$?(B <dref +file="tm-ja">encoded-word</dref> $B$r(B decode $B$9$k$?$a$N4X?t$r;}$C$F$$$^(B +$B$9!#(B +<p> +<memo> +$B5l(B <file>tiny-mime.el</file> $B$K$"$C$?(B RFC 1522 encoded-word $B$r(B decode +$B$9$k$?$a$N4X?t72$O(B tm-view $B$K0z$-7Q$,$l$^$7$?!#(B +</memo> + + +<define type="Command" name="mime/decode-message-header"> +<p> +current buffer $B$N(B message header $BCf$N(B encoded-word $B$r(B decode $B$7$^$9!#(B +<p> +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B <a file="tm-ja" node="MIME +charset">MIME charset</a> $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^;D$5$l$^$9!#(B +</define> + + +<define type="Command" name="mime-eword/decode-region"> +<args> start end <opts> unfolding must-unfold +<p> +<var>start</var> $B$H(B <var>end</var> $B$G0O$^$l$?NN0hCf$N(B encoded-word $B$r(B +decode $B$7$^$9!#(B +<p> +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B <a file="tm-ja" node="MIME +charset">MIME charset</a> $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^;D$5$l$^$9!#(B +<p> +<var>unfolding</var> $B$,(B non-nil $B$N>l9g!"@^$jJV$5$l$?(B field $B$r(B +unfolding $B$7$^$9!#(B +<p> +<var>must-fold</var> $B$,(B non-nil $B$N>l9g!"(Bencoded-word $B$N(B decode $B7k2L$K(B +$B@^$jJV$7!"$b$7$/$O!"2~9T$,4^$^$l$F$$$k>l9g!"(Bunfold $B$7!"2~9T$r=|$-$^$9!#(B +</define> + + +<defun name="mime-eword/decode-string"> +<args> string <opts> must-unfold +<p> +<var>string</var> $BCf$N(B encoded-word $B$r(B decode $B$7$?J8;zNs$rJV$7$^$9!#(B +<p> +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B <a file="tm-ja" node="MIME +charset">MIME charset</a> $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^=PNO$5$l$^$9!#(B +<p> +<var>string</var> $B$,@^$jJV$5$l$F$$$k>l9g!"(Bencoded-word $B$r(B decode $B$9$k(B +$BA0$K(B <var>string</var> $B$O(B unfold $B$5$l$^$9!#(B +<p> +<var>must-fold</var> $B$,(B non-nil $B$N>l9g!"(Bencoded-word $B$N(B decode $B7k2L$K(B +$B@^$jJV$7!"$b$7$/$O!"2~9T$,4^$^$l$F$$$F$b!"$=$l$i$O(B unfold $B$5$lC1BN$N2~(B +$B9TJ8;z$b<h$j=|$+$l$^$9!#(B +</defun> + + +<h1> $B35G0:w0z(B +<node> Concept Index + +<cindex> + + +<h1> $B4X?t:w0z(B +<node> Function Index + +<findex> + + +<h1> $BJQ?t:w0z(B +<node> Variable Index + +<vindex> + +</body>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/tm/tm-view-ja.texi Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,1040 @@ +\input texinfo.tex +@setfilename tm-view-ja.info +@settitle{tm-view 7.77 Reference Manual$B!JF|K\8lHG!K(B} +@titlepage +@title tm-view 7.77 Reference Manual$B!JF|K\8lHG!K(B +@author $B<i2,(B $BCNI'(B <morioka@@jaist.ac.jp> +@subtitle 1996/10/11 +@end titlepage +@node Top, Introduction, (dir), (dir) +@top tm-view 7.77 Reference Manual$B!JF|K\8lHG!K(B + +@ifinfo + +This file documents tm-view, a MIME Viewer for GNU Emacs.@refill + +GNU Emacs $BMQ$N(B MIME Viewer $B$G$"$k(B `tm-view' $B$K$D$$$F@bL@$7$^$9!#(B +@end ifinfo + +@menu +* Introduction:: tm-view $B$C$F2?!)(B +* MIME display:: mime/viewer-mode $B$N2hLL9=@.(B +* mime/viewer-mode:: mime/viewer-mode $B$G$NA`:n(B +* method:: $B:F@8=hM}$N<B8=(B +* Two buffers for an article:: raw-article-buffer $B$H(B preview-buffer +* API:: MIME message $B$N(B decode $B$K4X$9$k4X?t(B +* Concept Index:: $B35G0:w0z(B +* Function Index:: $B4X?t:w0z(B +* Variable Index:: $BJQ?t:w0z(B +@end menu + +@node Introduction, MIME display, Top, Top +@chapter tm-view $B$C$F2?!)(B + +tm-view $B$O(B GNU Emacs $B$GF0:n$9$kHFMQE*$J(B MIME viewer $B$G$9!#(B@refill + +tm-view $B$O(B @code{mime/viewer-mode} (@ref{mime/viewer-mode}) $B$H$$$&(B MIME +message $B$r8+$k$?$a$N(B major-mode $B$r(B MUA (@ref{(tm-ja)MUA}) $B$KBP$7$FDs6!$7(B +$B$^$9!#(BMUA $B$N@_7W<T$O$3$N(B mode $B$rMxMQ$9$k$3$H$G$=$N(B MUA $B$K(B MIME $B5!G=$rIU(B +$B2C$9$k$3$H$,$G$-$^$9!#(B@refill + +tm-view $B$O(B MIME message $B$r1\Mw$9$k$?$a$N(B user interface $B$N3K$G$"$j!"$=$N(B +$B>e$G3F(B content-type (@ref{(tm-ja)content-type}) $B$r07$&$?$a$N(B +@cindex{method}@strong{method} (@ref{method}) $B$H8F$P$l$k%W%m%0%i%`$rF0:n(B +$B$5$;$^$9!#$^$?!"(BMIME message $B$NI=<($N;EJ}$r7h$a$k(B +@cindex{filter}@strong{filter} (@ref{Two buffers for an article}) $B$H8F$P(B +$B$l$k%W%m%0%i%`$r5/F0;~$K8F$S=P$7$^$9!#(Bmethod $B$H(B filter $B$r(B tm-view $B$KAH$_(B +$B9~$`;v$K$h$C$F!"(B@code{mime/viewer-mode} $B$G$5$^$6$^$J(B MIME content-type +$B$r07$&;v$,$G$-$^$9!#(B + + +@node MIME display, mime/viewer-mode, Introduction, Top +@chapter mime/viewer-mode $B$N2hLL9=@.(B + +mime/viewer-mode (@ref{mime/viewer-mode}) $B$G$O3F(B part $B$KBP$7$F(B@refill + +@example + [content-button] + (content-header) + + (content-body) + (content-separator) +@end example + +@noindent +$B$H$$$&>pJs$rI=<($7$^$9!#$3$l$i$O>r7o$K=>$C$F(B design $B$rJQ99$7$?$j!"I=<((B +$B$rM^@)$9$k$3$H$,$G$-$^$9!#(B + +$B0J2<$K!"I=<(Nc$r<($7$^$9!#(B + + +@example +From: morioka@@jaist.ac.jp ($B<i2,(B $BCNI'(B / MORIOKA Tomohiko) +Subject: Re: $B<ALd!)(B +Newsgroups: zxr.message.mime +Date: 22 Oct 93 11:02:44 +Mime-Version: 1.0 +Organization: Japan Advanced Institute of Science and Technology, + Ishikawa, Japan + +[1 (text/plain)] + MIME-Edit mode $B$K$*$1$k!"(BMIME message $B$N:n$jJ}!#(B + + C-c C-x ? $B$r2!$9$H(B help $B$,=P$F$/$k!#(B + +C-c C-x C-t insert a text message. +C-c C-x TAB insert a (binary) file. +C-c C-x C-e insert a reference to external body. +C-c C-x C-v insert a voice message. +C-c C-x C-y insert a mail or news message. +C-c C-x RET insert a mail message. +C-c C-x C-s insert a signature file at end. +C-c C-x t insert a new MIME tag. +C-c C-x a enclose as multipart/alternative. +C-c C-x p enclose as multipart/parallel. +C-c C-x m enclose as multipart/mixed. +C-c C-x d enclose as multipart/digest. +C-c C-x s enclose as PGP signed. +C-c C-x e enclose as PGP encrypted. +C-c C-x C-k insert PGP public key. +C-c C-x C-p preview editing MIME message. +... + +$B$C$FLu$G!"(BC-c C-x C-i $B$r2!$7$F!"A^F~$7$?$$(B binary file $B$r;XDj$7$^$9!#(B + + binary file $B$N(B MIME encoding $B$K$O!"IaDL!"(BBase64 $B$r;XDj$7$^$9!#(B + +[2 (image/gif)] + +[3 (text/plain)] + + $B$3$s$JIw$K!"3(F~$j(B message $B$N$G$->e$,$j!#(B + +$B".".".".".".".".".".".(B $B%m%7%"%s!&%F%#!<$r0lGU!#(B $B".".".".".".".".".".".(B +$B".".".".".(B $B!y(B $B%8%c%`$G$O$J$/%^!<%^%l!<%I$G$b$J$/K*L*$G(B $B!y(B $B".".".".".(B +$B".".".".".(B $B'.'0'2$$'0','!(B $B'4'0'.'0'7'*','0(B $B".".".".".(B +$B".".".".".".".(B Internet E-mail: <morioka@@jaist.ac.jp> $B".".".".".".".(B +@end example + + + +@menu +* content-button:: +* content-header:: +* content-body:: +* content-separator:: +@end menu + +@node content-button, content-header, MIME display, MIME display +@section content-button + +@cindex{content-button}@strong{content-button} $B$O(B part $B$N@hF,$K$"$C$F!"(B +$B$=$N(B part $B$K4X$9$kBg$^$+$J>pJs$rI=<($9$kItJ,$G$9!#(B@refill + +$BI8=`$G$O(B + +@example + [1.3 test (text/plain)] +@end example + +@noindent +$B$N$h$&$J46$8$KI=<($5$l$^$9!#(B + +$B:G=i$N?t;z$O(B message $BCf$N$3$N(B part $B$N0LCV$r@aHV9f$N$h$&$KI=$7$?$b$N$G!"(B +@cindex{content-number}@strong{content-number} $B$H8F$S$^$9!#(B@refill + +$B#2HVL\$NJ8;zNs$OI=Bj$rI=$7$^$9!#$3$N>pJs$O!"(B + +@enumerate +@item +Content-Type field (@ref{(tm-ja)Content-Type field}) $B$N(B name paramater +$B$b$7$/$O(B x-name parameter $B$K=q$+$l$?(B file $BL>(B +@item +Content-Description field (@ref{(tm-ja)Content-Description field}) $B$b$7(B +$B$/$O(B Subject field $B$K=q$+$l$?I=Bj(B +@item + uuencode $B$N>l9g$N(B file $BL>(B +@end enumerate + +@noindent +$B$+$i:n$j$^$9!#$I$l$bB8:_$7$J$$>l9g$O6uGr$,I=<($5$l$^$9!#(B + +$B#3HVL\$N3g8L$NCf$N>pJs$O$=$N(B part $B$N(B content-type/subtype $B$rI=$7$^$9!#Hs(B +MIME part $B$N>l9g!"(B@code{nil} $B$,I=<($5$l$^$9!#(B@refill + +$B$3$N(B content-button $B$O(B content-header (@ref{content-header}), +content-body (@ref{content-body}) $B$rI=<($7$J$$>l9g!"(Bicon $B$N$h$&$JLr3d$r(B +$B2L$?$7$^$9!#Nc$($P!"(B + +@example + [2 (image/gif)] +@end example + +@noindent +$B$N>e$G(B @kbd{v} $B$r2!$;$P$3$3$KF~$C$F$$$k3($,I=<($5$l$^$9!#(B + +$B$^$?!"(Bmouse $BA`:n$,2DG=$J>l9g!"(Bcontent-button $B$rBh#2%\%?%s!J(B3 button +mouse $B$N>l9g!"Cf1{$N%\%?%s!K$G2!$;$P!"F1MM$K$=$N3($,I=<($5$l$^$9!#(B +(@ref{mime/viewer-mode})@refill + +$B$H$3$m$G!"(Bcontent-button $B$rI=<($9$k$N$O]5F+$7$$>l9g$,$"$k$N$G!"(B +content-button $B$NI=<($r>r7o$K$h$C$FM^@)$9$k$3$H$,$G$-$^$9!#(B + + +@defvar mime-viewer/content-button-ignored-ctype-list + +content-button $B$rI=<($7$J$$(B content-type $B$rMWAG$H$9$k(B list. +@end defvar + + + +@node content-header, content-body, content-button, MIME display +@section content-header + +@cindex{content-header}@strong{content-header} $B$O$"$k(B part $B$N(B header $B$r(B +$BI=<($9$kItJ,$G$9!#$7$+$7!"A4$F$N(B part $B$N(B content-header $B$rI=<($9$k$N$O]5(B +$BF+$7$$$N$G!"0J2<$N$h$&$J(B mechanism $B$K$h$C$FI=<($9$k$+$7$J$$$+$r7h$a$F$$(B +$B$^$9!#(B@refill + +$B$"$k(B part $B$N(B reversed-content-number $B$r4X?t(B +@code{mime-viewer/header-visible-p} $B$KM?$($?;~$NJV$jCM$,(B @code{t} $B$K$J$k(B +$B>l9g!"$=$N(B part $B$N(B content-header $B$,I=<($5$l$^$9!#(B@refill + +$B$3$NH=Dj4X?t$O!"0lHV>e$N(B part $B$G$J$/!"$=$N(B part $B$N?F$N(B content-type +(@ref{(tm-ja)content-type}) $B$,JQ?t(B +@code{mime-viewer/childrens-header-showing-Content-Type-list} $B$G;XDj$5$l(B +$B$F$$$k>l9g$K(B @code{t} $B$rJV$7$^$9!#(B@refill + +$B$3$N>r7o$rJQ$($?$$>l9g$O!"$3$N4X?t$r:FDj5A$7$F2<$5$$!#C"$7!"I8=`$G$O!"JQ(B +$B?t(B @code{mime-viewer/childrens-header-showing-Content-Type-list} $B$r;2>H(B +$B$7$^$9$,!":FDj5A$7$?>l9g!"$3$NJQ?t$NM-8z@-$OJ]>Z$5$l$J$$$N$GCm0U$7$F2<$5(B +$B$$!#(B@refill + +content-header $B$,I=<($5$l$k>l9g!"(Bcontent-header $B$O(B +@cindex{content-header-filter}@strong{content-header-filter} $B$H8F$P$l$k(B +program $B$K$h$C$F@07A$5$l$^$9!#(Bcontent-header-filter $B$O(B +raw-article-buffer (@ref{raw-article-buffer}) $B$N(B major-mode $B$r(B key $B$H$7(B +$B$FJQ?t(B @code{mime-viewer/content-header-filter-alist} $B$+$iC5$5$l$^$9!#$b(B +$B$7!"(Bcontent-header-filter $B$,8+$D$+$i$J$+$C$?>l9g!"4X?t(B +@code{mime-viewer/default-content-header-filter} $B$,8F$P$l$^$9!#(B@refill + + +@defvar mime-viewer/childrens-header-showing-Content-Type-list + +$B$"$k(B part $B$N;R$KEv$?$k(B content $B$N(B content-header $B$rI=<($9$Y$-(B +Content-Type $B$r<}$a$?(B list. $B4{DjCM$O(B @code{"message/rfc822"} $B$G$"$k!#(B +@refill + +$B$3$NJQ?t$O4X?t(B @code{mime-viewer/header-visible-p} $B$K$h$C$F;2>H$5$l$k!#(B +@end defvar + + + +@defun mime-viewer/header-visible-p rcnum cinfo &optional ctype + +content-info @var{cinfo} $BCf$N(B reversed-content-number $B$,(B @var{rcnum} $B$G(B +$B$"$k(B part $B$N(B header $B$,I=<($5$l$k>l9g!"(B@code{t} $B$rJV$9!#$=$N(B part $B$N(B +content-type $B$,$"$i$+$8$a$o$+$C$F$$$k>l9g!"(B@var{ctype} $B$K0z?t$H$7$FEO$9(B +$B$3$H$,$G$-$k!#(B +@end defun + + + +@defvar mime-viewer/content-header-filter-alist + +raw-article-buffer $B$N(B major-mode $B$r(B key $B$H$7$?O"A[%j%9%H$G!"CMIt$K$O(B +content-header-filter $B$,F~$C$F$$$k!#(B +@end defvar + + + +@defun mime-viewer/default-content-header-filter + +$B$"$k(B part $B$N(B content-header $B$rI=<($9$Y$-;~!"JQ?t(B +@code{mime-viewer/content-header-filter-alist} $B$NCf$K(B +content-header-filter $B$,8+$D$+$i$J$+$C$?>l9g$K8F$S=P$5$l$k!#(B@refill + +$BJQ?t(B @code{mime-viewer/ignored-field-regexp} $B$r;2>H$9$k!#(B +@end defun + + + +@defvar mime-viewer/ignored-field-list + +content-header $B$rI=<($9$k;~$K!"I=<($7$J$$(B field $B$r;XDj$9$k!#(B@refill + +$B@55,I=8=$N(B list $B$K$J$C$F$*$j!"$3$NCM$r85$KJQ?t(B +@code{mime-viewer/ignored-field-regexp} $B$,:n$i$l$k!#(B@refill + +$B$3$NJQ?t$OD>@\A`:n$;$:!"4X?t(B @code{tm:add-fields} $B$d(B +@code{tm:delete-fields} $B$r;H$C$FA`:n$9$k!#(B +@end defvar + + + +@node content-body, content-separator, content-header, MIME display +@section content-body + +@cindex{content-body}@strong{content-body} $B$O(B part $B$NFbMF$rI=<($9$kItJ,(B +$B$G$9!#(B@refill + +$BA4$F$N(B part $B$NFbMF$rI=<($G$-$k$H$O8B$i$J$$$7!"$^$?!"I=<($7$?$/$J$$(B part +$B$bB8:_$9$k$N$G!"0J2<$N$h$&$JJ}K!$GI=<($9$k$+$7$J$$$+$r7h$a$F$$$^$9!#(B +@refill + +$B$"$k(B part $B$N(B content-body $B$rI=<($9$k$+$I$&$+$O!"4X?t(B +@code{mime-viewer/body-visible-p} $B$,(B @code{t} $B$K$J$k$+$I$&$+$G7h$^$j$^$9!#(B +$BI8=`$G$O!"$"$k(B part $B$N(B content-type $B$,JQ?t(B +@code{mime-viewer/default-showing-Content-Type-list} $B$K@_Dj$5$l$F$$$k;~(B +$B$KI=<($5$l$^$9!#(B@refill + +$B$"$k(B part $B$N(B content-body $B$,I=<($5$l$k;~!"(Bpreview buffer $B$K$O(B part $B$NFb(B +$BMF$r(B @cindex{content-filter}@strong{content-filter} $B$H8F$P$l$k(B program +$B$K$h$C$F@07A$5$l$?$b$N$,I=<($5$l$^$9!#8F$P$l$k(B content-filter $B$O(B +raw-article-buffer (@ref{raw-article-buffer}) $B$N(B major-mode $B$r(B key $B$H$7(B +$B$FJQ?t(B @code{mime-viewer/content-filter-alist} $B$+$iC5$5$l$^$9!#$b$7!"$3(B +$B$NJQ?t$KEPO?$5$l$F$$$J$+$C$?>l9g!"4X?t(B +@code{mime-viewer/default-content-filter} $B$,8F$P$l$^$9!#(B + + +@defvar mime-viewer/default-showing-Content-Type-list + +content-body $B$rI=<($9$Y$-(B content-type $B$rMWAG$H$9$k(B list. +@end defvar + + + +@defun mime-viewer/body-visible-p rcnum cinfo &optional ctype + +reversed-content-number $B$,(B @var{rcnum} $B$G$"$k(B part $B$,I=<($5$l$k>l9g!"(B +@code{t} $B$rJV$9!#$=$N(B part $B$N(B content-type $B$,$"$i$+$8$a$o$+$C$F$$$k>l9g!"(B +@var{ctype} $B$K0z?t$H$7$FEO$9$3$H$,$G$-$k!#(B +@end defun + + + +@defvar mime-viewer/content-filter-alist + +raw-article-buffer $B$N(B major-mode $B$r(B key $B$H$7$?O"A[%j%9%H$G!"CMIt$K$O(B +content-filter $B$,F~$C$F$$$k!#(B +@end defvar + + + +@defun mime-viewer/default-content-filter rcnum cinfo ctype params subj + +$B$"$k(B part $B$N(B content-body $B$rI=<($9$Y$-;~!"JQ?t(B +@code{mime-viewer/content-filter-alist} $B$NCf$K(B content-filter $B$,8+$D$+$i(B +$B$J$+$C$?>l9g$K8F$S=P$5$l$k!#(B@refill + +$BI8=`$G$O2?$b$7$J$$!#(B +@end defun + + + + +@node content-separator, , content-body, MIME display +@section content-separator + +@cindex{content-separator}@strong{content-separator} $B$O(B part $B$N0lHV:G8e(B +$B$K(B part $B4V$N6-L\$rL@$i$+$K$9$k$?$a$KI=<($5$l$^$9!#(B@refill + +content-separator $B$O4X?t(B @code{mime-viewer/default-content-separator}$B$K(B +$B$h$C$FI=<($5$l$^$9!#I8=`$G$O!"(Bcontent-header $B$b(B content-body $B$bI=<($5$l(B +$B$J$$>l9g$N$_!"2~9T$rI=<($7$^$9!#(B@refill + +content-separator $B$N@_Dj$rJQ99$7$?$$>l9g$O!"$3$N4X?t$r:FDj5A$7$F2<$5$$!#(B +@refill + + +@defun mime-viewer/default-content-separator rcnum cinfo ctype params subj + +content-number $B$,(B @var{cnum} $B$G$"$k(B part $B$N(B content-separator $B$rI=<($9$k!#(B +$BI8=`$G$O!"(Bcontent-header $B$b(B content-body $B$bI=<($5$l$J$$>l9g$N$_!"2~9T$r(B +$BI=<($9$k!#(B +@end defun + + + +@node mime/viewer-mode, method, MIME display, Top +@chapter mime/viewer-mode $B$G$NA`:n(B + +mime/viewer-mode $B$K$O0J2<$N5!G=$,$"$j$^$9!#(B@refill + +@table @kbd +@item @key{u} +$B>e$N(B part $B$KLa$k!J(Bmessage $B$N0lHV>e$N(B part $B$G$3$l$r9T$J$&$H(B Summary +mode $B$KLa$k(B (*1)$B!K(B + +@item @key{p} +$BA0$N(B part $B$K0\F0$9$k(B + +@item @key{n} +$B<!$N(B part $B$K0\F0$9$k(B + +@item @key{SPC} +scroll up $B$9$k(B + +@item @key{M-SPC} +scroll down $B$9$k(B + +@item @key{DEL} +scroll down $B$9$k(B + +@item @key{RET} +$B<!$N9T$K0\F0$9$k(B + +@item @key{M-RET} +$BA0$N9T$K0\F0$9$k(B + +@item @key{M-RET} +$BA0$N9T$K0\F0$9$k(B + +@item @key{<} +message $B$N@hF,$K0\F0$9$k(B + +@item @key{>} +message $B$NKvHx$K0\F0$9$k(B + +@item @key{v} +part $B$r:F@8$9$k(B (*2) + +@item @key{e} +part $B$+$i(B file $B$r<h$j=P$9(B (*2) + +@item @key{C-c C-p} +part $B$r0u:~$9$k(B (*2) + +@item @key{f} +message $BCf$N(B X-Face $B$rI=<($9$k(B + +@item @key{mouse-button-2} +preview-buffer $BCf$N(B mouse button $B$r5/F0$9$k(B + +content-button $B$r2!$;$P!"$=$N(B part $B$,:F@8$5$l$k(B(*2)@refill + +URL-button $B$r2!$;$P!"$=$N(B WWW browser $B$,5/F0$5$l$k(B@refill + +@end table + +@noindent +@strong{[$BCm0U(B]} +@quotation + +(*1) tm-MUA $B$G(B tm-view $B$N@_Dj$r$7$F$$$J$$>l9g!"(BSummary mode $B$K$OLa$j$^$;(B +$B$s!#(B@refill + +(*2) $B<B:]$NF0:n$OBP1~$9$k(B method $B$K0M$j$^$9!#(B +@end quotation + + + +@node method, Two buffers for an article, mime/viewer-mode, Top +@chapter $B:F@8=hM}$N<B8=(B + +@code{mime/viewer-mode} $B$G$O!"3F(B part $B$KBP$7$F!"(Bplay (@kbd{v}), extract +(@kbd{e}), print (@kbd{C-c C-p}) $B$H$$$&A`:n$r9T$J$&$3$H$,$G$-$^$9!#$3$&(B +$B$7$?A`:n$N$3$H$r!X!J(Bpart $B$KBP$9$k!K(Bdecode $BA`:n!Y$H8F$V$3$H$K$7$^$9!#$^$?!"(B +play, extract, print $B$H$$$&(B decode $BA`:n$N<oN`$N$3$H$r(B +@cindex{decoding-mode}@strong{decoding-mode} $B$H8F$V$3$H$K$7$^$9!#(B@refill + +decode $BA`:n$,9T$J$o$l$?;~!"$=$N(B part $B$N(B content-type +(@ref{(tm-ja)content-type}) $B$J$I$N>r7o$d$=$N>l$N4D6-$K1~$8$F<B:]$K$=$NA`(B +$B:n$r<B9T$9$k<jB3$-$,8F$P$l$^$9!#$3$N<jB3$-$N$3$H$r(B +@cindex{method}@strong{method} $B$H8F$S$^$9!#(B@refill + +method $B$K$O!"(BEmacs Lisp $B$G=q$+$l$?(B @cindex{$BFbIt(B method}@strong{$BFbIt(B method} $B$H!"(B +$B30It(B program $B$G<B8=$5$l$?(B @cindex{$B30It(B method}@strong{$B30It(B method} $B$,$"$j$^$9!#(B +$BFbIt(B method $B$O(B Emacs $B$N5!G=$r;H$C$F$-$a:Y$+$$=hM}$r9T$J$&$3$H$,$G$-$^(B +$B$9!#30It(B method $B$OHsF14|%W%m%;%98F$S=P$7$r;H$C$F<B8=$5$l$F$$$k$N$G!"<B(B +$B9TCfBT$?$5$l$:$K$9$_$^$9!#$3$N$?$a!"@E;_2h$dF02h$J$I$N5pBg$J(B data $B$r:F(B +$B@8$9$k$N$KNI$$$G$7$g$&!#(B + + +@menu +* decoding-condition:: part $B$N:F@8$K4X$9$k>r7o$N@_Dj(B +* environment variables:: $B4D6-JQ?t(B +@end menu + +@node decoding-condition, environment variables, method, method +@section part $B$N:F@8$K4X$9$k>r7o$N@_Dj(B + +tm-view $B$O(B decode $BA`:n$,9T$J$o$l$k$H!"JQ?t(B +@code{mime/content-decoding-condition} $B$+$i$=$N;~$N>r7o$K9gCW$7$?(B method +$B$rA\$7=P$7$F!"$=$l$r8F$S=P$7$^$9!#(B@refill + +$BJQ?t(B @code{mime/content-decoding-condition} $B$O(B@refill + +@lisp + ($B>r7o(B1 $B>r7o(B2 ...) +@end lisp + +@noindent +$B$H$$$&7A$r$7$?(B list $B$G!"3F>r7o$O(B + +@lisp + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +@end lisp + +@noindent +$B$H$$$&7A$NO"A[(B list $B$K$J$C$F$$$^$9!#(B + +$BNc$($P!"(Btext/plain (@ref{(tm-ja)text/plain}) $B$N;~!"(Btm-plain $B$r5/F0$9$k;~!"(B + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +@end lisp + +@noindent +$B$H$$$&>r7o$r=q$-$^$9!#$3$N(B method $B$N(B value $BIt$N=q<0$K$D$$$F$O8e$G>\$7(B +$B$/=R$Y$^$9!#(B + +$B$3$N>r7o$O(B content-type (@ref{(tm-ja)content-type}) $B$,(B text/plain $B$G$"$k(B +part $B$J$iA4$F$N(B decoding-mode $B$GM-8z$G$9!#$7$+$7!"(B@refill + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +@end lisp + +@noindent +$B$J$i!"(Bplay mode $B$N;~$7$+M-8z$K$J$j$^$;$s!#(B + +$B5U$K!"(B@refill + +@lisp + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +@end lisp + +@noindent +$B$J$i!"A4$F$N(B content-type $B$N(B play mode $B$GM-8z$K$J$j$^$9!#(B + +$B$3$&$7$F3F>r7o$rA0$+$i8+$F9T$-!":G=i$KM-8z$K$J$C$?>r7o$,<B9T$5$l$^$9!#(B + + +@menu +* method value:: method $B$NCMIt$N=q<0(B +* Example of decoding-condition:: decoding-condition $B$NNc(B +@end menu + +@node method value, Example of decoding-condition, decoding-condition, decoding-condition +@subsection method $B$NCMIt$N=q<0(B + +decode-condition $B$N(B method field $B$O(B@refill + +@lisp + (method . SYMBOL) +@end lisp + +@noindent +$B$+(B + +@lisp + (method $BJ8;zNs(B FLAG $B0z?t(B1 $B0z?t(B2 ...) +@end lisp + +@noindent +$B$H$$$&7A$r$7$F$$$^$9!#(B + +$BA0<T$OFbIt(B method $B$r;XDj$9$k$?$a$N7A<0$G!"(Bdecode $BA`:n$,9T$J$o$l$?;~!"(B +SYMBOL $B$H$$$&4X?t$,4X?t8F$S=P$7$K$h$C$FFbIt(B method $B$H$7$F8F$S=P$5$l$^$9!#(B +@refill + +$B8e<T$O30It(B method $B$r;XDj$9$k$?$a$N7A<0$G!"(Bdecode $BA`:n$,9T$J$o$l$?;~!"J8(B +$B;zNs$G;XDj$5$l$?30It(B program $B$,HsF14|%W%m%;%98F$S=P$7$K$h$C$F30It(B method +$B$H$7$F8F$S=P$5$l$^$9!#(B@refill + +$B30It(B method $B$r;XDj$9$k>l9g$N(B method field $B$N=q<0$O0J2<$NDL$j$G$9!#(B +@refill + +@table @samp +@item $BJ8;zNs(B +$B30It(B method $B$NL>A0(B + +@item FLAG +@code{t} $B$J$i(B content-header $B$b30It(B method $B$KEO$9!#(B + +@code{nil} $B$J$i(B content-body $B$N$_$rEO$9!#(B@refill + +@item $B0z?tNs(B +$B30It(B method $B$N0z?t(B + +@end table + +$B$^$?!"30It(B method $B$N0z?t$O<!$N$h$&$J7A<0$G=q$-$^$9!#(B@refill + +@table @samp +@item $BJ8;zNs(B +$B$=$NJ8;zNs$rEO$9(B + +@item 'SYMBOL +SYMBOL $B$r(B key $B$H$7$?(B decoding-condition $B$NCM$rEO$9(B + +@item '$BJ8;zNs(B +$BJ8;zNs$r(B key $B$H$7$?(B decoding-condition $B$NCM$rEO$9(B + +@end table + +'SYMBOL $B$G;XDj$G$-$k$b$N$K$O!"(B@refill + +@table @samp +@item 'file +part $B$N>pJs$rEO$9$?$a$N(B file $BL>(B + +@item 'type +Content-Type field $B$N(B content-type/subtype + +@item 'encoding +Content-Transfer-Encoding field $B$N(B field body + +@item 'mode +decoding-mode + +@item 'name +file $B$KMn$9>l9g$N(B file $BL>(B + +@end table + +@noindent +$B$J$I$,$"$j!"(B@code{'$BJ8;zNs(B} $B$G$O(B Content-Type field $B$N(B parameter +$B$NCM$,;XDj$G$-$^$9!#(B + + +@node Example of decoding-condition, , method value, decoding-condition +@subsection decoding-condition $B$NNc(B + +$B0J2<$K(B decoding-condition $B$N@_DjNc$r<($7$^$9!#(B + +@lisp +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +@end lisp + + +$BNc$($P!"!VA4It(B metamail $B;H$&$s$d!W$H$$$&>l9g!"(B + +@lisp +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +@end lisp + +@noindent +$B$H$9$l$P(B OK $B$G$9!#(B + +$B9)IW$9$l$P!"$+$J$jJ#;($J>r7o$,=q$1$k$G$7$g$&!#(B@refill + +$B0J2<$K!"(Bdecoding-condition $B$r@_Dj$9$k$?$a$NM-MQ$J4X?t$r>R2p$7$^$9!#(B + + +@defun set-atype symbol alist + +@var{symbol} $B$K>r7o(B @var{alist} $B$rDI2C$7$^$9!#(B + +@noindent +@strong{[$BNc(B]} +@quotation + +@lisp +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +@end lisp +@end quotation +@end defun + + + +@node environment variables, , decoding-condition, method +@section $B4D6-JQ?t(B + +$B0J2<$K(B tm-view $B$NI8=`(B method $B$,;2>H$9$k4D6-JQ?t$r<($7$^$9!#(B + +@table @var +@item TM_TMP_DIR +$B0l;~E*$K:n@.$5$l$k(B file $B$d(B file $B=PNO$9$k>l9g$N(B default $B$N=PNO@h$H$7$F(B +$BMQ$$$i$l$k(B directory $B$r;XDj$9$k!#>JN,$5$l$?>l9g!"(B@file{/tmp/} $B$,(B +$BMQ$$$i$l$k!#(B + +@item VIDEO_DITHER +mpeg_play $B$G$N(B dither $B$N$+$1J}$r;XDj$9$k!#4{DjCM$O(B `gray'. + +@item TM_WWW_BROWSER +WWW browser $B$r;XDj$9$k!#4{DjCM$O(B `netscape'. + +@end table + + + +@node Two buffers for an article, API, method, Top +@chapter raw-article-buffer $B$H(B preview-buffer + +tm-view $B$O!"(BMIME $B=hM}$r9T$J$&A0$N@8$N(B message $B$,F~$C$F$$$k(B +@cindex{raw-article-buffer}@strong{raw-article-buffer} $B$H$=$NFbMF$r(B user +$B$K4J7i$KI=<($7!"(Buser $B$,A`:n$9$k$?$a$N(B +@cindex{preview-buffer}@strong{preview-buffer} $B$H$$$$D$N(B buffer $B$r4I(B +$BM}$7$^$9!#(Braw-article-buffer $B$N(B major-mode $B$O$b$H$b$H$N(B MUA $B$N(B article +$BI=<(MQ$N(B major-mode $B$G$"$j!"(Bpreview-buffer $B$N(B major-mode $B$O(B +@code{mime/viewer-mode} (@ref{mime/viewer-mode}) $B$H$J$j$^$9!#(B@refill + +@code{mime/viewer-mode} $B$r<B9T$9$k$H!"(Btm-view $B$O$^$:(B raw-article-buffer +$B$NFbMF$r2r@O$7!"$=$N(B message $B$N9=B$$r(B raw-article-buffer $B$N(B buffer local +$BJQ?t(B @code{mime::article/content-info} $B$K5-O?$7$^$9!#(B@refill + +$B<!$K!"$3$N7k2L$r85$K(B raw-article-buffer $B$KBP1~$9$k(B preview-buffer $B$r:n$j(B +$B$^$9!#$3$N:]!"(Bcontent-type $B$K1~$8$F!"(Bpart $BC10L$G(B header $B$d(B body $B$r2C9)$9(B +$B$k$3$H$,$G$-$^$9!#$3$N(B header $B$r2C9)$9$k%W%m%0%i%`$r(B +@cindex{header-filter}@strong{header-filter} (@ref{content-header}), +body $B$r2C9)$9$k%W%m%0%i%`$r(B +@cindex{content-filter}@strong{content-filter} (@ref{content-body}) $B$H8F(B +$B$S!"$3$l$i$rAm>N$7$F(B @cindex{filter}@strong{filter} $B$H8F$S$^$9!#(B + +preview-buffer $B$r:n@.$9$k;~$K!"(Bmessage $B$NI=<(>e$N9=B$$r5-O?$7$?(B +preview-buffer $B$N(B buffer local $BJQ?t(B @code{mime::preview/content-list} $B$,(B +$B:n$i$l$^$9!#(Btm-view $B$O(B raw-article-buffer $B>e$N(B +@code{mime::article/content-info} $B$H(B preview-buffer $B>e$N(B +@code{mime::preview/content-list} $B$rMQ$$$F(B message $B$r4IM}$7$^$9!#(B@refill + +@noindent +@strong{[$BCm0U(B]} +@quotation +$B$3$N@bL@=q$G$O!"(BContent-Type field $B$N(B content-type/subtype $B$N$3$H$r>N(B +$B$7$F(B ``content-type'' $B$H8F$S$^$9!#(B +@end quotation + + + +@menu +* raw-article-buffer:: raw-article-buffer $B$N(B buffer local $BJQ?t(B +* preview-buffer:: preview-buffer $B$N(B buffer local $BJQ?t(B +@end menu + +@node raw-article-buffer, preview-buffer, Two buffers for an article, Two buffers for an article +@section raw-article-buffer $B$N(B buffer local $BJQ?t(B + +@deffn{Structure} mime::content-info rcnum point-min point-max type parameters encoding children + +raw-article-buffer $B$K$*$1$k(B MIME part $B$K4X$9$k>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B +$BC1$K(B @cindex{content-info}@strong{content-info} $B$H$b8F$V!#(B@refill + +$B$3$N9=B$BN$r;2>H$9$k$K$O!"(B@code{mime::content-info/$B%9%m%C%HL>(B} $B$H$$$&(B +content-info $B$r0z?t$K$H$k4X?t$rMQ$$$k!#(B@refill + +$B$3$N9=B$BN$N%9%m%C%H$O0J2<$NDL$j$G$"$k!'(B + +@table @var +@item rcnum +``reversed content-number'' (list) + +@item point-min +raw-article-buffer $B$K$*$1$k@hF,(B point + +@item point-max +raw-article-buffer $B$K$*$1$kKvHx(B point + +@item type +content-type/sub-type$B!JJ8;zNs!"$^$?$O!"(Bnil$B!K(B + +@item parameters +Content-Type field $B$N(B parameter $B!JO"A[(B list$B!K(B + +@item encoding +Content-Transfer-Encoding$B!JJ8;zNs!"$^$?$O!"(Bnil$B!K(B + +@item children +$B$3$N(B part $B$K4^$^$l$k(B part$B!J(Bcontent-info $B$N(B list$B!K(B + +@end table + +$B$"$k(B part $B$,(B multipart $B$b$7$/$O(B message/rfc822 $B$J$I$NJL$N(B part $B$r4^$`$h(B +$B$&$J(B part $B$G$"$C$?>l9g!"(B@var{children} $B$KJL$N(B part $B$N(B content-info $B$,4^(B +$B$^$l$k;v$K$h$C$F!"(Bcontent-info $B$OLZ9=B$$K$J$k!#(B +@end deffn + + +@defvar mime::article/content-info + +raw-article-buffer $B$r(B MIME message $B$H$7$F2r@O$7$?7k2L(B (content-info) +@end defvar + + +@defvar mime::article/preview-buffer + +raw-article-buffer $B$KBP1~$9$k(B preview-buffer. +@end defvar + + +@defun mime-article/point-content-number point &optional cinfo + +content-info @var{cinfo} $B$G4IM}$5$l$kNN0h$K$*$$$F!"(B@var{point} $B$KBP1~$9(B +$B$k(B content-number $B$rJV$9!#(B@refill + +@var{cinfo} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime::article/content-info}$B$,MQ$$(B +$B$i$l$k!#(B +@end defun + + +@defun mime-article/rcnum-to-cinfo rcnum &optional cinfo + +content-info @var{cinfo} $B$G4IM}$5$l$kNN0h$K$*$$$F!"(B +reversed-content-number @var{rcnum} $B$KBP1~$9$k(B content-info $B$rJV$9!#(B +@refill + +@var{cinfo} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime::article/content-info} $B$,MQ$$(B +$B$i$l$k!#(B +@end defun + + +@defun mime-article/cnum-to-cinfo rcnum &optional cinfo + +content-info @var{cinfo} $B$G4IM}$5$l$kNN0h$K$*$$$F!"(Bcontent-number +@var{rcnum} $B$KBP1~$9$k(B content-info $B$rJV$9!#(B@refill + +@var{cinfo} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime::article/content-info} $B$,MQ$$(B +$B$i$l$k!#(B +@end defun + + +@defun mime/flatten-content-info &optional cinfo + +content-info @var{cinfo} $BCf$KG<$a$i$l$?A4(B part $B$N(B content-info $B$N(B list +$B$rJV$9!#(B@refill + +@var{cinfo} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime::article/content-info} $B$,MQ$$(B +$B$i$l$k!#(B +@end defun + + + +@node preview-buffer, , raw-article-buffer, Two buffers for an article +@section preview-buffer $B$N(B buffer local $BJQ?t(B + +@defvar mime::preview/mother-buffer + +$B$3$N(B preview-buffer $B$N?F$KAjEv$9$k(B buffer. +@end defvar + + +@deffn{Structure} mime::preview-content-info point-min point-max buffer content-info + +preview-buffer $B$K$*$1$k(B MIME content $B$K4X$9$k>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B +$BC1$K(B @cindex{preview-content-info}@strong{preview-content-info} $B$H$b8F$V!#(B +@refill + +$B$3$N9=B$BN$r;2>H$9$k$K$O!"(B@code{mime::content-info/$B%9%m%C%HL>(B} $B$H$$$&(B +content-info $B$r0z?t$K$H$k4X?t$rMQ$$$k!#(B@refill + +$B$3$N9=B$BN$N%9%m%C%H$O0J2<$NDL$j$G$"$k!#(B + +@table @var +@item point-min +preview-buffer $B$K$*$1$k@hF,(B point + +@item point-max +preview-buffer $B$K$*$1$kKvHx(B point + +@item buffer +$B$3$N(B part $B$KBP1~$9$k(B raw-article-buffer + +@item content-info +$B$3$N(B part $B$KBP1~$9$k(B content-info + +@end table +@end deffn + + +@defvar mime::preview/content-list + +$B$3$N(B preview-buffer $B$N9=B$$r$"$i$o$9(B preview-content-info $B$N(B list. +@end defvar + +@defvar mime::preview/article-buffer + +$B$3$N(B preview-buffer $B$KBP1~$9$k(B raw-article-buffer. +@end defvar + + +@defvar mime::preview/original-major-mode + +$B$3$N(B preview-buffer $B$N$b$H$K$J$C$?(B buffer $B$N(B major-mode. +@end defvar + + +@defvar mime::preview/original-window-configuration + +@code{mime/viewer-mode} $B$r<B9T$7$F!"$3$N(B preview-buffer $B:n$kD>A0$N(B +window-configuration. +@end defvar + + +@defun mime-preview/point-pcinfo point &optional pcl + +preview-content-info @var{pcl} $B$G4IM}$5$l$k(B preview-buffer $BCf$NNN0h$K$*(B +$B$$$F!"(B@var{point} $B$KBP1~$9$k(B part $B$N(B preview-content-info $B$rJV$9!#(B +@refill + +@var{cinfo} $B$,>JN,$5$l$?>l9g$O!"(B@code{mime::preview/content-list} $B$,MQ$$(B +$B$i$l$k!#(B +@end defun + + + +@node API, Concept Index, Two buffers for an article, Top +@chapter MIME message $B$N(B decode $B$K4X$9$k4X?t(B + +tm-view $B$NDs6!$9$k4X?t$r3F(B MUA (@ref{(tm-ja)MUA}) $B$KAH$_9~$`;v$K$h$C$F!"(B +$B3F(B MUA $B$K(B MIME $B:F@85!G=$rIU2C$9$k;v$,$G$-$^$9!#(B@refill + +tm-view $B$,3F(B MUA $B$KDs6!$9$k4X?t$O!"(BMIME preview $B$r9T$&$?$a$N4X?t(B +@code{mime/viewer-mode} $B$H(B encoded-word (@ref{(tm-ja)encoded-word}) $B$r(B +decode $B$9$k$?$a$N4X?t72$G$9!#(B + + +@menu +* API about MIME preview:: MIME preview $B$K4X$9$k4X?t(B +* encoded-word decoding:: encoded-word $B$NI|85(B +@end menu + +@node API about MIME preview, encoded-word decoding, API, API +@section MIME preview $B$K4X$9$k4X?t(B + + +@deffn{Command} mime/viewer-mode &optional mother ctl encoding ibuf obuf mother-keymap + +@var{ibuf} $B$r(B MIME message $B$H$7$F2r@O$7$F!"$=$NFbMF$r1\Mw$9$k$?$a$N(B +preview-buffer $B$r(B @var{obuf} $B$K:n@.$7!"(B@code{mime/viewer-mode} +(@ref{mime/viewer-mode})$B$KF~$j$^$9!#(B@refill + +@var{ibuf} $B$,>JN,$5$l$?>l9g!"(Bcurrent buffer $B$rMQ$$$^$9!#(B@refill + +@var{mother} $B$O!"2r@O$NBP>]$H$9$k(B raw-article-buffer $B$,(B message/partial +$B7A<0$NJ,3d$5$l$?(B message $B$r7k9g$7$F:n@.$7$?>l9g$J$I$K$*$1$k85$N(B buffer +$B$r;XDj$9$k$?$a$K;H$$$^$9!#(B@refill + +@var{ctl} $B$O(B Content-Type field (@ref{(tm-ja)Content-Type field}) $B$N(B +field-body $B$r(B @code{mime/Content-Type} $B$N=PNO@5<0$K$7$?$b$N$rF~$l$^$9!#(B +$B$3$N0z?t$,$"$k>l9g!"(Braw-article-buffer $B$N(B Content-Type field $B$h$j$b$3$N(B +$B0z?t$rM%@h$7$^$9!#(B@refill + +@var{encoding} $B$O(B Content-Transfer-Encoding field $B$N(B field-body $B$rF~$l$^(B +$B$9!#$3$N0z?t$,$"$k>l9g!"(Braw-article-buffer $B$N(B Content-Transfer-Encoding +field $B$h$j$b$3$N0z?t$rM%@h$7$^$9!#(B@refill + +@var{mother-keymap} $B$,;XDj$5$l$?>l9g!"(B@code{mime/viewer-mode} $B$N(B keymap +$B$O$3$N(B keymap $B$K2C$($?$b$N$H$J$j$^$9!#(B +@end deffn + + + +@node encoded-word decoding, , API about MIME preview, API +@section encoded-word $B$NI|85(B + +tm-view $B$O(B RFC 1522 $B$G5,Dj$5$l$?(B encoded-word +(@ref{(tm-ja)encoded-word}) $B$r(B decode $B$9$k$?$a$N4X?t$r;}$C$F$$$^$9!#(B + +@noindent +@strong{[Memo]} +@quotation +$B5l(B @file{tiny-mime.el} $B$K$"$C$?(B RFC 1522 encoded-word $B$r(B decode +$B$9$k$?$a$N4X?t72$O(B tm-view $B$K0z$-7Q$,$l$^$7$?!#(B +@end quotation + + + +@deffn{Command} mime/decode-message-header + +current buffer $B$N(B message header $BCf$N(B encoded-word $B$r(B decode $B$7$^$9!#(B +@refill + +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B MIME charset +(@ref{(tm-ja)MIME charset}) $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^;D$5$l$^$9!#(B +@end deffn + + + +@deffn{Command} mime-eword/decode-region start end &optional unfolding must-unfold + +@var{start} $B$H(B @var{end} $B$G0O$^$l$?NN0hCf$N(B encoded-word $B$r(B decode $B$7$^(B +$B$9!#(B@refill + +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B MIME charset +(@ref{(tm-ja)MIME charset}) $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^;D$5$l$^$9!#(B@refill + +@var{unfolding} $B$,(B non-nil $B$N>l9g!"@^$jJV$5$l$?(B field $B$r(B unfolding $B$7$^(B +$B$9!#(B@refill + +@var{must-fold} $B$,(B non-nil $B$N>l9g!"(Bencoded-word $B$N(B decode $B7k2L$K@^$jJV$7!"(B +$B$b$7$/$O!"2~9T$,4^$^$l$F$$$k>l9g!"(Bunfold $B$7!"2~9T$r=|$-$^$9!#(B +@end deffn + + + +@defun mime-eword/decode-string string &optional must-unfold + +@var{string} $BCf$N(B encoded-word $B$r(B decode $B$7$?J8;zNs$rJV$7$^$9!#(B@refill + +$B2u$l$F$$$?$j!"IT@5$@$C$?$j!"(Bdecode $B$G$-$J$$(B MIME charset +(@ref{(tm-ja)MIME charset}) $B$,MQ$$$i$l$F$$$k(B encoded-word $B$O(B decode $B$5$l(B +$B$:$=$N$^$^=PNO$5$l$^$9!#(B@refill + +@var{string} $B$,@^$jJV$5$l$F$$$k>l9g!"(Bencoded-word $B$r(B decode $B$9$kA0$K(B +@var{string} $B$O(B unfold $B$5$l$^$9!#(B@refill + +@var{must-fold} $B$,(B non-nil $B$N>l9g!"(Bencoded-word $B$N(B decode $B7k2L$K@^$jJV$7!"(B +$B$b$7$/$O!"2~9T$,4^$^$l$F$$$F$b!"$=$l$i$O(B unfold $B$5$lC1BN$N2~9TJ8;z$b<h$j(B +$B=|$+$l$^$9!#(B +@end defun + + + +@node Concept Index, Function Index, API, Top +@chapter $B35G0:w0z(B + +@printindex cp + +@node Function Index, Variable Index, Concept Index, Top +@chapter $B4X?t:w0z(B + +@printindex fn + +@node Variable Index, , Function Index, Top +@chapter $BJQ?t:w0z(B + +@printindex vr +@bye
--- a/man/xemacs/Makefile Mon Aug 13 08:47:16 2007 +0200 +++ b/man/xemacs/Makefile Mon Aug 13 08:47:35 2007 +0200 @@ -1,31 +1,27 @@ # Makefile for the XEmacs Reference Manual. -# -# based on FSF Makefile, 11 August 1990 + +# This file is part of XEmacs. + +# XEmacs is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. + +# XEmacs is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. + +# You should have received a copy of the GNU General Public License +# along with XEmacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + # Modified by Ben Wing, February 1994 -# Redefine `TEX' if `tex' does not invoke plain TeX. For example: -# TEX=platex - -TEX=tex - -# Where the TeX macros are kept: -texmacrodir = /usr/local/lib/tex/macros - -# Where the Emacs hierarchy lives ($EMACS in the INSTALL document for Emacs.) -# For example: -# emacslibdir = /usr/local/gnu/lib/emacs +NAME=xemacs -# Directory where Emacs is installed, by default: -emacslibdir = /usr/local/emacs - -# Unless you have a nonstandard Emacs installation, these shouldn't have to -# be changed. -prefix = /usr/local -infodir = ${prefix}/info - -# The name of the manual: - -NAME=xemacs +TEXI2DVI = texi2dvi # List of all the texinfo files in the manual: @@ -37,34 +33,22 @@ programs.texi reading.texi regs.texi frame.texi search.texi sending.texi \ text.texi trouble.texi undo.texi windows.texi -all: ../../info/$(NAME).info +all : info +info : ../../info/$(NAME).info -$(NAME).dvi: $(srcs) ../texindex - # Avoid losing old contents of aux file entirely. - -mv $(NAME).aux $(NAME).oaux - # First shot to define xrefs: - $(TEX) $(NAME).texi - ../texindex $(NAME).?? - $(TEX) $(NAME).texi +dvi: $(NAME).dvi +.texi.dvi : + $(TEXI2DVI) $< -../../info/$(NAME).info: $(srcs) ../makeinfo - ../makeinfo $(NAME).texi +../../info/$(NAME).info: $(srcs) + makeinfo -o $@ $(NAME).texi mostlyclean: rm -f *.toc *.aux *.oaux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ *.vr *.vrs *.pg *.pgs *.ky *.kys - clean: mostlyclean - rm -f *.dvi *.ps - rm -f make.out core - + rm -f *.dvi *.ps make.out core distclean: clean realclean: distclean extraclean: distclean -rm -f *~ \#* - -../texindex: - (cd ..; make texindex) - -../makeinfo: - (cd ..; make makeinfo)
--- a/site-lisp/emu-e19.el Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ -;;; emu-e19.el --- emu module for Emacs 19 and XEmacs 19 - -;; Copyright (C) 1995,1996 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: emu-e19.el,v 1.1.1.1 1996/12/18 04:06:19 steve Exp $ -;; Keywords: emulation, compatibility, mule, Latin-1 - -;; This file is part of emu. - -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. - -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Code: - -;;; @ version and variant specific features -;;; - -(cond (running-xemacs - (require 'emu-xemacs)) - (running-emacs-19 - (require 'emu-19) - )) - - -;;; @ character set -;;; - -(defconst charset-ascii 0 "Character set of ASCII") -(defconst charset-latin-iso8859-1 129 "Character set of ISO-8859-1") - -(defun charset-description (charset) - "Return description of CHARSET. [emu-e19.el]" - (if (< charset 128) - (documentation-property 'charset-ascii 'variable-documentation) - (documentation-property 'charset-latin-iso8859-1 'variable-documentation) - )) - -(defun charset-registry (charset) - "Return registry name of CHARSET. [emu-e19.el]" - (if (< charset 128) - "ASCII" - "ISO8859-1")) - -(defun charset-columns (charset) - "Return number of columns a CHARSET occupies when displayed. -\[emu-e19.el]" - 1) - -(defun charset-direction (charset) - "Return the direction of a character of CHARSET by - 0 (left-to-right) or 1 (right-to-left). [emu-e19.el]" - 0) - -(defun find-charset-string (str) - "Return a list of charsets in the string. -\[emu-e19.el; Mule emulating function]" - (if (string-match "[\200-\377]" str) - (list charset-latin-iso8859-1) - )) - -(defalias 'find-non-ascii-charset-string 'find-charset-string) - -(defun find-charset-region (start end) - "Return a list of charsets in the region between START and END. -\[emu-e19.el; Mule emulating function]" - (if (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (re-search-forward "[\200-\377]" nil t) - )) - (list charset-latin-iso8859-1) - )) - -(defalias 'find-non-ascii-charset-region 'find-charset-region) - - -;;; @ coding-system -;;; - -(defconst *internal* nil) -(defconst *ctext* nil) -(defconst *noconv* nil) - -(defun decode-coding-string (string coding-system) - "Decode the STRING which is encoded in CODING-SYSTEM. -\[emu-e19.el; Emacs 20 emulating function]" - string) - -(defun encode-coding-string (string coding-system) - "Encode the STRING as CODING-SYSTEM. -\[emu-e19.el; Emacs 20 emulating function]" - string) - -(defun decode-coding-region (start end coding-system) - "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-e19.el; Emacs 20 emulating function]" - 0) - -(defun encode-coding-region (start end coding-system) - "Encode the text between START and END to CODING-SYSTEM. -\[emu-e19.el; Emacs 20 emulating function]" - 0) - -(defun detect-coding-region (start end) - "Detect coding-system of the text in the region between START and END. -\[emu-e19.el; Emacs 20 emulating function]" - ) - -(defun set-buffer-file-coding-system (coding-system &optional force) - "Set buffer-file-coding-system of the current buffer to CODING-SYSTEM. -\[emu-e19.el; Emacs 20 emulating function]" - ) - -(defmacro as-binary-process (&rest body) - (` (let (selective-display) ; Disable ^M to nl translation. - (,@ body) - ))) - -(defmacro as-binary-input-file (&rest body) - (` (let ((emx-binary-mode t)) ; Stop CRLF to LF conversion in OS/2 - (,@ body) - ))) - - -;;; @@ for old MULE emulation -;;; - -(defun code-convert-string (str ic oc) - "Convert code in STRING from SOURCE code to TARGET code, -On successful converion, returns the result string, -else returns nil. [emu-e19.el; old MULE emulating function]" - str) - -(defun code-convert-region (beg end ic oc) - "Convert code of the text between BEGIN and END from SOURCE -to TARGET. On successful conversion returns t, -else returns nil. [emu-e19.el; old MULE emulating function]" - t) - - -;;; @ MIME charset -;;; - -(defvar charsets-mime-charset-alist - (list (cons (list charset-ascii) 'us-ascii))) - -(defvar default-mime-charset 'iso-8859-1) - -(defun mime-charset-to-coding-system (charset) - (if (stringp charset) - (setq charset (intern (downcase charset))) - ) - (and (memq charset (list 'us-ascii default-mime-charset)) - charset) - ) - -(defun detect-mime-charset-region (start end) - "Return MIME charset for region between START and END. -\[emu-e19.el]" - (if (save-excursion - (save-restriction - (narrow-to-region start end) - (goto-char start) - (re-search-forward "[\200-\377]" nil t) - )) - default-mime-charset - 'us-ascii)) - -(defun encode-mime-charset-region (start end charset) - "Encode the text between START and END as MIME CHARSET. -\[emu-e19.el]" - ) - -(defun decode-mime-charset-region (start end charset) - "Decode the text between START and END as MIME CHARSET. -\[emu-e19.el]" - ) - -(defun encode-mime-charset-string (string charset) - "Encode the STRING as MIME CHARSET. [emu-e19.el]" - string) - -(defun decode-mime-charset-string (string charset) - "Decode the STRING as MIME CHARSET. [emu-e19.el]" - string) - - -;;; @ character -;;; - -(defun char-charset (chr) - "Return the character set of char CHR. -\[emu-e19.el; XEmacs 20 emulating function]" - (if (< chr 128) - charset-ascii - charset-latin-iso8859-1)) - -(defun char-bytes (char) - "Return number of bytes a character in CHAR occupies in a buffer. -\[emu-e19.el; MULE emulating function]" - 1) - -(defalias 'char-length 'char-bytes) - -(defun char-columns (character) - "Return number of columns a CHARACTER occupies when displayed. -\[emu-e19.el]" - 1) - -;;; @@ for old MULE emulation -;;; - -(defalias 'char-width 'char-columns) - -(defalias 'char-leading-char 'char-charset) - - -;;; @ string -;;; - -(defalias 'string-columns 'length) - -(defun string-to-char-list (str) - (mapcar (function identity) str) - ) - -(defalias 'string-to-int-list 'string-to-char-list) - -(defalias 'sref 'aref) - -(defun truncate-string (str width &optional start-column) - "Truncate STR to fit in WIDTH columns. -Optional non-nil arg START-COLUMN specifies the starting column. -\[emu-e19.el; MULE 2.3 emulating function]" - (or start-column - (setq start-column 0)) - (substring str start-column width) - ) - -;;; @@ for old MULE emulation -;;; - -(defalias 'string-width 'length) - - -;;; @ end -;;; - -(provide 'emu-e19) - -;;; emu-e19.el ends here
--- a/site-lisp/emu-xemacs.el Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -;;; emu-xemacs.el --- emu API implementation for XEmacs - -;; Copyright (C) 1995 Free Software Foundation, Inc. -;; Copyright (C) 1995,1996 MORIOKA Tomohiko - -;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: -;; $Id: emu-xemacs.el,v 1.1.1.1 1996/12/18 04:06:19 steve Exp $ -;; Keywords: emulation, compatibility, XEmacs - -;; This file is part of emu. - -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. - -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Code: - -;;; @ text property -;;; - -(or (fboundp 'face-list) - (defalias 'face-list 'list-faces) - ) - -(or (memq 'underline (face-list)) - (and (fboundp 'make-face) - (make-face 'underline) - )) - -(or (face-differs-from-default-p 'underline) - (set-face-underline-p 'underline t)) - -(or (fboundp 'tl:set-text-properties) - (defun tl:set-text-properties (start end props &optional buffer) - (if (or (null buffer) (bufferp buffer)) - (if props - (while props - (put-text-property - start end (car props) (nth 1 props) buffer) - (setq props (nthcdr 2 props))) - (remove-text-properties start end ()) - ))) - ) - -(defun tl:add-text-properties (start end properties) - (add-text-properties start end - (append properties (list 'highlight t)) - ) - ) - -(defalias 'tl:make-overlay 'make-extent) -(defalias 'tl:overlay-put 'set-extent-property) -(defalias 'tl:overlay-buffer 'extent-buffer) - -(defun tl:move-overlay (extent start end &optional buffer) - (set-extent-endpoints extent start end) - ) - - -;;; @@ visible/invisible -;;; - -(defmacro enable-invisible ()) - -(defmacro end-of-invisible ()) - -(defun invisible-region (start end) - (if (save-excursion - (goto-char start) - (eq (following-char) ?\n) - ) - (setq start (1+ start)) - ) - (put-text-property start end 'invisible t) - ) - -(defun visible-region (start end) - (put-text-property start end 'invisible nil) - ) - -(defun invisible-p (pos) - (if (save-excursion - (goto-char pos) - (eq (following-char) ?\n) - ) - (setq pos (1+ pos)) - ) - (get-text-property pos 'invisible) - ) - -(defun next-visible-point (pos) - (save-excursion - (if (save-excursion - (goto-char pos) - (eq (following-char) ?\n) - ) - (setq pos (1+ pos)) - ) - (or (next-single-property-change pos 'invisible) - (point-max)) - )) - - -;;; @ mouse -;;; - -(defvar mouse-button-1 'button1) -(defvar mouse-button-2 'button2) -(defvar mouse-button-3 'button3) - - -;;; @ dired -;;; - -(or (fboundp 'dired-other-frame) - (defun dired-other-frame (dirname &optional switches) - "\"Edit\" directory DIRNAME. Like `dired' but makes a new frame." - (interactive (dired-read-dir-and-switches "in other frame ")) - (switch-to-buffer-other-frame (dired-noselect dirname switches)) - ) - ) - - -;;; @ string -;;; - -(defmacro char-list-to-string (char-list) - "Convert list of character CHAR-LIST to string. [emu-xemacs.el]" - `(mapconcat #'char-to-string ,char-list "")) - - -;;; @@ to avoid bug of XEmacs 19.14 -;;; - -(or (string-match "^../" - (file-relative-name "/usr/local/share" "/usr/local/lib")) - ;; This function was imported from Emacs 19.33. - (defun file-relative-name (filename &optional directory) - "Convert FILENAME to be relative to DIRECTORY -(default: default-directory). [emu-xemacs.el]" - (setq filename (expand-file-name filename) - directory (file-name-as-directory - (expand-file-name - (or directory default-directory)))) - (let ((ancestor "")) - (while (not (string-match (concat "^" (regexp-quote directory)) - filename)) - (setq directory (file-name-directory (substring directory 0 -1)) - ancestor (concat "../" ancestor))) - (concat ancestor (substring filename (match-end 0))) - )) - ) - - -;;; @ end -;;; - -(provide 'emu-xemacs) - -;;; emu-xemacs.el ends here
--- a/site-lisp/emu.el Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -;;; emu.el --- Emulation module for each Emacs variants - -;; Copyright (C) 1995,1996 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Version: $Id: emu.el,v 1.1.1.1 1996/12/18 04:06:19 steve Exp $ -;; Keywords: emulation, compatibility, NEmacs, MULE, Emacs/mule, XEmacs - -;; This file is part of emu. - -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. - -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Code: - -(defmacro defun-maybe (name &rest everything-else) - (or (and (fboundp name) - (not (get name 'defun-maybe)) - ) - (` (or (fboundp (quote (, name))) - (progn - (defun (, name) (,@ everything-else)) - (put (quote (, name)) 'defun-maybe t) - )) - ))) - -(put 'defun-maybe 'lisp-indent-function 'defun) - - -(or (boundp 'emacs-major-version) - (defconst emacs-major-version (string-to-int emacs-version))) -(or (boundp 'emacs-minor-version) - (defconst emacs-minor-version - (string-to-int - (substring - emacs-version - (string-match (format "%d\\." emacs-major-version) emacs-version) - )))) - -(defvar running-emacs-18 (<= emacs-major-version 18)) -(defvar running-xemacs (string-match "XEmacs" emacs-version)) - -(defvar running-mule-merged-emacs (and (not (boundp 'MULE)) - (not running-xemacs) (featurep 'mule))) -(defvar running-xemacs-with-mule (and running-xemacs (featurep 'mule))) - -(defvar running-emacs-19 (and (not running-xemacs) (= emacs-major-version 19))) -(defvar running-emacs-19_29-or-later - (or (and running-emacs-19 (>= emacs-minor-version 29)) - (and (not running-xemacs)(>= emacs-major-version 20)))) - -(defvar running-xemacs-19 (and running-xemacs - (= emacs-major-version 19))) -(defvar running-xemacs-20-or-later (and running-xemacs - (>= emacs-major-version 20))) -(defvar running-xemacs-19_14-or-later - (or (and running-xemacs-19 (>= emacs-minor-version 14)) - running-xemacs-20-or-later)) - -(cond (running-mule-merged-emacs - ;; for mule merged EMACS - (require 'emu-e20) - ) - (running-xemacs-with-mule - ;; for XEmacs/mule - (require 'emu-x20) - ) - ((boundp 'MULE) - ;; for MULE 1.* and 2.* - (require 'emu-mule) - ) - ((boundp 'NEMACS) - ;; for NEmacs and NEpoch - (require 'emu-nemacs) - ) - (t - ;; for EMACS 19 and XEmacs 19 (without mule) - (require 'emu-e19) - )) - - -;;; @ binary access -;;; - -(defun insert-binary-file-contents-literally - (filename &optional visit beg end replace) - "Like `insert-file-contents-literally', q.v., but don't code conversion. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place. -\[emu.el]" - (as-binary-input-file - (insert-file-contents-literally filename visit beg end replace) - )) - - -;;; @ MIME charset -;;; - -(defun charsets-to-mime-charset (charsets) - "Return MIME charset from list of charset CHARSETS. -This function refers variable `charsets-mime-charset-alist' -and `default-mime-charset'. [emu.el]" - (if charsets - (or (catch 'tag - (let ((rest charsets-mime-charset-alist) - cell csl) - (while (setq cell (car rest)) - (if (catch 'not-subset - (let ((set1 charsets) - (set2 (car cell)) - obj) - (while set1 - (setq obj (car set1)) - (or (memq obj set2) - (throw 'not-subset nil) - ) - (setq set1 (cdr set1)) - ) - t)) - (throw 'tag (cdr cell)) - ) - (setq rest (cdr rest)) - ))) - default-mime-charset))) - - -;;; @ EMACS 19.29 emulation -;;; - -(defvar path-separator ":" - "Character used to separate concatenated paths.") - -(defun-maybe buffer-substring-no-properties (beg end) - "Return the text from BEG to END, without text properties, as a string. -\[emu.el; EMACS 19.29 emulating function]" - (let ((string (buffer-substring beg end))) - (tl:set-text-properties 0 (length string) nil string) - string)) - -(defun-maybe match-string (num &optional string) - "Return string of text matched by last search. -NUM specifies which parenthesized expression in the last regexp. - Value is nil if NUMth pair didn't match, or there were less than NUM pairs. -Zero means the entire text matched by the whole regexp or whole string. -STRING should be given if the last search was by `string-match' on STRING. -\[emu.el; EMACS 19.29 emulating function]" - (if (match-beginning num) - (if string - (substring string (match-beginning num) (match-end num)) - (buffer-substring (match-beginning num) (match-end num))))) - -(or running-emacs-19_29-or-later - running-xemacs - ;; for Emacs 19.28 or earlier - (fboundp 'si:read-string) - (progn - (fset 'si:read-string (symbol-function 'read-string)) - - (defun read-string (prompt &optional initial-input history) - "Read a string from the minibuffer, prompting with string PROMPT. -If non-nil, second arg INITIAL-INPUT is a string to insert before reading. -The third arg HISTORY, is dummy for compatibility. [emu.el] -See `read-from-minibuffer' for details of HISTORY argument." - (si:read-string prompt initial-input) - ) - )) - -;; This function was imported Emacs 19.30. -(defun-maybe add-to-list (list-var element) - "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. -If you want to use `add-to-list' on a variable that is not defined -until a certain package is loaded, you should put the call to `add-to-list' -into a hook function that will be run only after loading the package. -\[emu.el; EMACS 19.30 emulating function]" - (or (member element (symbol-value list-var)) - (set list-var (cons element (symbol-value list-var))) - )) - - -;;; @ EMACS 19.30 emulation -;;; - -(cond ((fboundp 'insert-file-contents-literally) - ) - ((boundp 'file-name-handler-alist) - (defun insert-file-contents-literally - (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place. -\[emu.el; Emacs 19.30 emulating function]" - (let (file-name-handler-alist) - (insert-file-contents filename visit beg end replace) - )) - ) - (t - (defalias 'insert-file-contents-literally 'insert-file-contents) - )) - - -;;; @ EMACS 19.31 emulation -;;; - -(defun-maybe buffer-live-p (object) - "Return non-nil if OBJECT is a buffer which has not been killed. -Value is nil if OBJECT is not a buffer or if it has been killed. -\[emu.el; EMACS 19.31 emulating function]" - (and object - (get-buffer object) - (buffer-name (get-buffer object)) - )) - -(or (fboundp 'save-selected-window) - ;; This function was imported Emacs 19.33. - (defmacro save-selected-window (&rest body) - "Execute BODY, then select the window that was selected before BODY. -\[emu.el; EMACS 19.31 emulating function]" - (list 'let - '((save-selected-window-window (selected-window))) - (list 'unwind-protect - (cons 'progn body) - (list 'select-window 'save-selected-window-window)))) - ) - - -;;; @ XEmacs emulation -;;; - -(defun-maybe functionp (obj) - "Returns t if OBJ is a function, nil otherwise. -\[emu.el; XEmacs emulating function]" - (or (subrp obj) - (byte-code-function-p obj) - (and (symbolp obj)(fboundp obj)) - (and (consp obj)(eq (car obj) 'lambda)) - )) - - -;;; @ for XEmacs 20 -;;; - -(or (fboundp 'char-int) - (fset 'char-int (symbol-function 'identity)) - ) -(or (fboundp 'int-char) - (fset 'int-char (symbol-function 'identity)) - ) - - -;;; @ for text/richtext and text/enriched -;;; - -(cond ((or running-emacs-19_29-or-later running-xemacs-19_14-or-later) - ;; have enriched.el - (autoload 'richtext-decode "richtext") - (or (assq 'text/richtext format-alist) - (setq format-alist - (cons - (cons 'text/richtext - '("Extended MIME text/richtext format." - "Content-[Tt]ype:[ \t]*text/richtext" - richtext-decode richtext-encode t enriched-mode)) - format-alist))) - ) - (t - ;; don't have enriched.el - (autoload 'richtext-decode "tinyrich") - (autoload 'enriched-decode "tinyrich") - )) - - -;;; @ end -;;; - -(provide 'emu) - -;;; emu.el ends here
--- a/site-lisp/richtext.el Mon Aug 13 08:47:16 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,185 +0,0 @@ -;;; richtext.el -- read and save files in text/richtext format - -;; Copyright (C) 1995,1996 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> -;; Created: 1995/7/15 -;; Version: $Id: richtext.el,v 1.1.1.1 1996/12/18 04:06:19 steve Exp $ -;; Keywords: wp, faces, MIME, multimedia - -;; This file is not part of GNU Emacs yet. - -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. - -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Code: - -(require 'enriched) - - -;;; @ variables -;;; - -(defconst richtext-initial-annotation - (lambda () - (format "Content-Type: text/richtext\nText-Width: %d\n\n" - (enriched-text-width))) - "What to insert at the start of a text/richtext file. -If this is a string, it is inserted. If it is a list, it should be a lambda -expression, which is evaluated to get the string to insert.") - -(defconst richtext-annotation-regexp - "[ \t\n]*\\(<\\(/\\)?\\([-A-za-z0-9]+\\)>\\)[ \t\n]*" - "Regular expression matching richtext annotations.") - -(defconst richtext-translations - '((face (bold-italic "bold" "italic") - (bold "bold") - (italic "italic") - (underline "underline") - (fixed "fixed") - (excerpt "excerpt") - (default ) - (nil enriched-encode-other-face)) - (invisible (t "comment")) - (left-margin (4 "indent")) - (right-margin (4 "indentright")) - (justification (right "flushright") - (left "flushleft") - (full "flushboth") - (center "center")) - ;; The following are not part of the standard: - (FUNCTION (enriched-decode-foreground "x-color") - (enriched-decode-background "x-bg-color")) - (read-only (t "x-read-only")) - (unknown (nil format-annotate-value)) -; (font-size (2 "bigger") ; unimplemented -; (-2 "smaller")) -) - "List of definitions of text/richtext annotations. -See `format-annotate-region' and `format-deannotate-region' for the definition -of this structure.") - - -;;; @ encoder -;;; - -(defun richtext-encode (from to) - (if enriched-verbose (message "Richtext: encoding document...")) - (save-restriction - (narrow-to-region from to) - (delete-to-left-margin) - (unjustify-region) - (goto-char from) - (format-replace-strings '(("<" . "<lt>"))) - (format-insert-annotations - (format-annotate-region from (point-max) richtext-translations - 'enriched-make-annotation enriched-ignore)) - (goto-char from) - (insert (if (stringp enriched-initial-annotation) - richtext-initial-annotation - (funcall richtext-initial-annotation))) - (enriched-map-property-regions 'hard - (lambda (v b e) - (goto-char b) - (if (eolp) - (while (search-forward "\n" nil t) - (replace-match "<nl>\n") - ))) - (point) nil) - (if enriched-verbose (message nil)) - ;; Return new end. - (point-max))) - - -;;; @ decoder -;;; - -(defun richtext-next-annotation () - "Find and return next text/richtext annotation. -Return value is \(begin end name positive-p), or nil if none was found." - (catch 'tag - (while (re-search-forward richtext-annotation-regexp nil t) - (let* ((beg0 (match-beginning 0)) - (end0 (match-end 0)) - (beg (match-beginning 1)) - (end (match-end 1)) - (name (downcase (buffer-substring - (match-beginning 3) (match-end 3)))) - (pos (not (match-beginning 2))) - ) - (cond ((equal name "lt") - (delete-region beg end) - (goto-char beg) - (insert "<") - ) - ((equal name "comment") - (if pos - (throw 'tag (list beg0 end name pos)) - (throw 'tag (list beg end0 name pos)) - ) - ) - (t - (throw 'tag (list beg end name pos)) - )) - )))) - -(defun richtext-decode (from to) - (if enriched-verbose (message "Richtext: decoding document...")) - (save-excursion - (save-restriction - (narrow-to-region from to) - (goto-char from) - (let ((file-width (enriched-get-file-width)) - (use-hard-newlines t)) - (enriched-remove-header) - - (goto-char from) - (while (re-search-forward "\n\n+" nil t) - (replace-match "\n") - ) - - ;; Deal with newlines - (goto-char from) - (while (re-search-forward "[ \t\n]*<nl>[ \t\n]*" nil t) - (replace-match "\n") - (put-text-property (match-beginning 0) (point) 'hard t) - (put-text-property (match-beginning 0) (point) 'front-sticky nil) - ) - - ;; Translate annotations - (format-deannotate-region from (point-max) richtext-translations - 'richtext-next-annotation) - - ;; Fill paragraphs - (if (or (and file-width ; possible reasons not to fill: - (= file-width (enriched-text-width))) ; correct wd. - (null enriched-fill-after-visiting) ; never fill - (and (eq 'ask enriched-fill-after-visiting) ; asked & declined - (not (y-or-n-p "Re-fill for current display width? ")))) - ;; Minimally, we have to insert indentation and justification. - (enriched-insert-indentation) - (if enriched-verbose (message "Filling paragraphs...")) - (fill-region (point-min) (point-max)))) - (if enriched-verbose (message nil)) - (point-max)))) - - -;;; @ end -;;; - -(provide 'richtext) - -;;; richtext.el ends here
--- a/src/Makefile.in.in Mon Aug 13 08:47:16 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 08:47:35 2007 +0200 @@ -1151,7 +1151,6 @@ ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc \ ${lispdir}packages/vc-hooks.elc \ ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc \ - ${lispdir}packages/scroll-in-place.elc \ ${lispdir}modes/auto-show.elc SUNPRO_LISP TTY_LISP \ ${lispdir}bytecomp/bytecomp-runtime.elc FLOAT_LISP EPOCH_LISP \ ${lispdir}prim/itimer.elc ${lispdir}ediff/ediff-hook.elc \
--- a/src/bitmaps.h Mon Aug 13 08:47:16 2007 +0200 +++ b/src/bitmaps.h Mon Aug 13 08:47:35 2007 +0200 @@ -96,11 +96,25 @@ static unsigned char continuer_bits[] = { 0x00, 0xbc, 0xfc, 0xe0, 0xe0, 0x72, 0x3e, 0x1e, 0x1e, 0x3e}; +#if 0 /* Three dots indicating truncation */ #define truncator_width 7 #define truncator_height 8 static unsigned char truncator_bits[] = { 0x06, 0x06, 0x00, 0x18, 0x18, 0x00, 0x60, 0x60}; +#endif + +/* A Right pointing Arrow */ +#define truncator_width 6 +#define truncator_height 10 +static char truncator_bits[] = { + 0xc0,0xc4,0xc8,0xd0,0xff,0xd0,0xc8,0xc4,0xc0,0xc0}; + +/* A Left pointing Arrow */ +#define hscroll_width 6 +#define hscroll_height 10 +static char hscroll_bits[] = { + 0xc0,0xc8,0xc4,0xc2,0xff,0xc2,0xc4,0xc8,0xc0,0xc0}; #if 0 #define rarrow_width 12
--- a/src/cmds.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/cmds.c Mon Aug 13 08:47:35 2007 +0200 @@ -137,22 +137,6 @@ return make_int (negp ? - shortage : shortage); } -DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, - 0, 2, "_p" /* -Move point to beginning of current line. -With argument ARG not nil or 1, move forward ARG - 1 lines first. -If scan reaches end of buffer, stop there without error. -If BUFFER is nil, the current buffer is assumed. -*/ ) - (arg, buffer) - Lisp_Object arg, buffer; -{ - struct buffer *b = decode_buffer (buffer, 1); - - BUF_SET_PT(b, XINT (Fpoint_at_bol(arg, buffer))); - return Qnil; -} - DEFUN ("point-at-bol", Fpoint_at_bol, Spoint_at_bol, 0, 2, 0 /* Return the character position of the first character on the current line. With argument N not nil or 1, move forward N - 1 lines first. @@ -160,6 +144,7 @@ This function does not move point. */ ) (arg, buffer) + Lisp_Object arg, buffer; { struct buffer *b = decode_buffer (buffer, 1); register int orig, end; @@ -178,6 +163,44 @@ return make_int (end); } +DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, + 0, 2, "_p" /* +Move point to beginning of current line. +With argument ARG not nil or 1, move forward ARG - 1 lines first. +If scan reaches end of buffer, stop there without error. +If BUFFER is nil, the current buffer is assumed. +*/ ) + (arg, buffer) + Lisp_Object arg, buffer; +{ + struct buffer *b = decode_buffer (buffer, 1); + + BUF_SET_PT(b, XINT (Fpoint_at_bol(arg, buffer))); + return Qnil; +} + +DEFUN ("point-at-eol", Fpoint_at_eol, Spoint_at_eol, 0, 2, 0 /* +Return the character position of the last character on the current line. +With argument N not nil or 1, move forward N - 1 lines first. +If scan reaches end of buffer, return that position. +This function does not move point. +*/ ) + (arg, buffer) + Lisp_Object arg, buffer; +{ + struct buffer *buf = decode_buffer (buffer, 1); + + XSETBUFFER (buffer, buf); + + if (NILP (arg)) + arg = make_int (1); + else + CHECK_INT (arg); + + return make_int (find_before_next_newline (buf, BUF_PT (buf), 0, + XINT (arg) - (XINT (arg) <= 0))); +} + DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 2, "_p" /* Move point to end of current line. @@ -194,27 +217,6 @@ return Qnil; } -DEFUN ("point-at-eol", Fpoint_at_eol, Spoint_at_eol, 0, 2, 0 /* -Return the character position of the last character on the current line. -With argument N not nil or 1, move forward N - 1 lines first. -If scan reaches end of buffer, return that position. -This function does not move point. -*/ ) - (arg, buffer) -{ - struct buffer *buf = decode_buffer (buffer, 1); - - XSETBUFFER (buffer, buf); - - if (NILP (arg)) - arg = make_int (1); - else - CHECK_INT (arg); - - return find_before_next_newline (buf, BUF_PT (buf), 0, - XINT (arg) - (XINT (arg) <= 0)); -} - DEFUN ("delete-char", Fdelete_char, Sdelete_char, 1, 2, "*p\nP" /* Delete the following ARG characters (previous, with negative arg). Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
--- a/src/event-Xt.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 08:47:35 2007 +0200 @@ -677,8 +677,13 @@ { char buf [255]; char *s1, *s2; - for (s1 = name, s2 = buf; *s1; s1++, s2++) - *s2 = tolower (* (unsigned char *) s1); + for (s1 = name, s2 = buf; *s1; s1++, s2++) { + if (*s1 == '_') { + *s2 = '-'; + } else { + *s2 = tolower (* (unsigned char *) s1); + } + } *s2 = 0; return (KEYSYM (buf)); }
--- a/src/event-stream.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 08:47:35 2007 +0200 @@ -1196,6 +1196,34 @@ } } +int +event_stream_wakeup_pending_p (int id, int async_p) +{ + struct timeout *timeout; + Lisp_Object rest = Qnil; + Lisp_Object timeout_list; + int found = 0; + + + if (async_p) + timeout_list = pending_async_timeout_list; + else + timeout_list = pending_timeout_list; + + /* Find the element on the list of pending ones, if it's still there. */ + LIST_LOOP (rest, timeout_list) + { + timeout = (struct timeout *) XOPAQUE_DATA (XCAR (rest)); + if (timeout->id == id) + { + found = 1; + break; + } + } + + return found; +} + /**** Asynch. timeout functions (see also signal.c) ****/ @@ -2403,6 +2431,13 @@ and really need the processes to be handled. */ || (!EQ (result, Qt) && event_stream_event_pending_p (0))) { + /* If our timeout has arrived, we move along. */ + if (!event_stream_wakeup_pending_p (timeout_id, 0)) + { + timeout_enabled = 0; + process = Qnil; /* We're done. */ + } + QUIT; /* next_event_internal() does not QUIT, so check for ^G before reading output from the process - this makes it less likely that the filter will actually be aborted. @@ -2429,21 +2464,11 @@ break; } case timeout_event: - { - if (timeout_enabled && - XEVENT (event)->event.timeout.id_number == timeout_id) - { - timeout_enabled = 0; - process = Qnil; /* we're done */ - } - else /* a timeout that's not the one we're waiting for */ - goto EXECUTE_INTERNAL; - break; - } + /* We execute the event even if it's ours, and notice that it's + happened above. */ case pointer_motion_event: case magic_event: { - EXECUTE_INTERNAL: execute_internal_event (event); break; } @@ -2484,6 +2509,10 @@ event = Fmake_event (); while (1) { + /* If our timeout has arrived, we move along. */ + if (!event_stream_wakeup_pending_p (id, 0)) + goto DONE_LABEL; + QUIT; /* next_event_internal() does not QUIT, so check for ^G before reading output from the process - this makes it less likely that the filter will actually be aborted. @@ -2497,12 +2526,8 @@ switch (XEVENT_TYPE (event)) { case timeout_event: - { - if (XEVENT (event)->event.timeout.id_number == id) - goto DONE_LABEL; - else - goto EXECUTE_INTERNAL; - } + /* We execute the event even if it's ours, and notice that it's + happened above. */ case pointer_motion_event: case process_event: case magic_event: @@ -2587,8 +2612,8 @@ redisplay (); } - /* If we're no longer waiting for a timeout, bug out. */ - if (! id) + /* If our timeout has arrived, we move along. */ + if (!event_stream_wakeup_pending_p (id, 0)) { result = Qt; goto DONE_LABEL; @@ -2619,15 +2644,9 @@ break; } case timeout_event: - { - if (XEVENT (event)->event.timeout.id_number != id) - /* a timeout that wasn't the one we're waiting for */ - goto EXECUTE_INTERNAL; - id = 0; /* assert that we are no longer waiting for it. */ - result = Qt; - goto DONE_LABEL; - } - default: + /* We execute the event even if it's ours, and notice that it's + happened above. */ + default: { EXECUTE_INTERNAL: execute_internal_event (event); @@ -2638,7 +2657,7 @@ DONE_LABEL: /* If our timeout has not been signalled yet, disable it. */ - if (id) + if (NILP (result)) event_stream_disable_wakeup (id, 0); /* Put back the event (if any) that made Fsit_for() exit before the
--- a/src/glyphs-x.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 08:47:35 2007 +0200 @@ -3942,6 +3942,7 @@ BUILD_GLYPH_INST (Vtruncation_glyph, truncator); BUILD_GLYPH_INST (Vcontinuation_glyph, continuer); BUILD_GLYPH_INST (Vxemacs_logo, xemacs); + BUILD_GLYPH_INST (Vhscroll_glyph, hscroll); #undef BUILD_GLYPH_INST }
--- a/src/keymap.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/keymap.c Mon Aug 13 08:47:35 2007 +0200 @@ -1253,23 +1253,23 @@ static void define_key_check_keysym (Lisp_Object spec, - Lisp_Object keysym, unsigned int modifiers) + Lisp_Object *keysym, unsigned int modifiers) { /* Now, check and massage the trailing keysym specifier. */ - if (SYMBOLP (keysym)) + if (SYMBOLP (*keysym)) { - if (string_length (XSYMBOL (keysym)->name) == 1) + if (string_length (XSYMBOL (*keysym)->name) == 1) { - keysym = make_int (string_char (XSYMBOL (keysym)->name, 0)); + *keysym = make_int (string_char (XSYMBOL (*keysym)->name, 0)); goto fixnum_keysym; } } - else if (INTP (keysym)) + else if (INTP (*keysym)) { fixnum_keysym: - if (XINT (keysym) < ' ' || XINT (keysym) > 255) + if (XINT (*keysym) < ' ' || XINT (*keysym) > 255) signal_simple_error ("keysym must be in the range 32 - 255", - keysym); + *keysym); /* #### This bites! I want to be able to write (control shift a) */ if (modifiers & MOD_SHIFT) signal_simple_error ("the `shift' modifier may not be applied to ASCII keysyms", @@ -1278,11 +1278,27 @@ else { signal_simple_error ("unknown keysym specifier", - keysym); + *keysym); + } + + /* Code semi-snarfed from v20. */ + if (SYMBOLP (*keysym)) + { + char *name = (char *) + string_data (XSYMBOL (*keysym)->name); + + if (!strncmp(name, "kp_", 3)) { + /* Likewise, the obsolete keysym binding of kp_.* should not lose. */ + char temp[50]; + + strncpy(temp, name, sizeof (temp)); + temp[sizeof (temp) - 1] = '\0'; + temp[2] = '-'; + *keysym = Fintern_soft(make_string(temp, strlen(temp)), Qnil); + } } } - /* Given any kind of key-specifier, return a keysym and modifier mask. */ static void @@ -1345,7 +1361,7 @@ /* Be nice, allow = to mean (=) */ if (bucky_sym_to_bucky_bit (spec) != 0) signal_simple_error ("Key is a modifier name", spec); - define_key_check_keysym (spec, spec, 0); + define_key_check_keysym (spec, &spec, 0); returned_value->keysym = spec; returned_value->modifiers = 0; } @@ -1380,7 +1396,7 @@ if (!NILP (rest)) signal_simple_error ("dotted list", spec); - define_key_check_keysym (spec, keysym, modifiers); + define_key_check_keysym (spec, &keysym, modifiers); returned_value->keysym = keysym; returned_value->modifiers = modifiers; }
--- a/src/lstream.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/lstream.c Mon Aug 13 08:47:35 2007 +0200 @@ -685,6 +685,8 @@ static int Lstream_pseudo_close (Lstream *lstr) { + int rc; + if (!lstr->flags & LSTREAM_FL_IS_OPEN) { Lisp_Object obj = Qnil; @@ -694,18 +696,20 @@ } /* don't check errors here -- best not to risk file descriptor loss */ - Lstream_flush (lstr); + rc = Lstream_flush (lstr); - return 0; + return rc; } int Lstream_close (Lstream *lstr) { + int rc = 0; + if (lstr->flags & LSTREAM_FL_IS_OPEN) { /* don't return here on error, or file descriptor leak will result. */ - Lstream_pseudo_close (lstr); + rc = Lstream_pseudo_close (lstr); if (lstr->imp->closer) { if ((lstr->imp->closer) (lstr) < 0) @@ -738,7 +742,7 @@ lstr->unget_buffer = 0; } - return 0; + return rc; } int
--- a/src/redisplay-tty.c Mon Aug 13 08:47:16 2007 +0200 +++ b/src/redisplay-tty.c Mon Aug 13 08:47:35 2007 +0200 @@ -1323,34 +1323,34 @@ {"kD", "delete"}, /* terminfo */ {"kB", "backtab"}, /* terminfo */ /* - * "kp_backtab", "kp_space", "kp_tab" --- no termcaps + * "kp-backtab", "kp-space", "kp-tab" --- no termcaps */ - {"@8", "kp_enter"}, /* terminfo */ + {"@8", "kp-enter"}, /* terminfo */ /* - * "kp_f1", "kp_f2", "kp_f3" "kp_f4", - * "kp_multiply", "kp_add", "kp_separator", - * "kp_subtract", "kp_decimal", "kp_divide", "kp_0"; + * "kp-f1", "kp-f2", "kp-f3" "kp-f4", + * "kp-multiply", "kp-add", "kp-separator", + * "kp-subtract", "kp-decimal", "kp-divide", "kp-0"; * --- no termcaps for any of these. */ - {"K4", "kp_1"}, /* terminfo */ + {"K4", "kp-1"}, /* terminfo */ /* - * "kp_2" --- no termcap + * "kp-2" --- no termcap */ - {"K5", "kp_3"}, /* terminfo */ + {"K5", "kp-3"}, /* terminfo */ /* - * "kp_4" --- no termcap + * "kp-4" --- no termcap */ - {"K2", "kp_5"}, /* terminfo */ + {"K2", "kp-5"}, /* terminfo */ /* - * "kp_6" --- no termcap + * "kp-6" --- no termcap */ - {"K1", "kp_7"}, /* terminfo */ + {"K1", "kp-7"}, /* terminfo */ /* - * "kp_8" --- no termcap + * "kp-8" --- no termcap */ - {"K3", "kp_9"}, /* terminfo */ + {"K3", "kp-9"}, /* terminfo */ /* - * "kp_equal" --- no termcap + * "kp-equal" --- no termcap */ {"k1", "f1"}, {"k2", "f2"},
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/s/sunos4-0shr.h Mon Aug 13 08:47:35 2007 +0200 @@ -0,0 +1,63 @@ +/* Synched up with: FSF 19.31. (Split off from sunos4shr.h.) */ + +/* This file permits building Emacs with a shared libc on Sunos 4. + To make this work, you must completely replace your C shared library + using one of the SunOS 4.1.x jumbo replacement patches from Sun. + Here are the patch numbers for Sunos 4.1.3: + 100890-10 SunOS 4.1.3: domestic libc jumbo patch + 100891-10 SunOS 4.1.3: international libc jumbo patch */ + + +#include "sunos4-0.h" + +/* Say that the text segment of a.out includes the header; + the header actually occupies the first few bytes of the text segment + and is counted in hdr.a_text. */ + +/* Misleading! Actually gets loaded after crt0.o */ +#undef START_FILES +#define START_FILES pre-crt0.o + +/* + * Kludge! can't get at symbol "start" in std crt0.o + * Who the #$%&* decided to remove the __ characters! + * Someone needs to fix this in sysdep.c with an #ifdef BROKEN_START in + * sysdep.c. We do not use this address so any value should do really. Still + * may need it in the future? + */ +#define BROKEN_START +#ifndef TEXT_START +#define TEXT_START 0x2020 +#endif + +#undef UNEXEC +#define UNEXEC unexsunos4.o +#ifndef RUN_TIME_REMAP +#define RUN_TIME_REMAP +#endif +#define ORDINARY_LINK +#define SUNOS4_SHARED_LIBRARIES + +#undef LD_SWITCH_SYSTEM + +#undef SYSTEM_MALLOC +#ifndef GNU_MALLOC +#define GNU_MALLOC +#endif +#ifndef REL_ALLOC +#define REL_ALLOC +#endif + +#undef USE_DL_STUBS + +#ifndef HAVE_X11R6 +/* With X11R5 it was reported that linking -lXmu dynamically + did not work. With X11R6, it does work; and since normally + only the dynamic libraries are available, we should use them. */ +#ifdef __GNUC__ +#define LIBXMU -Xlinker -Bstatic -lXmu -Xlinker -Bdynamic +#else +#define LIBXMU -Bstatic -lXmu -Bdynamic +#endif + +#endif /* not HAVE_X11R6 */
--- a/src/syssignal.h Mon Aug 13 08:47:16 2007 +0200 +++ b/src/syssignal.h Mon Aug 13 08:47:35 2007 +0200 @@ -88,11 +88,12 @@ the risk of someone forgetting this convention and calling signal() directly. */ +typedef SIGTYPE (*signal_handler_t) (int); + #if defined (HAVE_SIGPROCMASK) /* The POSIX way (sigaction, sigprocmask, sigpending, sigsuspend) */ -typedef SIGTYPE (*signal_handler_t) (int); extern signal_handler_t sys_do_signal (int signal_number, signal_handler_t action); /* Provide our own version of signal(), that calls sigaction(). The