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

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

Re: Restore window configuration after Ediff


From: PJ Weisberg
Subject: Re: Restore window configuration after Ediff
Date: Sat, 16 Apr 2011 01:33:01 -0700

On Sat, Apr 16, 2011 at 12:36 AM, martin rudalics <address@hidden> wrote:
>> ======================================================================
>> (defvar saved-configuration nil)
>>
>> (defun do-ediff()
>>   (interactive)
>>   (add-hook 'ediff-quit-hook 'do-ediff-cleanup)
>>   (setq saved-configuration (current-window-configuration))
>>   (ediff-buffers "*scratch*" "*scratch*"))
>>
>> (defun do-ediff-cleanup()
>>   (set-window-configuration saved-configuration)
>>   (remove-hook 'ediff-quit-hook 'do-ediff-cleanup))
>> ======================================================================
>>
>> The problem is that after I quit ediff, the ediff control frame
>> doesn't always disappear.
>
> Replace `current-window-configuration' by `current-frame-configuration'
> and `set-window-configuration' by `set-frame-configuration'.
>
> martin
>

It looks like current-frame-configuration returns a list of all frames
with parameters and window configurations for each of them.  I'd
prefer to just save and restore state of the one frame that was
selected when I started Ediff.

Is there a reason that the code I have *shouldn't* work (besides the
fact that it doesn't)?  I.e., is there a gap in my understanding?

-PJ



reply via email to

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