*** empty log message ***
[bpt/guile.git] / HACKING
CommitLineData
ab4cd34b 1-*-text-*-
afdd97ae 2Guile Hacking Guide
3db4f31b 3Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001 Free software Foundation, Inc.
afdd97ae
MV
4
5 Permission is granted to anyone to make or distribute verbatim copies
6 of this document as received, in any medium, provided that the
7 copyright notice and permission notice are preserved,
8 and that the distributor grants the recipient permission
9 for further redistribution as permitted by this notice.
10
11 Permission is granted to distribute modified versions
12 of this document, or of portions of it,
13 under the above conditions, provided also that they
14 carry prominent notices stating who last changed them,
15 and that any new or changed statements about the activities
16 of the Free Software Foundation are approved by the Foundation.
17
18
3db4f31b
TTN
19What to Hack =========================================================
20
21You can hack whatever you want, thank GNU.
22
23However, to see what others have indicated as their interest (and avoid
e59f9c99
TTN
24potential wasteful duplication of effort), see file TODO. Note that
25the version you find may be out of date; a CVS checkout is recommended
26(see also file SNAPSHOTS).
3db4f31b
TTN
27
28It's also a good idea to join the guile-devel@gnu.org mailing list.
29See http://www.gnu.org/software/guile/mail/mail.html for more info.
30
31
b0749d03
MV
32Hacking It Yourself ==================================================
33
34As distributed, Guile needs only an ANSI C compiler and a Unix system
35to compile. However, Guile's makefiles, configuration scripts, and a
36few other files are automatically generated, not written by hand. If
37you want to make changes to the system (which we encourage!) you will
38find it helpful to have the tools we use to develop Guile. They
39are the following:
40
c794483c 41Autoconf 2.50 --- a system for automatically generating `configure'
b0749d03
MV
42 scripts from templates which list the non-portable features a
43 program would like to use. Available in
44 "ftp://ftp.gnu.org/pub/gnu/autoconf"
45
ab4cd34b 46Automake 1.4-p4 --- a system for automatically generating Makefiles that
b0749d03
MV
47 conform to the (rather Byzantine) GNU coding standards. The
48 nice thing is that it takes care of hairy targets like 'make
49 dist' and 'make distclean', and automatically generates
50 Makefile dependencies. Automake is available in
51 "ftp://ftp.gnu.org/pub/gnu/automake"
52
53 Before using automake, you may need to copy `threads.m4' and
54 `guile.m4' from the top directory of the Guile core disty to
e1f0133b 55 `/usr/local/share/aclocal'.
b0749d03 56
c794483c 57libtool 1.4 --- a system for managing the zillion hairy options needed
b0749d03
MV
58 on various systems to produce shared libraries. Available in
59 "ftp://ftp.gnu.org/pub/gnu/libtool"
60
e1f0133b
TTN
61 To avoid reported tricky errors during the Guile build: After
62 unpacking the libtool distribution, use autoconf (2.50) to
63 regenerate its ./configure script. Then build and install as
64 usual.
65
17383b7c
ML
66flex 2.5.4 (or newer) --- a scanner generator. earlier versions will
67 most probably work too.
093e7da4 68
b0749d03
MV
69You are lost in a little maze of automatically generated files, all
70different.
b0749d03 71
795b4217 72
3cc0883e
TTN
73Sample GDB Initialization File=========================================
74
75Here is a sample .gdbinit posted by Bill Schottstaedt (modified to
76use `set' instead of `call' in some places):
77
78 define gp
79 set gdb_print($arg0)
80 print gdb_output
81 end
82 document gp
83 Executes (object->string arg)
84 end
85
86 define ge
87 call gdb_read($arg0)
88 call gdb_eval(gdb_result)
89 set gdb_print(gdb_result)
90 print gdb_output
91 end
92 document ge
93 Executes (print (eval (read arg))): ge "(+ 1 2)" => 3
94 end
95
96 define gh
97 call g_help(scm_str2symbol($arg0), 20)
98 set gdb_print($1)
99 print gdb_output
100 end
101 document gh
102 Prints help string for arg: gh "enved-target"
103 end
104
105Bill further writes:
106
107 so in gdb if you see something useless like:
108
109 #32 0x081ae8f4 in scm_primitive_load (filename=1112137128) at load.c:129
110
111 You can get the file name with gp:
112
113 (gdb) gp 1112137128
114 $1 = 0x40853fac "\"/home/bil/test/share/guile/1.5.0/ice-9/session.scm\""
115
116
0822a9c1
JB
117Contributing Your Changes ============================================
118
119- If you have put together a change that meets the coding standards
120described below, we encourage you to submit it to Guile. The best
ee2bf8b8 121place to post it is guile-devel@gnu.org. Please don't send it
c5ee0952
JB
122directly to me; I often don't have time to look things over. If you
123have tested your change, then you don't need to be shy.
0822a9c1
JB
124
125- Please submit patches using either context or unified diffs (diff -c
126or diff -u). Don't include a patch for ChangeLog; such patches don't
127apply cleanly, since we've probably changed the top of ChangeLog too.
128Instead, provide the unaltered text at the top of your patch.
129
7e238e4a
TTN
130- For proper credit, also make sure you update the AUTHORS file
131(for new files for which you've assigned copyright to the FSF), or
132the THANKS file (for everything else).
1b5132c4 133
0822a9c1
JB
134Please don't include patches for generated files like configure,
135aclocal.m4, or any Makefile.in. Such patches are often large, and
136we're just going to regenerate those files anyway.
137
138
d2bd3d8d
JB
139CVS conventions ======================================================
140
eb4194d6 141- We use CVS to manage the Guile sources. The repository lives on
ee2bf8b8 142subversions.gnu.org, in /cvs; you will need an
aa31443a 143account on that machine to access the repository. Also, for security
ee2bf8b8 144reasons, subversions presently only supports CVS connections via the SSH
aa31443a
JB
145protocol, so you must first install the SSH client. Then, you should
146set your CVS_RSH environment variable to ssh, and use the following as
147your CVS root:
eb4194d6 148
ee2bf8b8 149 :ext:USER@subversions.gnu.org:/cvs
eb4194d6
JB
150
151Either set your CVSROOT environment variable to that, or give it as
152the value of the global -d option to CVS when you check out a working
153directory.
154
848f2a01 155For more information on SSH, see http://www.cs.hut.fi/ssh.
eb4194d6
JB
156
157The Guile sources live in several modules:
158
159 - guile-core --- the interpreter, QuickThreads, and ice-9
160 - guile-tcltk --- the Guile/Tk interface
b1f4ddc1 161 - guile-tk --- the new Guile/Tk interface, based on STk's modified Tk
eb4194d6
JB
162 - guile-rgx-ctax --- the Guile/Rx interface, and the ctax implementation
163 - guile-scsh --- the port of SCSH to guile, talk to Gary Houston
b1f4ddc1 164 - guile-www --- A Guile module for making HTTP requests.
ab4cd34b 165 - guile-statprof --- an experimental statistical profiler.
eb4194d6 166
afdfe3f4
JB
167There is a mailing list for CVS commit messages; see README for details.
168
ab4cd34b
RB
169- The guile-core tree is now versioned similarly to the Linux kernel.
170Guile now always uses three numbers to represent the version,
171i.e. "1.6.5". The first number, 1, is the major version number, the
172second number, 6, is the minor version number, and the third number,
1735, is the micro version number. Changes in major version number
174indicate major changes in Guile.
175
176Minor version numbers that are even denote stable releases, and odd
177minor version numbers denote development versions (which may be
178unstable). The micro version number indicates a minor sub-revision of
179a given MAJOR.MINOR release.
180
181- A default CVS checkout will get the current unstable development
182tree. However, for each stable release, a CVS branch is created so
183that release (and ongoing maintenance) of the stable version can
184proceed independent of the development of the next unstable version.
185To check out a particular stable branch, you just need to specify "-r
186branch_release-X-Y" to your CVS checkout command (or to any update).
187For example, if you wanted to check out the 1.6 stable branch, you
188would specify "-r branch_release-1-6".
189
190So, for example, during a normal development cycle, work will proceed
191on an unstable version, say 1.5.X, until it is decided that it's time
192for a stable release. At that point, a branch named
193branch_release-1-6 will be created, and the version numbers on the
194HEAD of the CVS tree (the trunk, i.e. what you get by default), will
195be changed to reflect the new unstable version 1.7.X. Then unstable
196development will proceed on the unstable version, while the stable
1971.5.X branch is fixed up for the eventual 1.6.0 release.
198
199Anytime you want to yank an existing checked out tree to the stable
200branch, you can run a command like this:
201
202 cvs -z3 update -r branch_release-1-6 -Pd
203
204This will yank the working directory over on to the stable release
205branch. Note that this directory will track that branch from then on
206unless you do something to yank it back to the main (unstable) trunk.
207
208To go back to the unstable branch, you can use
209
210 cvs -z3 update -A -Pd
211
212Note that in either case, you should probably make sure you've
213commited or removed all local changes before running the commands or
214you're likely to have some unexpected results.
215
216Finally note that one approach, should you need to work on both
217branches, is to keep two trees checked out, one stable, the other
218unstable and you can work in whichever is appropriate.
219
220To save some initial bandwidth, you can check out either the stable
221tree or the unstable tree, and then do something like this:
222
223 cp -a core-unstable core-1.5
224 cd core-1.5
225 cvs -z3 update -r branch_release-1-6 -Pd
226
227- The stable and unstable CVS trees are distinct, and no changes will
228automatically propagate between them. If you make changes that need
229to show up both places, you'll need to apply the changes both places.
230You *might* be able to do this with a cvs command, but often you'll
231probably need to apply the changes by hand or risk migrating
232superfluous modifications between the two versions. This is
233particularly important when moving a change from the unstable branch
234to the stable branch.
235
236- In general, please don't be adventurous with the stable branch. We
237mostly want bugfixes, documentation improvements, build improvements,
238etc., though exceptions will doubtless exist.
239
240- There are a few CVS tagging conventions which follow the Scheme
241convention that dashes are used to separate words within a single
242symbol, and so dashes bind more tightly than underscores. This means
243that foo-bar_baz-bax indicates that foo-bar is somehow separate from
244baz-bax. The conventions are as follows:
245
246 Branch root tags:
247 -----------------
248 anytime just before you create a branch it's a good
249 idea to create a normal tag so that you can refer to the branch point
250 on the main trunk as well as on the branch. So please use a tag of
251 the form
252
253 branch-root-release-1-X
254
255 or more generally, for other non-release branches:
256
257 branch-root_FOO
258
259 Branch tags:
260 ------------
261 for the branch tag itself please use
262
263 branch_release-1-6
264
265 or more generally, for other non-release branches:
266
267 branch_FOO
268
269 Merge tags:
270 -----------
271 Whenever you're merging a branch back into the trunk (or into another
272 branch repeatedly) you need to tag the branch each time you merge. If
273 you don't do that, you won't be able to merge repeatedly without
274 possibly tedious conflicts. For those tags, we suggest:
275
276 branch-merge_SOME-FOO_to_SOME-BAR_1
277 branch-merge_SOME-FOO_to_SOME-BAR_2
278 ..
279
280 As an example, SOME-BAR might be trunk, or even perhaps another branch
281 like branch-mvo-super-fixes :>
282
283 More mundanely, you might have
284
285 branch-merge_release-1-6_to_trunk_1
286
287 (Merging the stable branch to the trunk like this
288 will probably be much more common, when it happens, than the
289 reverse for the reasons mentioned above.
290
291 Release tags:
292 -------------
293 When releasing a new version of guile, please use:
294
295 release_X-Y-Z
296
297 i.e.
298
299 release_1-6-0
300
301- If you hack on a stable branch, please apply any relevant patches or
302fixes to the current unstable version (the main CVS trunk) as well.
303Similarly, please back-port any important fixes to the unstable CVS
304tree to the current stable branch.
305
b5f69988
GB
306- We check Makefile.am and configure.in files into CVS, but the
307"autogen.sh" script must be run from the top-level to generate the
308actual "configure" script that then must be run to create the various
309Makefile-s to build guile. The general rule is that you should be able
310to check out a working directory of Guile from CVS, and then type
294a61d3
MV
311"./autogen.sh", then "configure", and finally "make". No
312automatically generated files should be checked into the CVS
313repository.
314
315- The .cvsignore file is contained in the repository, to provide a
316reasonable list of auto-generated files that should not be checked in.
317This, however, prohibits one from having local additions to the
318.cvsignore file (yes, you can modify it and never check it in, but
319that doesn't seem to be a good solution to me). To get around this
320problem, you might want to patch your cvs program so that it uses a
321.cvsignore-local file (say) instead of the one from the repository. A
322patch for this can be found at the very end of this file.
350294b1 323
d4c83f63
JB
324- (Automake 1.4 only) Be sure to run automake at the top of the tree
325with no arguments. Do not use `automake Makefile' to regenerate
326specific Makefile.in files, and do not trust the Makefile rules to
327rebuild them when they are out of date. Automake 1.4 will add
328extraneous rules to the top-level Makefile if you specify specific
329Makefiles to rebuild on the command line. Running the command
330`autoreconf --force' should take care of everything correctly.
331
795b4217
JB
332- Make sure your changes compile and work, at least on your own
333machine, before checking them into the main branch of the Guile
334repository. If you really need to check in untested changes, make a
335branch.
336
d2bd3d8d
JB
337- Include each log entry in both the ChangeLog and in the CVS logs.
338If you're using Emacs, the pcl-cvs interface to CVS has features to
339make this easier; it checks the ChangeLog, and generates good default
340CVS log entries from that.
341
342
343Coding standards =====================================================
344
b80e8a60
MD
345- Before contributing larger amounts of code to Guile, please read the
346documents in `guile-core/devel/policy' in the CVS source tree.
347
d2bd3d8d
JB
348- As for any part of Project GNU, changes to Guile should follow the
349GNU coding standards. The standards are available via anonymous FTP
350from prep.ai.mit.edu, as /pub/gnu/standards/standards.texi and
351make-stds.texi.
352
99be3450
JB
353- The Guile tree should compile without warnings under the following
354GCC switches, which are the default in the current configure script:
fcba9b58
DH
355
356 -O2 -Wall -Wpointer-arith -Wmissing-prototypes
99be3450 357
ab4cd34b
RB
358To make sure of this, you can use the --enable-error-on-warning option
359to configure. This option will make GCC fail if it hits a warning.
360
d043e0bb
JB
361Note that the warnings generated vary from one version of GCC to the
362next, and from one architecture to the next (apparently). To provide
363a concrete common standard, Guile should compile without warnings from
18fa97f8 364GCC 2.7.2.3 in a Red Hat 5.2 i386 Linux machine. Furthermore, each
d043e0bb
JB
365developer should pursue any additional warnings noted by on their
366compiler. This means that people using more stringent compilers will
367have more work to do, and assures that everyone won't switch to the
41d368d9 368most lenient compiler they can find. :)
d043e0bb 369
afdfe3f4
JB
370Note also that EGCS (as of November 3 1998) doesn't handle the
371`noreturn' attribute properly, so it doesn't understand that functions
372like scm_error won't return. This may lead to some silly warnings
373about uninitialized variables. You should look into these warnings to
374make sure they are indeed spurious, but you needn't correct warnings
375caused by this EGCS bug.
376
0822a9c1
JB
377- If you add code which uses functions or other features that are not
378entirely portable, please make sure the rest of Guile will still
379function properly on systems where they are missing. This usually
380entails adding a test to configure.in, and then adding #ifdefs to your
381code to disable it if the system's features are missing.
afdfe3f4 382
f2f551af
MD
383- The normal way of removing a function, macro or variable is to mark
384it as "deprecated", keep it for a while, and remove it in a later
385release. If a function or macro is marked as "deprecated" it
386indicates that people shouldn't use it in new programs, and should try
387to remove it in old. Make sure that an alternative exists unless it
388is our purpose to remove functionality. Don't deprecate definitions
389if it is unclear when they will be removed. (This is to ensure that a
390valid way of implementing some functionality always exists.)
391
ee2bf8b8 392When deprecating a definition, always follow this procedure:
f2f551af
MD
393
3941. Mark the definition using
395
21d12a62
MV
396 #if (SCM_DEBUG_DEPRECATED == 0)
397 ...
398 #endif
f2f551af 399
21d12a62 400 or, for Scheme code, wrap it using
f2f551af 401
21d12a62
MV
402 (begin-deprecated
403 ...)
f2f551af 404
21d12a62
MV
4052. Make the deprecated code issue a warning when it is used, by using
406 scm_c_issue_deprecation_warning (in C) or issue-deprecation-warning
407 (in Scheme).
408
4093. Write a comment at the definition explaining how a programmer can
410 manage without the deprecated definition.
411
4124. Add an entry that the definition has been deprecated in NEWS and
413 explain what do do instead.
414
b2355534
TTN
4155. In file TODO, there is a list of releases with reminders about what
416 to do at each release. Add a reminder about the removal of the
417 deprecated defintion at the appropriate release.
f2f551af 418
795b4217
JB
419- When you make a user-visible change (i.e. one that should be
420documented, and appear in NEWS, put an asterisk in column zero of the
421start of the ChangeLog entry, like so:
422
423Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
424
425* * fports.c (scm_open_file): don't return #f, throw error.
426
fa3f45cc 427When you've written a NEWS entry and updated the documentation, go
ab4cd34b 428ahead and remove the asterisk. The asterisks are used to find and
fa3f45cc
JB
429document changes that haven't been dealt with before a release.
430
d49a7907
JB
431- Please write log entries for functions written in C under the
432functions' C names, and write log entries for functions written in
433Scheme under the functions' Scheme names. Please don't do this:
434
435 * procs.c, procs.h (procedure-documentation): Moved from eval.c.
436
437Entries like this make it harder to search the ChangeLogs, because you
afdfe3f4
JB
438can never tell which name the entry will refer to. Instead, write this:
439
440 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
d49a7907 441
4085a3da
JB
442Changes like adding this line are special:
443
3243bcc0 444 SCM_PROC (s_map_in_order, "map-in-order", 2, 0, 1, scm_map);
4085a3da
JB
445
446Since the change here is about the name itself --- we're adding a new
447alias for scm_map that guarantees the order in which we process list
448elements, but we're not changing scm_map at all --- it's appropriate
449to use the Scheme name in the log entry.
450
30d14d55
JB
451- There's no need to keep a change log for documentation files. This
452is because documentation is not susceptible to bugs that are hard to
453fix. Documentation does not consist of parts that must interact in a
454precisely engineered fashion; to correct an error, you need not know
455the history of the erroneous passage. (This is copied from the GNU
456coding standards.)
457
795b4217
JB
458- Make sure you have papers from people before integrating their
459changes or contributions. This is very frustrating, but very
460important to do right. From maintain.texi, "Information for
461Maintainers of GNU Software":
462
463 When incorporating changes from other people, make sure to follow the
464 correct procedures. Doing this ensures that the FSF has the legal
465 right to distribute and defend GNU software.
466
467 For the sake of registering the copyright on later versions ofthe
468 software you need to keep track of each person who makes significant
469 changes. A change of ten lines or so, or a few such changes, in a
470 large program is not significant.
471
472 *Before* incorporating significant changes, make sure that the person
473 has signed copyright papers, and that the Free Software Foundation has
474 received them.
475
476If you receive contributions you want to use from someone, let me know
477and I'll take care of the administrivia. Put the contributions aside
478until we have the necessary papers.
479
26446f99 480Once you accept a contribution, be sure to keep the files AUTHORS and
5a1a7950 481THANKS uptodate.
26446f99 482
fa3f45cc
JB
483- When you make substantial changes to a file, add the current year to
484the list of years in the copyright notice at the top of the file.
795b4217 485
26446f99
MV
486- When you get bug reports or patches from people, be sure to list
487them in THANKS.
488
d2bd3d8d 489
33ee4d57
MV
490Naming conventions =================================================
491
492We use certain naming conventions to structure the considerable number
493of global identifiers. All identifiers should be either all lower
494case or all upper case. Syllables are separated by underscores `_'.
495All non-static identifiers should start with scm_ or SCM_. Then might
496follow zero or more syllables giving the category of the identifier.
497The currently used category identifiers are
2aebf10d
MV
498
499 t - type name
500
501 c,C - something with a interface suited for C use. This is used
502 to name functions that behave like Scheme primitives but
503 have a more C friendly calling convention.
504
505 i,I - internal to libguile. It is global, but not considered part
506 of the libguile API.
507
508 f - a SCM variable pointing to a Scheme function object.
509
510 F - a bit mask for a flag.
511
512 m - a macro transformer procedure
513
514 n,N - a count of something
515
516 s - a constant C string
517
33ee4d57
MV
518 k - a SCM variable pointing to a keyword.
519
520 sym - a SCM variable pointing to a symbol.
521
522 var - a SCM variable pointing to a variable object.
523
524The follwing syllables also have a technical meaning:
525
526 str - this denotes a zero terminated C string
527
528 mem - a C string with an explicit count
529
530
531See also the file `devel/names.text'.
e59f9c99 532
2aebf10d 533
d2bd3d8d
JB
534Helpful hints ========================================================
535
f84f77f5
JB
536- [From Mikael Djurfeldt] When working on the Guile internals, it is
537quite often practical to implement a scheme-level procedure which
538helps you examine the feature you're working on.
539
540Examples of such procedures are: pt-size, debug-hand and
541current-pstate.
542
543I've now put #ifdef GUILE_DEBUG around all such procedures, so that
544they are not compiled into the "normal" Guile library. Please do the
545same when you add new procedures/C functions for debugging purpose.
546
547You can define the GUILE_DEBUG flag by passing --enable-guile-debug to
548the configure script.
549
52591c80
JB
550- You'll see uses of the macro SCM_P scattered throughout the code;
551those are vestiges of a time when Guile was meant to compile on
552pre-ANSI compilers. Guile now requires ANSI C, so when you write new
553functions, feel free to use ANSI declarations, and please provide
1cf84ea5 554prototypes for everything. You don't need to use SCM_P in new code.
52591c80 555
795b4217 556
7e2cb69c 557Jim Blandy, and others
294a61d3
MV
558
559
560Patches ===========================================================
561
562This one makes cvs-1.10 consider the file $CVSDOTIGNORE instead of
563.cvsignore when that environment variable is set.
564
565=== patch start ===
566diff -r -u cvs-1.10/src/cvs.h cvs-1.10.ignore-hack/src/cvs.h
567--- cvs-1.10/src/cvs.h Mon Jul 27 04:54:11 1998
568+++ cvs-1.10.ignore-hack/src/cvs.h Sun Jan 23 12:58:09 2000
569@@ -516,7 +516,7 @@
3db4f31b 570
294a61d3
MV
571 extern int ign_name PROTO ((char *name));
572 void ign_add PROTO((char *ign, int hold));
573-void ign_add_file PROTO((char *file, int hold));
574+int ign_add_file PROTO((char *file, int hold));
575 void ign_setup PROTO((void));
576 void ign_dir_add PROTO((char *name));
577 int ignore_directory PROTO((char *name));
578diff -r -u cvs-1.10/src/ignore.c cvs-1.10.ignore-hack/src/ignore.c
579--- cvs-1.10/src/ignore.c Mon Sep 8 01:04:15 1997
580+++ cvs-1.10.ignore-hack/src/ignore.c Sun Jan 23 12:57:50 2000
581@@ -99,9 +99,9 @@
582 /*
583 * Open a file and read lines, feeding each line to a line parser. Arrange
584 * for keeping a temporary list of wildcards at the end, if the "hold"
585- * argument is set.
586+ * argument is set. Return true when the file exists and has been handled.
587 */
588-void
589+int
590 ign_add_file (file, hold)
591 char *file;
592 int hold;
593@@ -149,8 +149,8 @@
594 if (fp == NULL)
595 {
596 if (! existence_error (errno))
597- error (0, errno, "cannot open %s", file);
598- return;
599+ error (0, errno, "cannot open %s", file);
600+ return 0;
601 }
602 while (getline (&line, &line_allocated, fp) >= 0)
603 ign_add (line, hold);
604@@ -159,6 +159,7 @@
605 if (fclose (fp) < 0)
606 error (0, errno, "cannot close %s", file);
607 free (line);
608+ return 1;
609 }
3db4f31b 610
294a61d3
MV
611 /* Parse a line of space-separated wildcards and add them to the list. */
612@@ -375,6 +376,7 @@
613 struct stat sb;
614 char *file;
615 char *xdir;
616+ char *cvsdotignore;
3db4f31b 617
294a61d3
MV
618 /* Set SUBDIRS if we have subdirectory information in ENTRIES. */
619 if (entries == NULL)
620@@ -397,7 +399,10 @@
621 if (dirp == NULL)
622 return;
3db4f31b 623
294a61d3
MV
624- ign_add_file (CVSDOTIGNORE, 1);
625+ cvsdotignore = getenv("CVSDOTIGNORE");
626+ if (cvsdotignore == NULL || !ign_add_file (cvsdotignore, 1))
627+ ign_add_file (CVSDOTIGNORE, 1);
628+
629 wrap_add_file (CVSDOTWRAPPER, 1);
3db4f31b 630
294a61d3
MV
631 while ((dp = readdir (dirp)) != NULL)
632=== patch end ===
633
634This one is for pcl-cvs-2.9.2, so that `i' adds to the local
635.cvsignore file.
636
637=== patch start ===
638--- pcl-cvs.el~ Mon Nov 1 12:33:46 1999
639+++ pcl-cvs.el Tue Jan 25 21:46:27 2000
640@@ -1177,7 +1177,10 @@
641 "Append the file in FILEINFO to the .cvsignore file.
642 Can only be used in the *cvs* buffer."
643 (save-window-excursion
644- (set-buffer (find-file-noselect (expand-file-name ".cvsignore" dir)))
3db4f31b 645+ (set-buffer (find-file-noselect
294a61d3
MV
646+ (expand-file-name (or (getenv "CVSDOTIGNORE")
647+ ".cvsignore")
648+ dir)))
649 (goto-char (point-max))
650 (unless (zerop (current-column)) (insert "\n"))
651 (insert str "\n")
652=== patch end ===