* window.h (window): Remove clone_number slot.
* window.c (Fwindow_clone_number, Fset_window_clone_number):
Remove.
(make_parent_window, make_window, saved_window)
(Fset_window_configuration, save_window_save): Don't deal with
clone numbers.
* buffer.c (Qclone_number): Remove declaration.
(sort_overlays, overlay_strings): Don't deal with clone numbers.
* window.el (window-state-get-1): Don't assign clone numbers.
Add clone-of item to list of window parameters.
(window-state-put-2): Don't process clone numbers.
(display-buffer-alist): Fix doc-string.
+2011-07-02 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window-state-get-1): Don't assign clone numbers.
+ Add clone-of item to list of window parameters.
+ (window-state-put-2): Don't process clone numbers.
+ (display-buffer-alist): Fix doc-string.
+
2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (remq): Don't allocate if it's not needed.
(window-list-no-nils
type
(unless (window-next-sibling window) (cons 'last t))
- (cons 'clone-number (window-clone-number window))
(cons 'total-height (window-total-size window))
(cons 'total-width (window-total-size window t))
(cons 'normal-height (window-normal-size window))
(unless (memq (car parameter)
window-state-ignored-parameters)
(setq list (cons parameter list))))
+ (unless (window-parameter window 'clone-of)
+ ;; Make a clone-of parameter.
+ (setq list (cons (cons 'clone-of window) list)))
(when list
(cons 'parameters list)))
(when buffer
"Helper function for `window-state-put'."
(dolist (item window-state-put-list)
(let ((window (car item))
- (clone-number (cdr (assq 'clone-number item)))
(splits (cdr (assq 'splits item)))
(nest (cdr (assq 'nest item)))
(parameters (cdr (assq 'parameters item)))
(state (cdr (assq 'buffer item))))
- ;; Put in clone-number.
- (when clone-number (set-window-clone-number window clone-number))
(when splits (set-window-splits window splits))
(when nest (set-window-nest window nest))
;; Process parameters.
function specified in the second element of the list is
responsible for displaying the buffer. `display-buffer' calls
this function with the buffer as first argument and the remaining
-elements of the list as the other arguments.
+elements of the list as the second.
The function should choose or create a window, display the buffer
in it, and return the window. It is also responsible for giving
+2011-07-02 Martin Rudalics <rudalics@gmx.at>
+
+ * window.h (window): Remove clone_number slot.
+ * window.c (Fwindow_clone_number, Fset_window_clone_number):
+ Remove.
+ (make_parent_window, make_window, saved_window)
+ (Fset_window_configuration, save_window_save): Don't deal with
+ clone numbers.
+ * buffer.c (Qclone_number): Remove declaration.
+ (sort_overlays, overlay_strings): Don't deal with clone numbers.
+
2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
Add multiple inheritance to keymaps.
Lisp_Object Qpriority, Qbefore_string, Qafter_string;
-static Lisp_Object Qclone_number, Qevaporate;
+static Lisp_Object Qevaporate;
Lisp_Object Qmodification_hooks;
Lisp_Object Qinsert_in_front_hooks;
overlays that are limited to some other window. */
if (w)
{
- Lisp_Object window, clone_number;
+ Lisp_Object window;
window = Foverlay_get (overlay, Qwindow);
- clone_number = Foverlay_get (overlay, Qclone_number);
- if (WINDOWP (window) && XWINDOW (window) != w
- && (! NUMBERP (clone_number)
- || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
+ if (WINDOWP (window) && XWINDOW (window) != w)
continue;
}
EMACS_INT
overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
{
- Lisp_Object overlay, window, clone_number, str;
+ Lisp_Object overlay, window, str;
struct Lisp_Overlay *ov;
EMACS_INT startpos, endpos;
int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
if (endpos != pos && startpos != pos)
continue;
window = Foverlay_get (overlay, Qwindow);
- clone_number = Foverlay_get (overlay, Qclone_number);
- if (WINDOWP (window) && XWINDOW (window) != w
- && (! NUMBERP (clone_number)
- || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
+ if (WINDOWP (window) && XWINDOW (window) != w)
continue;
-
if (startpos == pos
&& (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
record_overlay_string (&overlay_heads, str,
if (endpos != pos && startpos != pos)
continue;
window = Foverlay_get (overlay, Qwindow);
- clone_number = Foverlay_get (overlay, Qclone_number);
- if (WINDOWP (window) && XWINDOW (window) != w
- && (! NUMBERP (clone_number)
- || XFASTINT (clone_number) != XFASTINT (w->clone_number)))
+ if (WINDOWP (window) && XWINDOW (window) != w)
continue;
if (startpos == pos
&& (str = Foverlay_get (overlay, Qbefore_string), STRINGP (str)))
DEFSYM (Qinsert_behind_hooks, "insert-behind-hooks");
DEFSYM (Qget_file_buffer, "get-file-buffer");
DEFSYM (Qpriority, "priority");
- DEFSYM (Qclone_number, "clone-number");
DEFSYM (Qbefore_string, "before-string");
DEFSYM (Qafter_string, "after-string");
DEFSYM (Qfirst_change_hook, "first-change-hook");
return select_window (window, norecord, 0);
}
\f
-DEFUN ("window-clone-number", Fwindow_clone_number, Swindow_clone_number, 0, 1, 0,
- doc: /* Return WINDOW's clone number.
-WINDOW can be any window and defaults to the selected one. */)
- (Lisp_Object window)
-{
- return decode_any_window (window)->clone_number;
-}
-
DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0,
doc: /* Return the buffer that WINDOW is displaying.
WINDOW can be any window and defaults to the selected one.
unbind_to (count, Qnil);
}
-DEFUN ("set-window-clone-number", Fset_window_clone_number, Sset_window_clone_number, 2, 2, 0,
- doc: /* Set WINDOW's clone number to CLONE-NUMBER.
-WINDOW can be any window and defaults to the selected one. */)
- (Lisp_Object window, Lisp_Object clone_number)
-{
- register struct window *w = decode_any_window (window);
-
- CHECK_NUMBER (clone_number);
- w->clone_number = clone_number;
- return w->clone_number;
-}
-
DEFUN ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 3, 0,
doc: /* Make WINDOW display BUFFER-OR-NAME as its contents.
WINDOW has to be a live window and defaults to the selected one.
++sequence_number;
XSETFASTINT (p->sequence_number, sequence_number);
- XSETFASTINT (p->clone_number, sequence_number);
replace_window (window, parent, 1);
XSETFASTINT (w->use_time, 0);
++sequence_number;
XSETFASTINT (w->sequence_number, sequence_number);
- XSETFASTINT (w->clone_number, sequence_number);
w->temslot = w->last_modified = w->last_overlay_modified = Qnil;
XSETFASTINT (w->last_point, 0);
w->last_had_star = w->vertical_scroll_bar = Qnil;
{
struct vectorlike_header header;
- Lisp_Object window, clone_number;
- Lisp_Object buffer, start, pointm, mark;
+ Lisp_Object window, buffer, start, pointm, mark;
Lisp_Object left_col, top_line, total_cols, total_lines;
Lisp_Object normal_cols, normal_lines;
Lisp_Object hscroll, min_hscroll;
}
}
- w->clone_number = p->clone_number;
/* If we squirreled away the buffer in the window's height,
restore it now. */
if (BUFFERP (w->total_lines))
XSETFASTINT (w->temslot, i); i++;
p->window = window;
- p->clone_number = w->clone_number;
p->buffer = w->buffer;
p->left_col = w->left_col;
p->top_line = w->top_line;
defsubr (&Sset_frame_selected_window);
defsubr (&Spos_visible_in_window_p);
defsubr (&Swindow_line_height);
- defsubr (&Swindow_clone_number);
defsubr (&Swindow_buffer);
defsubr (&Swindow_parent);
defsubr (&Swindow_top_child);
defsubr (&Sdelete_window_internal);
defsubr (&Sresize_mini_window_internal);
defsubr (&Sset_window_buffer);
- defsubr (&Sset_window_clone_number);
defsubr (&Srun_window_configuration_change_hook);
defsubr (&Sselect_window);
defsubr (&Sforce_window_update);
/* Unique number of window assigned when it was created. */
Lisp_Object sequence_number;
- /* Sequence number of window this window was cloned from. Identic
- to sequence number if window was not cloned. */
- Lisp_Object clone_number;
-
/* No permanent meaning; used by save-window-excursion's
bookkeeping. */
Lisp_Object temslot;