unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Chong Yidong <cyd@gnu.org>
Cc: Thierry Volpiatto <thierry.volpiatto@gmail.com>,
	emacs-devel@gnu.org, Andreas Schwab <schwab@linux-m68k.org>,
	Mathias Dahl <mathias.dahl@gmail.com>
Subject: Re: Unuseful keybindings
Date: Sun, 23 Dec 2012 11:31:02 +0200	[thread overview]
Message-ID: <87d2y1glnt.fsf@mail.jurta.org> (raw)
In-Reply-To: <87a9t6a435.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 22 Dec 2012 10:23:38 +0200")

>> 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
 
 \f
 ;; 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.




  reply	other threads:[~2012-12-23  9:31 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 13:00 Unuseful keybindings Thierry Volpiatto
2012-12-18 13:36 ` Andreas Schwab
2012-12-18 14:48   ` Thierry Volpiatto
2012-12-18 16:58     ` Sam Steingold
2012-12-18 19:30     ` Mathias Dahl
2012-12-18 19:37       ` Thierry Volpiatto
2012-12-22  3:22         ` Chong Yidong
2012-12-22  4:39           ` Drew Adams
2012-12-22  5:09             ` Xue Fuqiao
2012-12-22 21:24             ` Sebastien Vauban
2012-12-22 21:48               ` Dmitry Gutov
2012-12-22 22:46                 ` Drew Adams
2012-12-22 23:32                   ` Dmitry Gutov
2012-12-23  0:45                     ` Drew Adams
2012-12-23  1:07                       ` Xue Fuqiao
2012-12-23  1:19                         ` Daniel Colascione
2012-12-23  1:54                           ` advertizing keyboard macros better [was: Unuseful keybindings] Drew Adams
2012-12-23  2:10                             ` Xue Fuqiao
2012-12-23  9:29                       ` Unuseful keybindings Juri Linkov
2012-12-23 16:55                         ` Drew Adams
2012-12-26 14:32                           ` Kevin Rodgers
2012-12-26 22:21                             ` Xue Fuqiao
2012-12-27  3:42                               ` Eli Zaretskii
2012-12-23 14:41                       ` Dmitry Gutov
2012-12-23 14:57                         ` Jambunathan K
2012-12-23 16:52                           ` Drew Adams
2012-12-23 17:47                             ` Jambunathan K
2012-12-23 18:44                               ` Drew Adams
2012-12-23 19:36                                 ` Jambunathan K
2012-12-23 20:25                                 ` Jambunathan K
2012-12-23 21:04                                   ` Drew Adams
2012-12-24  9:35                                   ` Juri Linkov
2012-12-24 13:02                                     ` Xue Fuqiao
2012-12-24 14:13                                       ` Drew Adams
2012-12-23 17:03                         ` Drew Adams
2012-12-23 17:33                           ` Dmitry Gutov
2012-12-23 18:51                             ` Drew Adams
2012-12-23 20:53                             ` Lars Ingebrigtsen
2012-12-23 21:13                               ` Drew Adams
2012-12-24 21:43                                 ` Drew Adams
2012-12-23 21:25                               ` Andreas Schwab
2012-12-24  9:39                               ` Juri Linkov
2012-12-23 17:58                           ` Stephen J. Turnbull
2012-12-23 18:42                             ` Drew Adams
2012-12-23  0:19                   ` Mathias Dahl
2012-12-23  0:55                     ` Drew Adams
2012-12-23  9:32                 ` Juri Linkov
2012-12-23 10:37                   ` Xue Fuqiao
2012-12-23 10:56                     ` Dmitry Gutov
2012-12-23 11:22                       ` Xue Fuqiao
2012-12-22 22:28               ` Drew Adams
2012-12-22  7:42           ` Thierry Volpiatto
2012-12-22  8:23           ` Juri Linkov
2012-12-23  9:31             ` Juri Linkov [this message]
2012-12-24 10:29               ` Juri Linkov
2012-12-24 17:10                 ` Juri Linkov
2012-12-29  5:57                   ` Chong Yidong
2013-01-10 19:17                     ` Sam Steingold
2013-01-10 19:13                 ` Sam Steingold
2013-01-10 22:38                   ` Xue Fuqiao
2013-01-11  0:31                   ` Juri Linkov
2013-01-11  1:17                     ` Stefan Monnier
2013-01-11  9:58                       ` Juri Linkov
2013-01-11 14:42                         ` Stefan Monnier
2013-01-11 18:26                         ` chad
2013-01-12  0:50                           ` Juri Linkov
2013-01-12 10:03                             ` Jan Djärv
2013-01-13 10:19                               ` Juri Linkov
2013-01-13 11:19                                 ` Jan Djärv
2012-12-19  0:27       ` Drew Adams
2012-12-19  6:32         ` Thierry Volpiatto
2012-12-19 16:43         ` Leo
2012-12-18 13:40 ` Xue Fuqiao
2012-12-18 17:41 ` Eli Zaretskii
2012-12-18 17:49   ` Thierry Volpiatto
2012-12-18 19:10     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2y1glnt.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=cyd@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mathias.dahl@gmail.com \
    --cc=schwab@linux-m68k.org \
    --cc=thierry.volpiatto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).