]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename compare-window-configurations and update doc
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 20 May 2022 02:23:32 +0000 (04:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 20 May 2022 02:23:32 +0000 (04:23 +0200)
* 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).

doc/lispref/windows.texi
lisp/emacs-lisp/byte-opt.el
lisp/strokes.el
lisp/subr.el
src/window.c
test/lisp/ffap-tests.el

index 0bb873f3a9f087afb9a3b62bbf7a6324d7531df7..90551e6697ea0aee8238904ec9b8c8fbf16ce731 100644 (file)
@@ -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
index d3d8405d0686284a2fd0f45b754d98875815e9bd..69795f9c112599effa0d520fbdb1b53720f933d0 100644 (file)
@@ -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
index dc242d8f335f9f2af5254f533e1ef69622c3a57c..5402ebf1e1c1b686f59241a6be43973d44cdc208 100644 (file)
@@ -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."
index 945587db53ccdc1c4ad9fdec5262b751c6b2ef96..6538d790507ae32a92097887bef249ee751c227e 100644 (file)
@@ -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")
index a87b4834aafc134fa06c745572382e1c2f363602..d3e8afd68a92241b5683c91ff1c4b020c55fc87a 100644 (file)
@@ -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);
index 0fdc31e8b6147306967888d58f9bb5eb1179c859..4b580b5af52960c7b0be89c34bf74b060189dbe0 100644 (file)
@@ -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)