[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111353: * lisp/frame.el (frame-maxim
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111353: * lisp/frame.el (frame-maximization-style): Remove user option. |
Date: |
Thu, 27 Dec 2012 22:09:45 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111353
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-12-27 22:09:45 +0200
message:
* lisp/frame.el (frame-maximization-style): Remove user option.
(cycle-frame-maximized): Remove function.
(toggle-frame-maximized): Rewrite and bind to M-<f10>.
(toggle-frame-fullscreen): New command bound to <f11> instead of
`toggle-frame-maximized'.
http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00703.html
modified:
etc/NEWS
lisp/ChangeLog
lisp/frame.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2012-12-27 08:21:08 +0000
+++ b/etc/NEWS 2012-12-27 20:09:45 +0000
@@ -53,8 +53,8 @@
* Editing Changes in Emacs 24.4
-** New commands `toggle-frame-maximized' and `cycle-frame-maximized',
-bound to <f11> and S-<f11>, respectively.
+** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
+bound to <f11> and M-<f10>, respectively.
* Changes in Specialized Modes and Packages in Emacs 24.4
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-27 19:58:04 +0000
+++ b/lisp/ChangeLog 2012-12-27 20:09:45 +0000
@@ -1,3 +1,12 @@
+2012-12-27 Juri Linkov <address@hidden>
+
+ * frame.el (frame-maximization-style): Remove user option.
+ (cycle-frame-maximized): Remove function.
+ (toggle-frame-maximized): Rewrite and bind to M-<f10>.
+ (toggle-frame-fullscreen): New command bound to <f11> instead of
+ `toggle-frame-maximized'.
+ http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00703.html
+
2012-12-27 Michael Albinus <address@hidden>
* net/tramp.el (tramp-handle-file-accessible-directory-p): New defun.
=== modified file 'lisp/frame.el'
--- a/lisp/frame.el 2012-12-12 14:43:45 +0000
+++ b/lisp/frame.el 2012-12-27 20:09:45 +0000
@@ -1654,32 +1654,49 @@
'blink-cursor-start))))
-;; 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)
+;; Frame maximization/fullscreen
(defun toggle-frame-maximized ()
- "Maximize/un-maximize Emacs frame according to `frame-maximization-style'.
-See also `cycle-frame-maximized'."
+ "Toggle maximization state of the selected frame.
+Maximize the selected frame or un-maximize if it is already maximized.
+Respect window manager screen decorations.
+If the frame is in fullscreen mode, don't change its mode,
+just toggle the temporary frame parameter `maximized',
+so the frame will go to the right maximization state
+after disabling fullscreen mode.
+See also `toggle-frame-fullscreen'."
(interactive)
- (modify-frame-parameters
- nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
- nil frame-maximization-style)))))
+ (if (eq (frame-parameter nil 'fullscreen) 'fullscreen)
+ (modify-frame-parameters
+ nil
+ `((maximized
+ . ,(unless (eq (frame-parameter nil 'maximized) 'maximized)
+ 'maximized))))
+ (modify-frame-parameters
+ nil
+ `((fullscreen
+ . ,(unless (eq (frame-parameter nil 'fullscreen) 'maximized)
+ 'maximized))))))
-(defun cycle-frame-maximized ()
- "Cycle Emacs frame between normal, maximized, and fullscreen.
+(defun toggle-frame-fullscreen ()
+ "Toggle fullscreen mode of the selected frame.
+Enable fullscreen mode of the selected frame or disable if it is
+already fullscreen. Ignore window manager screen decorations.
+When turning on fullscreen mode, remember the previous value of the
+maximization state in the temporary frame parameter `maximized'.
+Restore the maximization state when turning off fullscreen mode.
See also `toggle-frame-maximized'."
(interactive)
(modify-frame-parameters
- nil `((fullscreen . ,(cl-case (frame-parameter nil 'fullscreen)
- ((nil) 'maximized)
- ((maximized) 'fullscreen)
- ((fullscreen) nil))))))
+ nil
+ `((maximized
+ . ,(unless (eq (frame-parameter nil 'fullscreen) 'fullscreen)
+ (frame-parameter nil 'fullscreen)))
+ (fullscreen
+ . ,(if (eq (frame-parameter nil 'fullscreen) 'fullscreen)
+ (if (eq (frame-parameter nil 'maximized) 'maximized)
+ 'maximized)
+ 'fullscreen)))))
;;;; Key bindings
@@ -1688,8 +1705,8 @@
(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)
+(define-key global-map [f11] 'toggle-frame-fullscreen)
+(define-key global-map [(meta f10)] 'toggle-frame-maximized)
;; Misc.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111353: * lisp/frame.el (frame-maximization-style): Remove user option.,
Juri Linkov <=