[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Saving window config using desktop globals
From: |
Emanuel Berg |
Subject: |
Re: Saving window config using desktop globals |
Date: |
Mon, 14 Dec 2015 00:20:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Emanuel Berg <embe8573@student.uu.se> writes:
> (defvar *default-window-configuration-register* ?0)
>
> (defun save-window-configuration (&optional register)
> (interactive "P")
> (window-configuration-to-register
> (or register *default-window-configuration-register* )))
>
> (defun restore-window-configuration (&optional register)
> (interactive "P")
> (jump-to-register
> (or register *default-window-configuration-register* )))
OK, that doesn't work for interactive use 'cept for
the default call... which is the one I just said one
should stick to, still, if the code is there, it
should work for all uses, for sure.
I suppose this solves that but now you have to pass
registers as lists from Elisp. Perhaps do the
interactive "p" and/or do type checks. I'll leave it
at that at least for tonight...
(defun save-window-configuration (&optional register)
(interactive "P")
(window-configuration-to-register
(or (car register)
*default-window-configuration-register* )))
(defun restore-window-configuration (&optional register)
(interactive "P")
(jump-to-register
(or (car register)
*default-window-configuration-register* )))
--
underground experts united
http://user.it.uu.se/~embe8573
- Saving window config using desktop globals, Tim Johnson, 2015/12/13
- Re: Saving window config using desktop globals, Tim Johnson, 2015/12/13
- Re: Saving window config using desktop globals, Emanuel Berg, 2015/12/13
- Re: Saving window config using desktop globals,
Emanuel Berg <=
- Re: Saving window config using desktop globals, Emanuel Berg, 2015/12/13
- Re: Saving window config using desktop globals, Tim Johnson, 2015/12/13
- Re: Saving window config using desktop globals, Emanuel Berg, 2015/12/13
- Re: Saving window config using desktop globals, Tim Johnson, 2015/12/13
- Re: Saving window config using desktop globals, Emanuel Berg, 2015/12/13
- Re: Saving window config using desktop globals, Tim Johnson, 2015/12/13
- Re: Saving window config using desktop globals, Emanuel Berg, 2015/12/13
- Re: Saving window config using desktop globals, Tim Johnson, 2015/12/13
- [closed]Re: Saving window config using desktop globals, Tim Johnson, 2015/12/14
- Re: [closed]Re: Saving window config using desktop globals, Stefan Monnier, 2015/12/14