comparison lispref/tips.texi @ 71642:fa9d190c602e

(Coding Conventions): Cleanup last change.
author Richard M. Stallman <rms@gnu.org>
date Wed, 05 Jul 2006 17:04:09 +0000
parents 3184a667d8db
children 068befac60e5 138ce2701550
comparison
equal deleted inserted replaced
71641:6edfaf0b0ec6 71642:fa9d190c602e
175 175
176 @item 176 @item
177 Redefining (or advising) an Emacs primitive is a bad idea. It may do 177 Redefining (or advising) an Emacs primitive is a bad idea. It may do
178 the right thing for a particular program, but there is no telling what 178 the right thing for a particular program, but there is no telling what
179 other programs might break as a result. In any case, it is a problem 179 other programs might break as a result. In any case, it is a problem
180 for debugging, because the two advised function doesn't do what its 180 for debugging, because the advised function doesn't do what its source
181 source code says it does. If the programmer investigating the problem 181 code says it does. If the programmer investigating the problem is
182 is unaware that there is advice on the function, the experience can be 182 unaware that there is advice on the function, the experience can be
183 very frustrating. 183 very frustrating.
184 184
185 We hope to remove all the places in Emacs that advise primitives. 185 We hope to remove all the places in Emacs that advise primitives.
186 In the mean time, please don't add any more. 186 In the mean time, please don't add any more.
187 187
190 in another Lisp package. 190 in another Lisp package.
191 191
192 @item 192 @item
193 Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for 193 Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for
194 Loading}) in libraries and packages. This feature is meant for 194 Loading}) in libraries and packages. This feature is meant for
195 personal customizations; using it in a Lisp program is unclean because 195 personal customizations; using it in a Lisp program is unclean,
196 it modifies the behavior of another Lisp file in an invisible way. 196 because it modifies the behavior of another Lisp file in a way that's
197 This is an obstacle for debugging, much like advising a function in 197 not visible in that file. This is an obstacle for debugging, much
198 the other package. 198 like advising a function in the other package.
199 199
200 @item 200 @item
201 If a file does replace any of the functions or library programs of 201 If a file does replace any of the functions or library programs of
202 standard Emacs, prominent comments at the beginning of the file should 202 standard Emacs, prominent comments at the beginning of the file should
203 say which functions are replaced, and how the behavior of the 203 say which functions are replaced, and how the behavior of the