\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{LinuxDoc+Emacs+Ispell-HOWTO ÖÐÎÄ°æ}
\author{×÷Õß£º Philippe MARTIN
     (\onlynameurl{feloy@wanadoo.fr}) \\ 
     Ó¢ÒëÕß£º S\'ebastien Blondeel
     (\onlynameurl{Sebastien.Blondeel@lifl.fr}) \\ 
     ÖÐÒëÕß£ºÀî°²Éº An-Shan Lee
     (\onlynameurl{anshan@hello.com.tw})
   }
\date{v0.4, 27 February 1998
   }
\abstract{     Õâ·ÝÎÄ¼þÖ÷ÒªÊÇÌá¹©¸ø Linux HOWTOs µÄ×÷ÕßÓëÒëÕß¼°ÆäËû²ÎÓë Linux ÎÄ¼þ¼Æ»® (Linux Documentation Project) Õß²Î¿¼Ê¹ÓÃ¡£´Ó±¾ÎÄ´ó¼Ò¿ÉÒÔÕÒµ½Ò»Ð©ÓÐ¹ØÊ¹ÓÃEmacs Óë Ispell ¹¤¾ßµÄÌáÊ¾¡£   }


\begin{document}
\maketitle
\tableofcontents

\section{Ç°ÎÄ   }


\subsection{°æÈ¨    }

°æÈ¨Êôì¶ Philippe Martin 1998\\ 
Ö»ÒªÄú×ñÊØµÚ¶þ°æ»òÖ®áá°æ±¾µÄ GNU Í¨ÓÃ¹«¿ªÊÚÈ¨ (General Public License) µÄÌõ¼þ£¬Äú¿ÉÒÔÖØÐÂÉ¢²¼ ¼°/»ò ÐÞ¸ÄÕâ·ÝÎÄ¼þ¡£




\subsection{ÃúÐ»    }

ÌØ±ð¸ÐÐ» S\'ebastien Blondeel¡£ S\'ebastien ÊÇ¸ö·Ç³£ÂÞÁ¨°ÉàÂµÄÈË£¬²»Í£µÄÎÊÎÒÒ»´ó¶ÑÓÐ¹Ø Emacs °²×°µÄÎÊÌâ¡£:-) µ«Ò²ÓÉì¶ËûËùÎÊµÄÎÊÌâ¶¼ºÜÓÐÒâÒå£¬²ÅÊ¹ÎÒÄÜ¸üÉîÇÐµÄÁË½â Emacs£¬²¢½«ÎÒËùÑ§µ½µÄÖªÊ¶·¢±í³öÀ´£¬Ìá¹©¸ø´ó¼Ò²Î¿¼¡£




\subsection{ÆÀÂÛ    }

Èç¹ûÄúÓÐÈÎºÎ½¨Òé¿ÉÒÔ¸ÄÉÆ±¾ÎÄ£¬Çë²»ÒªÓÌÔ¥¾¡¿ìµÄ¸æËßÎÒ£¬ÎÒ»á×ÐÏ¸µÄ²Î¿¼ÄúµÄÒâ¼û¡£\\ ¶Ôì¶´ËÎÄ¼þËùÌ½ÌÖµÄÖ÷Ìâ£¬Èç¹ûÄúÓÐÈÎºÎÎÊÌâµÄ»°£¬Ò²Çë¾¡¿ìµÄ¸æËßÎÒ£¬ÎÒ»á·Ç³£ÀÖÒâµÄ»Ø´ðÄú£¬ÒòÎªÄúµÄ·¢ÎÊ»òÐíÒ²ÄÜ°ïÖúÎÒ¸ÄÉÆ´ËÎÄ¼þ¡£\footnote{Ó¢ÒëÕß×¢£º¼ÙÈç´ó¼ÒÈÏÎªÕâÎÄ¼þµÄÓ¢ÎÄºÜÄÑ¶®µÄ»°£¬ÄÇ¾Í¹ÖÎÒ·­ÒëµÄ²»ºÃ¡£\\ 
ÖÐÒëÕß×¢£ºÄÇÈç¹û´ó¼Ò¶ÔÕâÖÐÎÄÎÄ¼þÓÐÒÉÎÊµÄ»°£¬ÄÇ»¹ÊÇ¹Ö×ïÓ¢ÒëÕßÂÞ£¬ÒòÎªÎÒÊÇÕÕËûµÄÓ¢ÎÄ·­Òë¹ýÀ´µÄ¡£:-P ¿ªÍæÐ¦µÄ£¬Èç¹û´ó¼ÒÈÏÎªÕâ·ÝÎÄ¼þÖÐÎÄ·­µÄ²»ºÃ£¬Çë¶à¶à°üº­£¬²¢Ìá¹©Òâ¼û¸øÎÒ£¬ÒÔ±ãÎÒ¸ÄÉÆËü£¬Ð»Ð»¡£}




\subsection{°æ±¾    }

Õâ·ÝÎÄ¼þÓëÏÂÁÐ°æ±¾Ïà¹Ø:
\begin{itemize}
\item Sgml-tools °æ±¾ 0.99£¬
\item Emacs °æ±¾ 19.34£¬
\item Ispell °æ±¾ 3.1£¬
\item ±¾ÎÄ¾ÙÀýÄÚÏà¹ØµÄ Emacs ³ÌÊ½¿â¶¼ÓëÉÏÁÐµÄ Emacs °æ±¾Ò»Æð·¢ÐÐ£¬ {\ttfamily iso-sgml} ÔòÓë XEmacs Ò»Æð·¢ÐÐ£¬¶ø {\ttfamily psgml} ÔòÊÇ¶À×Ô·¢ÐÐµÄ³ÌÊ½¿â¡£
\end{itemize}







\section{¼ò½é   }


\subsection{SGML
    }

{\itshape Standard Generalised Mark-up Language\/}£¬»ò³ÆÎª {\bfseries SGML}£¬ÊÇÒ»ÖÖ¿ÉÒÔ¶¨ÒåÎÄ¼þÐÎÌ¬µÄÓïÑÔ¡£

Æ©Èç£¬Äú¿ÉÒÔ¶¨Òå{\itshape Ê³Æ×\/}µÄÎÄ¼þÐÍÌ¬£¬µÚÒ»²¿ÏÈ³ÊÏÖÆäÖ÷³É·Ö£¬µÚ¶þ²¿½éÉÜ×ôÁÏ£¬µÚÈý²¿ÔòÒ»²½Ò»²½µÄÖ¸Ê¾ÈçºÎºæ¿¾µ°¸â£¬Ö®ááÒ»·ùºÃ¿´µÄÍ¼»­¾Í¿É±íÏÖÆä¿É¿ÚÃÀÎ¶ÁË¡£

     
Õâ¾ÍÊÇËùÎ½µÄ{\itshape ÎÄ¼þÐÎÌ¬¶¨Òå (Document Type Definition)\/}¡£Ëü²¢Ã»ÓÐ¶¨Òå×îááµÄ²úÆ·Ó¦ÊÇÊ²÷áÑù×Ó£¬ËüÖ»ËµÃ÷ÎÄ¼þµÄÄÚÈÝ´óÔ¼°üÀ¨ÁËÊ²÷á¡£

ÒÔ´ËÀàÍÆ£¬ÄúÔÚ¶ÁÁËÎÒÕâÊ³Æ×µÄÐÍÌ¬¶¨ÒåµÄ¾ÙÀýÖ®áá£¬ÄúµÄÄÔ×ÓÀï¾Í»áÓÐÄú×Ô¼ºÀàËÆµÄÊ³Æ×£¬»òÕßÄúÏëµÄÕýÊÇÄú×îÏ²»¶µÄ³ø×ÓËù³ÊÏÖ¸øÄúµÄ£¬¶Ô°É£¿È»¶ø£¬ËûÃÇÆäÊµ¿´ÆðÀ´¶¼ÊÇ²»Í¬µÄ£ºÔÚÎÒµÄÏëÏñÀï£¬ÎÒµÄ³É¹ûÕÕÆ¬ÊÇ·ÅÔÚÔ¡ÊÒ¹ñ×ÓµÄ×óÉÏ½Ç£¬¶øÖ÷³É·ÖµÄ±íµ¥ÊÇÔÚáá»¨Ô°Àï£¬½éì¶ÓÎÓ¾³ØÓë¿¾ÈâÇøÖ®¼ä¡£ÄúµÄÄØ£¿

¶àÐ» SGML µÄ±ê×¼¶¨Òå£¬ÎÒÃÇ¿ÉÒÔ°´ÕÕÆäËùÌá¹©µÄ¸ñÊ½ÇáËÉµÄÐ´Ò»·ÝÎÄ¼þ£¬¶ø²»ÓÃµ£ÐÄ×îáá¶ÁÕß»á¿´²»¶®ÎÒÃÇÔÚÐ´Ð©Ê²÷á¡£




\subsection{{\ttfamily LinuxDoc} ÐÍÌ¬¶¨Òå    }

ÕýÈçÄú¿ÉÄÜ²Âµ½µÄ£¬ÕâÐÍÌ¬ÊÊÓÃì¶Ð´×÷¹Øì¶ Linux µÄÎÄ¼þ¡£

´ËÖÖÎÄ¼þÍ¨³£½¨¹¹ÈçÏÂ£ºÎÄ¼þµÄ¿ªÊ¼ÊÇ±êÌâ£¬½ÓÖøÊÇ×÷ÕßµÄÃû³Æ£¬ÎÄ¼þµÄ°æ±¾ºÅÂëÓëÈÕÆÚ¡£ÔÙÀ´ÊÇÕªÒª£¨ÕâÑù¶ÁÕß¾Í²»ÓÃÔÚä¯ÀÀ¹ýÕûÆªÎÄ¼þÖ®áá²ÅÖªµÀÕâ²¢²»ÊÇËûÃÇÏë¿´µÄÎÄ¼þ£©£¬Ö®ááÊÇÄ¿Â¼£¬ÏÔÊ¾ÎÄ¼þ½á¹¹£¬ÕâÑùÒ»À´ÄÇÐ©¼±ì¶ÏëÖªµÀÄ³Ò»ÌØ¶¨ÄÚÈÝµÄÈË¾Í¿ÉÖ±½ÓÌøµ½ÄÇ²¿·ÖÈ¥¶Á¡£

È»áá¾ÍÊÇÒ»ÏµÁÐµÄÕÂ½Ú£¬¶ÎÂäµÈ¡£ÔÚÕâ²¿·Ö£¬Äú¿ÉÒÔ²åÈë²¿·Ö³ÌÊ½£¬¸Ä±ä×ÖÌåÀ´Ç¿µ÷Ä³¸ö×ÖÑÛ»ò¾ä×Ó£¬»ò²åÈëÁÐ±í (lists)£¬ÒÔµ¼Òý¶ÁÕßÖÁÎÄ¼þµÄÁíÒ»²¿·Ý¶ÁÈ¡Ïà¹Ø×ÊÁÏ£¬µÈµÈ¡£

ÒªÐ´ÕâÖÖÎÄ¼þ£¬ÄúÖ»ÐèÒªÕýÈ·µÄÏêÏ¸ËµÃ÷ÎÄ¼þµÄ±êÌâ£¬×÷Õß£¬ÈÕÆÚ£¬°æ±¾£¬ÕÂ½Ú²¿·Ö£¬¼°´óÔ¼ËµÃ÷ºÎÊ±½«²åÈëÄ³Ò»ÁÐ±í (list)£¬Æä°üº¬µÄÔª¼þÊÇÊ²÷áµÈµÈ¼´¿É¡£




\subsection{{\ttfamily SGML-Tools}
    }

{\bfseries SGML-Tools}¿ÉÒÔ½«Ò»ÎÄ¼þµÄÌØÊâ¹æ¸ñ×ª»»³ÉÄúËùÏëÒªµÄ¸ñÊ½¡£¼ÙÈçÄúÒª½«´ËÎÄ¼þ´æÔÚÄú¸öÈËµÄ³ÌÊ½¿â£¬Äú¿ÉÒÔÑ¡Ôñ×ª³É {\itshape PostScript\/} ¸ñÊ½¡£¼ÙÈçÄúÒª½«ËüÍ¸¹ýÍøÂ·ÓëÊÀ½ç·ÖÏí£¬¿É½«Ëü×ª³É {\itshape HTML\/} ¸ñÊ½¡£¼ÙÈçÄú±ØÐëÔÚ Windows ÏÂ¶ÁÈ¡´Ë·ÝÎÄ¼þ£¬Äú¿ÉÒÔ°ÑËü×ª³É {\itshape RTF\/} ¸ñÊ½£¬²¢Ê¹ÓÃÎÄÊéÈíÌå¶ÁÈ¡¡£»òÕßÄúÒ²¿ÉÒÔ½«Ö®×ª³ÉÉÏÊöËùÓÐ¸ñÊ½£¬ÒÔ±ãÄúÈÎºÎÊ±ºòÊ¹ÓÃ¡£

Äú¿É´ÓÕâ FTP Õ¾ \onlynameurl{ftp://ftp.lip6.fr/pub/sgml-tools/} È¡µÃ SGML-Tools¡£ 


\section{ÄúµÄµÚÒ»·ÝÎÄ¼þ    }




\subsection{´ÓÒ»·Ý´¿ÎÄ×ÖµµÎÄ¼þ¿ªÊ¼     }

¼ÙÈçÄúÒª½«Ò»´¿ÎÄ×ÖµµÎÄ¼þ×ª³É SGML ÒÔ±ãÔÙ½«Ö®×ª³ÉÆäËûµÄ¸ñÊ½£¬×ö·¨ÈçÏÂ£º

\begin{enumerate}
\item ÔÙ×î¿ªÍ·Ê±¼ÓÉÏÏÂÁÐ×Ö¾äÓë±êÇ©£º
       
\begin{verbatim}
        <!doctype linuxdoc system>
         <article>
          <title>±êÌâ (Title) ·Å´Ë</title>
          <author>
           ×÷Õß£¬×÷ÕßµÄµç×ÓÓÊ¼þÕÊºÅ£¬µÈµÈ¡£
          </author>
          <date>
           °æ±¾¼°ÈÕÆÚ
          </date>
       
\end{verbatim}

       
\item Èç¹ûÄúÒªÔÚ¿ªÍ·Ê±ÕªÒª´ËÎÄ¼þµÄÄÚÈÝ£¬Çë½«ÏÂÁÐ±êÇ©ÓÃì¶´Ë¶ÎÂäµÄÍ·Î²£º {\ttfamily $<$abstract$>$} Óë {\ttfamily {$<$}/abstract$>$}¡£
       
\item Ö®áá²åÈëÕâ {\ttfamily $<$toc$>$} ±êÇ©£¬ SGML-Tools ×Ô»áÏÔÊ¾ÎÄ¼þµÄ{\itshape Ä¿Â¼ (Table Of Contents)\/}¡£
\item ÔÙÀ´£¬ÔÚÃ¿Ò»ÕÂ (chapter) µÄ¿ªÊ¼£¬ÒÔÏÂÁÐ×Ö¾äÓë±êÇ©È¡´úÃ¿Ò»ÕÂµÄºÅÂë¼°±êÌâ£º

\begin{verbatim}
       <sect>ÕâÒ»ÕÂµÄ±êÌâ (The Title Of The Chapter)
       
\end{verbatim}

ÔÙì¶ÕâÒ»ÕÂµÄ½áÎ²¼ÓÉÏ´Ë {\ttfamily {$<$}/sect$>$} ±êÇ©¡£\\ 
{\bfseries ×¢~£º} Äú²»Ðè·ÅÉÏÕâÒ»ÕÂµÄÏà¶ÔºÅÂë£¬ SGML-Tools ×Ô»á°ïÄú¼ÓÉÏ¡£



\item ÒÔÏàÍ¬µÄ·½·¨ÓÃì¶½ÓÏÂÀ´µÄ·Ö½Ú (section)¡£Äú±ØÐëÉ¾³ýÃ¿Ò»½ÚµÄºÅÂë£¬²¢ÒÔ´Ë {\ttfamily $<$sect1$>$} ±êÇ©±êì¶Ã¿Ò»½Ú¿ªÍ·µÄ±êÌâ£¬¼°ÔÚÃ¿Ò»½ÚµÄ½áÎ²±êÉÏ {\ttfamily {$<$}/sect1$>$}¡£
\item ÔÚÃ¿Ò»½ÚÖÐ£¬ÄúÒ²¿ÉÒÔÊ¹ÓÃ {\ttfamily $<$sectn$>$} Óë {\ttfamily {$<$}/sectn$>$} ±êÇ©£¬½«Ö®·Ö²ã¶à´ï 4 ¸ö²ã´Î£¬Ã¿Ò»²ãÊ¹ÓÃÍ¬ÑùµÄ±êÇ©£¬ÆäÖÐ n=2,3, »ò 4£¬ÒÀ´ËÀàÍÆ¡£
\item Ö®áá£¬ÔÚÃ¿Ò»¶ÎÂä (paragraph) µÄ¿ªÊ¼£¬²åÈë {\ttfamily $<$p$>$} ±êÇ©¡£
\item ÔÚ¶ÎÂäÖÐ£¬Èç¹ûÄúÐèÒªÇ¿µ÷Ä³Ð©²¿·Ö£¬¾ÍÊ¹ÓÃ {\ttfamily $<$it$>$} Óë {\ttfamily {$<$}/it$>$} ({\itshape Ð±Ìå\/})£¬ {\ttfamily $<$bf$>$} Óë {\ttfamily {$<$}/bf$>$} ({\bfseries ´ÖÌå})£¬»ò {\ttfamily $<$tt$>$} Óë {\ttfamily {$<$}/tt$>$} ({\ttfamily ´ò×ÖÌå}) ±êÇ©¡£
\item ÈôÒª²åÈëÁÐ±í (list)£¬ÇëÒÀÏÂÁÐ·½Ê½£º 

\begin{verbatim}
        Àý×Ó£ºÕâÊÇÒ»¸öËÄÐÐµÄÁÐ±í£º

         - µÚÒ»ÐÐ·ÅÔÚÕâÀï
         - ¸úÖøµÚ¶þÐÐ
         - ÔÙÀ´µÚÈýÐÐ
         - µÚËÄÐÐ¡£
       
\end{verbatim}

       
ÇëÒÔÏÂÁÐ·½Ê½À´±êÃ÷ÉÏÁÐÁÐ±í£º
       
\begin{verbatim}
        ÕâÊÇÒ»¸öËÄÐÐµÄÁÐ±í£º
       <itemize>
       <item>µÚÒ»ÐÐ·ÅÔÚÕâÀï
       <item>¸úÖøµÚ¶þÐÐ
       <item>ÔÙÀ´µÚÈýÐÐ
       <item>tµÚËÄÐÐ¡£
       </itemize>
       
\end{verbatim}

\item µ±ÄúÒªÔÚ¶ÎÂäÖÐ·Å½øÄ³³ÌÊ½µÄÒ»²¿·Ö£¬»òÕßÐèÒªÍ»ÏÔÄ³Ð©µØ·½£¬ÇëÒÀÏÂÁÐ·½Ê½£º

\begin{verbatim}
        <verb>
        10 REM à¸£¬ÀÏÌì£¡ÕâÊÇÊ²÷á£¿
        20 REM ÎÒÒÔÎªÕâ¶«Î÷Ôç¾Í²»¼ûÁË£¡
        30 PRINT "ÎÒ»Øµ½...";
        40 PRINT "Õü¾ÈÊÀ½ç¡£"
        50 INPUT "Äã´ÓÄÄµÃÖªµÄ£¿ ",M$
        60 IF M$="°¢´ô" THEN PRINT "ÄãºÜ´ÏÃ÷¡£":GOTO PARADISE
        70 ELSE PRINT "ËäÈ»ÄãÈÔÊÇÉµºôºôµÄ¡£":GOTO RICHMOND
        </verb>
       
\end{verbatim}

\item µ½Ä¿Ç°ÎªÖ¹£¬ÄúËùÑ§µ½µÄ SGML ¸ñÊ½¼¼ÊõÒÑ¾­Ïàµ±¹»ÓÃ¡£¼ÙÈçÄúÏëÔÙ¼ÓÇ¿ÄúµÄÎÄ¼þ£¬Äú¿ÉÒÔ²Î¿¼ {\bfseries SGML-Tools} µÄÊ¹ÓÃÖ¸Òý£¬ÀïÃæÏê¾¡µÄ½éÉÜÁËÓÐ¹Ø {\bfseries LinuxDoc} ÎÄ¼þÐÍÌ¬µÄÓ¦ÓÃ¡£
\end{enumerate}



\section{Éè¶¨ {\ttfamily Emacs}
    }




\subsection{ÖØÒôÎÄ×Ö (Accented Characters)
     }

¼ÙÈçÄúÐèÒªÒÔ·¨ÎÄ»òÆäËûÎ÷Å·ÓïÑÔÀ´Ð´ÎÄ¼þ£¬Äú±ØÐëÊ¹ÓÃ 8-bit ÎÄ×Ö (8-bit characters)£¬²Å¿ÉÏÔÊ¾ÆäÓÐÖØÒôµÄÎÄ×Ö¡£ÕâÑùµÄÉèÖÃ²Å¿ÉÒÔÁî Emacs ½ÓÊÜÕâÐ©ÎÄ×Ö¡£




\subsubsection{ÏÔÊ¾ 8-bit ÎÄ×Ö      }

ÒªÁî Emacs ÏÔÊ¾ 8-bit ÎÄ×Ö£¬Äú±ØÐë½«ÏÂÁÐÖ¸Áî¼ÓÈëÄúµÄ {\ttfamily .emacs} µµ°¸£º
\begin{verbatim}
       (standard-display-european 1)
       (load-library "iso-syntax")
      
\end{verbatim}


¼ÙÈçÄúÔÚÒ»¸ö²»Ö§Ô® 8-bit µÄÖÕ¶Ë»úÉÏÊ¹ÓÃ Emacs£¬Äú¿ÉÒÔÊ¹ÓÃ {\ttfamily iso-ascii} ³ÌÊ½¿â ({\ttfamily (load-library "iso-ascii")})£¬Ëü»áÖ¸Áî Emacs ÒÔ×îÏàËÆµÄÐÎÊ½À´ÏÔÊ¾ÕâÐ©ÎÄ×Ö¡£




\subsubsection{8-bit ÎÄ×ÖµÄ¼üÈë      }

¼ÙÈçÄúµÄ¼üÅÌÔÊÐíÄú¼üÈëÓÐÖØÒôµÄÎÄ×Ö£¬ÄÇ¾ÍÃ»ÓÐÎÊÌâ£¬Òª²»È»Ò²¿ÉÕÕÏÂÁÐ·½Ê½À´²¹¾È£º




\paragraph{{\ttfamily Iso-acc} ³ÌÊ½¿â      }

Emacs {\ttfamily iso-acc} ³ÌÊ½¿â¿ÉÒÔÈÃÄúÊ¹ÓÃ 7-bit µÄ¼üÅÌ¼üÈë 8-bit µÄÎÄ×Ö¡£

Ö»Òª½«ÏÂÁÐÖ¸Áî¼ÓÈëÄúµÄ {\ttfamily .emacs} µµ°¸£º
\begin{verbatim}
      (load-library "iso-acc")
      
\end{verbatim}


È»ááÔÚÊ¹ÓÃ Emacs Ê±£¬¿ªÆôÄúËùÐèÒª±à¼­µÄµµ°¸£¬¼üÈë {\ttfamily Meta-x iso-accents-mode}¡£

ÕâÑùÄúÈôÒª¼üÈë·¨ÎÄ {\itshape caf\'e\/} µÄ {\bfseries \'e} µÄ»°£¬Äú¾Í¿ÉÒÔÏÈ¼üÈë {\bfseries '} È»ááÔÙ¼üÈë {\ttfamily e}¡£×ÜÖ®£¬ÄúÐèÏÈ¼üÈëÄÇ¸öÎÄ×ÖµÄÖØÒô£¬Ö®ááÔÙ¼üÈëÏà¶ÔµÄ×ÖÄ¸£¨²»ÂÛ´óÐ´»òÐ¡Ð´£©¡£ÒÔÏÂÊÇÒ»Ð©Äú¿ÉÒÔÊ¹ÓÃµÄÖØÒô£º

\begin{list}{}{}
\item {\ttfamily '}~: Acute
\item {\ttfamily `}~: Grave
\item {\ttfamily \^{}}~: Circumflex
\item {\ttfamily "}~: Dieresis
\item {\ttfamily \~{}}~: Tilde, cedilla, ÓëÆäËûÌØ±ðµÄÀý×Ó (cf iso-acc.el).
\item {\ttfamily /}~: ÔÚÒ»×ÖÄ¸ÉÏ¼ÓÏß£¬µÈµÈ¡£
\end{list}
      

Èç¹ûÄúÖ»ÐèÒªÕâÐ©ÖØÒô·ûºÅÖ®Ò»£¬µ«²»ÊÇÏà¶ÔµÄÖØÒô×ÖÄ¸£¬ÄÇ¾ÍÔÚ·ûºÅÖ®áá¼üÈëÒ»¿Õ°×¼ü¡£ÀýÈç£¬ÒªÊä³ö {\itshape l'\'el\'ephant\/}£¬¾Í¼üÈë {\ttfamily l ' \cparam{¿Õ°×} ' e l ' e ...} ¼´¿É¡£

Äú¿ÉÒÔÔÚ {\ttfamily iso-acc.el} µµ°¸ÄÚÕÒµ½ËùÓÐÄúÐèÒªµÄÖØÒô×éºÏ¡£




\paragraph{\cparam{Meta} ¼ü      }

Äú¿ÉÒÔÔÚÄ³Ð©ÖÕ¶Ë»úÉÏÊ¹ÓÃ \cparam{Meta} (»ò \cparam{Alt}) ¼üÀ´¼üÈë 8-bit ÎÄ×Ö¡£ÀýÈç£¬Äú¿ÉÒÔ¼üÈë {\bfseries \cparam{Meta}-i} À´Êä³ö {\bfseries \'e} Õâ¸ö×Ö¡£

µ«ÊÇ¾ÍÎÒËùÖª£¬ Emacs ½« \cparam{Meta} ¼üÓÃì¶ÆäËû³¡ºÏ£¬ÆäËûµÄ³ÌÊ½¿âËÆºõÒ²²»Ìá¹©ÕâÖÖÖØÒôÊäÈë·½Ê½¡£

²»¹ýÎÒÃÇ»¹ÊÇ¿ÉÒÔÒÔÏÂÁÐ·½Ê½À´²¹¾È£º

\begin{verbatim}
      (global-set-key "\ei" '(lambda () (interactive) (insert ?\351)))
                         _                                      ___
      
\end{verbatim}


Ö»Òª½«ÉÏÁÐÖ¸Áî¼ÓÈëÄúµÄ {\ttfamily .emacs} µµ°¸ÄÚ£¬Äú¾Í¿ÉÒÔÓÃ {\bfseries \cparam{Meta}-i} À´Êä³ö {\bfseries \'e}¡£ÄúÒ²¿ÉÒÔÖØÐÂ¶¨ÒåÄúÒªµÄ×éºÏ£¬Ö»ÒªÄúÓÃÄúÒªµÄ×Ö¼ü (key) È¡´ú {\bfseries i}£¬ÓÃÕýÈ·µÄ±àÂë (code) È¡´ú {\bfseries 351}£¬ÔÙÅä¶ÔÆðÀ´£¬¾Í¿ÉÒÔµÃµ½ÄúÒªµÄÖØÒô×ÖÄ¸¡£Äú¿É²Î¿¼ ISO-8859-1 character set È¡µÃÄúÒªµÄ±àÂë¡£

{\bfseries ×¢Òâ£¡} Ä³Ð© local modes »òÐí»áÖØÐÂ¶¨ÒåÄúµÄ×Ö¼ü×éºÏ¡£




\subsubsection{8-bit  SGML ÎÄ×ÖµÄÏÔÊ¾    }

Ê¹ÓÃ SGML Ê±£¬Äú¿ÉÒÔÀûÓÃ¾Þ¼¯ (macros) À´ÊäÈëÖØÒôÎÄ×Ö¡£ÀýÈç£¬ÒªÊäÈë {\bfseries \'e} ¾Í¿ÉÓÃ {\bfseries \&eacute;}¡£µ«Í¨³££¬ÐèÒª¶ÁÈ¡ SGML µÄÓ¦ÓÃÈíÌå¶¼¿ÉÒÔ¶ÁÈ¡ 8-bit ÎÄ×Ö£¬ËùÒÔÒ»°ã¶¼ÓÃ²»µ½ÕâÖÖ¾Þ¼¯¡£»òÐíÓÐÐ©ÈíÌåÈÔÈ»ÎÞ·¨¶ÁÈ¡ 8-bit ÎÄ×Ö£¬ÄÇ÷áÕâÊ±Äú¾Í¿ÉÒÔÀûÓÃÉÏÊö¾Þ¼¯ÁË¡£

Ò»°ãÊ±ºò£¬ÔÚÊ¹ÓÃ Emacs Ê±£¬Äú¿ÉÒÔÀûÓÃ {\ttfamily iso-sgml} ³ÌÊ½¿âÀ´ÊäÈëÖØÒôÎÄ×Ö¡£µ±ÄúÒª½«ÎÄ¼þµµ°¸´æµ½´ÅµúÊ±£¬ËüÒ²»á°ïÄú°Ñ 8-bit ÎÄ×Ö×ª³É SGML µÄ¸ñÊ½£¬ÒÔ·½±ãÄú¶ÁÈ¡¡£

ËùÒÔÓÐÁËÕâ¸ö³ÌÊ½¿â£¬Äú¾Í¿ÉÒÔÔÚÊ¹ÓÃ Emacs Ê±£¬ÇáËÉµÄÊäÈë»ò¶ÁÈ¡ 8-bit ÎÄ×Ö£¬ÉõÖÁÒ»¸ö²»½ÓÊÜ 8-bit ÎÄ×ÖµÄÈíÌå£¬Ò²¿ÉÒÔ¶ÁÈ¡Äú±àÐ´µÄ 8-bit ÎÄ¼þ¡£

ÄúÖ»Òª½«ÏÂÁÐÎÄ×Ö¼ÓÈë {\ttfamily .emacs} µµ°¸ÄÚ£¬Äú¾Í¿ÉÒÔÊ¹ÓÃÉÏÊö³ÌÊ½¿â£º

\begin{verbatim}
      (setq sgml-mode-hook
      '(lambda () "Defaults for SGML mode."
       (load-library "iso-sgml")))
      
\end{verbatim}





\subsection{SGML Ä£Ê½ (SGML mode)
     }

µ±ÔØÈë {\bfseries .sgml} Ïà¹ØÎÄ¼þÊ±£¬ Emacs Í¨³£»á×Ô¶¯½øÈë {\bfseries sgml Ä£Ê½}¡£ ¼ÙÈçÃ»ÓÐµÄ»°£¬Äú¿ÉÒÔ¼üÈë {\ttfamily Meta-x sgml-mode} À´Çý¶¯Ëü½øÈë {\bfseries sgml Ä£Ê½}¡£»òÕß½«ÏÂÁÐÖ¸Áî¼ÓÈë {\ttfamily .emacs} µµ°¸ÄÚÀ´Éè¶¨Ëü×Ô¶¯½øÈë£º

\begin{verbatim}
      (setq auto-mode-alist
      (append '(("\.sgml$"  . sgml-mode))
                auto-mode-alist))
     
\end{verbatim}


ÔÚ sgml Ä£Ê½ÏÂ£¬Äú¿ÉÒÔÑ¡ÔñÒªÈçºÎÊä³ö 8-bit ÎÄ×Ö¡£±ÈÈç£¬Ê¹ÓÃ {\ttfamily Meta-x sgml-name-8bit-mode} £¨»òÊÇÑ¡µ¥ÏîÄ¿ÉÏµÄ {\itshape SGML/Toggle 8-bit insertion\/}£©£¬Äú¿ÉÒÔÑ¡ÔñÖ±½ÓÊä³ö 8-bit ÎÄ×ÖµÄ¸ñÊ½£¬»òÊÇÊä³ö SGML µÄ¸ñÊ½£¨¼´ {\bfseries \&...;} ¸ñÊ½£©¡£

ÔÚ´ËÄ£Ê½ÏÂ£¬ÄúÒ²¿ÉÒÔÊ¹ÓÃ {\ttfamily Meta-x sgml-tags-invisible}£¨»òÊÇÑ¡µ¥ÏîÄ¿ÉÏµÄ {\itshape SGML/Toggle Tag Visibility\/}£© À´Ñ¡ÔñÊÇ·ñÒªÒþ²Ø»òÏÔÊ¾ SGML ±êÇ©¡£




\subsection{PSGML Ä£Ê½ (PSGML mode)
    }

PSGML Ä£Ê½¶Ôì¶ÔÚÊ¹ÓÃ Emacs ÏÂ±à¼­ SGML ÎÄ¼þºÜÓÐÖúÒæ¡£

Õâ·ÝÎÄ¼þ \onlynameurl{psgml-linuxdoc} ½âÊÍÁËÈçºÎ°²×°Õâ¸öÄ£Ê½£¬¼°ÈçºÎ½«Ö®Ó¦ÓÃÔÚ {\itshape LinuxDoc\/}¡£ 




\subsection{ÆäËûÏà¹ØÄ£Ê½     }




\subsubsection{Auto-fill mode
      }

ÔÚÒ»°ãÄ£Ê½ÏÂ£¬µ±Äú´òÍêÒ»¸ö¶ÎÂä£¬ÄúÍ¨³£»á¼üÈë \cparam{Return} ÒÔ±ã»»µ½ÏÂÒ»ÐÐ£¬·ñÔòÄúÎÄÕÂµÄ¶ÎÂä¾Í»áÏàÁ¬£¬ÎÞ·¨·ÖÇå³þ¡£µ«µ±ÄúÊ¹ÓÃ \cparam{Return} ÒÔ±ã»»µ½ÏÂÒ»ÐÐÊ±£¬ÄúµÄ¶ÎÂäµÄÓÒ±ßÍ¨³£ÊÇ²Î²î²»ÆëµÄ¡£

µ«¼ÙÈçÄú²»»»µ½ÏÂÒ»ÐÐ¶ø¼ÌÐø¼üÈëÎÄ×Ö£¬ÔÚÄ³Ð©±à¼­Æ÷ÏÂ£¬Äú¾ÍÎÞ·¨¿´µ½ÓÒ±ß±ß½çÍâµÄÎÄ×ÖÊÇÊ²÷á¡£

ÔÚÕâÇéÐÎÏÂ£¬{\bfseries auto-fill} Ä£Ê½¿ÉÒÔ°ïÄú¸ÄÕýÕâÇé¿ö¡£µ±Äú¼üÈë³¬¹ýÔ¤ÉèÖµµÄµÚ70ÁÐÊ±£¬ÔÚÕâÄ£Ê½ÏÂ£¬Äú¾Í»á×Ô¶¯»»µ½ÏÂÒ»ÐÐ¡£

ÏÂÁÐÊÇÖ´ÐÐ auto-fill Ä£Ê½µÄÖ¸Áî£¬²¢¿É½«Ò»ÐÐµÄ¿í¶Èµ÷ÕûÎª80ÁÐ£º

\begin{verbatim}
       (setq sgml-mode-hook
             '(lambda () "Defaults for SGML mode."
                 (auto-fill-mode)       
                 (setq fill-column 80)))
       
\end{verbatim}





\section{Ispell
    }

Èç¹ûÄúÒªÔÚÊ¹ÓÃ Emacs Ê±×÷Æ´×Ö¼ì²é£¬Äú¿ÉÒÔÊ¹ÓÃ {\bfseries Ispell} Ì×¼þ¼°Æä Emacs Ä£Ê½¡£




\subsection{Ñ¡ÔñÄúµÄÔ¤Éè´Çµä (default dictionaries)
     }

Äú¿ÉÒÔÉè¶¨ Emacs£¬Ê¹Ö®ÔÚ¿ªÊ¼ÔØÈëÄ³Ò»ÎÄ¼þÊ±£¬±ã×Ô¶¯Ñ¡ÔñËùÐèµÄ´Çµä£¨Äú¿ÉÒÔÑ¡ÔñºÃ¼¸¸ö£©¡£Ô¤Éè´Çµä (main dictionary) ¼´Ö÷Òª´Çµä£¬ÊÇÓë Ispell Ò»Æð·¢ÐÐµÄ´Çµä¡£Äú¿ÉÒÔÑ¡ÔñÄúËùÐèÒªµÄÓïÑÔ¡£µÚ¶þ¸ö¼´ÊÇÄúµÄ¸öÈË´Çµä (personal dictionary)£¬Äú¿ÉÒÔÉè¶¨Òª Ispell ½«ÄúÔÚÖ÷Òª´ÇµäÀïËùÕÒ²»µ½µÄ×Ö·Åµ½ÕâÀï¡£

¼ÙÈçÄúÒª½« Ispell ÀïµÄ·¨ÎÄ´ÇµäÉèÎªÔ¤Éè´Çµä£¬²¢ÏëÓÃÄúÖ÷Ä¿Â¼ (home directory) ÏÂµÄ {\ttfamily .ispell-dico-perso} µµ°¸×÷Îª¸öÈË´Çµä£¬¿ÉÒÔÔÚ {\ttfamily .emacs} µµ°¸Àï¼ÓÈëÏÂÁÐÖ¸Áî£º

\begin{verbatim}
       (setq sgml-mode-hook
       '(lambda () "Defauts for SGML mode."
       (setq ispell-personal-dictionary "~/.ispell-dico-perso")
       (ispell-change-dictionary "francais")
       ))
      
\end{verbatim}





\subsection{ÎªÌØ¶¨ÎÄ¼þÉè¶¨¸ö±ðµÄ´Çµä     }

Èç¹ûÄúÃ»ÓÐÓÃÍ¬Ò»ÓïÑÔÀ´¼ì²éÕû·ÝÎÄ¼þµÄÆ´×Ö£¬ÄÇ÷áÄú¿ÉÄÜ»áÓöµ½Ò»Ð©À§ÄÑ¡£µ«µ±ÄúÔÚ·­ÒëÎÄÕÂÊ±£¬ÄúºÜÓÐ¿ÉÄÜ¾­³£½»»»Ê¹ÓÃ²»Í¬µÄÓïÑÔÓë´Çµä¡£



²»¹ÜÊÇ×Ô¶¯Éè¶¨µÄ»òÊÇÊÖ¶¯µÄ£¬ÎÒ²¢²»Çå³þ Lisp ÊÇÈçºÎÑ¡ÔñËùÐèµÄÖ÷´ÇµäºÍ¸öÈË´Çµä¡££¨Èç¹ûÄúÖªµÀµÄ»°£¬ÇëÀ´ÐÅ¸æËßÎÒ£¡£©



²»¹ýÄØ£¬ÔÚÃ¿Ò»¸öµµ°¸µÄ½áÎ²£¬Ö»Òª½«ÏÂÁÐÖ¸Áî¼ÓÈë×÷Îª×¢ÊÍ£¬Äú¶¼¿ÉÒÔÖ¸¶¨ÄúÏÖÐÐµÄµµ°¸ÒªÊ¹ÓÃÄÄÒ»´Çµä¡£ Ispell ¿ªÊ¼Æ´×Ö¼ì²éÊ±¼´¿ÉÓ¦ÓÃËùÖ¸¶¨µÄ´Çµä£º

\begin{verbatim}
      <!-- Local IspellDict: english -->
      <!-- Local IspellPersDict: ~/emacs/.ispell-english -->
     
\end{verbatim}


¼ÙÈçÄúÔÚ {\ttfamily .emacs} µµ°¸ÀïÒÑ¾­Éè¶¨ÁËÔ¤Éè´ÇµäÎª·¨ÎÄ£¬ÄÇÄú¿ÉÒÔ½«ÉÏÊöÖ¸Áî¼ÓÈëÄúËùÐ´µÄÓ¢ÎÄÎÄ¼þµÄ½áÎ²£¬ÒÔ±ãÊ¹ÓÃÓ¢ÎÄ´Çµä¡£




\subsection{ÎÄ¼þµÄÆ´×Ö¼ì²é      }

ÈôÒª¼ì²éÕû·ÝÎÄ¼þ£¬¿ÉÔÚÎÄ¼þÄÚÈÎÒ»´¦Ê¹ÓÃ {\ttfamily Meta-x ispell-buffer} Ö¸Áî¡£ÄúÒ²¿ÉÒÔ¼ì²éÎÄ¼þÄ³Ð©²¿·ÖµÄÆ´×Ö£º

\begin{itemize}
\item  ½«Òª¼ì²éÆ´×ÖµÄ²¿·ÖÖ®¿ªÍ·ÓÃ {\ttfamily Ctrl-Spc} ±ê×¢ (mark)
(¼´ËùÎ½µÄ mark-set-command)£¬
\item  È»áá±ê×¢µ½ÄÇ²¿·ÖµÄ½áÎ²£¬
\item  ÔÙ¼üÈëÖ¸Áî {\ttfamily Meta-x ispell-region}.
\end{itemize}


Emacs ¾Í»á¿ªÊ¼Ö´ÐÐ Ispell¡£µ±Óöµ½´ÇµäÀïËùÃ»ÓÐµÄ×ÖÊ±£¬³ÌÊ½»áÏÔÊ¾Õâ¸ö×Ö£¨Í¨³£ÒÔ·´°×ÏÔÊ¾£©£¬²¢ÒªÇóÄúÊäÈëÏÂÁÐÖ¸Áî£º

\begin{itemize}
\item {\bfseries spc }accepts the word, this time only,
\item {\bfseries i }accepts the word and inserts it in your personal dictionary, 
\item {\bfseries a }accepts the word for this session,
\item {\bfseries A }accepts the word for this file, and inserts it in the local file dictionary
\item {\bfseries r }allows you to correct the word by hand
\item {\bfseries R }allows you to correct all the occurrences of the misspelled word,
\item {\bfseries x }stops the checking, and puts the cursor back in place,
\item {\bfseries X }stops the checking and leaves the cursor where it is, letting you correct your file; you will be able to continue the spell-checking later if you type {\ttfamily Meta-x ispell-continue},
\item {\bfseries ? }gives you online help.
\end{itemize}


Èç¹û Ispell ÕÒµ½ÀàËÆµÄ´Ê»ã£¬Ëü»á½«ÕâÐ©ÎÄ×ÖÏÔÏÖÔÚÒ»Ð¡ÊÓ´°ÄÚ£¬Ã¿Ò»¸öÎÄ×ÖÇ°¶¼ÓÐºÅÂë±êÃ÷£¬Ö»Òª¼üÈëÄúÒªµÄÄÇ¸ö×Ö»ãµÄºÅÂë£¬ Ispell ¾Í»áÒÔÄúËùÑ¡µÄ×ÖÈ¡´ú´í×Ö¡£




\subsection{¸öÈË´ÇµäÓë¸ö±ðµµ°¸´Çµä (local file dictionary) µÄ±È½Ï      }

{\bfseries i} ¼üÈÃÄú¿ÉÒÔÔÚÄúµÄ¸öÈË´ÇµäÄÚ²åÈëÒ»¸öÐÂ×Ö£¬¶ø {\bfseries A} ¼üÈÃÄúÔÚ¸ö±ðµµ°¸´ÇµäÄÚ²åÈëÐÂ×Ö¡£



¸ö±ðµµ°¸´ÇµäÆäÊµÊÇÒ»µµ°¸½áÎ²Ëù²åÈëÒ»ÏµÁÐµÄ×Ö»òÆÀÂÛ£¬ Ispell Ã¿´Î¼ì²é´Ëµµ°¸µÄÆ´×ÖÊ±¶¼»áÖØÐÂ¶ÁÈ¡Õâ¸ö´Çµä¡£Èç´Ë£¬Äú¾Í¿ÉÒÔ¼üÈëÒ»Ð©Ö»ÔÚÕâÌØ¶¨µµ°¸ÄÜ½ÓÊÜµÄ×Ö£¬¶øÆäËûµµ°¸Ôò¿É²»ÊÜ´Ë´ÇµäÓ°Ïì¡£



ÔÚÎÒ¿´À´£¬ÎÒÈÏÎª¸öÈË´Çµä×îºÃÊÇÓÃÀ´´¢´æÒ»Ð©Ö÷´ÇµäËùÃ»ÓÐµÄ×Ö£¬ÓÈÆäÊÇÄÇÐ©Êôì¶¸÷¹úÓïÑÔµÄ×Ö£¨ÏñÊÇÓÐÁ¬×Ö·ûºÅ hyphenated µÄ×Ö£©£¬¼°Ò»Ð©Í¨ÓÃµÄÌØ¶¨Ãû´Ê£¨ÏñÊÇ {\itshape Linux\/}£©£¬µ«ÔÚ¸öÈË´ÇµäÄÚ¼ÓÈëÌ«¶àÏñÊÇÐÕÃûµÄµ¥×ÖÒ²²»Ì«ºÃ£¬ÒòÎªÕâÐ©×Ö¾Í»á±»µ±×÷Ò»°ã×ÖÊ¹ÓÃÁË£¨Äú¿ÉÒÔÏëÏñÈç¹ûÄú°Ñ {\itshape Tof\/} ¼ÓÈë¸öÈË´ÇµäÄÚ£¬ Ispell ¿ÉÄÜ¾Í»áÔÚÏÂÁÐµÄÀý×ÓÀï£¬ºöÂÔÕâ¸ö´í×Ö£º\footnote{{\itshape `When the going gets tof, the tof get going.'\/}
{\itshape Tof\/} ÊÇ·¨ÎÄ {\itshape Christophe\/} Ãû×ÖµÄËõÐ´¡£}
£©




\subsection{¼üÈëÊ±µÄÆ´×Ö¼ì²é      }

µ±ÄúÔÚ¼üÈëÎÄ×ÖÊ±£¬Ö»ÒªÄúÔÚÕâ {\bfseries ispell-minor-mode} Ä£Ê½ÏÂ£¬ Ispell ¾Í»á×Ô¶¯°ïÄú¼ì²éÆ´×Ö¡£ÒªÆô¶¯»ò¹Ø±ÕÕâÄ£Ê½£¬Çë¼üÈëÕâÖ¸Áî {\ttfamily Meta-x ispell-minor-mode}¡£Ã¿µ±ÓÐ Ispell ²é²»µ½µÄ×ÖÊ±£¬Ëü¾Í»á{\itshape ßÙ\/}Ò»ÉùÀ´ÌáÐÑÄú¡£



¼ÙÈçÄú¾õµÃ{\itshape ßÙ\/}Ò»ÉùºÜ·³ÈË£¬Ö»Òª¼üÈëÖ¸Áî {\ttfamily Meta-x set-variable RET visible-bell RET t RET} £¬Äú¾Í¿ÉÒÔ¸ÄÓÃÓ©Ä»µÄÉÁË¸À´ÌáÐÑÄú¡£ÄúÒ²¿ÉÒÔÔÚ {\ttfamily .emacs} µµ°¸Àï¼ÓÈëÏÂÁÐÖ¸ÁîÀ´¹Øµô Emacs µÄÉùÒô£º

\begin{verbatim}
       (setq visible-bell t)
      
\end{verbatim}





\section{Ò»Ð©Í¶»úµÄ¼¼ÇÉ   }


\subsection{×Ô¶¯²åÈëÒ³Ê× (header)
    }

ÔÚ Emacs ÏÂ£¬Äú¿ÉÒÔ½«ÈÎºÎÊÂ¼þ{\itshape Íâ¹Ò (hook)\/} ÈÎºÎµÄ¶¯×÷£¨ÏñÊÇ´ò¿ªÒ»¸öµµ°¸£¬´¢´æ£¬»òÖ´ÐÐÒ»¸öÐÂµÄÄ£Ê½£¬µÈµÈ£©¡£



ÄúÒ²¿ÉÒÔÀûÓÃ {\bfseries autoinsert} ³ÌÊ½¿âÀ´Ö´ÐÐÒ»Ð©ÌØ±ðµÄ¶¯×÷£ºµ±ÄúÔÚ Emacs ÏÂ¿ªÐÂµµ°¸Ê±£¬Õâ¸ö³ÌÊ½¿â¾Í»á¸ù¾Ýµµ°¸µÄÊôÐÔÀ´²åÈëÏà·ûµÄ{\itshape ±ê×¼\/}Ò³Ê×¡£



¾ÍÎÒÃÇµÄÇéÐÎ£¬Õâ{\itshape ±ê×¼\/}Ò³Ê×¾ÍÊÇÎÒÃÇËµÃ÷ÎÄ¼þÐÍÌ¬ (LinuxDoc)£¬±êÌâ£¬×÷Õß£¬¼°ÈÕÆÚµÄµØ·½¡£



½ÓÏÂÀ´ÎÒ»áÃèÊöÁ½¸öÈçºÎ²åÈëÕâÖÖÒ³Ê×µÄ·½·¨¡£Äú¿ÉÒÔ²åÈëÒ»¸öº¬ÓÐÏà¹Ø×ÊÑ¶µÄÄ£°å (template) µµ°¸£¬»òÕßÄúÒ²¿ÉÒÔÅÜÒ»ÅÜ {\bfseries elisp} ³ÌÊ½¡£




\subsubsection{½åÓÉ²åÈëÒ»¸öµµ°¸    }

µ±Äú¿ªÆôÒ»·Ýµµ°¸Ê±£¬Ê×ÏÈÄú±ØÐë¸æËß Emacs Ö´ÐÐ{\ttfamily ×Ô¶¯²åÈë}£¬È»ááÔÙ¶ÁÈ¡ {\bfseries autoinsert} ³ÌÊ½¿âµÄ×ÊÁÏÀ´Ðû¸æÎÒÃÇÒª¸Ä±äµÄ {\ttfamily auto-insert-alist} ±íµ¥¡£Õâ±íµ¥¶¨ÒåÁË²»Í¬µµ°¸ÐÍÌ¬ËùÒª²åÈëµÄÒ³Ê×¡£ËüµÄÔ¤ÉèÖµÊÇÒª²åÈëµÄµµ°¸±ØÐëÔÚ {\ttfamily \~{}/insert/} Ä¿Â¼ÏÂ£¬µ«Èç¹ûÄúÒªÖØÐÂ¶¨ÒåÆä {\ttfamily auto-insert-directory} Ò²ÊÇ¿ÉÐÐµÄ¡£



Ã¿Ò»´ÎÄú¿ªÆôÒ»·ÝÐÂµÄ SGML µµ°¸Ê±£¬Ö»ÒªÔÚ {\ttfamily .emacs} µµ°¸ÄÚ¼ÓÈëÏÂÁÐÖ¸Ê¾£¬Äú¾Í¿ÉÒÔ²åÈë {\ttfamily \~{}/emacs/sgml-insert.sgml} µµ£º

\begin{verbatim}
      (add-hook 'find-file-hooks 'auto-insert)
      (load-library "autoinsert")
      (setq auto-insert-directory "~/emacs/")
      (setq auto-insert-alist
            (append '((sgml-mode .  "sgml-insert.sgml"))
                    auto-insert-alist))
     
\end{verbatim}


ÄÇÄú¾Í¿ÉÒÔÔÚ {\ttfamily \~{}/emacs/sgml-insert.sgml} µµÐ´ÈëÄú×Ô¶©µÄÒ³Ê×£¬È»ááÔÙÖØÐÂÖ´ÐÐ Emacs À´¿ªÆôÄ³Ò» {\ttfamily foobar.sgml} µµ°¸£¬Ö®áá Emacs »áÑ¯ÎÊÄúÈ·ÈÏÕâ×Ô¶¯²åÈëµÄÖ¸ÁîÀ´²åÈëÄúÒªµÄÒ³Ê×¡£




\subsubsection{½åÓÉÖ´ÐÐÒ»¸ö³ÌÊ½    }

Õâ·½·¨¸úÉÏÊö´óÍ¬Ð¡Òì£¬µ«²»Í¬µÄÊÇÄú±ØÐëÉè¶¨ {\ttfamily auto-insert-alist} ±íµ¥£¬¸æËßËüÒª²åÈëµÄÊÇÒ»¸öÖ´ÐÐ³ÌÊ½£¬¶ø·ÇÒ»¸öµµ°¸¡£Ö»ÒªÔÚ {\ttfamily .emacs} µµ°¸ÄÚ¼ÓÈëÏÂÁÐÖ¸Ê¾£¬¾Í¿ÉÒÔ×Ô¶¯Ö´ÐÐ£¬²»¹ýµ±È»ÄúµÃÏÈ°ÑÕâ³ÌÊ½Ð´ÔÚÒ»¸ö½Ð×ö {\ttfamily \~{}/emacs/sgml-header.el} µÄµµ°¸Àï²Å¿ÉÒÔ¡££¨¼øì¶Õâº¯Ê½¿ÉÄÜ»á¹ý³¤£¬Äú²»ÐèÒª½«Ëü·ÅÔÚ {\ttfamily .emacs} µµ°¸Àï£©£º

\begin{verbatim}
      (add-hook 'find-file-hooks 'auto-insert)
      (load-library "autoinsert")
      (add-to-list 'load-path "~/emacs")
      (load-library "sgml-header")
      (setq auto-insert-alist
            (append '(((sgml-mode .  "SGML Mode") . insert-sgml-header))
                    auto-insert-alist))
     
\end{verbatim}


Äú¿ÉÒÔ²Î¿¼\ref{insert-sgml-header} {(¸½Â¼)}ÀïÓÐ¹Ø {\ttfamily Insert-sgml-header} ³ÌÊ½µÄÀý×Ó¡£






 \appendix 

\section{{\ttfamily Insert-sgml-header}³ÌÊ½Ö®¡õÀý\label{insert-sgml-header}
   }

¶ÁÕßÔÚ×«Ð´Ò»·Ý Linux Documentation Project ÎÄ¼þÊ±£¬¿ÉÒÔÊ¹ÓÃÏÂÁÐ³ÌÊ½À´Æô¶¯×Ô¶¯²åÈë×Ô¶©µÄÒ³Ê×¡£



Í¸¹ýÒ» {\itshape mini-buffer\/}£¬ÉÏÊö³ÌÊ½»áÒªÇó¶ÁÕßÌá¹©Ò»Ð©»òÐí±ØÒªµÄ×ÊÑ¶¡£

Ëü»áÏÈÑ¯ÎÊÒªÊä³öµÄ±êÌâÊÇÊ²÷á£¬ÈôÄúÃ»ÓÐÌá¹©£¬ÔòÒ³Ê×¾Í²»»áÏÔÏÖ±êÌâ¡£ÔÙÀ´ÊÇÈÕÆÚ£¬×÷Õß£¬×÷ÕßµÄµç×ÓÓÊ¼þÕÊºÅÓë home page £¨×îááÁ½Ïî¿ÉËæÒâÌîÈë£©¡£

½ÓÖøËü»áÑ¯ÎÊ·­ÒëÕßµÄÃû×Ö¡£ÈôÎÞ£¬ÇëÖ±½Ó¼üÈë {\itshape Return\/}¡£ÈôÓÐ£¬³ÌÊ½¾Í»á½ÓÖøÑ¯ÎÊÒëÕßµÄµç×ÓÓÊ¼þÕÊºÅ¼° home page £¨Í¬ÑùÒ²ÊÇËæÒâÌîÈë£©¡£

ÔÙÀ´Ëü»á°ÑÄúµÄÊäÈë´æÈë current buffer£¬°üÀ¨ÈÎºÎÄúÊäÈëµÄ×ÊÑ¶¸ñÊ½£¬¼°ÕªÒªºÍµÚÒ»ÕÂµÄ±êÇ©¡£Ö®ááËü»á½«ÓÎ±êµ¼ÏòÄúÒª¼üÈëÕªÒªµÄµÄµØ·½¡£

\begin{verbatim}
(defun insert-sgml-header ()
  "Inserts the header for a LinuxDoc document"
  (interactive)
  (let (title author email home translator email-translator home-translator date 
              starting-point)
    (setq title (read-from-minibuffer "Title: "))
    (if (> (length title) 0)
        (progn 
          (setq date (read-from-minibuffer "Date: ")
                author (read-from-minibuffer "Author: ")
                email (read-from-minibuffer "Author e-mail: ")
                home (read-from-minibuffer "Author home page: http://")
                translator (read-from-minibuffer "Translator: "))
          (insert "<!doctype linuxdoc system>\n<article>\n<title>")
          (insert title)
          (insert "</title>\n<author>\nAuthor: ") (insert author) (insert "<newline>\n")
          (if (> (length email) 0)
              (progn
                (insert "<htmlurl url=\"mailto:")
                (insert email) (insert "\" name=\"") (insert email)
                (insert "\"><newline>\n")))
          (if (> (length home) 0)
              (progn
                (insert "<htmlurl url=\"http://")
                (insert home) (insert "\" name=\"") (insert home)
                (insert "\">\n<newline>")))
          (if (> (length translator) 0)
              (progn
                (setq email-translator (read-from-minibuffer "Translator e-mail: ")
                      home-translator (read-from-minibuffer "Translator home page: http://"))
                (insert "Translator : ") 
                (insert translator) 
                (insert "<newline>\n")
                (if (> (length email-translator) 0)
                    (progn 
                      (insert "<htmlurl url=\"mailto:") 
                      (insert email-translator) (insert "\" name=\"") 
                      (insert email-translator)
                      (insert "\"><newline>\n")))
                (if (> (length home-translator) 0)
                    (progn 
                      (insert "<htmlurl url=\"http://") 
                      (insert home-translator) (insert "\" name=\"")
                      (insert home-translator)
                      (insert "\"><newline>\n")))))
          (insert "</author>\n<date>\n")
          (insert date)
          (insert "\n</date>\n\n<abstract>\n")
          (setq point-beginning (point))
          (insert "\n</abstract>\n<toc>\n\n<sect>\n<p>\n\n\n</sect>\n\n</article>\n")
          (goto-char point-beginning)
          ))))
 
\end{verbatim}


\end{document}
