[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unuseful keybindings
From: |
Juri Linkov |
Subject: |
Re: Unuseful keybindings |
Date: |
Sun, 23 Dec 2012 11:31:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
>> But: why doesn't <f11> toggle a true full screen mode, at least on
>> platforms which support that? That would be more useful, since ordinary
>> maximization can be done with window decorations anyway.
>
> I wondered about this too. IMHO, `frame-maximization-style' should be
> `fullscreen' by default, so `F11' will do fullscreen by default.
>
> Also I see no reason having a separate `S-F11' (`cycle-frame-maximized').
> I believe it would be enough to add a prefix arg to `toggle-frame-maximized',
> so `C-u F11' will do non-default complementary action from
> `frame-maximization-style'
> (i.e. `maximized' after changing its default to `fullscreen').
This can be improved with the following patch:
=== modified file 'lisp/frame.el'
--- lisp/frame.el 2012-12-12 14:43:45 +0000
+++ lisp/frame.el 2012-12-23 09:30:39 +0000
@@ -1655,7 +1655,7 @@ (define-minor-mode blink-cursor-mode
;; Frame maximization
-(defcustom frame-maximization-style 'maximized
+(defcustom frame-maximization-style 'fullscreen
"The maximization style of \\[toggle-frame-maximized]."
:version "24.4"
:type '(choice
@@ -1663,13 +1663,18 @@ (defcustom frame-maximization-style 'max
(const :tab "Ignore window manager screen decorations." fullscreen))
:group 'frames)
-(defun toggle-frame-maximized ()
+(defun toggle-frame-maximized (&optional arg)
"Maximize/un-maximize Emacs frame according to `frame-maximization-style'.
-See also `cycle-frame-maximized'."
- (interactive)
+With prefix ARG toggle using non-default value of `frame-maximization-style',
+i.e. when the default is `fullscreen', use `maximized', otherwise use
+`fullscreen'. See also `cycle-frame-maximized'."
+ (interactive "P")
(modify-frame-parameters
- nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
- nil frame-maximization-style)))))
+ nil `((fullscreen . ,(cond
+ ((frame-parameter nil 'fullscreen) nil)
+ (arg (if (eq frame-maximization-style 'fullscreen)
+ 'maximized 'fullscreen))
+ (t frame-maximization-style))))))
(defun cycle-frame-maximized ()
"Cycle Emacs frame between normal, maximized, and fullscreen.
- RE: Unuseful keybindings, (continued)
- Re: Unuseful keybindings, Juri Linkov, 2012/12/23
- Re: Unuseful keybindings, Xue Fuqiao, 2012/12/23
- Re: Unuseful keybindings, Dmitry Gutov, 2012/12/23
- Re: Unuseful keybindings, Xue Fuqiao, 2012/12/23
- RE: Unuseful keybindings, Drew Adams, 2012/12/22
- Re: Unuseful keybindings, Thierry Volpiatto, 2012/12/22
- Re: Unuseful keybindings, Juri Linkov, 2012/12/22
- Re: Unuseful keybindings,
Juri Linkov <=
- Re: Unuseful keybindings, Juri Linkov, 2012/12/24
- Re: Unuseful keybindings, Juri Linkov, 2012/12/24
- Re: Unuseful keybindings, Chong Yidong, 2012/12/29
- RE: Unuseful keybindings, Drew Adams, 2012/12/18
- Re: Unuseful keybindings, Thierry Volpiatto, 2012/12/19
- Re: Unuseful keybindings, Leo, 2012/12/19
Re: Unuseful keybindings, Xue Fuqiao, 2012/12/18
Re: Unuseful keybindings, Eli Zaretskii, 2012/12/18