diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-02-10 00:07:41 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-02-10 00:07:41 +0100 |
| commit | f01cf73329cda1cffb9182635a429f7775cb585c (patch) | |
| tree | dc65b393d2c9f2de8cb52916f6d7cee021e2b93d | |
| parent | e59e311d1ffc422f91e4e9c494598e978f5c2125 (diff) | |
Add innermost-minibuffer-pfeature/innermost-minibuffer
| -rw-r--r-- | compat-28.el | 8 | ||||
| -rw-r--r-- | compat-tests.el | 3 | ||||
| -rw-r--r-- | compat.texi | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/compat-28.el b/compat-28.el index 645f5cb..c845b58 100644 --- a/compat-28.el +++ b/compat-28.el @@ -605,6 +605,14 @@ onwards does." ".#" (file-name-nondirectory filename)) (file-name-directory filename))) +;;;; Defined in minibuf.c + +(compat-defun innermost-minibuffer-p (&optional buffer) ;; <compat-tests:innermost-minibuffer-p> + "Return t if BUFFER is the most nested active minibuffer. +No argument or nil as argument means use the current buffer as BUFFER." + (when-let ((win (active-minibuffer-window))) + (eq (window-buffer win) (or buffer (current-buffer))))) + ;;;; Defined in minibuffer.el (compat-defun format-prompt (prompt default &rest format-args) ;; <compat-tests:format-prompt> diff --git a/compat-tests.el b/compat-tests.el index ce818c1..e63a041 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -163,6 +163,9 @@ (push x y)) '(3 2 1)))) +(ert-deftest innermost-minibuffer-p () + ) + (ert-deftest minibuffer-history-value () (let ((minibuffer-history-variable 'file-name-history) (file-name-history '("a" "b" "c"))) diff --git a/compat.texi b/compat.texi index 4a84f29..f5d0fb3 100644 --- a/compat.texi +++ b/compat.texi @@ -2224,8 +2224,6 @@ The function @code{split-string-shell-command}. @item The function @code{string-limit}. @item -The function @code{innermost-minibuffer-p}. -@item The function @code{max-mini-window-lines}. @item The function @code{lock-file} and @code{unlock-file}. |
