all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jen-Chieh Shen <jcs090218@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] Add all-frames as arg for count windows.
Date: Sat, 15 Aug 2020 20:11:41 +0800	[thread overview]
Message-ID: <CAMiGhTPOOjSyNr=jxdAicwRHtjVuU6tyPehqKmTGU8QNbms8Pw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1110 bytes --]

Hi,

I think it is handy to have `all-frames` as an argument when using the
`count-windows` function?

Best,

Jen-Chieh Shen


From 226154c0c338845af757a6893db9645870cb9a12 Mon Sep 17 00:00:00 2001
From: jenchieh <jcs090218@gmail.com>
Date: Sat, 15 Aug 2020 15:57:14 +0800
Subject: [PATCH] Add all-frames as arg for count windows.

---
 lisp/window.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index f20940fa0e..591f019a7c 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2644,9 +2644,14 @@ and no others."

 (defun count-windows (&optional minibuf)
    "Return the number of live windows on the selected frame.
+
 The optional argument MINIBUF specifies whether the minibuffer
-window shall be counted.  See `walk-windows' for the precise
-meaning of this argument."
+window shall be counted.
+
+The optional argument ALL-FRAMES counted all windows instead of
+just the selected frame.
+
+See `walk-windows' for the precise meaning of this argument."
    (length (window-list-1 nil minibuf)))

 ;;; Resizing windows.
-- 
2.27.0.windows.1

[-- Attachment #1.2: Type: text/html, Size: 1414 bytes --]

[-- Attachment #2: cnt-win-frames.patch --]
[-- Type: application/octet-stream, Size: 989 bytes --]

From 226154c0c338845af757a6893db9645870cb9a12 Mon Sep 17 00:00:00 2001
From: jenchieh <jcs090218@gmail.com>
Date: Sat, 15 Aug 2020 15:57:14 +0800
Subject: [PATCH] Add all-frames as arg for count windows.

---
 lisp/window.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/window.el b/lisp/window.el
index f20940fa0e..591f019a7c 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2644,9 +2644,14 @@ and no others."
 
 (defun count-windows (&optional minibuf)
    "Return the number of live windows on the selected frame.
+
 The optional argument MINIBUF specifies whether the minibuffer
-window shall be counted.  See `walk-windows' for the precise
-meaning of this argument."
+window shall be counted.  
+
+The optional argument ALL-FRAMES counted all windows instead of
+just the selected frame.
+
+See `walk-windows' for the precise meaning of this argument."
    (length (window-list-1 nil minibuf)))
 \f
 ;;; Resizing windows.
-- 
2.27.0.windows.1


                 reply	other threads:[~2020-08-15 12:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAMiGhTPOOjSyNr=jxdAicwRHtjVuU6tyPehqKmTGU8QNbms8Pw@mail.gmail.com' \
    --to=jcs090218@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.