bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6204: vc-dir always splits the frame


From: Drew Adams
Subject: bug#6204: vc-dir always splits the frame
Date: Tue, 25 May 2010 11:33:24 -0700

> Rather than let-binding some Lisp-manipulated "config" var, I was
> thinking of passing special parameters to display-buffer (I'd rather
> avoid dynamic scoping whenever possible).

I'm not following this thread[*], and I agree that using explicit parameters is
usually better than using dynamic scoping. However, I do have a parenthetic
comment. ;-)

The downside to adding such parameters in a case where you modify existing
functions (esp. if used heavily in existing code) is that it can make it harder
for 3rd-party code to take advantage of the new feature and still work with
older versions that do not have the new parameters.

E.g. 

(let ((new-var ...))
 ... (foo) ... (foo) ... (foo) ...)

versus

...
(if xxx (foo) (foo new-param))
...
(if xxx (foo) (foo new-param))
...
(if xxx (foo) (foo new-param))
...

In the former case, all that's needed is to add a `let' binding.  And if there
is already a `let', then _nothing_ changes in the code except adding one more
binding.  It is nearly always the case that the variables to be added are be
specific to the function (`foo'), without conflict.

IOW, dynamic scoping is foot-loose and fancy-free, error prone, and can even
sometimes be dangerous.  But it does have its advantages.


---
* Why oh why do you insist on carrying on discussions of such general import as
changing the signature of `display-buffer' in a bug thread instead of in
emacs-devel?  It happens over and over again now.  Fundamental design-change
discussion takes place buried in a bug thread with a Subject line that is
unrelated.  Not good.  At the very least, once you've hashed out the choices for
the bug fix, send a proposal for any design changes to emacs-devel for general
discussion.






reply via email to

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