[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: something like linum.el ought to be added
From: |
Markus Triska |
Subject: |
Re: something like linum.el ought to be added |
Date: |
Sun, 16 Sep 2007 17:57:09 +0200 |
Richard Stallman <address@hidden> writes:
> Would someone like to try implementing this?
A first try follows. In addition, here is a version of linum.el that
depends on the patch and seems to work as intended:
http://stud4.tuwien.ac.at/~e0225855/linum/linum-cvs.el
Other versions are of course still available from the project page.
2007-09-16 Markus Triska <address@hidden>
* xdisp.c (redisplay_window): Invoke new hook,
window-bottom-change-functions, when visibility changes may have
altered the position of the bottom of the window.
(syms_of_xdisp): add window-bottom-change-functions
diff --git a/src/xdisp.c b/src/xdisp.c
index 618a538..80b973c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -232,6 +232,7 @@ extern Lisp_Object Qhelp_echo;
Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
+Lisp_Object Qwindow_bottom_change_functions, Vwindow_bottom_change_functions;
Lisp_Object Qredisplay_end_trigger_functions, Vredisplay_end_trigger_functions;
Lisp_Object Qinhibit_point_motion_hooks;
Lisp_Object QCeval, QCfile, QCdata, QCpropertize;
@@ -12880,6 +12881,10 @@ redisplay_window (window, just_this_one_p)
&& XFASTINT (w->last_modified) >= MODIFF
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF);
+ if (!current_matrix_up_to_date_p
+ && !NILP(Vwindow_bottom_change_functions))
+ safe_run_hooks (Qwindow_bottom_change_functions);
+
buffer_unchanged_p
= (!NILP (w->window_end_valid)
&& !current_buffer->clip_changed
@@ -23866,6 +23871,9 @@ syms_of_xdisp ()
staticpro (&Qwindow_scroll_functions);
Qwindow_scroll_functions = intern ("window-scroll-functions");
+ staticpro (&Qwindow_bottom_change_functions);
+ Qwindow_bottom_change_functions = intern ("window-bottom-change-functions");
+
staticpro (&Qredisplay_end_trigger_functions);
Qredisplay_end_trigger_functions = intern
("redisplay-end-trigger-functions");
@@ -24173,6 +24181,11 @@ and its new display-start position. Note that the
value of `window-end'
is not valid when these functions are called. */);
Vwindow_scroll_functions = Qnil;
+ DEFVAR_LISP ("window-bottom-change-functions",
&Vwindow_bottom_change_functions,
+ doc: /* List of functions to call when visibility changes may have altered
+the position of the bottom of the window. */);
+ Vwindow_bottom_change_functions = Qnil;
+
DEFVAR_LISP ("redisplay-end-trigger-functions",
&Vredisplay_end_trigger_functions,
doc: /* Functions called when redisplay of a window reaches the end
trigger.
Each function is called with two arguments, the window and the end trigger
value.
- Re: something like linum.el ought to be added, (continued)
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/11
- Re: something like linum.el ought to be added, Markus Triska, 2007/09/12
- Re: something like linum.el ought to be added, martin rudalics, 2007/09/12
- Re: something like linum.el ought to be added, Markus Triska, 2007/09/12
- Re: something like linum.el ought to be added, martin rudalics, 2007/09/12
- Re: something like linum.el ought to be added, Markus Triska, 2007/09/12
- Re: something like linum.el ought to be added, Juanma Barranquero, 2007/09/15
- Re: something like linum.el ought to be added, Markus Triska, 2007/09/15
- Re: something like linum.el ought to be added, Juanma Barranquero, 2007/09/15
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/16
- Re: something like linum.el ought to be added,
Markus Triska <=
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/16
- Re: something like linum.el ought to be added, Stefan Monnier, 2007/09/16
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/16
- RE: something like linum.el ought to be added, brianjiang, 2007/09/17
- Re: something like linum.el ought to be added, Stefan Monnier, 2007/09/17
- Re: something like linum.el ought to be added, Stefan Monnier, 2007/09/17
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/17
- Re: something like linum.el ought to be added, Stefan Monnier, 2007/09/17
- Re: something like linum.el ought to be added, Richard Stallman, 2007/09/17
- Re: something like linum.el ought to be added, Stefan Monnier, 2007/09/18