aboutsummaryrefslogtreecommitdiff
path: root/compat-27.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2023-01-20 16:04:52 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2023-01-20 16:06:27 +0100
commit041ac359aea6083d3aa236d759ed41292ee10079 (patch)
treeb85914bdaa94a3747a2fc4d359fd723e00740e5a /compat-27.el
parentc0a9abc9b1f97bddc72779e3e25d11c30f19668d (diff)
compat-27: Add minibuffer-history-value
Diffstat (limited to 'compat-27.el')
-rw-r--r--compat-27.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/compat-27.el b/compat-27.el
index 16a6b12..672a1d0 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -307,6 +307,14 @@ Also see `decoded-time-dst'.")
This is an integer indicating the UTC offset in seconds, i.e.,
the number of seconds east of Greenwich.")))
+(compat-defun minibuffer-history-value () ;; <compat-tests:minibuffer-history-value>
+ "Return the value of the minibuffer input history list.
+If `minibuffer-history-variable' points to a buffer-local variable and
+the minibuffer is active, return the buffer-local value for the buffer
+that was current when the minibuffer was activated."
+ (buffer-local-value minibuffer-history-variable
+ (window-buffer (minibuffer-selected-window))))
+
;;;; Defined in minibuffer.el
(compat-defmacro with-minibuffer-selected-window (&rest body) ;; <compat-tests:with-minibuffer-selected-window>
@@ -716,7 +724,7 @@ and if a matching region is found, place point at the start of the region."
;;;; Defined in ring.el
-(compat-defun ring-resize (ring size)
+(compat-defun ring-resize (ring size) ;; <compat-tests:ring-resize>
"Set the size of RING to SIZE.
If the new size is smaller, then the oldest items in the ring are
discarded."