emacs-devel
[Top][All Lists]
Advanced

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

Re: find-file-noselect needs save-match-data


From: Richard Stallman
Subject: Re: find-file-noselect needs save-match-data
Date: Sat, 09 Jun 2007 05:45:29 -0400

    > This would violate referential transparency.  Consider
    >
    > (defvar foobar "foobar")
    >
    > (defun foo ()
    >   (string-match "foo" foobar)
    >   (match-string 0 foobar))
    >
    > (defun bar ()
    >   (string-match "bar" foobar)
    >   (preserve-match-data
    >    (foo)))

If referential transparency is something which dynamic variables
"violate", then it isn't relevant to Emacs.




reply via email to

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