From: joakim@verona.se
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Adding parameters to windows
Date: Fri, 23 May 2008 16:10:19 +0200 [thread overview]
Message-ID: <m3d4ndun5g.fsf@verona.se> (raw)
In-Reply-To: <jwvprrnpici.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 15 May 2008 13:51:50 -0400")
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Now that your copyright papers are on file, could you send us a patch
> together with a corresponding ChangeLog entry?
>
>
> Stefan
Changelog entry:
2008-05-23 Joakim Verona <joakim@verona.se>
* window.h (window):Added window_parameters.
* window.c (syms_of_window): Add new symbols.
* window.c (DEFUN): New defun set-window-parameter.
* window.c (make_window): Initialize window_parameters to nil.
I edited out the parts of the patch for "pinning" and "grouping"
windows. Please find it attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: winpropp-1st.diff --]
[-- Type: text/x-patch, Size: 2306 bytes --]
=== modified file 'src/window.c'
--- src/window.c 2008-04-03 02:15:43 +0000
+++ src/window.c 2008-04-29 09:40:34 +0000
@@ -275,6 +278,7 @@
p->frame = Qnil;
p->display_table = Qnil;
p->dedicated = Qnil;
+ p->window_parameters = Qnil;
p->pseudo_window_p = 0;
bzero (&p->cursor, sizeof (p->cursor));
bzero (&p->last_cursor, sizeof (p->last_cursor));
@@ -1325,6 +1329,38 @@
return w->dedicated;
}
+DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
+ 1, 1, 0,
+ doc: /* Return WINDOW's window-parameters.
+ returns nil or an alist where values affect window operations. */)
+ (window)
+ Lisp_Object window;
+{
+ return decode_window (window)->window_parameters;
+}
+
+
+DEFUN ("set-window-parameter", Fset_window_parameter,
+ Sset_window_parameter, 3, 3, 0,
+ doc: /* set window parameters */)
+ (window, prop, val)
+ Lisp_Object window, prop, val;
+{
+ register struct window *w = decode_window (window);
+ register Lisp_Object old_alist_elt;
+
+ old_alist_elt = Fassq (prop, w->window_parameters);
+ if (EQ (old_alist_elt, Qnil))
+ w->window_parameters = Fcons (Fcons (prop, val), w->window_parameters);
+ else
+ Fsetcdr (old_alist_elt, val);
+
+ //Fplist_put(w->window_parameters,key,value);
+
+ return w->window_parameters;
+}
+
+
DEFUN ("window-display-table", Fwindow_display_table, Swindow_display_table,
0, 1, 0,
doc: /* Return the display-table that WINDOW is using.
@@ -7714,6 +7771,9 @@
defsubr (&Sset_window_vscroll);
defsubr (&Scompare_window_configurations);
defsubr (&Swindow_list);
+ defsubr (&Swindow_parameters);
+ defsubr (&Sset_window_parameter);
+
}
void
=== modified file 'src/window.h'
--- src/window.h 2008-01-29 02:05:10 +0000
+++ src/window.h 2008-04-29 10:04:07 +0000
@@ -229,6 +229,11 @@
enlarged. */
Lisp_Object orig_total_lines, orig_top_line;
+ /* an alist with flags that modifies behaviour of certain window operations.
+ currently "pin" and "group" are special
+ */
+ Lisp_Object window_parameters;
+
/* No Lisp data may follow below this point without changing
mark_object in alloc.c. The member current_matrix must be the
first non-Lisp member. */
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
--
Joakim Verona
next prev parent reply other threads:[~2008-05-23 14:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 17:51 Adding parameters to windows Stefan Monnier
2008-05-23 14:10 ` joakim [this message]
2008-05-23 19:47 ` Stefan Monnier
2008-05-23 20:28 ` joakim
2008-06-04 11:01 ` joakim
2008-06-04 11:18 ` David Kastrup
2008-06-04 11:24 ` joakim
2008-06-04 11:46 ` David Kastrup
2008-06-04 15:10 ` Stefan Monnier
2008-06-04 15:58 ` joakim
2008-06-04 17:24 ` Stefan Monnier
2008-06-04 21:13 ` Juanma Barranquero
2008-06-04 21:25 ` joakim
2008-06-04 21:56 ` Juanma Barranquero
2008-06-04 22:05 ` joakim
2008-06-04 21:27 ` Juanma Barranquero
2008-06-05 2:07 ` Stefan Monnier
2008-06-05 3:25 ` Juanma Barranquero
-- strict thread matches above, loose matches on Subject: below --
2008-05-16 23:37 Seiji Zenitani
2008-05-20 1:17 ` Stefan Monnier
2008-06-03 9:04 ` Seiji Zenitani
2008-06-03 17:38 ` Glenn Morris
2008-06-04 6:46 ` Jan Djärv
2008-06-04 7:08 ` Glenn Morris
2008-06-04 9:10 ` Miles Bader
2008-06-05 1:45 ` Seiji Zenitani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d4ndun5g.fsf@verona.se \
--to=joakim@verona.se \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).