aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-06-10 10:34:35 +0000
committerRichard M. Stallman2006-06-10 10:34:35 +0000
commit4c02cf8619e158542d4273bda97231b325c63f19 (patch)
tree2b54b51a4fcef920c36df91d6683488a159ea12a
parentf609f34556668ed412455345354beb4c809901fe (diff)
downloademacs-4c02cf8619e158542d4273bda97231b325c63f19.tar.gz
emacs-4c02cf8619e158542d4273bda97231b325c63f19.zip
(Coding Conventions): Explain use of coding systems
to ensure one decoding for strings.
-rw-r--r--lispref/tips.texi25
1 files changed, 25 insertions, 0 deletions
diff --git a/lispref/tips.texi b/lispref/tips.texi
index d2060a942bf..727ae6918de 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -224,6 +224,31 @@ only for special-purpose buffers.) The users will find Emacs more
224coherent if all libraries use the same conventions. 224coherent if all libraries use the same conventions.
225 225
226@item 226@item
227If your program contains non-ASCII characters in string or character
228constants, you should make sure Emacs always decodes these characters
229the same way, regardless of the user's settings. There are two ways
230to do that:
231
232@itemize -
233@item
234Use coding system @code{emacs-mule}, and specify that for
235@code{coding} in the @samp{-*-} line or the local variables list.
236
237@example
238;; XXX.el -*- coding: emacs-mule; -*-
239@end example
240
241@item
242Use one of the coding systems based on ISO 2022 (such as
243iso-8859-@var{n} and iso-2022-7bit), and specify it with @samp{!} at
244the end for @code{coding}. (The @samp{!} turns off any possible
245character translation.)
246
247@example
248;; XXX.el -*- coding: iso-latin-2!; -*-
249@end example
250
251@item
227Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the 252Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the
228default indentation parameters. 253default indentation parameters.
229 254