mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
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).
This commit is contained in:
parent
7e32904998
commit
9d557d4d4a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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."
|
||||
|
@ -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")
|
||||
|
12
src/window.c
12
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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user