jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

buffer_filename() with optional argument


Hi,

I propose the following patch:

--- site.sl     (Revision 33)
+++ site.sl     (Arbeitskopie)
@@ -408,15 +408,18 @@
 %!%+
 %\function{buffer_filename}
 %\synopsis{buffer_filename}
-%\usage{String buffer_filename ();}
+%\usage{String buffer_filename ([bufname]);}
 %\description
-% Returns the name of the file associated with the current buffer.  If
-% there is none associated with it, the empty string is returned.
+% Returns the name of the file associated with the current buffer or the
+% buffer \var{bufname}.  If there is none associated with it, the empty
+% string is returned. If the buffer specified by \var{bufname} do not
+% exist a RunTimeError is thrown.
 %!%-
 define buffer_filename ()
 {
+   variable args = __pop_args(_NARGS);
    variable file, dir;
-   (file, dir, , ) = getbuf_info();
+   (file, dir, , ) = getbuf_info(__push_args(args));
    !if (strlen (file)) dir = "";
    dir + file;
 }

Bye, Jörg.
-- 
The UNIX Guru's View of Sex:
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ; sleep

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]