From: Juri Linkov <juri@jurta.org>
To: Chong Yidong <cyd@gnu.org>
Cc: Mathias Dahl <mathias.dahl@gmail.com>,
emacs-devel@gnu.org, Andreas Schwab <schwab@linux-m68k.org>,
Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: Re: Unuseful keybindings
Date: Mon, 24 Dec 2012 12:29:19 +0200 [thread overview]
Message-ID: <87hanbu3ly.fsf@mail.jurta.org> (raw)
In-Reply-To: <87d2y1glnt.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 23 Dec 2012 11:31:02 +0200")
> This can be improved with the following patch:
Actually thinking more in terms of the command line arguments
`--maximized' and `--fullscreen' suggests a better patch
that for consistency defines exactly the same corresponding commands
`toggle-frame-maximized' and `toggle-frame-fullscreen':
=== modified file 'lisp/frame.el'
*** lisp/frame.el 2012-12-12 14:43:45 +0000
--- lisp/frame.el 2012-12-24 10:28:49 +0000
*************** (define-minor-mode blink-cursor-mode
*** 1655,1685 ****
\f
;; Frame maximization
! (defcustom frame-maximization-style 'maximized
! "The maximization style of \\[toggle-frame-maximized]."
! :version "24.4"
! :type '(choice
! (const :tab "Respect window manager screen decorations." maximized)
! (const :tab "Ignore window manager screen decorations." fullscreen))
! :group 'frames)
!
! (defun toggle-frame-maximized ()
! "Maximize/un-maximize Emacs frame according to `frame-maximization-style'.
! See also `cycle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
! nil frame-maximization-style)))))
!
! (defun cycle-frame-maximized ()
! "Cycle Emacs frame between normal, maximized, and fullscreen.
See also `toggle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(cl-case (frame-parameter nil 'fullscreen)
! ((nil) 'maximized)
! ((maximized) 'fullscreen)
! ((fullscreen) nil))))))
\f
;;;; Key bindings
--- 1655,1680 ----
\f
;; Frame maximization
!
! (defun toggle-frame-maximized (&optional frame)
! "Maximize FRAME or un-maximize if it is already maximized.
! Respect window manager screen decorations.
! See also `toggle-frame-fullscreen'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(if (frame-parameter frame 'fullscreen)
! nil
! 'maximized)))))
!
! (defun toggle-frame-fullscreen (&optional frame)
! "Maximize FRAME to fullscreen or un-maximize if it is already fullscreen.
! Ignore window manager screen decorations.
See also `toggle-frame-maximized'."
(interactive)
(modify-frame-parameters
! nil `((fullscreen . ,(if (frame-parameter frame 'fullscreen)
! nil
! 'fullscreen)))))
\f
;;;; Key bindings
*************** (define-key ctl-x-5-map "2" 'make-frame-
*** 1688,1695 ****
(define-key ctl-x-5-map "1" 'delete-other-frames)
(define-key ctl-x-5-map "0" 'delete-frame)
(define-key ctl-x-5-map "o" 'other-frame)
! (define-key global-map [f11] 'toggle-frame-maximized)
! (define-key global-map [(shift f11)] 'cycle-frame-maximized)
\f
;; Misc.
--- 1683,1690 ----
(define-key ctl-x-5-map "1" 'delete-other-frames)
(define-key ctl-x-5-map "0" 'delete-frame)
(define-key ctl-x-5-map "o" 'other-frame)
! (define-key global-map [f11] 'toggle-frame-fullscreen)
! (define-key global-map [(meta f10)] 'toggle-frame-maximized)
\f
;; Misc.
next prev parent reply other threads:[~2012-12-24 10:29 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
2012-12-24 10:29 ` Juri Linkov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hanbu3ly.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.