aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-12-12 15:52:56 +0100
committerJoakim Verona2012-12-12 15:52:56 +0100
commit8986f115b01183ffdc4cfc912ba426959266ef1a (patch)
treef4d5ec87d857ae64a690e4d9a30c3bbd8b16bfb8
parentfd2e292857ec77c1789c000b9a0f101a6815cd73 (diff)
parentd0efe6ec5bc90a206c194a429e6cdfd86a8fb3d5 (diff)
downloademacs-8986f115b01183ffdc4cfc912ba426959266ef1a.tar.gz
emacs-8986f115b01183ffdc4cfc912ba426959266ef1a.zip
auto upstream
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/frame.el30
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus.el18
-rw-r--r--lisp/mpc.el5
6 files changed, 65 insertions, 8 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 77e7e47b8a3..4199bd302a9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -35,6 +35,9 @@ simply disabling Transient Mark mode does the same thing.
35 35
36* Editing Changes in Emacs 24.4 36* Editing Changes in Emacs 24.4
37 37
38** New commands `toggle-frame-maximized' and `cycle-frame-maximized',
39bound to <f11> and S-<f11>, respectively.
40
38 41
39* Changes in Specialized Modes and Packages in Emacs 24.4 42* Changes in Specialized Modes and Packages in Emacs 24.4
40 43
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 49e129cd77a..adf8d9f88f0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12012-12-12 Sam Steingold <sds@gnu.org>
2
3 * frame.el (frame-maximization-style): New user option.
4 (toggle-frame-maximized): Toggle frame maximization according to
5 `frame-maximization-style', bound to <f11>.
6 (cycle-frame-maximized): Cycle between all maximization styles and
7 non-maximized frame, bound to shift-<f11>.
8
92012-12-12 David Cadé <codename68@gmail.com>
10
11 * mpc.el (mpc-format): Use truncate-string-to-width (bug#13143).
12
12012-12-12 Jonas Bernoulli <jonas@bernoul.li> 132012-12-12 Jonas Bernoulli <jonas@bernoul.li>
2 14
3 * lisp/emacs-lisp/eieio.el: Prettier object pretty-printing (bug#13115). 15 * lisp/emacs-lisp/eieio.el: Prettier object pretty-printing (bug#13115).
diff --git a/lisp/frame.el b/lisp/frame.el
index 7a54efc23e7..559aa35242d 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1654,12 +1654,42 @@ terminals, cursor blinking is controlled by the terminal."
1654 'blink-cursor-start)))) 1654 'blink-cursor-start))))
1655 1655
1656 1656
1657;; Frame maximization
1658(defcustom frame-maximization-style 'maximized
1659 "The maximization style of \\[toggle-frame-maximized]."
1660 :version "24.4"
1661 :type '(choice
1662 (const :tab "Respect window manager screen decorations." maximized)
1663 (const :tab "Ignore window manager screen decorations." fullscreen))
1664 :group 'frames)
1665
1666(defun toggle-frame-maximized ()
1667 "Maximize/un-maximize Emacs frame according to `frame-maximization-style'.
1668See also `cycle-frame-maximized'."
1669 (interactive)
1670 (modify-frame-parameters
1671 nil `((fullscreen . ,(if (frame-parameter nil 'fullscreen)
1672 nil frame-maximization-style)))))
1673
1674(defun cycle-frame-maximized ()
1675 "Cycle Emacs frame between normal, maximized, and fullscreen.
1676See also `toggle-frame-maximized'."
1677 (interactive)
1678 (modify-frame-parameters
1679 nil `((fullscreen . ,(cl-case (frame-parameter nil 'fullscreen)
1680 ((nil) 'maximized)
1681 ((maximized) 'fullscreen)
1682 ((fullscreen) nil))))))
1683
1684
1657;;;; Key bindings 1685;;;; Key bindings
1658 1686
1659(define-key ctl-x-5-map "2" 'make-frame-command) 1687(define-key ctl-x-5-map "2" 'make-frame-command)
1660(define-key ctl-x-5-map "1" 'delete-other-frames) 1688(define-key ctl-x-5-map "1" 'delete-other-frames)
1661(define-key ctl-x-5-map "0" 'delete-frame) 1689(define-key ctl-x-5-map "0" 'delete-frame)
1662(define-key ctl-x-5-map "o" 'other-frame) 1690(define-key ctl-x-5-map "o" 'other-frame)
1691(define-key global-map [f11] 'toggle-frame-maximized)
1692(define-key global-map [(shift f11)] 'cycle-frame-maximized)
1663 1693
1664 1694
1665;; Misc. 1695;; Misc.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2d2d9318bd6..565096b6289 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12012-12-12 Sam Steingold <sds@gnu.org>
2
3 * gnus.el (gnus-other-frame-resume-function): Add user option.
4 (gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.
5
12012-12-06 Sam Steingold <sds@gnu.org> 62012-12-06 Sam Steingold <sds@gnu.org>
2 7
3 * gnus-start.el (gnus-before-resume-hook): Add. 8 * gnus-start.el (gnus-before-resume-hook): Add.
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 70e7f711f3d..753c5fb473e 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -2495,7 +2495,15 @@ Disabling the agent may result in noticeable loss of performance."
2495 :type 'boolean) 2495 :type 'boolean)
2496 2496
2497(defcustom gnus-other-frame-function 'gnus 2497(defcustom gnus-other-frame-function 'gnus
2498 "Function called by the command `gnus-other-frame'." 2498 "Function called by the command `gnus-other-frame' when starting Gnus."
2499 :group 'gnus-start
2500 :type '(choice (function-item gnus)
2501 (function-item gnus-no-server)
2502 (function-item gnus-slave)
2503 (function-item gnus-slave-no-server)))
2504
2505(defcustom gnus-other-frame-resume-function 'gnus-group-get-new-news
2506 "Function called by the command `gnus-other-frame' when resuming Gnus."
2499 :group 'gnus-start 2507 :group 'gnus-start
2500 :type '(choice (function-item gnus) 2508 :type '(choice (function-item gnus)
2501 (function-item gnus-no-server) 2509 (function-item gnus-no-server)
@@ -4361,8 +4369,9 @@ Used for `gnus-exit-gnus-hook' in `gnus-other-frame'."
4361 "Pop up a frame to read news. 4369 "Pop up a frame to read news.
4362This will call one of the Gnus commands which is specified by the user 4370This will call one of the Gnus commands which is specified by the user
4363option `gnus-other-frame-function' (default `gnus') with the argument 4371option `gnus-other-frame-function' (default `gnus') with the argument
4364ARG if Gnus is not running, otherwise just pop up a Gnus frame. The 4372ARG if Gnus is not running, otherwise pop up a Gnus frame and run the
4365optional second argument DISPLAY should be a standard display string 4373command specified by `gnus-other-frame-resume-function'.
4374The optional second argument DISPLAY should be a standard display string
4366such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is 4375such as \"unix:0\" to specify where to pop up a frame. If DISPLAY is
4367omitted or the function `make-frame-on-display' is not available, the 4376omitted or the function `make-frame-on-display' is not available, the
4368current display is used." 4377current display is used."
@@ -4394,7 +4403,8 @@ current display is used."
4394 (make-frame-on-display display gnus-other-frame-parameters) 4403 (make-frame-on-display display gnus-other-frame-parameters)
4395 (make-frame gnus-other-frame-parameters)))) 4404 (make-frame gnus-other-frame-parameters))))
4396 (if alive 4405 (if alive
4397 (switch-to-buffer gnus-group-buffer) 4406 (progn (switch-to-buffer gnus-group-buffer)
4407 (funcall gnus-other-frame-resume-function arg))
4398 (funcall gnus-other-frame-function arg) 4408 (funcall gnus-other-frame-function arg)
4399 (add-hook 'gnus-exit-gnus-hook 'gnus-delete-gnus-frame) 4409 (add-hook 'gnus-exit-gnus-hook 'gnus-delete-gnus-frame)
4400 ;; One might argue that `gnus-delete-gnus-frame' should not be called 4410 ;; One might argue that `gnus-delete-gnus-frame' should not be called
diff --git a/lisp/mpc.el b/lisp/mpc.el
index e8b5c50e561..65363de40f3 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1034,11 +1034,8 @@ If PLAYLIST is t or nil or missing, use the main playlist."
1034 (let ((display 1034 (let ((display
1035 (if (and size 1035 (if (and size
1036 (> (+ postwidth textwidth) size)) 1036 (> (+ postwidth textwidth) size))
1037 ;; This doesn't even obey double-width chars :-(
1038 (propertize 1037 (propertize
1039 (if (zerop (- size postwidth 1)) 1038 (truncate-string-to-width text size nil nil "…")
1040 (substring text 0 1)
1041 (concat (substring text 0 (- size postwidth textwidth 1)) "…"))
1042 'help-echo text) 1039 'help-echo text)
1043 text))) 1040 text)))
1044 (when (memq tag '(Artist Album Composer)) ;FIXME: wrong list. 1041 (when (memq tag '(Artist Album Composer)) ;FIXME: wrong list.