diff options
| -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}. |
