summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-05-20 04:23:32 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-05-20 04:23:32 +0200
commit9d557d4d4adf68ca15ca9aaa48470133544ede26 (patch)
treedb41dac2aaa23bc0d8ef591b393f7c152414fdf8
parent7e32904998db6bcaff78c9329efa1fcbc26cbd70 (diff)
downloademacs-9d557d4d4adf68ca15ca9aaa48470133544ede26.tar.gz
Rename compare-window-configurations and update doc
* doc/lispref/windows.texi (Window Configurations): Update name. * lisp/strokes.el (strokes-window-configuration-changed-p): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Update callers and references. * lisp/subr.el (compare-window-configurations): Make into obsolete alias. * src/window.c (Fwindow_configuration_equal_p): Rename (bug#14964).
-rw-r--r--doc/lispref/windows.texi9
-rw-r--r--lisp/emacs-lisp/byte-opt.el2
-rw-r--r--lisp/strokes.el4
-rw-r--r--lisp/subr.el3
-rw-r--r--src/window.c12
-rw-r--r--test/lisp/ffap-tests.el2
6 files changed, 17 insertions, 15 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 0bb873f3a9f..90551e6697e 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6141,11 +6141,10 @@ configuration on the current frame.
This function returns @code{t} if @var{object} is a window configuration.
@end defun
-@defun compare-window-configurations config1 config2
-This function compares two window configurations as regards the
-structure of windows, but ignores the values of point and the
-saved scrolling positions---it can return @code{t} even if those
-aspects differ.
+@defun window-configuration-equal-p config1 config2
+This function says whether two window configurations have the same
+window layout, but ignores the values of point and the saved scrolling
+positions---it can return @code{t} even if those aspects differ.
@end defun
@defun window-configuration-frame config
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index d3d8405d068..69795f9c112 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1368,7 +1368,7 @@ See Info node `(elisp) Integer Basics'."
buffer-substring byte-code-function-p
capitalize car-less-than-car car cdr ceiling char-after char-before
char-equal char-to-string char-width compare-strings
- compare-window-configurations concat coordinates-in-window-p
+ window-configuration-equal-p concat coordinates-in-window-p
copy-alist copy-sequence copy-marker copysign cos count-lines
current-time-string current-time-zone
decode-char
diff --git a/lisp/strokes.el b/lisp/strokes.el
index dc242d8f335..5402ebf1e1c 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1036,8 +1036,8 @@ o Strokes are a bit computer-dependent in that they depend somewhat on
(defun strokes-window-configuration-changed-p ()
"Non-nil if the `strokes-window-configuration' frame properties changed.
This is based on the last time `strokes-window-configuration' was updated."
- (compare-window-configurations (current-window-configuration)
- strokes-window-configuration))
+ (window-configuration-equal-p (current-window-configuration)
+ strokes-window-configuration))
(defun strokes-update-window-configuration ()
"Ensure that `strokes-window-configuration' is up-to-date."
diff --git a/lisp/subr.el b/lisp/subr.el
index 945587db53c..6538d790507 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1874,6 +1874,9 @@ This was used internally by quail.el and keyboard.c in Emacs 27.
It does nothing in Emacs 28.")
(make-obsolete-variable 'inhibit--record-char nil "28.1")
+(define-obsolete-function-alias 'compare-window-configurations
+ #'window-configuration-equal-p "29.1")
+
;; We can't actually make `values' obsolete, because that will result
;; in warnings when using `values' in let-bindings.
;;(make-obsolete-variable 'values "no longer used" "28.1")
diff --git a/src/window.c b/src/window.c
index a87b4834aaf..d3e8afd68a9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8121,11 +8121,11 @@ compare_window_configurations (Lisp_Object configuration1,
return true;
}
-DEFUN ("compare-window-configurations", Fcompare_window_configurations,
- Scompare_window_configurations, 2, 2, 0,
- doc: /* Compare two window configurations as regards the structure of windows.
-This function ignores details such as the values of point
-and scrolling positions. */)
+DEFUN ("window-configuration-equal-p", Fwindow_configuration_equal_p,
+ Swindow_configuration_equal_p, 2, 2, 0,
+ doc: /* Say whether two window configurations have the same window layout.
+This function ignores details such as the values of point and
+scrolling positions. */)
(Lisp_Object x, Lisp_Object y)
{
if (compare_window_configurations (x, y))
@@ -8613,7 +8613,7 @@ displayed after a scrolling operation to be somewhat inaccurate. */);
defsubr (&Swindow_scroll_bars);
defsubr (&Swindow_vscroll);
defsubr (&Sset_window_vscroll);
- defsubr (&Scompare_window_configurations);
+ defsubr (&Swindow_configuration_equal_p);
defsubr (&Swindow_bump_use_time);
defsubr (&Swindow_list);
defsubr (&Swindow_list_1);
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 0fdc31e8b61..4b580b5af52 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -73,7 +73,7 @@ left alone when opening a URL in an external browser."
(urls nil)
(ffap-url-fetcher (lambda (url) (push url urls) nil)))
(should-not (ffap-other-window "https://www.gnu.org"))
- (should (compare-window-configurations (current-window-configuration) old))
+ (should (window-configuration-equal-p (current-window-configuration) old))
(should (equal urls '("https://www.gnu.org")))))
(defun ffap-test-string (space string)