aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Jensen2018-01-22 10:52:32 +0100
committerMartin Rudalics2018-01-22 10:52:32 +0100
commitfa582153f7a75e1eaaef4bfd2b381916233dc0a7 (patch)
treee2d496bab50b9086fc09d406440de279d894e9e8
parent6b01b9475d0318f8bb1c7555938f9398b40e5ec7 (diff)
downloademacs-fa582153f7a75e1eaaef4bfd2b381916233dc0a7.tar.gz
emacs-fa582153f7a75e1eaaef4bfd2b381916233dc0a7.zip
Use text-pixels values only when saving framesets (Bug#30141)
* lisp/frameset.el (frameset-persistent-filter-alist): Specify that text-pixels values are by default only saved by framesets so the parameter is not set when restoring (Bug#30141).
-rw-r--r--lisp/frameset.el62
1 files changed, 34 insertions, 28 deletions
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 3fb6901e943..0e3363d7ae3 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -230,11 +230,10 @@ Properties can be set with
230;; filtering functions) is copied to FILTERED as is. Keyword values :save, 230;; filtering functions) is copied to FILTERED as is. Keyword values :save,
231;; :restore and :never tell the function to copy CURRENT to FILTERED in the 231;; :restore and :never tell the function to copy CURRENT to FILTERED in the
232;; respective situations, that is, when saving, restoring, or never at all. 232;; respective situations, that is, when saving, restoring, or never at all.
233;; Values :save and :restore are not used in this package, because usually if 233;; Values :save and :restore can be useful, for example, if you already
234;; you don't want to save a parameter, you don't want to restore it either. 234;; have a saved frameset created with some intent, and want to reuse it for
235;; But they can be useful, for example, if you already have a saved frameset 235;; a different objective where the expected parameter list has different
236;; created with some intent, and want to reuse it for a different objective 236;; requirements.
237;; where the expected parameter list has different requirements.
238;; 237;;
239;; Finally, the value can also be a filtering function, or a filtering 238;; Finally, the value can also be a filtering function, or a filtering
240;; function plus some arguments. The function is called for each matching 239;; function plus some arguments. The function is called for each matching
@@ -291,6 +290,11 @@ Properties can be set with
291;; So, in general, not saving `name' is the right thing to do, though 290;; So, in general, not saving `name' is the right thing to do, though
292;; surely there are applications that will want to override this filter. 291;; surely there are applications that will want to override this filter.
293;; 292;;
293;; - `frameset--text-pixel-height', `frameset--text-pixel-width': These are used to
294;; save the pixel width and height of a frame. They are necessary
295;; during restore, but should not be set on the actual frame after
296;; restoring, so `:save' is used to ensure they are only saved.
297;;
294;; - `font', `fullscreen', `height' and `width': These parameters suffer 298;; - `font', `fullscreen', `height' and `width': These parameters suffer
295;; from the fact that they are badly mangled when going through a 299;; from the fact that they are badly mangled when going through a
296;; tty session, though not all in the same way. When saving a GUI frame 300;; tty session, though not all in the same way. When saving a GUI frame
@@ -442,32 +446,34 @@ DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
442;;;###autoload 446;;;###autoload
443(defvar frameset-persistent-filter-alist 447(defvar frameset-persistent-filter-alist
444 (nconc 448 (nconc
445 '((background-color . frameset-filter-sanitize-color) 449 '((background-color . frameset-filter-sanitize-color)
446 (buffer-list . :never) 450 (buffer-list . :never)
447 (buffer-predicate . :never) 451 (buffer-predicate . :never)
448 (buried-buffer-list . :never) 452 (buried-buffer-list . :never)
449 ;; Don't save the 'client' parameter to avoid that a subsequent 453 ;; Don't save the 'client' parameter to avoid that a subsequent
450 ;; `save-buffers-kill-terminal' in a non-client session barks at 454 ;; `save-buffers-kill-terminal' in a non-client session barks at
451 ;; the user (Bug#29067). 455 ;; the user (Bug#29067).
452 (client . :never) 456 (client . :never)
453 (delete-before . :never) 457 (delete-before . :never)
454 (font . frameset-filter-font-param) 458 (font . frameset-filter-font-param)
455 (foreground-color . frameset-filter-sanitize-color) 459 (foreground-color . frameset-filter-sanitize-color)
456 (fullscreen . frameset-filter-shelve-param) 460 (frameset--text-pixel-height . :save)
457 (GUI:font . frameset-filter-unshelve-param) 461 (frameset--text-pixel-width . :save)
458 (GUI:fullscreen . frameset-filter-unshelve-param) 462 (fullscreen . frameset-filter-shelve-param)
459 (GUI:height . frameset-filter-unshelve-param) 463 (GUI:font . frameset-filter-unshelve-param)
460 (GUI:width . frameset-filter-unshelve-param) 464 (GUI:fullscreen . frameset-filter-unshelve-param)
461 (height . frameset-filter-shelve-param) 465 (GUI:height . frameset-filter-unshelve-param)
462 (outer-window-id . :never) 466 (GUI:width . frameset-filter-unshelve-param)
463 (parent-frame . :never) 467 (height . frameset-filter-shelve-param)
464 (parent-id . :never) 468 (outer-window-id . :never)
465 (mouse-wheel-frame . :never) 469 (parent-frame . :never)
466 (tty . frameset-filter-tty-to-GUI) 470 (parent-id . :never)
467 (tty-type . frameset-filter-tty-to-GUI) 471 (mouse-wheel-frame . :never)
468 (width . frameset-filter-shelve-param) 472 (tty . frameset-filter-tty-to-GUI)
469 (window-id . :never) 473 (tty-type . frameset-filter-tty-to-GUI)
470 (window-system . :never)) 474 (width . frameset-filter-shelve-param)
475 (window-id . :never)
476 (window-system . :never))
471 frameset-session-filter-alist) 477 frameset-session-filter-alist)
472 "Parameters to filter for persistent framesets. 478 "Parameters to filter for persistent framesets.
473DO NOT MODIFY. See `frameset-filter-alist' for a full description.") 479DO NOT MODIFY. See `frameset-filter-alist' for a full description.")