[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More enhancements to fringe bitmaps.
From: |
Marco Munari 16447.64651 |
Subject: |
Re: More enhancements to fringe bitmaps. |
Date: |
Mon, 08 Mar 2004 14:48:12 +0100 |
dear developers, i use emacs and sometime i touch the code to improve it
by my ideas,
i like best use of topological visual meaning, so
i'm introducing new fringe *active* basic face,
(FRINGE_ACTIVE_FACE_ID as new and complement of FRINGE_FACE_ID)
to permit more hilighting of current selected window, because
mod_line_inactive_face_id and mode_line_face_id highlight the selected
emacs window only in the bottom (of the void space) below the buffer.
[fresh cvs patch is attached in two formats to the end of this mail]
modification described above involves following changes:
faces.el: added face fringe-active
dispextern.h: added basic face FRINGE_ACTIVE_FACE_ID
added macro CURRENT_FRINGE_FACE_ID(W): returns the
FRINGE*_FACE_ID depending on window (selected/unselected)
window.c: other-window call Fselect_window only if selected_window is
effectively a new one
it works, but must be done in a better way:
xfaces.c: added lisp object Qfringe_active
surprise because new call to realize_named_face
with Qfringe_active parameter
returns error (so call is introduced and commented)
fringe.c: [confusion] left|right (_user)*1 _fringe_face_id uniformed
to use CURRENT_FRINGE_FACE_ID(w) (depending on selected_window),
was really needed the distinction(?)
actually the hilight of fringe bars works as expected after window split
and every recenter (c-l) (because ``recenter'' do a full frame redraw);
i'd like to redraw the fringe face of selected and unselected windows only
in the right time:
i tkink ``other-window'' function -in my limited emacs knowledge p.o.view-,
should have this effect:
- reddaw selected_window fringe bars (i think seting
?...->redraw_fringe_bitmaps_p=1 is needed, related to selected_window)
- after ``other-window`` determine the new window, prepare to redraw also it.
and no need to redraw others (unchanged) windows.
i think similar redraw heppen when mouse select a different window (area),
are there other possible cases?
the included patch contains even, for personal preference, the
following changes: (i like tiny use of visual space)
- fringe.c: i change some symbol to -my opinion- more appropriate
(smaller and intuitive) bitmaps, and better relatively positioned.
Notice: I create and use this bitmaps since fringe functionality was
introduced in xdisp.c, in that time, it was not extensible.
- xfns.c: modified for tiny scroll bar.
- size reduction of emacs fringe (custom 'fringe-mode half) [my preference]
- etc/TODO: "fringe bitmaps user configurable" DONE by Kim,
(no need to be in TODO,.. or someone plan even more configurable?)
- ibuffer.el desc long lines implies big column values, not "long columns"!
Saluti,
Marco Munari <mar i.am>
--
x(t),y(t) = th(3t-34.5)*e^[-(3t-34.5)^2]/2-4.3+e^(-1.8/t^2)/(.8*atg(t-
3)+2)(t-1.8)-.3th(5t-42.5),(1.4e^[-(3t-34.5)^2]+1-sgn[|t-8.5|-.5]*1.5*
|sin(pi*t)|^[2e^(-(t-11.5)^2)+.5+e^(-(.6t-3.3)^2)])/(.5+t)+1 ; 0<t<14
Index: etc/TODO
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TODO,v
retrieving revision 1.61
diff -r1.61 TODO
71,73d70
< * Make fringe bitmaps user configurable. Maybe add ability to add
< additional bitmaps to the fringe from lisp.
<
Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.282
diff -r1.282 faces.el
1927a1928,1940
> (defface fringe-active
> '((((class color) (background light))
> :background "grey75")
> (((class color) (background dark))
> :background "grey30")
> (t
> :background "light gray"))
> "Basic face for the fringes of active input emacs windows."
> :version "21.4"
> :group 'frames
> :group 'basic-faces)
>
>
Index: lisp/ibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.57
diff -r1.57 ibuffer.el
202c202
< "The string to use for eliding long columns."
---
> "The string to use for eliding long lines."
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.165
diff -r1.165 dispextern.h
1167a1168,1174
> /* mar: Return the fringe mode relative to selected/unselected window */
>
> #define CURRENT_FRINGE_FACE_ID(W) \
> ( ((W) == XWINDOW (selected_window)) \
> ? FRINGE_ACTIVE_FACE_ID \
> : FRINGE_FACE_ID)
>
1514a1522
> FRINGE_ACTIVE_FACE_ID,
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.10
diff -r1.10 fringe.c
107,114c107,114
< ...xx...
< ..xx....
< .xx.....
< xxxxxx..
< xxxxxx..
< .xx.....
< ..xx....
< ...xx...
---
> - ..... ...
> ..x.. ...
> .x... ...
> xxxxx ...
> .x... ...
> ..x.. ...
> - ..... ...
> - ..... ...
117c117
< 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18};
---
> 0x04, 0x08, 0x1f, 0x08, 0x04};
122,129c122,129
< ...xx...
< ....xx..
< .....xx.
< ..xxxxxx
< ..xxxxxx
< .....xx.
< ....xx..
< ...xx...
---
> - ........
> ... ..x..
> ... ...x.
> ... xxxxx
> ... ...x.
> ... ..x..
> - ........
> - ........
132c132
< 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18};
---
> 0x04, 0x02, 0x1f, 0x02, 0x04};
166,173c166,173
< ..xxxx..
< ..xxxxx.
< ......xx
< ..x..xxx
< ..xxxxxx
< ..xxxxx.
< ..xxxx..
< ..xxxxx.
---
> - ........
> - ........
> - ........
> .... xx.
> .... ..x
> .... x.x
> .... xx.
> .... xxx
176c176
< 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
---
> 0x06, 0x01, 0x05, 0x06, 0x07};
180,187c180,187
< ..xxxx..
< .xxxxx..
< xx......
< xxx..x..
< xxxxxx..
< .xxxxx..
< ..xxxx..
< .xxxxx..
---
> .... .xx
> .... x..
> .... x.x
> .... .xx
> .... xxx
> - ........
> - ........
> - ........
190c190
< 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
---
> 0x03, 0x04, 0x05, 0x03, 0x07};
415a416
> /* bits, height, width,period, align , dynamic*/
417,418c418,419
< { FRBITS (left_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
< { FRBITS (right_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
---
> { FRBITS (left_arrow_bits), 5, 0, ALIGN_BITMAP_CENTER, 0 },
> { FRBITS (right_arrow_bits), 5, 0, ALIGN_BITMAP_CENTER, 0 },
421,422c422,423
< { FRBITS (continued_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
< { FRBITS (continuation_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
---
> { FRBITS (continued_bits), 3, 0, ALIGN_BITMAP_BOTTOM, 0 },
> { FRBITS (continuation_bits), 3, 0, ALIGN_BITMAP_TOP, 0 },
485c486
< face_id = row->left_fringe_face_id;
---
> //mar:useless, reassign follow: face_id = row->left_fringe_face_id;
490c491
< face_id = row->right_fringe_face_id;
---
> //mar:useless, reassign follow: face_id = row->right_fringe_face_id;
492a494,495
> face_id = CURRENT_FRINGE_FACE_ID(w);
>
803c806
< left_face_id = row->left_user_fringe_face_id;
---
> left_face_id =
> CURRENT_FRINGE_FACE_ID(w);//row->left_user_fringe_face_id;
829c832
< right_face_id = row->right_user_fringe_face_id;
---
> right_face_id =
> CURRENT_FRINGE_FACE_ID(w);//row->right_user_fringe_face_id;
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.462
diff -r1.462 window.c
1778,1779c1778,1781
<
< Fselect_window (window, Qnil);
---
> if (window != selected_window) {
> //selected_window->circa row->redraw_fringe_bitmaps_p = 1;
> Fselect_window (window, Qnil);
> }
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.289
diff -r1.289 xfaces.c
325c325
< Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
---
> Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe, Qfringe_active;
6628a6629,6631
> /* mar: i imagine the need of
> realize_named_face (f, Qfringe_active, FRINGE_ACTIVE_FACE_ID);,
> but returns error "emacs: Wrong type argument: symbolp, 0" */
7703a7707,7708
> Qfringe = intern ("fringe-active");
> staticpro (&Qfringe_active);
Index: src/xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.606
diff -r1.606 xfns.c
2134c2134
< int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
---
> int width = 8 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
2140c2140
< FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
---
> FRAME_CONFIG_SCROLL_BAR_COLS (f) = (6 + wid - 1) / wid;
mar_emacs_cvs.patch
Description: cvs/emacs$ patch -p1 mar_emacs_cvs.patch
- Re: More enhancements to fringe bitmaps.,
Marco Munari 16447.64651 <=