Mercurial > hg > xemacs-beta
comparison man/lispref/tips.texi @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | 3ecd8885ac67 |
children | 1ccc32a20af4 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
1 @c -*-texinfo-*- | 1 @c -*-texinfo-*- |
2 @c This is part of the XEmacs Lisp Reference Manual. | 2 @c This is part of the XEmacs Lisp Reference Manual. |
3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. | 3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
4 @c See the file lispref.texi for copying conditions. | 4 @c See the file lispref.texi for copying conditions. |
5 @setfilename ../../info/tips.info | 5 @setfilename ../../info/tips.info |
6 @node Tips, Building XEmacs and Object Allocation, MULE, Top | 6 @node Tips, Building XEmacs and Object Allocation, MULE, Top |
7 @appendix Tips and Standards | 7 @appendix Tips and Standards |
8 @cindex tips | 8 @cindex tips |
158 It is a bad idea to define aliases for the Emacs primitives. Use the | 158 It is a bad idea to define aliases for the Emacs primitives. Use the |
159 standard names instead. | 159 standard names instead. |
160 | 160 |
161 @item | 161 @item |
162 Redefining an Emacs primitive is an even worse idea. | 162 Redefining an Emacs primitive is an even worse idea. |
163 It may do the right thing for a particular program, but | 163 It may do the right thing for a particular program, but |
164 there is no telling what other programs might break as a result. | 164 there is no telling what other programs might break as a result. |
165 | 165 |
166 @item | 166 @item |
167 If a file does replace any of the functions or library programs of | 167 If a file does replace any of the functions or library programs of |
168 standard XEmacs, prominent comments at the beginning of the file should | 168 standard XEmacs, prominent comments at the beginning of the file should |
282 @code{assq}, or @code{assoc} is even faster than explicit iteration. It | 282 @code{assq}, or @code{assoc} is even faster than explicit iteration. It |
283 may be worth rearranging a data structure so that one of these primitive | 283 may be worth rearranging a data structure so that one of these primitive |
284 search functions can be used. | 284 search functions can be used. |
285 | 285 |
286 @item | 286 @item |
287 Certain built-in functions are handled specially in byte-compiled code, | 287 Certain built-in functions are handled specially in byte-compiled code, |
288 avoiding the need for an ordinary function call. It is a good idea to | 288 avoiding the need for an ordinary function call. It is a good idea to |
289 use these functions rather than alternatives. To see whether a function | 289 use these functions rather than alternatives. To see whether a function |
290 is handled specially by the compiler, examine its @code{byte-compile} | 290 is handled specially by the compiler, examine its @code{byte-compile} |
291 property. If the property is non-@code{nil}, then the function is | 291 property. If the property is non-@code{nil}, then the function is |
292 handled specially. | 292 handled specially. |
367 Do not start or end a documentation string with whitespace. | 367 Do not start or end a documentation string with whitespace. |
368 | 368 |
369 @item | 369 @item |
370 Format the documentation string so that it fits in an Emacs window on an | 370 Format the documentation string so that it fits in an Emacs window on an |
371 80-column screen. It is a good idea for most lines to be no wider than | 371 80-column screen. It is a good idea for most lines to be no wider than |
372 60 characters. The first line can be wider if necessary to fit the | 372 60 characters. The first line can be wider if necessary to fit the |
373 information that ought to be there. | 373 information that ought to be there. |
374 | 374 |
375 However, rather than simply filling the entire documentation string, you | 375 However, rather than simply filling the entire documentation string, you |
376 can make it much more readable by choosing line breaks with care. | 376 can make it much more readable by choosing line breaks with care. |
377 Use blank lines between topics if the documentation string is long. | 377 Use blank lines between topics if the documentation string is long. |
378 | 378 |
379 @item | 379 @item |
380 @strong{Do not} indent subsequent lines of a documentation string so | 380 @strong{Do not} indent subsequent lines of a documentation string so |
381 that the text is lined up in the source code with the text of the first | 381 that the text is lined up in the source code with the text of the first |
382 line. This looks nice in the source code, but looks bizarre when users | 382 line. This looks nice in the source code, but looks bizarre when users |
383 view the documentation. Remember that the indentation before the | 383 view the documentation. Remember that the indentation before the |