emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write-region docstring/behavior inconsistency


From: Kai Großjohann
Subject: Re: write-region docstring/behavior inconsistency
Date: Wed, 12 Dec 2001 12:07:15 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>     The documentation for write-region says that START and END should be
>     buffer positions, but auto_save_1 calls it with START and END being
>     nil.  There is an inconsistency here.  
>
> That means those arguments are omitted.  They default to the
> whole buffer.

So how about something like the following patch?  (My wording is
horrible.)

--- fileio.c.~1.433.~   Wed Dec 12 11:56:53 2001
+++ fileio.c    Wed Dec 12 12:04:53 2001
@@ -4649,7 +4649,8 @@
        "r\nFWrite region to file: \ni\ni\ni\np",
        doc: /* Write current region into specified file.
 When called from a program, takes three arguments:
-START, END and FILENAME.  START and END are buffer positions.
+START, END and FILENAME.  START and END are buffer positions or nil.
+START (END) being nil means use beginning (end) of buffer.
 Optional fourth argument APPEND if non-nil means
   append to existing file contents (if any).  If it is an integer,
   seek to that offset in the file before writing.


>     If write-region should grok nil for START and/or END, should all
>     filename handlers be checked so that they do so, as well?
>
> Yes.

Ok.  Is it okay for me to propose a change which does this for
jka-compr-write-region, as well as possibly other functions?

kai
-- 
Simplification good!  Oversimplification bad!  (Larry Wall)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]