* More enhancements to fringe bitmaps.
@ 2004-02-09 1:01 Kim F. Storm
2004-02-09 2:48 ` YAMAMOTO Mitsuharu
` (5 more replies)
0 siblings, 6 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-09 1:01 UTC (permalink / raw)
I have just committed changes to implement a very old item on my
personal to-do list:
You can now redefine the built-in fringe bitmaps!
In addition you can define your own fringe bitmaps and have them
appear in the left or right fringe of any row to your liking. You can
even specify the face to use for each of the fringe bitmaps.
I will add something to NEWS and the lispref about it tomorrow.
In the meantime, you can look at the examples below.
___HELP NEEDED FROM W32 AND MAC EXPERTS___
But I need help for the W32 and MAC ports!!! Could someone which know
about pixmaps and clipping on these systems please look at the code
(from xterm.c) that I have inserted in w32term.c and macterm.c with
the following conditionals:
#if 0 /* TODO: fringe overlay_p and cursor_p */
The code in those blocks serves two purposes:
There is some code (adapted to w32 and mac) which aim to use the text
cursor color when the cursor is in the right fringe, but as I have no
way of testing this -- so I didn't enable it.
There is also some code which (on X) sets the clipmask for drawing the
bitmap to the bitmap itself when "overlay_p" is set in the parameter
block; the intention is that the bitmap should be drawn with a
transparent background over another bitmap. I don't know anything
about clipping on W32 or MAC, so I have no clue how to accomplish this
on those platforms -- so I need help.
Until this is fixed on W32 and MAC, there may be some problems with the
cursor in the right fringe, and to show the overlay arrow in the left
fringe together with a user defined bitmap in the same row.
___EXAMPLES___
;;; ====================================================================
;;; Here is an example of using a user-defined fringe bitmaps; it is a red
;;; circle which can be used to mark a debugger breakpoint (instead of
;;; using the display margin as gdba current does).
;;;
;;; Eval this and try M-x xb RET
(defface fringe-standout
'((t
:inherit fringe
:foreground "red"))
"Face for fringe bitmaps which should stand out.")
;; ..xxxx..
;; .xxxxxx.
;; xxxxxxxx
;; xxxxxxxx
;; xxxxxxxx
;; xxxxxxxx
;; .xxxxxx.
;; ..xxxx..
(defvar circle-fringe-bitmap
(define-fringe-bitmap "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
(defun xb ()
"Insert the circle-fringe-bitmap in right fringe of current line."
(interactive)
(let ((b (line-beginning-position)))
(add-text-properties b (+ b 1)
`(display (left-fringe ,circle-fringe-bitmap fringe-standout)))))
;;; ====================================================================
;;; Assign a different color to the overlay arrow.
(require 'fringe)
(defface fringe-arrow
'((t
:inherit fringe
:foreground "green"))
"Face for arrow fringe bitmap.")
(set-fringe-bitmap-face overlay-arrow-fringe-bitmap 'fringe-arrow)
;;; ====================================================================
;;; Use a ~ bitmap to mark empty lines (viper mode may like this :-)
;; ........
;; ..xx....
;; .x..x..x
;; .....xx.
(require 'fringe)
(define-fringe-bitmap "\x00\x30\x49\x06" nil nil 'top empty-line-fringe-bitmap)
(setq indicate-empty-lines t)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
@ 2004-02-09 2:48 ` YAMAMOTO Mitsuharu
2004-02-09 14:54 ` Kim F. Storm
2004-02-09 8:54 ` Masatake YAMATO
` (4 subsequent siblings)
5 siblings, 1 reply; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-09 2:48 UTC (permalink / raw)
>>>>> On 09 Feb 2004 02:01:48 +0100, no-spam@cua.dk (Kim F. Storm) said:
> There is some code (adapted to w32 and mac) which aim to use the
> text cursor color when the cursor is in the right fringe, but as I
> have no way of testing this -- so I didn't enable it.
For the mac port, the above change seems to work fine as far as I
tested with "M-x set-cursor-color RET red RET". Sometimes a box
cursor appears as a hollow cursor in the fringe area, but I think this
is not related to the above change.
> There is also some code which (on X) sets the clipmask for drawing
> the bitmap to the bitmap itself when "overlay_p" is set in the
> parameter block; the intention is that the bitmap should be drawn
> with a transparent background over another bitmap. I don't know
> anything about clipping on W32 or MAC, so I have no clue how to
> accomplish this on those platforms -- so I need help.
In mac, the easiest way to do this would be to use the "srcOr" bitmap
transfer mode (draw only foreground), instead of the "srcCopy" mode
(draw both foreground and background).
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
*** src/macterm.c.~1.58.~ Mon Feb 9 09:57:53 2004
--- src/macterm.c Mon Feb 9 11:19:05 2004
***************
*** 467,478 ****
/* Mac replacement for XCopyArea. */
static void
! mac_draw_bitmap (display, w, gc, x, y, bitmap)
Display *display;
WindowPtr w;
GC gc;
int x, y;
BitMap *bitmap;
{
Rect r;
--- 467,479 ----
/* Mac replacement for XCopyArea. */
static void
! mac_draw_bitmap (display, w, gc, x, y, bitmap, overlay_p)
Display *display;
WindowPtr w;
GC gc;
int x, y;
BitMap *bitmap;
+ int overlay_p;
{
Rect r;
***************
*** 491,501 ****
LockPortBits (GetWindowPort (w));
pmh = GetPortPixMap (GetWindowPort (w));
! CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r, srcCopy, 0);
UnlockPortBits (GetWindowPort (w));
}
#else /* not TARGET_API_MAC_CARBON */
! CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r, srcCopy, 0);
#endif /* not TARGET_API_MAC_CARBON */
}
--- 492,504 ----
LockPortBits (GetWindowPort (w));
pmh = GetPortPixMap (GetWindowPort (w));
! CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r,
! overlay_p ? srcOr : srcCopy, 0);
UnlockPortBits (GetWindowPort (w));
}
#else /* not TARGET_API_MAC_CARBON */
! CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r,
! overlay_p ? srcOr : srcCopy, 0);
#endif /* not TARGET_API_MAC_CARBON */
}
***************
*** 1345,1373 ****
BitMap bitmap;
mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
- gcv.foreground = face->foreground;
- gcv.background = face->background;
-
- #if 0 /* TODO: fringe overlay_p and cursor_p */
gcv.foreground = (p->cursor_p
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
! : face->foreground));
!
! if (p->overlay_p)
! {
! clipmask = XCreatePixmapFromBitmapData (display,
! FRAME_X_DISPLAY_INFO (f)->root_window,
! bits, p->wd, p->h,
! 1, 0, 1);
! gcv.clip_mask = clipmask;
! gcv.clip_x_origin = p->x;
! gcv.clip_y_origin = p->y;
! XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv);
! }
! #endif
!
! mac_draw_bitmap (display, window, &gcv, p->x, p->y, &bitmap);
mac_free_bitmap (&bitmap);
#if 0 /* TODO: fringe overlay_p and cursor_p */
--- 1348,1360 ----
BitMap bitmap;
mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
gcv.foreground = (p->cursor_p
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
! : face->foreground);
! gcv.background = face->background;
! mac_draw_bitmap (display, window, &gcv, p->x, p->y, &bitmap,
! p->overlay_p);
mac_free_bitmap (&bitmap);
#if 0 /* TODO: fringe overlay_p and cursor_p */
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
2004-02-09 2:48 ` YAMAMOTO Mitsuharu
@ 2004-02-09 8:54 ` Masatake YAMATO
2004-02-09 16:49 ` Kim F. Storm
2004-02-09 15:02 ` Matt Hodges
` (3 subsequent siblings)
5 siblings, 1 reply; 59+ messages in thread
From: Masatake YAMATO @ 2004-02-09 8:54 UTC (permalink / raw)
Cc: emacs-devel
> I have just committed changes to implement a very old item on my
> personal to-do list:
>
> You can now redefine the built-in fringe bitmaps!
Great!
> ;;; ====================================================================
> ;;; Here is an example of using a user-defined fringe bitmaps; it is a red
> ;;; circle which can be used to mark a debugger breakpoint (instead of
> ;;; using the display margin as gdba current does).
> ;;;
> ;;; Eval this and try M-x xb RET
>
> (defface fringe-standout
> '((t
> :inherit fringe
> :foreground "red"))
> "Face for fringe bitmaps which should stand out.")
>
> ;; ..xxxx..
> ;; .xxxxxx.
> ;; xxxxxxxx
> ;; xxxxxxxx
> ;; xxxxxxxx
> ;; xxxxxxxx
> ;; .xxxxxx.
> ;; ..xxxx..
> (defvar circle-fringe-bitmap
> (define-fringe-bitmap "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
Why we have to write such fringe bitmap figure in comments?
Instead, the figure itself should be passed to the lisp function, I think.
e.g.
(fringe-make-bitmap-from-strings
'("..xxxx.."
".xxxxxx."
"xxxxxxxx"
"xxxxxxxx"
"xxxxxxxx"
"xxxxxxxx"
".xxxxxx."
"..xxxx.."))
=> "<~\377\377\377\377~<"
(defun fringe-make-bitmap-from-strings (strings &optional on off)
"Make fringe bitmap string from lists of strings.
>From STRINGS, a bitmap string suitable for the argument of
`define-fringe-bitmap' is made.
ON and OFF stands for the on-bit and off-bit characters. If ON
is not given, ?x is used. If OFF is not given, ?. is used.
STRINGS is a list of strings. Each element stands for a line
of the bitmap; and its length must be 8. The content of element
must be ON or OFF.
e.g.
\(fringe-make-bitmap-from-strings
'(\"__@@@@__\"
\"_@@@@@@_\"
\"@@@@@@@@\"
\"@@@@@@@@\"
\"@@@@@@@@\"
\"@@@@@@@@\"
\"_@@@@@@_\"
\"__@@@@__\") ?@ ?_)
"
(unless on (setq on ?x))
(unless off (setq off ?.))
(mapconcat (lambda (string)
(if (not (eq 8 (length string)))
(error "Wrong lenght string: %d" (length string)))
(let ((i 7)
(line 0))
(mapc (lambda (c)
(cond
((eq on c)
(setq line (logior line (lsh 1 i))))
((eq off c))
(t
(error "Wrong charset in string: %c" c)))
(setq i (1- i)))
string)
(funcall 'string line)))
strings ""))
(defun fringe-decode-bitmap-string (bitmap &optional on off)
"Make a list of strings from a fringe bitmap string."
(unless on (setq on ?x))
(unless off (setq off ?.))
(mapcar
(lambda (c)
(setq c (string-to-char c))
(string
(if (eq 0 (logand (lsh 1 7) c)) off on)
(if (eq 0 (logand (lsh 1 6) c)) off on)
(if (eq 0 (logand (lsh 1 5) c)) off on)
(if (eq 0 (logand (lsh 1 4) c)) off on)
(if (eq 0 (logand (lsh 1 3) c)) off on)
(if (eq 0 (logand (lsh 1 2) c)) off on)
(if (eq 0 (logand (lsh 1 1) c)) off on)
(if (eq 0 (logand (lsh 1 0) c)) off on)))
bitmap))
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 14:54 ` Kim F. Storm
@ 2004-02-09 14:27 ` Jason Rumney
2004-02-09 20:09 ` Harald Maier
2004-02-11 2:54 ` YAMAMOTO Mitsuharu
1 sibling, 1 reply; 59+ messages in thread
From: Jason Rumney @ 2004-02-09 14:27 UTC (permalink / raw)
Cc: YAMAMOTO Mitsuharu, emacs-devel
Kim F. Storm wrote:
>>In mac, the easiest way to do this would be to use the "srcOr" bitmap
>>transfer mode (draw only foreground), instead of the "srcCopy" mode
>>(draw both foreground and background).
>>
>>
>
>Thanks for the advise and patch. So the mac support should be done now.
>
>
I will hopefully get some time to look at this this week, but if someone
else wants to try, the
equivalent for w32 is probably something like what is done in
x_draw_image_foreground()
in w32term.c, or what is done in the BitBlt calls in w32bdf.c is
probably sufficient for
monochrome bitmaps.
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 2:48 ` YAMAMOTO Mitsuharu
@ 2004-02-09 14:54 ` Kim F. Storm
2004-02-09 14:27 ` Jason Rumney
2004-02-11 2:54 ` YAMAMOTO Mitsuharu
0 siblings, 2 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-09 14:54 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> >>>>> On 09 Feb 2004 02:01:48 +0100, no-spam@cua.dk (Kim F. Storm) said:
>
> > There is some code (adapted to w32 and mac) which aim to use the
> > text cursor color when the cursor is in the right fringe, but as I
> > have no way of testing this -- so I didn't enable it.
>
> For the mac port, the above change seems to work fine as far as I
> tested with "M-x set-cursor-color RET red RET".
Thanks for testing.
> Sometimes a box
> cursor appears as a hollow cursor in the fringe area, but I think this
> is not related to the above change.
Hm, that should only happen if you have cursor-in-non-selected-windows
set to t. Can you find any pattern?
> In mac, the easiest way to do this would be to use the "srcOr" bitmap
> transfer mode (draw only foreground), instead of the "srcCopy" mode
> (draw both foreground and background).
Thanks for the advise and patch. So the mac support should be done now.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
2004-02-09 2:48 ` YAMAMOTO Mitsuharu
2004-02-09 8:54 ` Masatake YAMATO
@ 2004-02-09 15:02 ` Matt Hodges
2004-02-14 0:46 ` Kim F. Storm
2004-02-09 19:54 ` Tak Ota
` (2 subsequent siblings)
5 siblings, 1 reply; 59+ messages in thread
From: Matt Hodges @ 2004-02-09 15:02 UTC (permalink / raw)
Kim F. Storm writes:
> I have just committed changes to implement a very old item on my
> personal to-do list:
>
> You can now redefine the built-in fringe bitmaps!
Prototypes for pos and window are missing in Ffringe_bitmaps_at_pos (fails to
build on alpha.)
Matt
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 8:54 ` Masatake YAMATO
@ 2004-02-09 16:49 ` Kim F. Storm
2004-02-10 1:28 ` Johan Bockgård
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-09 16:49 UTC (permalink / raw)
Cc: emacs-devel
Masatake YAMATO <jet@gyve.org> writes:
> Why we have to write such fringe bitmap figure in comments?
It was my plan to fix this later -- but you are way ahead of me :-)
I'll take a look at your code, and add it to fringe.el (with a few
additions).
Thank you for your assistance!!
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
` (2 preceding siblings ...)
2004-02-09 15:02 ` Matt Hodges
@ 2004-02-09 19:54 ` Tak Ota
2004-02-09 20:37 ` Tak Ota
2004-03-08 13:48 ` Marco Munari 16447.64651
2004-03-11 0:22 ` Marco Munari 16447.64651
5 siblings, 1 reply; 59+ messages in thread
From: Tak Ota @ 2004-02-09 19:54 UTC (permalink / raw)
Cc: emacs-devel
I needed to apply following two modification for successful build
under win32 environment.
-Tak
*** pure/emacs-21.3.50/src/Makefile.w32-in Wed Jan 28 15:24:00 2004
--- emacs-21.3.50/src/Makefile.w32-in Mon Feb 9 10:56:00 2004
***************
*** 118,124 ****
$(BLD)/coding.$(O) \
$(BLD)/category.$(O) \
$(BLD)/ccl.$(O) \
! $(BLD)/fontset.$(O)
WIN32OBJ = $(BLD)/w32term.$(O) \
$(BLD)/w32xfns.$(O) \
--- 118,125 ----
$(BLD)/coding.$(O) \
$(BLD)/category.$(O) \
$(BLD)/ccl.$(O) \
! $(BLD)/fontset.$(O) \
! $(BLD)/fringe.$(O)
WIN32OBJ = $(BLD)/w32term.$(O) \
$(BLD)/w32xfns.$(O) \
*** pure/emacs-21.3.50/src/w32term.c Sun Feb 8 22:37:26 2004
--- emacs-21.3.50/src/w32term.c Mon Feb 9 10:50:26 2004
***************
*** 698,704 ****
else
w32_clip_to_row (w, row, hdc);
! if (p->bx >= 0 !p->overlay_p)
{
w32_fill_area (f, hdc, face->background,
p->bx, p->by, p->nx, p->ny);
--- 698,704 ----
else
w32_clip_to_row (w, row, hdc);
! if (p->bx >= 0 && !p->overlay_p)
{
w32_fill_area (f, hdc, face->background,
p->bx, p->by, p->nx, p->ny);
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 14:27 ` Jason Rumney
@ 2004-02-09 20:09 ` Harald Maier
0 siblings, 0 replies; 59+ messages in thread
From: Harald Maier @ 2004-02-09 20:09 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
Jason Rumney <jasonr@gnu.org> writes:
> Kim F. Storm wrote:
>
>>>In mac, the easiest way to do this would be to use the "srcOr"
>>>bitmap transfer mode (draw only foreground), instead of the
>>>"srcCopy" mode (draw both foreground and background).
>>>
>>>
>>
>>Thanks for the advise and patch. So the mac support should be done
>>now.
>>
>>
> I will hopefully get some time to look at this this week, but if
> someone else wants to try, the equivalent for w32 is probably
> something like what is done in x_draw_image_foreground() in
> w32term.c, or what is done in the BitBlt calls in w32bdf.c is
> probably sufficient for monochrome bitmaps.
On W32 emacs fails to build with mingw, but it looks it's true too for
nmake because the fringe.o file is missing in makefile.w32-in. In
w32term.c there is a small typo. Here the two only modification to the
files so that it builds again.
------
Index: w32term.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32term.c,v
retrieving revision 1.202
diff -r1.202 w32term.c
701c701
< if (p->bx >= 0 !p->overlay_p)
---
> if (p->bx >= 0 && !p->overlay_p)
Index: makefile.w32-in
===================================================================
RCS file: /cvsroot/emacs/emacs/src/makefile.w32-in,v
retrieving revision 1.27
diff -r1.27 makefile.w32-in
105a106
> $(BLD)/fringe.$(O) \
------
Harald
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 19:54 ` Tak Ota
@ 2004-02-09 20:37 ` Tak Ota
0 siblings, 0 replies; 59+ messages in thread
From: Tak Ota @ 2004-02-09 20:37 UTC (permalink / raw)
Cc: emacs-devel
Mon, 09 Feb 2004 11:54:30 -0800 (PST): Tak Ota <Takaaki.Ota@am.sony.com> wrote:
> I needed to apply following two modification for successful build
> under win32 environment.
Oops, sorry I meant "w32".
-Tak
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 16:49 ` Kim F. Storm
@ 2004-02-10 1:28 ` Johan Bockgård
2004-02-14 0:58 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Johan Bockgård @ 2004-02-10 1:28 UTC (permalink / raw)
storm@cua.dk (Kim F. Storm) writes:
> Masatake YAMATO <jet@gyve.org> writes:
>
>> Why we have to write such fringe bitmap figure in comments?
>
> It was my plan to fix this later -- but you are way ahead of me :-)
This is an easy way to do it:
"\x3c\x7e\xff\xff\xff\xff\x7e\x3c"
==
(string
#b00111100
#b01111110
#b11111111
#b11111111
#b11111111
#b11111111
#b01111110
#b00111100)
--
Johan Bockgård
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 14:54 ` Kim F. Storm
2004-02-09 14:27 ` Jason Rumney
@ 2004-02-11 2:54 ` YAMAMOTO Mitsuharu
2004-02-11 11:17 ` Kim F. Storm
2004-02-16 10:22 ` YAMAMOTO Mitsuharu
1 sibling, 2 replies; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-11 2:54 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 09 Feb 2004 15:54:27 +0100, storm@cua.dk (Kim F. Storm) said:
>> Sometimes a box cursor appears as a hollow cursor in the fringe
>> area, but I think this is not related to the above change.
> Hm, that should only happen if you have
> cursor-in-non-selected-windows set to t. Can you find any pattern?
Yes. (1) Launch the Carbon Emacs, (2) M-<, C-e, and hit the space bar
four times to move the cursor to the right fringe area of the first
line. (3) C-x 2 to split the window.
Just after 2), I see a hollow box cursor (should be a filled one), and
3) makes all cursors disappear. I couldn't reproduce these phenomena
on the X11 version.
By the way, bit-swapping in fringe.c is not needed for the mac port.
As a matter of fact, Carbon Emacs in CVS (without the image support
patches) has been displaying right arrows on the right fringe as left
arrows :-)
Additionally, if the start address of the bitmap data for each row
were word-aligned (by occupying 2 bytes for each row) for the mac
port, we would not need to create intermediate data for displaying
fringe bitmaps. It would be worth considering if similar things also
happen in the w32 port.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 2:54 ` YAMAMOTO Mitsuharu
@ 2004-02-11 11:17 ` Kim F. Storm
2004-02-11 11:28 ` YAMAMOTO Mitsuharu
2004-02-16 10:22 ` YAMAMOTO Mitsuharu
1 sibling, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-11 11:17 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> >>>>> On 09 Feb 2004 15:54:27 +0100, storm@cua.dk (Kim F. Storm) said:
>
> >> Sometimes a box cursor appears as a hollow cursor in the fringe
> >> area, but I think this is not related to the above change.
>
> > Hm, that should only happen if you have
> > cursor-in-non-selected-windows set to t. Can you find any pattern?
>
> Yes. (1) Launch the Carbon Emacs, (2) M-<, C-e, and hit the space bar
> four times to move the cursor to the right fringe area of the first
> line. (3) C-x 2 to split the window.
>
> Just after 2), I see a hollow box cursor (should be a filled one), and
> 3) makes all cursors disappear. I couldn't reproduce these phenomena
> on the X11 version.
Which probably makes it hard for me to reproduce -- but I'll look into it.
Is TARGET_API_MAC_CARBON defined in the setup that fails?
If not, then x_flush is a dummy, and the display may not be updated
correctly -- just guessing...
>
> By the way, bit-swapping in fringe.c is not needed for the mac port.
> As a matter of fact, Carbon Emacs in CVS (without the image support
> patches) has been displaying right arrows on the right fringe as left
> arrows :-)
So the following #ifdef (in fringe.c) shouldn't mention MAC_OS then?
void
init_fringe_bitmap (which, fb, once_p)
enum fringe_bitmap_type which;
struct fringe_bitmap *fb;
int once_p;
{
if (once_p || fb->dynamic)
{
#if defined (HAVE_X_WINDOWS) || defined (MAC_OS)
unsigned char *bits = fb->bits;
int j;
for (j = 0; j < fb->height; j++)
{
>
> Additionally, if the start address of the bitmap data for each row
> were word-aligned (by occupying 2 bytes for each row) for the mac
> port, we would not need to create intermediate data for displaying
> fringe bitmaps.
I do see an explicit 8->16 bit conversion for W32, but not on the mac port.
Do you mean this call?
mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
Supposing that fb->bits was word aligned and 16 bits per row, what would
the code for drawing the bitmap look like then?
> It would be worth considering if similar things also
> happen in the w32 port.
I have been thinking about this and there's no fundamental reason why
fringe bitmaps must be 8 bits wide (except that we always guarantee
that the fringes are at least 8 bits wide if no explicit width has
been set).
The windows port uses 16 bits per row too, so it would probably be
more generic to use that on X as well; I'll think about it.
--
Kim F. Storm http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 11:17 ` Kim F. Storm
@ 2004-02-11 11:28 ` YAMAMOTO Mitsuharu
2004-02-11 14:03 ` Stefan Monnier
2004-02-14 0:39 ` Kim F. Storm
0 siblings, 2 replies; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-11 11:28 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 11 Feb 2004 12:17:24 +0100, storm@cua.dk (Kim F. Storm) said:
> Which probably makes it hard for me to reproduce -- but I'll look into it.
> Is TARGET_API_MAC_CARBON defined in the setup that fails?
Yes. This variable is defined in Carbon/Carbon.h. Maybe I will look
some redisplay-related variables/structures with a debugger to see
what's happening.
> So the following #ifdef (in fringe.c) shouldn't mention MAC_OS then?
Exactly. But then the image support patches have to be modified so
as to disable bit-swapping in them.
> I do see an explicit 8->16 bit conversion for W32, but not on the
> mac port. Do you mean this call?
> mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
Yes. And this is the very function that does bit-swapping in the
image support patches. It is also used for converting from xbm data
(LSB first, each row is byte aligned) to mac-native bitmap data (MSB
first, each row is word aligned).
> Supposing that fb->bits was word aligned and 16 bits per row, what
> would the code for drawing the bitmap look like then?
Just like the following: Functions mac_create_bitmap_from_bitmap_data
and mac_free_bitmap are no longer used for drawing fringe bitmaps.
The function mac_draw_bitmap additionally takes width and height
as arguments.
static void
mac_draw_bitmap (display, w, gc, x, y, width, height, bits, overlay_p)
Display *display;
WindowPtr w;
GC gc;
int x, y, width, height;
unsigned char *bits;
int overlay_p;
{
BitMap bitmap;
Rect r;
bitmap.rowBytes = (width + 15) / 16 * 2; /* must be on word boundary */
bitmap.baseAddr = bits;
SetRect (&(bitmap.bounds), 0, 0, width, height);
... /* same as the original one, but change "bitmap" to "&bitmap"
(and "bitmap-><fieldname>" to "bitmap.<fieldname>") */
}
static void
x_draw_fringe_bitmap (w, row, p)
...
{
...
if (p->which)
{
unsigned char *bits = p->bits + p->dh;
gcv.foreground = (p->cursor_p
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
: face->foreground);
gcv.background = face->background;
mac_draw_bitmap (display, window, &gcv, p->x, p->y, p->wd, p->h, bits,
p->overlay_p);
}
...
}
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 11:28 ` YAMAMOTO Mitsuharu
@ 2004-02-11 14:03 ` Stefan Monnier
2004-02-12 0:58 ` YAMAMOTO Mitsuharu
2004-02-14 0:39 ` Kim F. Storm
1 sibling, 1 reply; 59+ messages in thread
From: Stefan Monnier @ 2004-02-11 14:03 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
> Exactly. But then the image support patches have to be modified so
> as to disable bit-swapping in them.
What is the reason why they are still not installed?
Are we still waiting for papers?
> first, each row is word aligned).
`word' does not universally refer to 2bytes (actually in most of the current
GNU world, it refers to 4bytes). I got confused for a while. So please
say 16bit-aligned instead or something like that to make things more clear.
Stefan
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
@ 2004-02-11 23:41 Nick Roberts
2004-02-12 1:18 ` Miles Bader
2004-02-12 12:07 ` Kim F. Storm
0 siblings, 2 replies; 59+ messages in thread
From: Nick Roberts @ 2004-02-11 23:41 UTC (permalink / raw)
> ;;; Here is an example of using a user-defined fringe bitmaps; it is a red
> ;;; circle which can be used to mark a debugger breakpoint (instead of
> ;;; using the display margin as gdba current does).
I recall a thread about 15 months ago about the fringe versus the display
margin for breakpoint icons. However, I must admit that I've never quite
understood the need for the fringe. Using the display margin does shunt the
code sideways but I've got used to that. On the other hand, the overlay arrow
already uses the fringe so it could get a bit crowded. Also, on text-only
terminals the character `B' or `b' in the display margin marks a debugger
breakpoint while the fringe is unavailable. Would the concept of the fringe
make sense for such terminals?
Nick http://www.nick.uklinux.net
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 14:03 ` Stefan Monnier
@ 2004-02-12 0:58 ` YAMAMOTO Mitsuharu
0 siblings, 0 replies; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-12 0:58 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
>>>>> On 11 Feb 2004 09:03:12 -0500, Stefan Monnier <monnier@iro.umontreal.ca> said:
>> Exactly. But then the image support patches have to be modified so
>> as to disable bit-swapping in them.
> What is the reason why they are still not installed? Are we still
> waiting for papers?
Yes. The procedure for the assignment started again from the
beginning because the previous papers are suspected to have got lost
in the mail. Although I said that they seemed to be accepted, it
turned out to be the confusion with my old disclaimer that is not
applicable to recent changes.
I've just sent back new signed papers today. So it would take at
least a few weeks to install the changes.
>> first, each row is word aligned).
> `word' does not universally refer to 2bytes (actually in most of the
> current GNU world, it refers to 4bytes). I got confused for a
> while. So please say 16bit-aligned instead or something like that
> to make things more clear.
Oops! I was not careful about that. I'm sorry for the confusion and
thanks for notifying me.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 23:41 Nick Roberts
@ 2004-02-12 1:18 ` Miles Bader
2004-02-12 11:55 ` Kim F. Storm
2004-02-12 16:42 ` Nick Roberts
2004-02-12 12:07 ` Kim F. Storm
1 sibling, 2 replies; 59+ messages in thread
From: Miles Bader @ 2004-02-12 1:18 UTC (permalink / raw)
Cc: emacs-devel
On Wed, Feb 11, 2004 at 11:41:24PM +0000, Nick Roberts wrote:
> Using the display margin does shunt the code sideways but I've got used to
> that.
It would help if it removed the margin when all breakpoints in a file are
deleted; currently once it's there, it seems to be there for good.
> On the other hand, the overlay arrow
> already uses the fringe so it could get a bit crowded.
I don't think this is much of a problem (other debuggers with a similar
display use combined breakpoint/current-position icons to handle this case,
but if that's too hard, I think people could cope with the current-position
icon temporarily overriding a breakpoint icon.
OTOH, I personally don't really mind the display margin being used in this
case, especially if it were made reversible like I mentioned above.
[Well, to be completely honest, I don't use the visual debugging anymore
because it's too buggy/annoying. E.g., the default window popping-up
behavior is awful if you use gdb keyboard commands: give a gdb command, and
it hides the command window!]
-Miles
--
Is it true that nothing can be known? If so how do we know this? -Woody Allen
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 1:18 ` Miles Bader
@ 2004-02-12 11:55 ` Kim F. Storm
2004-02-12 12:32 ` Miles Bader
2004-02-13 17:34 ` Richard Stallman
2004-02-12 16:42 ` Nick Roberts
1 sibling, 2 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-12 11:55 UTC (permalink / raw)
Cc: Nick Roberts, emacs-devel
Miles Bader <miles@gnu.org> writes:
> > On the other hand, the overlay arrow
> > already uses the fringe so it could get a bit crowded.
>
> I don't think this is much of a problem (other debuggers with a similar
> display use combined breakpoint/current-position icons to handle this case,
> but if that's too hard, I think people could cope with the current-position
> icon temporarily overriding a breakpoint icon.
The new code I added explicitly handles the overlay arrow as an
overlay also in the fringe, i.e. the > icon is shown above another
bitmap (eg. a breakpoint icon) in the same position.
>
> OTOH, I personally don't really mind the display margin being used
> in this case, especially if it were made reversible like I mentioned
> above.
>
> [Well, to be completely honest, I don't use the visual debugging anymore
> because it's too buggy/annoying. E.g., the default window popping-up
> behavior is awful if you use gdb keyboard commands: give a gdb command, and
> it hides the command window!]
Using the toolbar for debugging works very well IMO.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 23:41 Nick Roberts
2004-02-12 1:18 ` Miles Bader
@ 2004-02-12 12:07 ` Kim F. Storm
2004-02-12 16:59 ` Nick Roberts
1 sibling, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-12 12:07 UTC (permalink / raw)
Cc: emacs-devel
Nick Roberts <nick@nick.uklinux.net> writes:
> > ;;; Here is an example of using a user-defined fringe bitmaps; it is a red
> > ;;; circle which can be used to mark a debugger breakpoint (instead of
> > ;;; using the display margin as gdba current does).
>
> I recall a thread about 15 months ago about the fringe versus the display
> margin for breakpoint icons. However, I must admit that I've never quite
> understood the need for the fringe.
Well, the fringe is there, so why not use it :-)
> Using the display margin does shunt the
> code sideways but I've got used to that.
That is one thing that I find it hard to get used to...
As a side note, I also find it hard to get used to NOT being able
to set a break-point with the mouse in a source buffer which is
not "side-shifted".
> On the other hand, the overlay arrow
> already uses the fringe so it could get a bit crowded. Also, on text-only
> terminals the character `B' or `b' in the display margin marks a debugger
> breakpoint while the fringe is unavailable. Would the concept of the fringe
> make sense for such terminals?
I don't see why the two approaches cannot live side by side, i.e. let
it be a user option whether the breakpoint should be in the display
margin or in the fringe (when available, and it has a width >= 8
pixels):
I.e. something like
(if (and window-system
gdb-display-break-point-in-fringe
(>= (car (window-fringes)) 8))
(...) ; put icon in fringe
(...) ; put icon in display margin
)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 11:55 ` Kim F. Storm
@ 2004-02-12 12:32 ` Miles Bader
2004-02-13 17:34 ` Richard Stallman
1 sibling, 0 replies; 59+ messages in thread
From: Miles Bader @ 2004-02-12 12:32 UTC (permalink / raw)
Cc: Nick Roberts, emacs-devel, Miles Bader
On Thu, Feb 12, 2004 at 12:55:41PM +0100, Kim F. Storm wrote:
> The new code I added explicitly handles the overlay arrow as an
> overlay also in the fringe, i.e. the > icon is shown above another
> bitmap (eg. a breakpoint icon) in the same position.
Kewl. :-)
> Using the toolbar for debugging works very well IMO.
No doubt, but I don't like using the toolbar for debugging. Partly this is
personal preference (I tried for a while, then just stopped), but there are
also many common debugging situations where I think _most_ people (at least
those not terminally infected by windows debuggers) would use the
command-line, or at least have the gdb command buffer visible: for instance,
when you're not hitting `step / step / step', but rather `step / grovel
around in data / step / grovel around in other data / etc'.
Since the new graphical debugging stuff appears to be enabled by default (at
least, it pre-stuffs the gdb command line with the options to turn it on), I
think at the least, it ought not screw up traditional gdb-in-emacs usage.
-Miles
--
Somebody has to do something, and it's just incredibly pathetic that it
has to be us. -- Jerry Garcia
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 1:18 ` Miles Bader
2004-02-12 11:55 ` Kim F. Storm
@ 2004-02-12 16:42 ` Nick Roberts
2004-02-12 20:55 ` Miles Bader
1 sibling, 1 reply; 59+ messages in thread
From: Nick Roberts @ 2004-02-12 16:42 UTC (permalink / raw)
Cc: emacs-devel
> > Using the display margin does shunt the code sideways but I've got used to
> > that.
>
> It would help if it removed the margin when all breakpoints in a file are
> deleted;
And shunt the code back again, you mean?
> [Well, to be completely honest, I don't use the visual debugging anymore
> because it's too buggy/annoying...
Then it should be really easy to submit bug reports so that I can improve its
behaviour.
> ...E.g., the default window popping-up
> behavior is awful if you use gdb keyboard commands: give a gdb command, and
> it hides the command window!]
Some commands can pop up a new frame rather than a new window. A good bug
report needs to be more specific, preferably with reproducible examples. "I
don't like it because its crap" isn't very helpful.
Nick
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 12:07 ` Kim F. Storm
@ 2004-02-12 16:59 ` Nick Roberts
2004-02-12 23:35 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Nick Roberts @ 2004-02-12 16:59 UTC (permalink / raw)
Cc: emacs-devel
> As a side note, I also find it hard to get used to NOT being able
> to set a break-point with the mouse in a source buffer which is
> not "side-shifted".
But you can set a breakpoint, by clicking in the fringe, using the code that
you wrote (the local variable gud-minor-mode needs to be non-nil, though).
> I don't see why the two approaches cannot live side by side, i.e. let
> it be a user option whether the breakpoint should be in the display
> margin or in the fringe (when available, and it has a width >= 8
> pixels):
>
> I.e. something like..
I would prefer to have just one approach. If the general preference is to
use the fringe then I'll move the breakpoint icons there.
> The new code I added explicitly handles the overlay arrow as an
> overlay also in the fringe, i.e. the > icon is shown above another
> bitmap (eg. a breakpoint icon) in the same position.
This certainly makes the fringe more attractive.
Nick
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 16:42 ` Nick Roberts
@ 2004-02-12 20:55 ` Miles Bader
0 siblings, 0 replies; 59+ messages in thread
From: Miles Bader @ 2004-02-12 20:55 UTC (permalink / raw)
Cc: emacs-devel, Miles Bader
On Thu, Feb 12, 2004 at 04:42:02PM +0000, Nick Roberts wrote:
> Some commands can pop up a new frame rather than a new window. A good bug
> report needs to be more specific, preferably with reproducible examples. "I
> don't like it because its crap" isn't very helpful.
Yes I know. I will submit a proper bug report when I have time.
-Miles
--
`Suppose Korea goes to the World Cup final against Japan and wins,' Moon said.
`All the past could be forgiven.' [NYT]
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 16:59 ` Nick Roberts
@ 2004-02-12 23:35 ` Kim F. Storm
2004-02-13 19:25 ` Nick Roberts
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-12 23:35 UTC (permalink / raw)
Cc: emacs-devel
Nick Roberts <nick@nick.uklinux.net> writes:
> > As a side note, I also find it hard to get used to NOT being able
> > to set a break-point with the mouse in a source buffer which is
> > not "side-shifted".
>
> But you can set a breakpoint, by clicking in the fringe, using the code that
> you wrote (the local variable gud-minor-mode needs to be non-nil, though).
Ok, so that's the missing link... when is that variable set?
>
> > I don't see why the two approaches cannot live side by side, i.e. let
> > it be a user option whether the breakpoint should be in the display
> > margin or in the fringe (when available, and it has a width >= 8
> > pixels):
> >
> > I.e. something like..
>
> I would prefer to have just one approach. If the general preference is to
> use the fringe then I'll move the breakpoint icons there.
I would prefer the fringes when available -- but as you say, the
display margins are the only option on text-only terminals.
So you need to support both (but you don't need to support icons
for the display margins though).
>
> > The new code I added explicitly handles the overlay arrow as an
> > overlay also in the fringe, i.e. the > icon is shown above another
> > bitmap (eg. a breakpoint icon) in the same position.
>
> This certainly makes the fringe more attractive.
That was the intention :-)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 11:55 ` Kim F. Storm
2004-02-12 12:32 ` Miles Bader
@ 2004-02-13 17:34 ` Richard Stallman
2004-02-13 21:53 ` Kim F. Storm
1 sibling, 1 reply; 59+ messages in thread
From: Richard Stallman @ 2004-02-13 17:34 UTC (permalink / raw)
Cc: nick, emacs-devel, miles
The new code I added explicitly handles the overlay arrow as an
overlay also in the fringe, i.e. the > icon is shown above another
bitmap (eg. a breakpoint icon) in the same position.
How does it handle the overlay arrow on a text-only console?
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-12 23:35 ` Kim F. Storm
@ 2004-02-13 19:25 ` Nick Roberts
0 siblings, 0 replies; 59+ messages in thread
From: Nick Roberts @ 2004-02-13 19:25 UTC (permalink / raw)
Cc: emacs-devel
> > > As a side note, I also find it hard to get used to NOT being able
> > > to set a break-point with the mouse in a source buffer which is
> > > not "side-shifted".
> >
> > But you can set a breakpoint, by clicking in the fringe, using the code that
> > you wrote (the local variable gud-minor-mode needs to be non-nil, though).
>
> Ok, so that's the missing link... when is that variable set?
When the associated file is found through gud-find-file. This might be at
start up for the file that contains main or MAIN__ (Fortran), through
execution stopping in a file, or through setting a breakpoint.
If you visit a new file with find-file then gud-minor-mode will be nil. This
is a constant problem (or advantage, depending on how you look at it) with
Emacs as it tries to be more than one thing at the same time. I could change
the behaviour of find-file so that it assigns gud-minor-mode a value if
(buffer-name gud-comint-buffer) is non-nil but that might be too intrusive.
Also note that if you do visit a new file with find-file you can still set a
breakpoint with `C-x SPC' (which also sets gud-minor-mode) since this is a
global binding .
Nick
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-13 17:34 ` Richard Stallman
@ 2004-02-13 21:53 ` Kim F. Storm
0 siblings, 0 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-13 21:53 UTC (permalink / raw)
Cc: nick, emacs-devel, miles
Richard Stallman <rms@gnu.org> writes:
> The new code I added explicitly handles the overlay arrow as an
> overlay also in the fringe, i.e. the > icon is shown above another
> bitmap (eg. a breakpoint icon) in the same position.
>
> How does it handle the overlay arrow on a text-only console?
It behaves as it has always done, i.e. it uses a => arrow in the text area.
My change only relates to the overlay arrow bitmap in the fringe.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 11:28 ` YAMAMOTO Mitsuharu
2004-02-11 14:03 ` Stefan Monnier
@ 2004-02-14 0:39 ` Kim F. Storm
2004-02-14 8:08 ` Harald Maier
2004-02-14 15:31 ` YAMAMOTO Mitsuharu
1 sibling, 2 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-14 0:39 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> >>>>> On 11 Feb 2004 12:17:24 +0100, storm@cua.dk (Kim F. Storm) said:
>
> > Supposing that fb->bits was word aligned and 16 bits per row, what
> > would the code for drawing the bitmap look like then?
>
> Just like the following: Functions mac_create_bitmap_from_bitmap_data
> and mac_free_bitmap are no longer used for drawing fringe bitmaps.
> The function mac_draw_bitmap additionally takes width and height
> as arguments.
Thanks for you help and suggestions.
I have just installed changes that allows fringe bitmaps to be up to
16 bits wide, and properly support any width between 1 and 16 on X.
I believe I have made the necessary changes to the W32 and MAC ports
(including not doing bit-swapping on MAC_OS). As we previously
discussed, the code is simpler on both W32 and MAC after these change,
but as usual I cannot test whether it works.
Vi fans may want to try this...
(require 'fringe)
(define-fringe-bitmap
[#b000000000
#b000100100
#b001010100
#b001001000]
nil 9 'top empty-line-fringe-bitmap)
(setq indicate-empty-lines t)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 15:02 ` Matt Hodges
@ 2004-02-14 0:46 ` Kim F. Storm
0 siblings, 0 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-14 0:46 UTC (permalink / raw)
Cc: emacs-devel
Matt Hodges <matt@tc.bham.ac.uk> writes:
> Prototypes for pos and window are missing in Ffringe_bitmaps_at_pos (fails to
> build on alpha.)
Thanks for the report. I have just installed a fix.
Sorry for not answering sooner.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-10 1:28 ` Johan Bockgård
@ 2004-02-14 0:58 ` Kim F. Storm
0 siblings, 0 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-14 0:58 UTC (permalink / raw)
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> This is an easy way to do it:
>
> "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"
>
> ==
>
> (string
> #b00111100
> #b01111110
> #b11111111
> #b11111111
> #b11111111
> #b11111111
> #b01111110
> #b00111100)
>
That is a good point indeed. Thanks!
You can even use a vector:
[#b00111100
#b01111110
#b11111111
#b11111111
#b11111111
#b11111111
#b01111110
#b00111100]
I think this is sufficient for the limited number of fringe bitmaps
that we will need to create.
What do other think?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-14 0:39 ` Kim F. Storm
@ 2004-02-14 8:08 ` Harald Maier
2004-02-14 15:31 ` YAMAMOTO Mitsuharu
1 sibling, 0 replies; 59+ messages in thread
From: Harald Maier @ 2004-02-14 8:08 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> I have just installed changes that allows fringe bitmaps to be up to
> 16 bits wide, and properly support any width between 1 and 16 on X.
>
> I believe I have made the necessary changes to the W32 and MAC ports
> (including not doing bit-swapping on MAC_OS). As we previously
> discussed, the code is simpler on both W32 and MAC after these
> change, but as usual I cannot test whether it works.
>
>
> Vi fans may want to try this...
>
> (require 'fringe)
>
> (define-fringe-bitmap
> [#b000000000
> #b000100100
> #b001010100
> #b001001000]
> nil 9 'top empty-line-fringe-bitmap)
>
> (setq indicate-empty-lines t)
Hello Kim,
I tried it on W32 and it looks really as vi :). With other words, the
look and the behavior it's the same as with GNU/Linux.
Harald
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-14 0:39 ` Kim F. Storm
2004-02-14 8:08 ` Harald Maier
@ 2004-02-14 15:31 ` YAMAMOTO Mitsuharu
2004-02-15 17:19 ` Kim F. Storm
1 sibling, 1 reply; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-14 15:31 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 14 Feb 2004 01:39:27 +0100, storm@cua.dk (Kim F. Storm) said:
> I believe I have made the necessary changes to the W32 and MAC ports
> (including not doing bit-swapping on MAC_OS). As we previously
> discussed, the code is simpler on both W32 and MAC after these
> change, but as usual I cannot test whether it works.
Thanks for considering 16-bit alignment. But because PowerPC is
usually used in big-endian mode, byte-swapping is needed when storing
16-bit data to unsigned short variable for the mac port. Could you do
byte-swapping in init_fringe_bitmap if both MAC_OS and
WORDS_BIG_ENDIAN are defined?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-14 15:31 ` YAMAMOTO Mitsuharu
@ 2004-02-15 17:19 ` Kim F. Storm
0 siblings, 0 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-15 17:19 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> Thanks for considering 16-bit alignment. But because PowerPC is
> usually used in big-endian mode, byte-swapping is needed when storing
> 16-bit data to unsigned short variable for the mac port. Could you do
> byte-swapping in init_fringe_bitmap if both MAC_OS and
> WORDS_BIG_ENDIAN are defined?
Done.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-11 2:54 ` YAMAMOTO Mitsuharu
2004-02-11 11:17 ` Kim F. Storm
@ 2004-02-16 10:22 ` YAMAMOTO Mitsuharu
2004-02-16 13:22 ` Kim F. Storm
1 sibling, 1 reply; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-16 10:22 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 15 Feb 2004 18:19:57 +0100, storm@cua.dk (Kim F. Storm) said:
>> Thanks for considering 16-bit alignment. But because PowerPC is
>> usually used in big-endian mode, byte-swapping is needed when
>> storing 16-bit data to unsigned short variable for the mac port.
>> Could you do byte-swapping in init_fringe_bitmap if both MAC_OS and
>> WORDS_BIG_ENDIAN are defined?
> Done.
A slight modification was needed to compile the mac port.
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.6
diff -c -r1.6 fringe.c
*** src/fringe.c 16 Feb 2004 04:53:28 -0000 1.6
--- src/fringe.c 16 Feb 2004 10:05:50 -0000
***************
*** 1067,1072 ****
--- 1067,1074 ----
#if defined (MAC_OS) && defined (WORDS_BIG_ENDIAN)
unsigned short *bits = fb->bits;
+ int j;
+
for (j = 0; j < fb->height; j++)
{
unsigned short b = *bits;
>>>>> On Wed, 11 Feb 2004 11:54:11 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:
> Yes. (1) Launch the Carbon Emacs, (2) M-<, C-e, and hit the space
> bar four times to move the cursor to the right fringe area of the
> first line. (3) C-x 2 to split the window.
> Just after 2), I see a hollow box cursor (should be a filled one),
> and 3) makes all cursors disappear. I couldn't reproduce these
> phenomena on the X11 version.
I found another strange behaviour about this problem. If I repeatedly
type C-l after (2), filled and hollow cursors are alternately
displayed in the fringe area. Does this become a clue?
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-16 10:22 ` YAMAMOTO Mitsuharu
@ 2004-02-16 13:22 ` Kim F. Storm
2004-02-17 3:13 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-16 13:22 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> > Yes. (1) Launch the Carbon Emacs, (2) M-<, C-e, and hit the space
> > bar four times to move the cursor to the right fringe area of the
> > first line. (3) C-x 2 to split the window.
>
> > Just after 2), I see a hollow box cursor (should be a filled one),
> > and 3) makes all cursors disappear. I couldn't reproduce these
> > phenomena on the X11 version.
>
> I found another strange behaviour about this problem. If I repeatedly
> type C-l after (2), filled and hollow cursors are alternately
> displayed in the fringe area. Does this become a clue?
Not really. The only reason I can think of is that somehow Carbon Emacs
cannot keep track of which window is the selected window during redisplay.
Maybe the event/command loop does a select-window at some point which
isn't restored before redisplay, and so it gets confused.
Is this somehow related to where the mouse is on the screen; it could
be some mouse related events which confuses the Carbon event loop.
What happens if you set cursor-in-non-selected-windows to nil?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-16 13:22 ` Kim F. Storm
@ 2004-02-17 3:13 ` YAMAMOTO Mitsuharu
2004-02-17 22:41 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-17 3:13 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 16 Feb 2004 14:22:28 +0100, storm@cua.dk (Kim F. Storm) said:
> Maybe the event/command loop does a select-window at some point
> which isn't restored before redisplay, and so it gets confused.
Hmm, if that is the case, I think the cursor at non-fringe area would
also be affected.
> Is this somehow related to where the mouse is on the screen; it
> could be some mouse related events which confuses the Carbon event
> loop.
I could not observe any difference by the mouse position.
> What happens if you set cursor-in-non-selected-windows to nil?
It just erases the hollow cursors in non-selected windows, and the
selected window still displays the hollow one.
Inspecting by a debugger, I found that glyph->type is 2 (IMAGE_GLYPH)
at the fringe position in question. So the function
get_window_cursor_type determines the cursor type as
HOLLOW_BOX_CURSOR.
/* Use normal cursor if not blinked off. */
if (!w->cursor_off_p)
{
if (glyph->type == IMAGE_GLYPH) {
if (cursor_type == FILLED_BOX_CURSOR)
cursor_type = HOLLOW_BOX_CURSOR;
}
return cursor_type;
}
I guess glyph->type at the fringe position is not properly initialized
in Carbon Emacs. But this does not explain why all the cursors
disappear when a window is split.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-17 3:13 ` YAMAMOTO Mitsuharu
@ 2004-02-17 22:41 ` Kim F. Storm
2004-02-18 2:32 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-17 22:41 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> Inspecting by a debugger, I found that glyph->type is 2 (IMAGE_GLYPH)
> at the fringe position in question. So the function
> get_window_cursor_type determines the cursor type as
> HOLLOW_BOX_CURSOR.
That was a very helpful hint, thank you. I have just installed a
patch which I think will fix this. Can you please test?
Actually, it was a generic bug, so why it only showed up on MAC Carbon
I don't know. But I guess it would have shown up at random on other
platforms.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-17 22:41 ` Kim F. Storm
@ 2004-02-18 2:32 ` YAMAMOTO Mitsuharu
2004-02-18 22:04 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-18 2:32 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 17 Feb 2004 23:41:14 +0100, storm@cua.dk (Kim F. Storm) said:
> That was a very helpful hint, thank you. I have just installed a
> patch which I think will fix this. Can you please test?
Still I see the hollow cursor in fringe.
glyph = (glyph_row->cursor_in_fringe_p ? NULL
: glyph_row->glyphs[TEXT_AREA] + hpos);
glyph_row->cursor_in_fringe_p above is not set at this stage; it will
be set in rif->draw_window_cursor, which is mac_draw_window_cursor in
the mac port, afterward.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-18 2:32 ` YAMAMOTO Mitsuharu
@ 2004-02-18 22:04 ` Kim F. Storm
2004-02-19 4:28 ` YAMAMOTO Mitsuharu
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-02-18 22:04 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> >>>>> On 17 Feb 2004 23:41:14 +0100, storm@cua.dk (Kim F. Storm) said:
>
> > That was a very helpful hint, thank you. I have just installed a
> > patch which I think will fix this. Can you please test?
>
> Still I see the hollow cursor in fringe.
>
> glyph = (glyph_row->cursor_in_fringe_p ? NULL
> : glyph_row->glyphs[TEXT_AREA] + hpos);
>
> glyph_row->cursor_in_fringe_p above is not set at this stage; it will
> be set in rif->draw_window_cursor, which is mac_draw_window_cursor in
> the mac port, afterward.
You are absolutely right. Thanks.
I just installed a better fix.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-18 22:04 ` Kim F. Storm
@ 2004-02-19 4:28 ` YAMAMOTO Mitsuharu
2004-02-19 8:38 ` Jason Rumney
2004-02-19 9:52 ` Kim F. Storm
0 siblings, 2 replies; 59+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-02-19 4:28 UTC (permalink / raw)
Cc: emacs-devel
>>>>> On 18 Feb 2004 23:04:15 +0100, storm@cua.dk (Kim F. Storm) said:
> I just installed a better fix.
It works fine. Thank you very much.
So, the remaining problem is the one related to the window splitting.
I believe the problem is specific to Carbon Emacs, but let me
summarize how to reproduce it here.
(1) Launch Carbon Emacs (where blink-cursor-mode is disabled by
default).
(2) M-<, C-e, and hit the space bar four times to move the cursor to
the right fringe area of the first line. (Now correctly
displayed as a filled cursor.)
(3) C-x 2 -> All the cursors disappear.
(4) C-x 1 -> The cursor comes back to the right fringe just after
C-x is typed.
(5) C-x 2
(6) C-a -> The cursor in the first window goes to the beginning
of line, but the cursor at the fringe remains to be
displayed.
[The following does not depend on the previous sequence.]
(7) C-x 3 -> The vertical line separating windows is not displayed
until some event (e.g., keyboard input) occurs.
If blink-cursor-mode is enabled, (3) and (7) are solved after the
first blink, and (6) does not occur unless you type C-x 2 C-a quickly
before blinking starts.
Although I'm not sure it is related to the above problem, I noticed
that x_make_frame_visible in Carbon Emacs is different from the ones
in other platforms. It does not wait for a window system event that
tells the frame becomes actually visible to come. I guess this is the
reason why the "fancy splash screen" is not displayed in Carbon Emacs
with the image support patches.
As for the vertical line separating windows, I noticed that it makes a
flicker in the X11 version if blink-cursor-mode is enabled.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-19 4:28 ` YAMAMOTO Mitsuharu
@ 2004-02-19 8:38 ` Jason Rumney
2004-02-19 9:52 ` Kim F. Storm
1 sibling, 0 replies; 59+ messages in thread
From: Jason Rumney @ 2004-02-19 8:38 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> (7) C-x 3 -> The vertical line separating windows is not displayed
> until some event (e.g., keyboard input) occurs.
This bug is also present on Windows. As with Mac, the first blink of
the cursor makes the vertical line appear when blink-cursor-mode is
active (the default).
> If blink-cursor-mode is enabled, (3) and (7) are solved after the
> first blink, and (6) does not occur unless you type C-x 2 C-a quickly
> before blinking starts.
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-19 4:28 ` YAMAMOTO Mitsuharu
2004-02-19 8:38 ` Jason Rumney
@ 2004-02-19 9:52 ` Kim F. Storm
1 sibling, 0 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-02-19 9:52 UTC (permalink / raw)
Cc: emacs-devel
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:
> >>>>> On 18 Feb 2004 23:04:15 +0100, storm@cua.dk (Kim F. Storm) said:
>
> > I just installed a better fix.
>
> It works fine. Thank you very much.
>
> So, the remaining problem is the one related to the window splitting.
> I believe the problem is specific to Carbon Emacs, but let me
> summarize how to reproduce it here.
I will think about how this can happen. But it very much sounds like
a flush is missing somewhere (which may also be why the splash screen
does not work on Carbon).
In any case, while fixing the previous problem, I noticed that the
handling of the phys_cursor has some subtle problems, so I will try
to fix those first.
>
> (1) Launch Carbon Emacs (where blink-cursor-mode is disabled by
> default).
> (2) M-<, C-e, and hit the space bar four times to move the cursor to
> the right fringe area of the first line. (Now correctly
> displayed as a filled cursor.)
> (3) C-x 2 -> All the cursors disappear.
> (4) C-x 1 -> The cursor comes back to the right fringe just after
> C-x is typed.
> (5) C-x 2
> (6) C-a -> The cursor in the first window goes to the beginning
> of line, but the cursor at the fringe remains to be
> displayed.
emacs probably thinks it's already displayed...
> [The following does not depend on the previous sequence.]
> (7) C-x 3 -> The vertical line separating windows is not displayed
> until some event (e.g., keyboard input) occurs.
sounds like a flush is missing.
>
> If blink-cursor-mode is enabled, (3) and (7) are solved after the
> first blink, and (6) does not occur unless you type C-x 2 C-a quickly
> before blinking starts.
because blink is followed by a flush?
>
> Although I'm not sure it is related to the above problem, I noticed
> that x_make_frame_visible in Carbon Emacs is different from the ones
> in other platforms. It does not wait for a window system event that
> tells the frame becomes actually visible to come. I guess this is the
> reason why the "fancy splash screen" is not displayed in Carbon Emacs
> with the image support patches.
or output is not flushed correctly?
maybe you can compare the x and mac ports to see if there are
any differences when/how things get flushed...
Also, XFlush and x_flush in macterm.c are defined differently
on Carbon. Maybe one of them has a bug?
>
> As for the vertical line separating windows, I noticed that it makes a
> flicker in the X11 version if blink-cursor-mode is enabled.
I have seen the vertical line flicker on X myself; I'll look into
that as well.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
` (3 preceding siblings ...)
2004-02-09 19:54 ` Tak Ota
@ 2004-03-08 13:48 ` Marco Munari 16447.64651
2004-03-08 23:52 ` Kim F. Storm
2004-03-11 0:22 ` Marco Munari 16447.64651
5 siblings, 1 reply; 59+ messages in thread
From: Marco Munari 16447.64651 @ 2004-03-08 13:48 UTC (permalink / raw)
Cc: Kim F. Storm
[-- Attachment #1: Type: text/plain, Size: 3028 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fringe d-patch to currente emacs cvs --]
[-- Type: text/x-patch, Size: 5840 bytes --]
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;
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: cvs/emacs$ patch -p1 mar_emacs_cvs.patch --]
[-- Type: text/x-patch, Size: 10199 bytes --]
Index: etc/TODO
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TODO,v
retrieving revision 1.61
diff -u -r1.61 TODO
--- etc/TODO 21 Nov 2003 18:23:27 -0000 1.61
+++ etc/TODO 8 Mar 2004 11:10:08 -0000
@@ -68,9 +68,6 @@
* Set fringe widths per-window/per-buffer.
-* Make fringe bitmaps user configurable. Maybe add ability to add
- additional bitmaps to the fringe from lisp.
-
Other features we would like:
* Have a command suggestion help system that recognizes patterns
Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.282
diff -u -r1.282 faces.el
--- lisp/faces.el 27 Feb 2004 17:30:23 -0000 1.282
+++ lisp/faces.el 8 Mar 2004 11:10:09 -0000
@@ -1925,6 +1925,19 @@
:group 'basic-faces)
+(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)
+
+
(defface scroll-bar '()
"Basic face for the scroll bar colors under X."
:version "21.1"
Index: lisp/ibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.57
diff -u -r1.57 ibuffer.el
--- lisp/ibuffer.el 1 Sep 2003 15:45:12 -0000 1.57
+++ lisp/ibuffer.el 8 Mar 2004 11:10:10 -0000
@@ -199,7 +199,7 @@
:group 'ibuffer)
(defcustom ibuffer-eliding-string "..."
- "The string to use for eliding long columns."
+ "The string to use for eliding long lines."
:type 'string
:group 'ibuffer)
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.165
diff -u -r1.165 dispextern.h
--- src/dispextern.h 26 Feb 2004 17:46:46 -0000 1.165
+++ src/dispextern.h 8 Mar 2004 11:10:11 -0000
@@ -1165,6 +1165,13 @@
? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
: 0)
+/* 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)
+
/* Return the desired face id for the mode line of a window, depending
on whether the window is selected or not, or if the window is the
scrolling window for the currently active minibuffer window.
@@ -1512,6 +1519,7 @@
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
+ FRINGE_ACTIVE_FACE_ID,
HEADER_LINE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.10
diff -u -r1.10 fringe.c
--- src/fringe.c 1 Mar 2004 23:56:44 -0000 1.10
+++ src/fringe.c 8 Mar 2004 11:10:11 -0000
@@ -104,32 +104,32 @@
/* An arrow like this: `<-'. */
/*
- ...xx...
- ..xx....
- .xx.....
- xxxxxx..
- xxxxxx..
- .xx.....
- ..xx....
- ...xx...
+- ..... ...
+ ..x.. ...
+ .x... ...
+ xxxxx ...
+ .x... ...
+ ..x.. ...
+- ..... ...
+- ..... ...
*/
static unsigned short left_arrow_bits[] = {
- 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18};
+ 0x04, 0x08, 0x1f, 0x08, 0x04};
/* Right truncation arrow bitmap `->'. */
/*
- ...xx...
- ....xx..
- .....xx.
- ..xxxxxx
- ..xxxxxx
- .....xx.
- ....xx..
- ...xx...
+- ........
+ ... ..x..
+ ... ...x.
+ ... xxxxx
+ ... ...x.
+ ... ..x..
+- ........
+- ........
*/
static unsigned short right_arrow_bits[] = {
- 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18};
+ 0x04, 0x02, 0x1f, 0x02, 0x04};
/* Up arrow bitmap. */
@@ -163,31 +163,31 @@
/* Marker for continued lines. */
/*
- ..xxxx..
- ..xxxxx.
- ......xx
- ..x..xxx
- ..xxxxxx
- ..xxxxx.
- ..xxxx..
- ..xxxxx.
+- ........
+- ........
+- ........
+ .... xx.
+ .... ..x
+ .... x.x
+ .... xx.
+ .... xxx
*/
static unsigned short continued_bits[] = {
- 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
+ 0x06, 0x01, 0x05, 0x06, 0x07};
/* Marker for continuation lines. */
/*
- ..xxxx..
- .xxxxx..
- xx......
- xxx..x..
- xxxxxx..
- .xxxxx..
- ..xxxx..
- .xxxxx..
+ .... .xx
+ .... x..
+ .... x.x
+ .... .xx
+ .... xxx
+- ........
+- ........
+- ........
*/
static unsigned short continuation_bits[] = {
- 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
+ 0x03, 0x04, 0x05, 0x03, 0x07};
/* Overlay arrow bitmap. A triangular arrow. */
/*
@@ -413,13 +413,14 @@
struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] =
{
{ NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
+ /* bits, height, width,period, align , dynamic*/
{ FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
- { 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 },
{ FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
- { 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 },
{ FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
@@ -482,14 +483,16 @@
else if (left_p)
{
which = row->left_fringe_bitmap;
- face_id = row->left_fringe_face_id;
+ //mar:useless, reassign follow: face_id = row->left_fringe_face_id;
}
else
{
which = row->right_fringe_bitmap;
- face_id = row->right_fringe_face_id;
+ //mar:useless, reassign follow: face_id = row->right_fringe_face_id;
}
+ face_id = CURRENT_FRINGE_FACE_ID(w);
+
if (face_id == DEFAULT_FACE_ID)
face_id = fringe_faces[which];
@@ -800,7 +803,7 @@
else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
left = row->left_user_fringe_bitmap;
- left_face_id = row->left_user_fringe_face_id;
+ left_face_id = CURRENT_FRINGE_FACE_ID(w);//row->left_user_fringe_face_id;
}
else if (row->indicate_bob_p && boundary_pos <= 0)
left = ((row->indicate_eob_p && boundary_pos < 0)
@@ -826,7 +829,7 @@
else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
right = row->right_user_fringe_bitmap;
- right_face_id = row->right_user_fringe_face_id;
+ right_face_id = CURRENT_FRINGE_FACE_ID(w);//row->right_user_fringe_face_id;
}
else if (row->indicate_bob_p && boundary_pos > 0)
right = ((row->indicate_eob_p && boundary_pos >= 0)
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.462
diff -u -r1.462 window.c
--- src/window.c 4 Mar 2004 17:16:23 -0000 1.462
+++ src/window.c 8 Mar 2004 11:10:13 -0000
@@ -1775,8 +1775,10 @@
window = Fnext_window (window, Qnil, all_frames);
for (; i < 0; ++i)
window = Fprevious_window (window, Qnil, all_frames);
-
- Fselect_window (window, Qnil);
+ if (window != selected_window) {
+ //selected_window->circa row->redraw_fringe_bitmaps_p = 1;
+ Fselect_window (window, Qnil);
+ }
return Qnil;
}
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.289
diff -u -r1.289 xfaces.c
--- src/xfaces.c 9 Feb 2004 15:39:49 -0000 1.289
+++ src/xfaces.c 8 Mar 2004 11:10:15 -0000
@@ -322,7 +322,7 @@
/* Names of basic faces. */
-Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
+Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe, Qfringe_active;
Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
Lisp_Object Qmode_line_inactive;
extern Lisp_Object Qmode_line;
@@ -6626,6 +6626,9 @@
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
+ /* 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" */
realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
@@ -7701,6 +7704,8 @@
staticpro (&Qregion);
Qfringe = intern ("fringe");
staticpro (&Qfringe);
+ Qfringe = intern ("fringe-active");
+ staticpro (&Qfringe_active);
Qheader_line = intern ("header-line");
staticpro (&Qheader_line);
Qscroll_bar = intern ("scroll-bar");
Index: src/xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.606
diff -u -r1.606 xfns.c
--- src/xfns.c 1 Mar 2004 12:51:33 -0000 1.606
+++ src/xfns.c 8 Mar 2004 11:10:17 -0000
@@ -2131,13 +2131,13 @@
#ifdef USE_TOOLKIT_SCROLL_BARS
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
- int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
+ int width = 8 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
/* Make the actual width at least 14 pixels and a multiple of a
character width. */
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = (6 + wid - 1) / wid;
/* Use all of that space (aside from required margins) for the
scroll bar. */
[-- Attachment #4: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-08 13:48 ` Marco Munari 16447.64651
@ 2004-03-08 23:52 ` Kim F. Storm
2004-03-11 15:27 ` Miles Bader
2004-03-11 17:06 ` Marco Munari 16464.32679
0 siblings, 2 replies; 59+ messages in thread
From: Kim F. Storm @ 2004-03-08 23:52 UTC (permalink / raw)
Cc: emacs-devel
mar@i.am (Marco Munari 16447.64651) writes:
> dear developers, i use emacs and sometime i touch the code to improve it
> by my ideas,
If we are going to use your changes, we will need papers.
> 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.
That is a nice idea, and I would like to consider it.
I can see quite some problems doing it properly, and from the comments
you gave I doubt it covers all corners of this functionality.
However, I will not look at your patch in details, until I know whether
you will sign papers.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
` (4 preceding siblings ...)
2004-03-08 13:48 ` Marco Munari 16447.64651
@ 2004-03-11 0:22 ` Marco Munari 16447.64651
2004-03-17 3:56 ` Miles Bader
5 siblings, 1 reply; 59+ messages in thread
From: Marco Munari 16447.64651 @ 2004-03-11 0:22 UTC (permalink / raw)
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.
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
\f
<#part type="text/x-patch" filename="/usr/self/cvs/emacs/mar_emacs_cvs.diff" disposition=inline description="fringe patch to currente emacs cvs">
<#/part>
<#part type="text/x-patch" filename="/usr/self/cvs/emacs/mar_emacs_cvs.patch" disposition=attachment description="cvs/emacs$ patch -p1 mar_emacs_cvs.patch">
<#/part>
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-08 23:52 ` Kim F. Storm
@ 2004-03-11 15:27 ` Miles Bader
2004-03-17 13:59 ` Marco Munari
2004-03-11 17:06 ` Marco Munari 16464.32679
1 sibling, 1 reply; 59+ messages in thread
From: Miles Bader @ 2004-03-11 15:27 UTC (permalink / raw)
Cc: emacs-devel, Marco Munari 16447.64651
BTW, I notice that this patch makes `active fringes' the distinguished case,
and uses the normal fringe property for `inactive fringes', which is the
opposite of what happens with modelines (the active modeline is `normal',
and inactive ones are special).
Is there a reason for this difference? If not, it seems things might as
well be consistent.
-miles
--
"Whatever you do will be insignificant, but it is very important that
you do it." Mahatma Ghandi
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-08 23:52 ` Kim F. Storm
2004-03-11 15:27 ` Miles Bader
@ 2004-03-11 17:06 ` Marco Munari 16464.32679
1 sibling, 0 replies; 59+ messages in thread
From: Marco Munari 16464.32679 @ 2004-03-11 17:06 UTC (permalink / raw)
Cc: Kim F. Storm
~\/~ "Kim" == Kim F Storm <storm@cua.dk> wrote in a (lost) emacs-devel message:
Kim> mar@i.am (Marco Munari 16447.64651) writes:
[ The dot number appended after my public e-mail address
is unix epoch expressed in MS16bit.LS16bit in decimal ]
> > dear developers, i use emacs and sometime i touch the code
> > to improve it by my ideas,
Kim> If we are going to use your changes, we will need papers.
I'm heppy to contribute to GNU Emacs, it's simply my way to say "very much",
after i thought "thanks".
No other company will borrow for this my contribute because i've my own company
and this is my best time.
> mar i.am (Marco Munari 16447.64651) writes:
> > 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.
Kim> That is a nice idea, and I would like to consider it.
Kim> I can see quite some problems doing it properly, and from the
Kim> comments you gave I doubt it covers all corners of this
Kim> functionality.
Kim> However, I will not look at your patch in details, until I know
Kim> whether you will sign papers.
I like\x7f\x7f\x7fove you respect of mind, ideas and authors and if you need,
i can sign disclaimer papers for this free software contribute.
(obviously [but sorry if it couldn't be so obvious])
Mail-Referenced: <ywmr7w3cuw3.fsf@fast.mm.homeunix.org>
Copyright (C) 2004 Marco Munari <mar i.am>
Referred patch is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Referred patch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Kim> -- Kim F. Storm <storm@cua.dk> http://www.cua.dk
Saluti,
MARco http://mar.i.am/ieavoid.html#ed16464.32679
--
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
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-11 0:22 ` Marco Munari 16447.64651
@ 2004-03-17 3:56 ` Miles Bader
2004-03-18 5:08 ` Marc Munari 16473.4929
0 siblings, 1 reply; 59+ messages in thread
From: Miles Bader @ 2004-03-17 3:56 UTC (permalink / raw)
Cc: emacs-devel
mar@i.am (Marco Munari 16447.64651) writes:
> 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.
If you are answering my previous question, I think you didn't quite
understand what I meant:
Why did you use: `fringe-active' and `fringe'
instead of: `fringe' and `fringe-inactive'
To highlight the selected-window/other-windows?
The latter is more consistent with existing practice.
[There may very well be a good reason, I simply don't know what it is.]
-Miles
--
Run away! Run away!
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-11 15:27 ` Miles Bader
@ 2004-03-17 13:59 ` Marco Munari
0 siblings, 0 replies; 59+ messages in thread
From: Marco Munari @ 2004-03-17 13:59 UTC (permalink / raw)
Cc: emacs-devel, Kim F. Storm
[i saw you resend, this mail reply was not sent
because it was "under construction"]
~\/~ "Miles" == Miles Bader <miles@gnu.org> writes:
Miles> BTW, I notice that this patch makes `active fringes' the
Miles> distinguished case, and uses the normal fringe property for
Miles> `inactive fringes', which is the opposite of what happens with
Miles> modelines (the active modeline is `normal', and inactive ones
Miles> are special).
Miles> Is there a reason for this difference?
i thought a reason, but with some my assumptions, i'm not sure if
is valid for you:
1- never change existing variable names expecially if related to
customizable names unless really necessary
2- choose the name which maximixe the meaning when introducing new
variable names.
i suppose the cronological history of this faces is:
+ modeline (aliased)
+ mode-line
+ mode-line-inactive
+ fringe
when i was partitioning the fringe face concept into active and inactive
meaning i was in dubt becouse i suppose (1) i can't change existing names,
and in my mind "inactive" without express "active" is unexpected logic,
because "inactive" is etymologically a word which extents "active".
i didn't choose fringe-inactive by this opinion.
But now, in more conservative point of view i can find a reason to
imitate mode-line-inactive logic:
when existing(/previous) unique fringe face is whatched by the user,
the name is "fringe" and it is implicitly thoughts "active"
in current window, even if there was not distinction.
Anyway I temporary (locally) change the name in
to fringe-active and fringe-inactive, and
put an alias fringe (put 'fringe 'face-alias 'fringe-active),
you can expect a new patch relative to the original emacs,
after i sign copyright disclaimer papers,
Anyway i have to say: in previous patch in xdisp.c there was wrong asignment
to Qfringe, the second assignment should be to Qfringe_active in previous
naming logic, and this explain the surprise noticed and commented
in the same file:
xfaces.c in line 7705
- Qfringe = intern ("fringe-inactive");
+ Qfringe_active = intern ("fringe-active");
relative to that patch
actually i have connection timeout to port 22 of savannah.gnu.org
Miles> If not, it seems things might as well be consistent.
Miles> -miles -- "Whatever you do will be insignificant, but it is
Miles> very important that you do it." Mahatma Ghandi
Saluti,
MARco
--
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
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-17 3:56 ` Miles Bader
@ 2004-03-18 5:08 ` Marc Munari 16473.4929
2004-03-18 13:27 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Marc Munari 16473.4929 @ 2004-03-18 5:08 UTC (permalink / raw)
~\/~ "Miles" == Miles Bader <miles@lsi.nec.co.jp> writes:
> mar@i.am (Marco Munari 16447.64651) writes:
on Mar 9 and on Mar 11
> 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.
Miles> If you are answering my previous question,
No, the list in the past had problem and i rely suggestion
to resend messages if they don't appare for long time. I did,
even tryng to set (unsuccesfully) the same message-id.
But after, the message appare twice.
Miles> I think you didn't quite understand what I meant:
i'm sorry, it is not the case.
Miles> Why did you use: `fringe-active' and `fringe' instead of:
Miles> `fringe' and `fringe-inactive'
Miles> To highlight the selected-window/other-windows?
Miles> The latter is more consistent with existing practice.
since the beginning i noticed an existing practice related
to mode-line-inactive (are there any other similar cases?),
before and in conjunction to your first reply.
Miles> [There may very well be a good reason,
Miles> I simply don't know what it is.]
Miles> -Miles -- Run away! Run away!
I'm not in a hurry, are you (the patch is not in cvs)? (some
other one ask me to sign papers insted of discuss the content,
i didn't ignore your message in my mind (and i immediately
prepared a draft of a reply), but i prefered to send
less "not well definde mail" as possible. I'm sorry if this
was not what you expect, now you have the draft with reasons
(expressed as my opinion) why i don't choosed ...-inactive
variable name, in my reply with _your_ message-id in
References field. I repeat here that i will send a new patch
related to base cvs emacs.
Saluti,
MARco
--
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
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-18 5:08 ` Marc Munari 16473.4929
@ 2004-03-18 13:27 ` Kim F. Storm
2004-03-18 19:05 ` Marco Munari 16473.54072
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-03-18 13:27 UTC (permalink / raw)
mar@i.am (Marc Munari 16473.4929) writes:
> I'm not in a hurry, are you (the patch is not in cvs)? (some
> other one ask me to sign papers insted of discuss the content,
Yes, I asked you to sign papers before I would take a closer
look at your patch.
As I said, I think your idea is a nice enhancement, and I would
reserve the option to implement it myself if you would not sign
papers. That is why I didn't want to look at your patch in details.
As you are going to sign papers for this, I'll go back and
look more closely at your proposed changes. Stay tuned :-)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-18 13:27 ` Kim F. Storm
@ 2004-03-18 19:05 ` Marco Munari 16473.54072
2004-03-18 23:43 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Marco Munari 16473.54072 @ 2004-03-18 19:05 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
~\/~ "Kim" == Kim F Storm <storm@cua.dk> writes:
...
Kim> Stay tuned :-)
ok :)
As M.B. suggests i switch to FRINGE_FACE_ID and FRINGE_INACTIVE_FACE_ID
naming notation. (a reason exists).
I don't understand why you (Kim) introduces (on 2004-02-09 as Changelog)
right_user_fringe_face_id and left_user_fringe_face_id
The respect of this user capability create to me dubts on
what it's better... how to create optional left_user_fringe_inactive_face_id
and _user_fringe_inactive_face_id,
i can introduce differential face_id number
an highlight function of fringe could respect more by default left
and right fringe user preference.
an updated patch containing following modification follows:
M etc/TODO
removed DONE stuff
(just for rem, because you are the one who made fringe user configurable)
M lisp/faces.el
added face fringe-inactive
M lisp/ibuffer.el
text fix in desc: long lines implies big column values, not "long columns"!
M lisp/log-edit.el
fix tipo: defar insted defvar
M src/dispextern.h
added basic face FRINGE_INACTIVE_FACE_ID
added macro CURRENT_FRINGE_FACE_ID(W): returns the
FRINGE*_FACE_ID depending on window (selected/unselected)
added macro CURRENT_DELTA_FRINGE_FACE_ID(W), it's an idea (to be discussed)
M src/fringe.c
partially disabled user left and right fringe configurable
to set brutally to current basic fringe (should be discussed)
maybe we need to define right_user_fringe_inactive_face_id
right_user_fringe_inactive_face_id (better if a delta compatible to
CURRENT_DELTA_FRINGE_FACE_ID.. it's just a possibility far to be the best)
M src/window.c
other-window call Fselect_window only if selected_window is
effectively a new one (this modify enlight task when only 1 window is
in the farme for either mode-line-fringe/mode-line-inactive
and fringe/fringe_inactive)
M src/xfaces.c
added lisp object Qfringe_inactive
M src/xfns.c
personal preference (narrow scroll bar)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: obtained by cvs diff -u --]
[-- Type: text/x-patch, Size: 12484 bytes --]
Index: etc/TODO
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TODO,v
retrieving revision 1.61
diff -u -r1.61 TODO
--- etc/TODO 21 Nov 2003 18:23:27 -0000 1.61
+++ etc/TODO 18 Mar 2004 18:55:42 -0000
@@ -68,9 +68,6 @@
* Set fringe widths per-window/per-buffer.
-* Make fringe bitmaps user configurable. Maybe add ability to add
- additional bitmaps to the fringe from lisp.
-
Other features we would like:
* Have a command suggestion help system that recognizes patterns
Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.282
diff -u -r1.282 faces.el
--- lisp/faces.el 27 Feb 2004 17:30:23 -0000 1.282
+++ lisp/faces.el 18 Mar 2004 18:55:45 -0000
@@ -1923,6 +1923,19 @@
:version "21.1"
:group 'frames
:group 'basic-faces)
+;(put 'fringe-active 'face-alias 'fringe) ;deprecated, just to be clare
+
+(defface fringe-inactive
+ '((((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)
(defface scroll-bar '()
Index: lisp/ibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.57
diff -u -r1.57 ibuffer.el
--- lisp/ibuffer.el 1 Sep 2003 15:45:12 -0000 1.57
+++ lisp/ibuffer.el 18 Mar 2004 18:55:48 -0000
@@ -199,7 +199,7 @@
:group 'ibuffer)
(defcustom ibuffer-eliding-string "..."
- "The string to use for eliding long columns."
+ "The string to use for eliding long lines."
:type 'string
:group 'ibuffer)
Index: lisp/log-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/log-edit.el,v
retrieving revision 1.25
diff -u -r1.25 log-edit.el
--- lisp/log-edit.el 18 Mar 2004 02:48:51 -0000 1.25
+++ lisp/log-edit.el 18 Mar 2004 18:55:48 -0000
@@ -299,7 +299,7 @@
;;; Actual code
;;;
-(defar log-edit-font-lock-keywords
+(defvar log-edit-font-lock-keywords
'(("\\`\\(Summary:\\)\\(.*\\)"
(1 font-lock-keyword-face)
(2 font-lock-function-name-face))))
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.169
diff -u -r1.169 dispextern.h
--- src/dispextern.h 14 Mar 2004 00:28:01 -0000 1.169
+++ src/dispextern.h 18 Mar 2004 18:56:06 -0000
@@ -1172,6 +1172,22 @@
? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
: 0)
+/* Return the fringe mode relative to selected/unselected window */
+
+#define CURRENT_FRINGE_FACE_ID(W) \
+ ( ((W) == XWINDOW (selected_window)) \
+ ? FRINGE_FACE_ID \
+ : FRINGE_INACTIVE_FACE_ID)
+
+/* Return the fringe optional optional increment to FRINGE_FACE_ID
+ depending on active or inactive window */
+
+#define CURRENT_DELTA_FRINGE_FACE_ID(W) \
+ ( ((W) == XWINDOW (selected_window)) \
+ ? 0 \
+ : (FRINGE_INACTIVE_FACE_ID - FRINGE_FACE_ID))
+
+
/* Return the desired face id for the mode line of a window, depending
on whether the window is selected or not, or if the window is the
scrolling window for the currently active minibuffer window.
@@ -1519,6 +1535,7 @@
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
+ FRINGE_INACTIVE_FACE_ID,
HEADER_LINE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.10
diff -u -r1.10 fringe.c
--- src/fringe.c 1 Mar 2004 23:56:44 -0000 1.10
+++ src/fringe.c 18 Mar 2004 18:56:06 -0000
@@ -104,32 +104,32 @@
/* An arrow like this: `<-'. */
/*
- ...xx...
- ..xx....
- .xx.....
- xxxxxx..
- xxxxxx..
- .xx.....
- ..xx....
- ...xx...
+- ..... ...
+ ..x.. ...
+ .x... ...
+ xxxxx ...
+ .x... ...
+ ..x.. ...
+- ..... ...
+- ..... ...
*/
static unsigned short left_arrow_bits[] = {
- 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18};
+ 0x04, 0x08, 0x1f, 0x08, 0x04};
/* Right truncation arrow bitmap `->'. */
/*
- ...xx...
- ....xx..
- .....xx.
- ..xxxxxx
- ..xxxxxx
- .....xx.
- ....xx..
- ...xx...
+- ........
+ ... ..x..
+ ... ...x.
+ ... xxxxx
+ ... ...x.
+ ... ..x..
+- ........
+- ........
*/
static unsigned short right_arrow_bits[] = {
- 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18};
+ 0x04, 0x02, 0x1f, 0x02, 0x04};
/* Up arrow bitmap. */
@@ -163,31 +163,31 @@
/* Marker for continued lines. */
/*
- ..xxxx..
- ..xxxxx.
- ......xx
- ..x..xxx
- ..xxxxxx
- ..xxxxx.
- ..xxxx..
- ..xxxxx.
+- ........
+- ........
+- ........
+ .... xx.
+ .... ..x
+ .... x.x
+ .... xx.
+ .... xxx
*/
static unsigned short continued_bits[] = {
- 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
+ 0x06, 0x01, 0x05, 0x06, 0x07};
/* Marker for continuation lines. */
/*
- ..xxxx..
- .xxxxx..
- xx......
- xxx..x..
- xxxxxx..
- .xxxxx..
- ..xxxx..
- .xxxxx..
+ .... .xx
+ .... x..
+ .... x.x
+ .... .xx
+ .... xxx
+- ........
+- ........
+- ........
*/
static unsigned short continuation_bits[] = {
- 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
+ 0x03, 0x04, 0x05, 0x03, 0x07};
/* Overlay arrow bitmap. A triangular arrow. */
/*
@@ -413,13 +413,14 @@
struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] =
{
{ NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
+ /* bits, height, width,period, align , dynamic*/
{ FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
- { 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 },
{ FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
- { 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 },
{ FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
@@ -478,16 +479,19 @@
if (which != NO_FRINGE_BITMAP)
{
+ face_id = CURRENT_FRINGE_FACE_ID(w);
}
else if (left_p)
{
which = row->left_fringe_bitmap;
- face_id = row->left_fringe_face_id;
+ face_id = row->left_fringe_face_id
+ +CURRENT_DELTA_FRINGE_FACE_ID(w);
}
else
{
which = row->right_fringe_bitmap;
- face_id = row->right_fringe_face_id;
+ face_id = row->right_fringe_face_id
+ +CURRENT_DELTA_FRINGE_FACE_ID(w);
}
if (face_id == DEFAULT_FACE_ID)
@@ -800,7 +804,7 @@
else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
left = row->left_user_fringe_bitmap;
- left_face_id = row->left_user_fringe_face_id;
+ left_face_id = CURRENT_FRINGE_FACE_ID(w);//row->left_user_fringe_face_id;
}
else if (row->indicate_bob_p && boundary_pos <= 0)
left = ((row->indicate_eob_p && boundary_pos < 0)
@@ -826,7 +830,7 @@
else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
right = row->right_user_fringe_bitmap;
- right_face_id = row->right_user_fringe_face_id;
+ right_face_id = CURRENT_FRINGE_FACE_ID(w);//row->right_user_fringe_face_id+CURRENT_DELTA_FRINGE_FACE_ID(w);
}
else if (row->indicate_bob_p && boundary_pos > 0)
right = ((row->indicate_eob_p && boundary_pos >= 0)
@@ -853,15 +857,15 @@
|| row->visible_height != cur->visible_height
|| left != cur->left_fringe_bitmap
|| right != cur->right_fringe_bitmap
- || left_face_id != cur->left_fringe_face_id
- || right_face_id != cur->right_fringe_face_id
+ //|| left_face_id != cur->left_fringe_face_id
+ //|| right_face_id != cur->right_fringe_face_id
|| cur->redraw_fringe_bitmaps_p)
{
redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
cur->left_fringe_bitmap = left;
cur->right_fringe_bitmap = right;
- cur->left_fringe_face_id = left_face_id;
- cur->right_fringe_face_id = right_face_id;
+ cur->left_fringe_face_id = CURRENT_FRINGE_FACE_ID(w);//left_face_id;
+ cur->right_fringe_face_id = CURRENT_FRINGE_FACE_ID(w);//right_face_id;
}
if (row->overlay_arrow_p != cur->overlay_arrow_p)
@@ -872,8 +876,8 @@
row->left_fringe_bitmap = left;
row->right_fringe_bitmap = right;
- row->left_fringe_face_id = left_face_id;
- row->right_fringe_face_id = right_face_id;
+ row->left_fringe_face_id = CURRENT_FRINGE_FACE_ID(w);//left_face_id;
+ row->right_fringe_face_id = CURRENT_FRINGE_FACE_ID(w);//right_face_id;
}
return redraw_p;
@@ -992,7 +996,7 @@
if (n = XINT (which), n >= max_used_fringe_bitmap)
return Qnil;
- fringe_faces[n] = FRINGE_FACE_ID;
+ fringe_faces[n] = FRINGE_INACTIVE_FACE_ID;
fbp = &fringe_bitmaps[n];
if (*fbp && (*fbp)->dynamic)
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.462
diff -u -r1.462 window.c
--- src/window.c 4 Mar 2004 17:16:23 -0000 1.462
+++ src/window.c 18 Mar 2004 18:56:06 -0000
@@ -1775,8 +1775,10 @@
window = Fnext_window (window, Qnil, all_frames);
for (; i < 0; ++i)
window = Fprevious_window (window, Qnil, all_frames);
-
- Fselect_window (window, Qnil);
+ if (window != selected_window) {
+ //selected_window->circa row->redraw_fringe_bitmaps_p = 1;
+ Fselect_window (window, Qnil);
+ }
return Qnil;
}
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.289
diff -u -r1.289 xfaces.c
--- src/xfaces.c 9 Feb 2004 15:39:49 -0000 1.289
+++ src/xfaces.c 18 Mar 2004 18:56:07 -0000
@@ -322,7 +322,7 @@
/* Names of basic faces. */
-Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
+Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe, Qfringe_inactive;
Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
Lisp_Object Qmode_line_inactive;
extern Lisp_Object Qmode_line;
@@ -6626,6 +6626,7 @@
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
+ realize_named_face (f, Qfringe_inactive, FRINGE_INACTIVE_FACE_ID);
realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
@@ -7701,6 +7702,8 @@
staticpro (&Qregion);
Qfringe = intern ("fringe");
staticpro (&Qfringe);
+ Qfringe_inactive = intern ("fringe-inactive");
+ staticpro (&Qfringe_inactive);
Qheader_line = intern ("header-line");
staticpro (&Qheader_line);
Qscroll_bar = intern ("scroll-bar");
Index: src/xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.608
diff -u -r1.608 xfns.c
--- src/xfns.c 14 Mar 2004 00:28:46 -0000 1.608
+++ src/xfns.c 18 Mar 2004 18:56:18 -0000
@@ -1791,13 +1791,13 @@
#ifdef USE_TOOLKIT_SCROLL_BARS
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
- int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
+ int width = 8 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
/* Make the actual width at least 14 pixels and a multiple of a
character width. */
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = (6 + wid - 1) / wid;
/* Use all of that space (aside from required margins) for the
scroll bar. */
[-- Attachment #3: Type: text/plain, Size: 5272 bytes --]
Saluti,
MARco
--
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
In previous days i modify gpg source to support features (SHA-512
S10 and an optional different support of idea (w/o 3des S3) even if i
don't use idea), i generated the key with modified gpg... locally
it works, but when i register the key server on MIT, i obtain a
format error :(
Anyway if you can use it, my publik key follows
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.3.5 (GNU/Linux)
mQIPBEBVThsBECClepSJeDeoT8o/Q7tjCHkoau6nR5NCwSYw+nEr1wNiF6QH+XG5
ngCizUK1rxQkTooBBWhWy0tZBcMXJOGA1VoBbn14SHN3V584oTTbkoysf1mR+I2z
YyKxkH+HeCqIVQlrHNLvmetleXoxx6sEKXVbkDOPzr8a30P1VmL3CMhu8HWvmkWq
PsIcjtMPzA6Zn0eAjdbWCIEAArbuMN+Xy3IltneN2TP9HHKtd0701ioda8/vFlil
3ijPiHCt7ECSWyEJdLECbIqQoVI4qC5v1QOucX3xoQ1NdsieoKNQIA1qV3gzF2zb
QHwcgglBCaevoHhO/1J/llOuqwThfzLBWEWg05O/c1KwO64aXIoIv3plnFm/BEkq
4E3msf47yqc04QBjtUeQGcmrx++ip4aFiGl5orgoiAj9i5jXL5/byHKJ6p0dN65t
om5g11mgtM1z8J4KKhI3QMt6raxU4R4FvGvBY03mdo+hYVQPu6AqyVSwbGxynocO
ZDm20/xrjrDeozyTOKOzR+r1LMNSKWeKhtXFh76cBmeQ6L2oefZIEdVqdzZZIwsE
sq2MVB12kN6Gcw0ZlIPKddGn1uECpa8gyeppA2+9NqH0E8/K5DvpbVv6dvv6DpT0
Dykig8P291HE63TKqbHzsRcug8SUTWmub/jS2s2j2oiJ59icIjnYKSfdT8DgKdcA
Bim2AAAAKE1hcmNvIE11bmFyaSAoYWZkIG1haWwpIDxtYXJAYWxsZXJ0YS5pdD6J
AkAEEwECACYFAkBVT2sCGw8FCQWjmoAGCwoJCAcDBRUKCAIDAxYCAQIeAQIXgAAK
CRB3HUxoV0Kv1XfdEB4nX12LvJ0wE4pZ5Fald2UYDMjN6nsvgLnBzJK2R77lObUd
qV1DZVyQUNlG4FkXVvT/5EItL0cgUQpjQ1Rukrn6Rl/6/XktEG/vi9scl70Itx5y
8DvLv3ZSvdf8/0Hu1TK54j3lVjta7+zZ8vNZN49ZHEgXkeK25suyhRXoWeyCef1U
MkqWF/YEsCOkjNUAaop2ZFgZCOdcQOlEvgqNOD+uATDUty5aWI/e/iVrZgTni9Rb
ERVTibafziCYpraVc/2gm8efG8J98S9oBKHjYEmWaZUf9k83rKvQPShN05ArRBaS
m8ElDYLptM2ANE+hhLFXFKxNaKpgOx9M2ObQMkGYeZnRa60jmbIYtxftJH10tKdV
PRZOIqYafTvYQlx9WlwzBDJLuJ16jGnPblZYi3jj96t0FbRxd7PAWW6GA42Ilxsi
6+KUNrs4ZMIaIONE244pJ3AJGM0En7/FVbSPb72i+GyYWdVbciEXc30AwEFz47S6
GaVdqT53SQFhk4l0dAWvITR+euo7FXtJYVHw/FlJu50CDcFmDPdkZ767xfKksLuq
5TljOQMp5Y90ZfLmZqd5NCY2klGVOIAHcMZymaBkVDGH+GR3cy2VPuKr/5yZDys+
9OVxHTbFEVkRjyXA1/ya4xhiMCiRPk4H7OTmhRfslcPilO3ApqbUKMHmhGovQghP
Zv62AAAAKE1hcmNvIE11bmFyaSAocHViIG1haWwgaW50IHMpIDxtYXJAaS5hbT6J
AkMEEwECACkCGw8FCQWjmoAGCwoJCAcDBRUKCAIDAxYCAQIeAQIXgAUCQFVUhgIZ
AQAKCRB3HUxoV0Kv1SbdEB9voEpyqGk+JDrOXI9v/Kmj+HKtXaqFxm4GXUAK/jMc
p5AtBoFLB6B+4da7TTp4AXcJb0ezo818L1w4xQnfov5nHVeamv1Vdt3Vl8RzsoY0
gf7Rx3n9BPiuX+9LQzhufKHsVuEDney49xRevNbR0Pw1HzB2MGQ/wzrO/D4FlVW8
TmIlYvSHLyJ79hlvPF+CgaUkwuC6upxneRedk9Ksha8tcT4Y7Buqi7/8iuSQyBft
ref+aZuzjPLVAGUeNVFSHoNNNGQ3n+QFcvJrGTVfR6tkUB5iD8AYADe9Kqy02r4L
+DxPpu/GRDY/VInvGAtk+O30HJW92NEgbPIf25sqy2TVQOO/gYfIy1OTlbALsG6K
g4dGCMHc0wzHBOdHDMfEu8gtLlsMdqhjrMrELjaTqIAENgEPfzyiYa9NgukEQvj7
696AdGX0LTEya5GAXEhpT882+AhsExa/yMbjS5cWOjHKEZNWptmz+W5HCoLZEtSQ
LBY+Bjfllq9cAbC2Cvh/1Oqm9pye+/2p0jmHqjtfGJoOy6aj14xkVKzPzXvUddSh
HgvGv9HyIT0OiOYjbzbokRrsotvQcHvOnopNT6LrC++2Rov/xalA13XqMkgCxeIj
KjYua/BOW9a5hyu/syAavHZFDRP+PmfroQAkFAk5+GnebT2a43U/+F9cEj/ftczE
IuYoIQTRw0PDQQEQAAEBAAAAAAAAAAAAAAAA/9j/4AAQSkZJRgABAQEASABIAAD/
2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsL
EBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQU
FBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAAY
ADIDASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAAAAcEBgIFCAP/xAAtEAAB
AwMEAAUEAQUAAAAAAAABAgMEBQYRAAcSIQgTFDFhCSJRcYEjJDJCof/EABgBAAMB
AQAAAAAAAAAAAAAAAAIDBAUB/8QAIhEAAgICAgAHAAAAAAAAAAAAAQIAEQNBMbEF
EhMhYYGR/9oADAMBAAIRAxEAPwDmm1ZlW2/rMe3WKzEpSX2UhinMo5KcQMJ8xf2F
Kc4J5LIBOrdPiW5XKg5AuvbqmXFNXlSkRGUwZvH3CipoNrWcfd1nrHXetBuDu61t
PuVYVakU5qo0GrUKFLkpLeXEOJcdHNByMkJUOj131g96ftM3z2EpddXue9X4j815
tSlUwyy7/UUgpKjF4eYVEE9Hr37A1ITWpvqqsKBHto0O4maN4F7N3eW+bVq9csua
k5VArDCZjaT+AR5a0j5PI6j3F9NdW30Zc65r7S/Eb7LFKpyi458BS1gJP8H9at+3
P1EKfVfEBQYKqHGodhyHjB9bKP8AdN+YcIcWQeCWwrGU98QSeRxjTK8d/jIVspuH
QLYt6n06uVBhr1tSRNCillKxhpA4kYWRlXecAoODnSQ2e6lLY/DyDkHANb6nNrW1
23lpssIYsiat9Z4tVG55ZXzV17MpCUqHY/0V7++sNwqa9RKdFjOppVBRJeTH9Iae
lpCXFJ6QtKGQEBXeOYGe/cAnTbp3iv2V31tumtXhFes2qUjk6Wy+QmRyIKh5iUK8
wEpT7pSr4ONUO6d/aXv3v5aNtWjCbFBXIbbmSHYwJfjNEOqbbDg5JSEtn7iArIGM
Y7cC2xJWXELKEUeK39c/sU0/w/09ydIWs+nWpxRUy0ohCDn/ABHwPbRrwv7d9un3
1cUVOSlioyGgR7HDqh+fjRp4uZx9MHiaLeO6ol3bR7SvoeSufBhy6bKQDlSPKW3w
z+0qB/nSc0aNGBQkzsWaz8dQ1KqdVm1qa5MqEt+dLcAC5ElwuOKwABlRJJwAB+gN
GjXYuRdPHwhVmnWruNWblqbiG2qHQJk1vmQCpeEthI+SHCB+9GjQsLFRuI+Vww1E
rPmu1KdJlvq5PPuKdWr8qUcn/p0aNGiip//ZiQJABBMBAgAmBQJAVU7gAhsPBQkF
o5qABgsKCQgHAwUVCggCAwMWAgECHgECF4AACgkQdx1MaFdCr9X3DRAfQ7Q9uehx
DK34SAJS6x+HP+/n4uyk6xDGOxW7qOiDqJxBynbORvm4t4iF6zrkLRWuV3x7NKN4
hEwExQhwhmA7XZ3EmzUvmmMwFKBr/XKalD2eRwecV1yJUJwY24pJYyeeXsSN+1Zw
S2cMgL6C8Gf2KLl82jyLKdQEzsewtyLNZ2ofsoZUANbn//2LKfiVvjmnynCwMZ05
0PsRHHViTKMgCun0xVVVvDE70KkTKnwFoqEJTtfB2uJNCyRqrnMDTQ6Smjve4xyf
uiMXr76GfJBpwAV37ZtwWoe/uq8ki+cxAkTl2qVJR9URSl1sHIILz3osIB+UqZm/
nWY0xUCOwsw6GjqNCDuiw2NXJiYD9DQ6ggA9Z/LXyFWTLiUWrDxV/GJLxZtPAL4C
GGETTRXFR/lf5rphY0U4zHPqO4MMedC7YK1/gtcPyQ3Kkp9qBhj/43eAF2Is1zhN
AUFeU21uYaGYOs+mG50FyxEgKRH4XW/YZYDTPZJwqmzzLk+p/Cmuym3rT5Bdd3jF
GS1R76lGehxQKiRW5zE9x6k1H0EAGHC/tx00uDwsvTkhBv3fgYJr2GPrMQE8vdr4
tJJxEZmwTbaBAH/sNZV2Vad+8XyZpynFGnxpOb7mmpqaJU3ODRRDXmQ0L/TxYgvH
xt1XWJbPxNXQ58aPq/5JPueFnxDDaBpPNeiCc8AR
=9Otj
-----END PGP PUBLIC KEY BLOCK-----
[-- Attachment #4: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-18 19:05 ` Marco Munari 16473.54072
@ 2004-03-18 23:43 ` Kim F. Storm
2004-03-19 3:44 ` Marco Munari
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-03-18 23:43 UTC (permalink / raw)
Cc: emacs-devel
mar@i.am (Marco Munari 16473.54072) writes:
> ~\/~ "Kim" == Kim F Storm <storm@cua.dk> writes:
> ...
> Kim> Stay tuned :-)
>
> ok :)
>
> As M.B. suggests i switch to FRINGE_FACE_ID and FRINGE_INACTIVE_FACE_ID
> naming notation. (a reason exists).
>
I agree with Miles.
>
> I don't understand why you (Kim) introduces (on 2004-02-09 as Changelog)
> right_user_fringe_face_id and left_user_fringe_face_id
These are used to keep track of user defined faces for specific fringe
bitmaps. So contrary to fringe_face_id, they are dynamic.
See gdb-ui.el for an example; that's how we can show a "red bullet"
bitmap for a gdb breakpoint.
>
>
> The respect of this user capability create to me dubts on
> what it's better... how to create optional left_user_fringe_inactive_face_id
> and _user_fringe_inactive_face_id,
> i can introduce differential face_id number
>
> an highlight function of fringe could respect more by default left
> and right fringe user preference.
>
> an updated patch containing following modification follows:
>
> M etc/TODO
> removed DONE stuff
> (just for rem, because you are the one who made fringe user configurable)
>
> M lisp/faces.el
> added face fringe-inactive
>
> M lisp/ibuffer.el
> text fix in desc: long lines implies big column values, not "long columns"!
>
> M lisp/log-edit.el
> fix tipo: defar insted defvar
>
> M src/dispextern.h
> added basic face FRINGE_INACTIVE_FACE_ID
> added macro CURRENT_FRINGE_FACE_ID(W): returns the
> FRINGE*_FACE_ID depending on window (selected/unselected)
> added macro CURRENT_DELTA_FRINGE_FACE_ID(W), it's an idea (to be discussed)
I think use of fringe-inactive should as a minimum be customizable.
Either by testing Vmode_line_in_non_selected_windows, or better add a
new Vfringe_in_non_selected_windows variable to control this.
>
> M src/fringe.c
> partially disabled user left and right fringe configurable
> to set brutally to current basic fringe (should be discussed)
> maybe we need to define right_user_fringe_inactive_face_id
> right_user_fringe_inactive_face_id (better if a delta compatible to
> CURRENT_DELTA_FRINGE_FACE_ID.. it's just a possibility far to be the best)
This is definitely the wrong approach for face selection.
A simple approach would be to use fringe-inactive unconditionally in
non-selected windows, and the fringe face (or user defined face) in
selected window.
A more flexible approach would be for the code which does the actual fg/bg
color selection to look at fringe-inactive face colors if current
window is non-selected and actual face's colors match the fringe face
colors.
Your new tiny arrows are your personal preferences. Since you can now
define your own alternative bitmaps, I don't see a need to change
the defaults.
You could write code to (e.g. a use-tiny-fringe-arrows defcustom)
which installs (and removes) your custom bitmaps via suitable calls to
define-fringe-bitmap. We could then installed it in fringe.el.
>
> M src/window.c
> other-window call Fselect_window only if selected_window is
> effectively a new one (this modify enlight task when only 1 window is
> in the farme for either mode-line-fringe/mode-line-inactive
> and fringe/fringe_inactive)
That seems like a good idea.
>
> M src/xfaces.c
> added lisp object Qfringe_inactive
>
> M src/xfns.c
> personal preference (narrow scroll bar)
This is supposed to be customizable via the scroll-bar-width frame parameter.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-18 23:43 ` Kim F. Storm
@ 2004-03-19 3:44 ` Marco Munari
2004-03-19 14:04 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Marco Munari @ 2004-03-19 3:44 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]
~\/~ "Kim" == Kim F Storm <storm@cua.dk> writes:
Kim> I think use of fringe-inactive should as a minimum be customizable.
Kim~> mode_line_in_non_selected_windows, or better add a new
Kim~> fringe_in_non_selected_windows variable to control this.
Assumption: Window managers call "window" what emacs calls "frame" and
emacs calls "window" the partitioned/split text area; is it allways so for
emacs and you?
moreover... Is there a difference between "selected" and "active" window?
(sometime i have the impression that "active window" in emacs is used for
"acrive frame"), if i whatch more the code i can find answare on my own,
but apparently you prefere the short cut.
I can add fringe_in_non_selected_windows locally (i can't do elsewhere),
but how do you preferre to syncronize idea in the code? You know emacs
code more than me and you have write access to cvs, not all file
patched by me are in the best way and i know.
> > M src/fringe.c
> > partially disabled user left and right fringe configurable to
> > set brutally to current basic fringe (should be discussed)
> > maybe we need to define right_user_fringe_inactive_face_id
~ > > left_user_fringe_inactive_face_id (better if a delta compatible
> > to CURRENT_DELTA_FRINGE_FACE_ID..
> > it's just a possibility far to be the best)
Kim> This is definitely the wrong approach for face selection.
the patch sent even of that file was my try to stay tuned,
i made CURRENT_DELTA_FRINGE_FACE_ID macro (do you referre to that one?)
few minuts before send the patch (i was in dubt to comment it)
Kim> A simple approach would be to use fringe-inactive unconditionally
Kim> in non-selected windows, and the fringe face (or user defined
Kim> face) in selected window.
Yes, i didn't realize it is what i should do, now it's OK.
(it is the whole cvs diff, so following patch has even previous
fringe.c bitmaps redefinition, i will move that code later)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: updated patch --]
[-- Type: text/x-patch, Size: 13862 bytes --]
? mar_emacs_cvs.diff
? mar_emacs_cvs.patch
? lispintro/Makefile.in.cvs6modified
? lispref/display.dvi
Index: AUTHORS
===================================================================
RCS file: /cvsroot/emacs/emacs/AUTHORS,v
retrieving revision 1.21
diff -u -r1.21 AUTHORS
--- AUTHORS 15 Feb 2004 00:01:26 -0000 1.21
+++ AUTHORS 19 Mar 2004 03:35:00 -0000
@@ -1118,6 +1118,9 @@
Marco Melgazzi: changed term.el
+Marco Munari: changed faces.el xfaces.c dispextern.h window.c fringe.el
+ fringe.c xfns.c
+
Marco Walther: changed mips-siemens.h unexelfsni.c unexsni.c
Marcus G. Daniels: changed xterm.c configure.in lwlib-Xm.c lwlib.c
Index: etc/TODO
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TODO,v
retrieving revision 1.61
diff -u -r1.61 TODO
--- etc/TODO 21 Nov 2003 18:23:27 -0000 1.61
+++ etc/TODO 19 Mar 2004 03:35:01 -0000
@@ -68,9 +68,6 @@
* Set fringe widths per-window/per-buffer.
-* Make fringe bitmaps user configurable. Maybe add ability to add
- additional bitmaps to the fringe from lisp.
-
Other features we would like:
* Have a command suggestion help system that recognizes patterns
Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.282
diff -u -r1.282 faces.el
--- lisp/faces.el 27 Feb 2004 17:30:23 -0000 1.282
+++ lisp/faces.el 19 Mar 2004 03:35:04 -0000
@@ -1923,6 +1923,19 @@
:version "21.1"
:group 'frames
:group 'basic-faces)
+;(put 'fringe-active 'face-alias 'fringe) ;deprecated, just to be clare
+
+(defface fringe-inactive
+ '((((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)
(defface scroll-bar '()
Index: lisp/ibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.57
diff -u -r1.57 ibuffer.el
--- lisp/ibuffer.el 1 Sep 2003 15:45:12 -0000 1.57
+++ lisp/ibuffer.el 19 Mar 2004 03:35:16 -0000
@@ -199,7 +199,7 @@
:group 'ibuffer)
(defcustom ibuffer-eliding-string "..."
- "The string to use for eliding long columns."
+ "The string to use for eliding long lines."
:type 'string
:group 'ibuffer)
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.169
diff -u -r1.169 dispextern.h
--- src/dispextern.h 14 Mar 2004 00:28:01 -0000 1.169
+++ src/dispextern.h 19 Mar 2004 03:35:16 -0000
@@ -1172,6 +1172,20 @@
? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
: 0)
+/* Return the fringe mode relative to selected/unselected window,
+ parameters W the window, AFFID Active Fringe Face ID */
+
+#define CURRENT_FRINGE_FACE_ID_2(W,AFFID) \
+ (fringe_in_non_selected_windows \
+ || ((W) == XWINDOW (selected_window)) \
+ ? AFFID \
+ : FRINGE_INACTIVE_FACE_ID)
+
+/* see above, FRINGE_FACE_ID is the default */
+
+#define CURRENT_FRINGE_FACE_ID(W) \
+ CURRENT_FRINGE_FACE_ID_2(W,FRINGE_FACE_ID)
+
/* Return the desired face id for the mode line of a window, depending
on whether the window is selected or not, or if the window is the
scrolling window for the currently active minibuffer window.
@@ -1519,6 +1533,7 @@
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
+ FRINGE_INACTIVE_FACE_ID,
HEADER_LINE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
@@ -2522,6 +2537,7 @@
extern Lisp_Object Qtool_bar;
extern Lisp_Object Vshow_trailing_whitespace;
extern int mode_line_in_non_selected_windows;
+extern int fringe_in_non_selected_windows;
extern int redisplaying_p;
extern Lisp_Object Vimage_types;
extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.10
diff -u -r1.10 fringe.c
--- src/fringe.c 1 Mar 2004 23:56:44 -0000 1.10
+++ src/fringe.c 19 Mar 2004 03:35:16 -0000
@@ -104,32 +104,32 @@
/* An arrow like this: `<-'. */
/*
- ...xx...
- ..xx....
- .xx.....
- xxxxxx..
- xxxxxx..
- .xx.....
- ..xx....
- ...xx...
+- ..... ...
+ ..x.. ...
+ .x... ...
+ xxxxx ...
+ .x... ...
+ ..x.. ...
+- ..... ...
+- ..... ...
*/
static unsigned short left_arrow_bits[] = {
- 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18};
+ 0x04, 0x08, 0x1f, 0x08, 0x04};
/* Right truncation arrow bitmap `->'. */
/*
- ...xx...
- ....xx..
- .....xx.
- ..xxxxxx
- ..xxxxxx
- .....xx.
- ....xx..
- ...xx...
+- ........
+ ... ..x..
+ ... ...x.
+ ... xxxxx
+ ... ...x.
+ ... ..x..
+- ........
+- ........
*/
static unsigned short right_arrow_bits[] = {
- 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18};
+ 0x04, 0x02, 0x1f, 0x02, 0x04};
/* Up arrow bitmap. */
@@ -163,31 +163,31 @@
/* Marker for continued lines. */
/*
- ..xxxx..
- ..xxxxx.
- ......xx
- ..x..xxx
- ..xxxxxx
- ..xxxxx.
- ..xxxx..
- ..xxxxx.
+- ........
+- ........
+- ........
+ .... xx.
+ .... ..x
+ .... x.x
+ .... xx.
+ .... xxx
*/
static unsigned short continued_bits[] = {
- 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e};
+ 0x06, 0x01, 0x05, 0x06, 0x07};
/* Marker for continuation lines. */
/*
- ..xxxx..
- .xxxxx..
- xx......
- xxx..x..
- xxxxxx..
- .xxxxx..
- ..xxxx..
- .xxxxx..
+ .... .xx
+ .... x..
+ .... x.x
+ .... .xx
+ .... xxx
+- ........
+- ........
+- ........
*/
static unsigned short continuation_bits[] = {
- 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
+ 0x03, 0x04, 0x05, 0x03, 0x07};
/* Overlay arrow bitmap. A triangular arrow. */
/*
@@ -413,13 +413,14 @@
struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] =
{
{ NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
+ /* bits, height, width,period, align , dynamic*/
{ FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
- { 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 },
{ FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
- { 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 },
{ FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
@@ -478,20 +479,21 @@
if (which != NO_FRINGE_BITMAP)
{
+ face_id = CURRENT_FRINGE_FACE_ID(w);
}
else if (left_p)
{
which = row->left_fringe_bitmap;
- face_id = row->left_fringe_face_id;
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, row->left_fringe_face_id);
}
else
{
which = row->right_fringe_bitmap;
- face_id = row->right_fringe_face_id;
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, row->right_fringe_face_id);
}
if (face_id == DEFAULT_FACE_ID)
- face_id = fringe_faces[which];
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, fringe_faces[which]);
fb = fringe_bitmaps[which];
if (fb == NULL)
@@ -800,7 +802,8 @@
else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
left = row->left_user_fringe_bitmap;
- left_face_id = row->left_user_fringe_face_id;
+ left_face_id =
+ CURRENT_FRINGE_FACE_ID_2(w,row->left_user_fringe_face_id);
}
else if (row->indicate_bob_p && boundary_pos <= 0)
left = ((row->indicate_eob_p && boundary_pos < 0)
@@ -826,7 +829,8 @@
else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
right = row->right_user_fringe_bitmap;
- right_face_id = row->right_user_fringe_face_id;
+ right_face_id =
+ CURRENT_FRINGE_FACE_ID_2(w,row->right_user_fringe_face_id);
}
else if (row->indicate_bob_p && boundary_pos > 0)
right = ((row->indicate_eob_p && boundary_pos >= 0)
@@ -853,15 +857,15 @@
|| row->visible_height != cur->visible_height
|| left != cur->left_fringe_bitmap
|| right != cur->right_fringe_bitmap
- || left_face_id != cur->left_fringe_face_id
+ || le22ft_face_id != cur->left_fringe_face_id
|| right_face_id != cur->right_fringe_face_id
|| cur->redraw_fringe_bitmaps_p)
{
redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
cur->left_fringe_bitmap = left;
cur->right_fringe_bitmap = right;
- cur->left_fringe_face_id = left_face_id;
- cur->right_fringe_face_id = right_face_id;
+ cur->left_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,left_face_id);
+ cur->right_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,right_face_id);
}
if (row->overlay_arrow_p != cur->overlay_arrow_p)
@@ -872,8 +876,8 @@
row->left_fringe_bitmap = left;
row->right_fringe_bitmap = right;
- row->left_fringe_face_id = left_face_id;
- row->right_fringe_face_id = right_face_id;
+ row->left_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,left_face_id);
+ row->right_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,right_face_id);
}
return redraw_p;
@@ -992,7 +996,7 @@
if (n = XINT (which), n >= max_used_fringe_bitmap)
return Qnil;
- fringe_faces[n] = FRINGE_FACE_ID;
+ fringe_faces[n] = FRINGE_INACTIVE_FACE_ID;
fbp = &fringe_bitmaps[n];
if (*fbp && (*fbp)->dynamic)
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.462
diff -u -r1.462 window.c
--- src/window.c 4 Mar 2004 17:16:23 -0000 1.462
+++ src/window.c 19 Mar 2004 03:35:21 -0000
@@ -129,6 +129,10 @@
minibuffer is active. */
int mode_line_in_non_selected_windows;
+/* Non-zero means to use fringe-inactive face in all windows but the
+ selected-window. */
+int fringe_in_non_selected_windows;
+
/* If a window gets smaller than either of these, it is removed. */
EMACS_INT window_min_height;
@@ -1775,8 +1779,10 @@
window = Fnext_window (window, Qnil, all_frames);
for (; i < 0; ++i)
window = Fprevious_window (window, Qnil, all_frames);
-
- Fselect_window (window, Qnil);
+ if (window != selected_window) {
+ //selected_window->circa row->redraw_fringe_bitmaps_p = 1;
+ Fselect_window (window, Qnil);
+ }
return Qnil;
}
@@ -6474,6 +6480,10 @@
doc: /* Non-nil means to use `mode-line-inactive' face in non-selected windows.
If the minibuffer is active, the `minibuffer-scroll-window' mode line
is displayed in the `mode-line' face. */);
+ mode_line_in_non_selected_windows = 1;
+
+ DEFVAR_BOOL ("fringe-in-non-selected-windows", &fringe_in_non_selected_windows,
+ doc: /* Non-nil means to use `fringe-inactive' face in non-selected windows. */);
mode_line_in_non_selected_windows = 1;
DEFVAR_LISP ("other-window-scroll-buffer", &Vother_window_scroll_buffer,
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.289
diff -u -r1.289 xfaces.c
--- src/xfaces.c 9 Feb 2004 15:39:49 -0000 1.289
+++ src/xfaces.c 19 Mar 2004 03:35:25 -0000
@@ -322,7 +322,7 @@
/* Names of basic faces. */
-Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
+Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe, Qfringe_inactive;
Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
Lisp_Object Qmode_line_inactive;
extern Lisp_Object Qmode_line;
@@ -6626,6 +6626,7 @@
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
+ realize_named_face (f, Qfringe_inactive, FRINGE_INACTIVE_FACE_ID);
realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
@@ -7701,6 +7702,8 @@
staticpro (&Qregion);
Qfringe = intern ("fringe");
staticpro (&Qfringe);
+ Qfringe_inactive = intern ("fringe-inactive");
+ staticpro (&Qfringe_inactive);
Qheader_line = intern ("header-line");
staticpro (&Qheader_line);
Qscroll_bar = intern ("scroll-bar");
Index: src/xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.608
diff -u -r1.608 xfns.c
--- src/xfns.c 14 Mar 2004 00:28:46 -0000 1.608
+++ src/xfns.c 19 Mar 2004 03:35:30 -0000
@@ -1791,13 +1791,13 @@
#ifdef USE_TOOLKIT_SCROLL_BARS
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
- int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
+ int width = 8 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
/* Make the actual width at least 14 pixels and a multiple of a
character width. */
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = (6 + wid - 1) / wid;
/* Use all of that space (aside from required margins) for the
scroll bar. */
[-- Attachment #3: Type: text/plain, Size: 2274 bytes --]
PS: the rest of the mail is draft AS IS during composition, i go now.
Saluti,
MARco
Kim> A more flexible approach would be for the code which does the
Kim> actual fg/bg color selection to look at fringe-inactive face
Kim> colors if current window is non-selected and actual face's colors
Kim> match the fringe face colors.
It appare you like very much fixed color customization (insted i
prefere to think the passage from monocrome to generic color image
(a newline-arrow bitmap for example could have 3D aspect if it's
a color image)
i think there are some more interesting customization to think on...
minibuffer positioning
bottom(default) and top, than absolute or relative to selected window
Kim> Your new tiny arrows are your personal preferences. Since you
Kim> can now define your own alternative bitmaps, I don't see a need
Kim> to change the defaults.
as in the comments of my first post, i use those bitmap since the
code was in xdisp.c, when you move the bitmap to fringe.c i changed
the bitmap there, when you introduce the costomization capability
notice i resize and position the bitmaps
Kim> You could write code to (e.g. a use-tiny-fringe-arrows defcustom)
Kim> which installs (and removes) your custom bitmaps via suitable
Kim> calls to define-fringe-bitmap. We could then installed it in
Kim> fringe.el.
Kim> >
Kim> > M src/window.c
Kim> > other-window call Fselect_window only if selected_window is
Kim> > effectively a new one (this modify enlight task when only 1 window is
Kim> > in the farme for either mode-line-fringe/mode-line-inactive
Kim> > and fringe/fringe_inactive)
Kim> That seems like a good idea.
it's just an optimization.
Kim> >
Kim> > M src/xfaces.c > added lisp object Qfringe_inactive
Kim> > M src/xfns.c > personal preference (narrow scroll bar)
Kim> This is supposed to be customizable via the scroll-bar-width
Kim> frame parameter.
i compiled with --with-x-toolkit=yes --without-toolkit-scroll-bars
but setting scroll-bar-width don't change the width of scroll bar
it works after long time
--
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
[-- Attachment #4: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-19 3:44 ` Marco Munari
@ 2004-03-19 14:04 ` Kim F. Storm
2004-03-21 3:27 ` Marco Munari
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-03-19 14:04 UTC (permalink / raw)
Marco Munari <mar@i.am> writes:
> Assumption: Window managers call "window" what emacs calls "frame" and
> emacs calls "window" the partitioned/split text area; is it allways so for
> emacs and you?
Yes.
> moreover... Is there a difference between "selected" and "active" window?
> (sometime i have the impression that "active window" in emacs is used for
> "acrive frame"), if i whatch more the code i can find answare on my own,
> but apparently you prefere the short cut.
No, active window and selected window are (or should be) the same thing.
However, there are some border cases, eg. if you are in a window, X,
and enter the minibuffer, e.g. by typing C-x C-f, the minibuffer
window is (of course) selected/active, but window X is still
considered the "selected window" in terms of
mode-line-in-non-selected-windows functionality.
Please see the doc string for that variable.
>
> I can add fringe_in_non_selected_windows locally (i can't do elsewhere),
> but how do you preferre to syncronize idea in the code? You know emacs
> code more than me and you have write access to cvs, not all file
> patched by me are in the best way and i know.
Just post your patches here; I can install them for you when time comes.
> Kim> A simple approach would be to use fringe-inactive unconditionally
> Kim> in non-selected windows, and the fringe face (or user defined
> Kim> face) in selected window.
>
> Yes, i didn't realize it is what i should do, now it's OK.
> (it is the whole cvs diff, so following patch has even previous
> fringe.c bitmaps redefinition, i will move that code later)
That's ok. In any case, I'm not going to install anything until RMS
tells me that yours papers have arrived.
> Index: AUTHORS
> ===================================================================
Don't patch AUTHORS file. It is machine generated.
> +(defface fringe-inactive
> + '((((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)
Maybe fringe-inactive should inherit from fringe face (or vice versa)?
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
> retrieving revision 1.169
> diff -u -r1.169 dispextern.h
> --- src/dispextern.h 14 Mar 2004 00:28:01 -0000 1.169
> +++ src/dispextern.h 19 Mar 2004 03:35:16 -0000
> @@ -1172,6 +1172,20 @@
> ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
> : 0)
>
> +/* Return the fringe mode relative to selected/unselected window,
> + parameters W the window, AFFID Active Fringe Face ID */
> +
> +#define CURRENT_FRINGE_FACE_ID_2(W,AFFID) \
> + (fringe_in_non_selected_windows \
Don't you mean !fringe_in_non_selected_windows here ?
> + DEFVAR_BOOL ("fringe-in-non-selected-windows", &fringe_in_non_selected_windows,
> + doc: /* Non-nil means to use `fringe-inactive' face in non-selected windows. */);
> mode_line_in_non_selected_windows = 1;
You mean fringe-in-non-selected-windows here.
> Kim> A more flexible approach would be for the code which does the
> Kim> actual fg/bg color selection to look at fringe-inactive face
> Kim> colors if current window is non-selected and actual face's colors
> Kim> match the fringe face colors.
>
> It appare you like very much fixed color customization (insted i
> prefere to think the passage from monocrome to generic color image
> (a newline-arrow bitmap for example could have 3D aspect if it's
> a color image)
My current approach is a step-wise improvement to the original
mono-crome fringe code. Adding full image support in the fringe would
be ok, but like you I think there are more important things to work
on, so the current level of functionality is based on "need to have"
(and can be done with reasonable efforts) rather than "nice to have"
(which requires more work).
>
> i think there are some more interesting customization to think on...
> minibuffer positioning
> bottom(default) and top, than absolute or relative to selected window
Feel free to work on it :-)
>
> notice i resize and position the bitmaps
You can do that with define-fringe-bitmap as well. Please report
it as a bug if it doesn't work.
> Kim> > M src/xfns.c > personal preference (narrow scroll bar)
>
> Kim> This is supposed to be customizable via the scroll-bar-width
> Kim> frame parameter.
>
> i compiled with --with-x-toolkit=yes --without-toolkit-scroll-bars
> but setting scroll-bar-width don't change the width of scroll bar
> it works after long time
How do you set the scroll-bar width?
(modify-frame-parameters nil '((scroll-bar-width . 12)))
works for me.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-19 14:04 ` Kim F. Storm
@ 2004-03-21 3:27 ` Marco Munari
2004-03-22 10:59 ` Kim F. Storm
0 siblings, 1 reply; 59+ messages in thread
From: Marco Munari @ 2004-03-21 3:27 UTC (permalink / raw)
Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 661 bytes --]
related to previous discussion with Kim and , an updated patch follows
the additional news:
fringe.c: i remove my bitmap redefinition (but i keep change
on default ALIGN of thos bitmap), and i move my bitmaps in a
customizable variable fringe-bitmap-group in fringe.el, which can be
default nil
tiny (0)
small (1)
medium (2)
all bitmaps valuea are defined in a octal string,
i was in dubt about the name of fringe-bitmap-group, is it fine or it
is better fringe-bitmaps-group or something else?
The fringe/fringe_inactive now react fine istantly when mouse is
moved or another window is selected.
[I'm waiting papers in my address box in Italy, right?]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Updated patch --]
[-- Type: text/x-patch, Size: 19043 bytes --]
? mar_emacs_cvs.diff
? mar_emacs_cvs.patch
? lispintro/Makefile.in.cvs6modified
? lispref/display.dvi
Index: etc/TODO
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/TODO,v
retrieving revision 1.62
diff -u -r1.62 TODO
--- etc/TODO 19 Mar 2004 21:10:10 -0000 1.62
+++ etc/TODO 21 Mar 2004 02:53:33 -0000
@@ -63,6 +63,11 @@
* Remove the limitation that window and frame widths and heights can
be only full columns/lines.
+* Move fringe to be displayed between display margins and text area.
+ [KFS is looking into this].
+
+* Set fringe widths per-window/per-buffer.
+
Other features we would like:
* Have a command suggestion help system that recognizes patterns
Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.282
diff -u -r1.282 faces.el
--- lisp/faces.el 27 Feb 2004 17:30:23 -0000 1.282
+++ lisp/faces.el 21 Mar 2004 02:53:36 -0000
@@ -1923,6 +1923,21 @@
:version "21.1"
:group 'frames
:group 'basic-faces)
+;(put 'fringe-active 'face-alias 'fringe) ;deprecated, just to be clare
+
+(defface fringe-inactive
+ '((t
+ :inherit fringe)
+ (((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)
(defface scroll-bar '()
Index: lisp/fringe.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/fringe.el,v
retrieving revision 1.11
diff -u -r1.11 fringe.el
--- lisp/fringe.el 15 Mar 2004 07:27:02 -0000 1.11
+++ lisp/fringe.el 21 Mar 2004 02:53:36 -0000
@@ -229,6 +229,199 @@
0)
(float (frame-char-width))))
+
+; control default fringe group of bitmaps
+
+(defvar fringe-bitmap-group nil)
+(setq fringe-bitmap-group nil) ;orrible, but a way to avoid undefined in conditions
+
+(defun set-fringe-bitmap-group (symbol value)
+ "Set frimge-bitmap-group (SYMBOL) to VALUE and put into effect.
+See custom `fringe-bitmap-group' for possible values and their effect."
+ (cond ((eq 0 value)
+ (progn ;string numbers are expressed in \octal or \xhex
+ (define-fringe-bitmap "\4\17\4" nil 4 'center
+ left-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\2\17\2" nil 4 'center
+ right-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\2\7\2\2\2" nil 3 'top
+ up-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\2\2\2\7\2" nil 3 'bottom
+ down-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\6\1\5\6\7" nil 3 'bottom
+ continued-line-fringe-bitmap)
+ (define-fringe-bitmap "\3\4\5\3\7" nil 3 'top
+ continuation-line-fringe-bitmap)
+ (define-fringe-bitmap "\7\4\4" nil 3 'top
+ top-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\7\1\1" nil 3 'top
+ top-right-angle-fringe-bitmap)
+ (define-fringe-bitmap "\4\4\7" nil 3 'bottom
+ bottom-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\1\1\7" nil 3 'bottom
+ bottom-right-angle-fringe-bitmap)))
+ ((eq 1 value)
+ (progn
+ (define-fringe-bitmap "\4\10\37\10\4" nil 5 'center
+ left-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\4\2\37\2\4" nil 5 'center
+ right-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\4\16\25\4\4\4" nil 5 'top
+ up-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\4\4\4\25\16\4" nil 5 'bottom
+ down-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\6\1\11\12\14\16" nil 4 'bottom
+ continued-line-fringe-bitmap)
+ (define-fringe-bitmap "\6\10\11\5\3\7" nil 4 'top
+ continuation-line-fringe-bitmap)
+ (define-fringe-bitmap "\17\10\10\10" nil 4 'top
+ top-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\17\1\1\1" nil 4 'top
+ top-right-angle-fringe-bitmap)
+ (define-fringe-bitmap "\10\10\10\17" nil 4 'bottom
+ bottom-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\1\1\1\17" nil 4 'bottom
+ bottom-right-angle-fringe-bitmap)))
+ ((eq 2 value)
+ (progn
+ (define-fringe-bitmap "\4\10\20\77\20\10\4" nil 6 'center
+ left-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\10\4\2\77\2\4\10" nil 6 'center
+ right-truncation-fringe-bitmap)
+ (define-fringe-bitmap "\10\34\52\111\10\10" nil 7 'top
+ up-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\10\10\111\52\34\10" nil 7 'bottom
+ down-arrow-fringe-bitmap)
+ (define-fringe-bitmap "\16\1\21\26\34\37" nil 5 'bottom
+ continued-line-fringe-bitmap)
+ (define-fringe-bitmap "\10\20\21\15\7\37" nil 5 'top
+ continuation-line-fringe-bitmap)
+ (define-fringe-bitmap "\37\20\20\20\20" nil 5 'top
+ top-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\37\1\1\1\1" nil 5 'top
+ top-right-angle-fringe-bitmap)
+ (define-fringe-bitmap "\20\20\20\20\37" nil 5 'bottom
+ bottom-left-angle-fringe-bitmap)
+ (define-fringe-bitmap "\1\1\1\1\37" nil 5 'bottom
+ bottom-right-angle-fringe-bitmap)))
+ ((and (eq nil value)
+ ;;(not (eq fringe-bitmap-group value)) ;how to compare to previous
+ )
+ (progn
+ (destroy-fringe-bitmap left-truncation-fringe-bitmap)
+ (destroy-fringe-bitmap right-truncation-fringe-bitmap)
+ (destroy-fringe-bitmap up-arrow-fringe-bitmap)
+ (destroy-fringe-bitmap down-arrow-fringe-bitmap)
+ (destroy-fringe-bitmap continued-line-fringe-bitmap)
+ (destroy-fringe-bitmap continuation-line-fringe-bitmap)
+ (destroy-fringe-bitmap top-left-angle-fringe-bitmap)
+ (destroy-fringe-bitmap top-right-angle-fringe-bitmap)
+ (destroy-fringe-bitmap bottom-left-angle-fringe-bitmap)
+ (destroy-fringe-bitmap bottom-right-angle-fringe-bitmap)
+ ;(destroy-fringe-bitmap )
+ )))
+ (setq fringe-bitmap-group value)) ;how to use symbol?
+
+;;;###autoload
+(defcustom fringe-bitmap-group nil
+ "*Specify the bitmap set (related to size) of fringe bitmaps
+nil is the default bitpapset (quit big)
+0 (tiny) for smallest bitmap as possible"
+ :type '(choice (const :tag "Default size" nil)
+ (const :tag "tiny" 0)
+ (const :tag "small" 1)
+ (const :tag "medium" 2))
+ :group 'frames
+ :require 'fringe
+ :set 'set-fringe-bitmap-group)
+
+;;The following part close to the end is not well done and not necessary
+;;so commented as it can be removed
+;; (it's an adapted copy/paste from above with few modifications)
+;;the purpose is to have eventually more interactive ways to
+;; customize fringe-bitmap-group
+;;document string are still wrong related to above copy
+;;the idea to be valued -before remove- is to choose fringe-bitmap-group
+;; (which differs principally in size) depending on fringe width.
+;;but in this case i (mar) think it should be moved in fringe.c.
+;
+;(defun fringe-query-bitmap-group (&optional all-frames)
+; "Query user for fringe bitmap group.
+;Returns values suitable for left-fringe and right-fringe frame parameters.
+;If ALL-FRAMES, the negation of the fringe values in
+;`default-frame-alist' is used when user enters the empty string.
+;Otherwise the negation of the fringe value in the currently selected
+;frame parameter is used."
+; (let ((mode (intern (completing-read
+; "Select fringe bitmap for all frames (type ? for list): "
+; '(("default") ("tiny") ("small"))
+; nil t))))
+; (cond ((eq mode 'default) nil)
+; ((eq mode 'tiny) 0)
+; ((eq mode 'small) 1)
+; ((eq mode (intern ""))
+; (if (> 5 (... cdr (assq 'left-fringe
+; (if all-frames
+; default-frame-alist
+; (frame-parameters (selected-frame))))))
+; nil
+; 0)))))
+;
+;;;;###autoload
+;(defun fringe-bitmap-group (&optional mode)
+; "...Set the default appearance of fringes on all frames.
+;
+;...When called interactively, query the user for MODE. Valid values
+;for MODE include `none', `default', `left-only', `right-only',
+;`minimal' and `half'.
+;
+;When used in a Lisp program, MODE can be a cons cell where the
+;integer in car specifies the left fringe width and the integer in
+;cdr specifies the right fringe width. MODE can also be a single
+;integer that specifies both the left and the right fringe width.
+;If a fringe width specification is nil, that means to use the
+;default width (8 pixels). This command may round up the left and
+;right width specifications to ensure that their sum is a multiple
+;of the character width of a frame. It never rounds up a fringe
+;width of 0.
+;
+;Fringe widths set by `set-window-fringes' override the default
+;fringe widths set by this command. This command applies to all
+;frames that exist and frames to be created in the future. If you
+;want to set the default appearance of fringes on the selected
+;frame only, see the command `set-fringe-style'."
+; (interactive (list (fringe-query-bitmap-group 'all-frames)))
+; (set-fringe-bitmap-group nil mode))
+;
+;;;;###autoload
+;(defun set-fringe-style (&optional mode)
+; "...Set the default appearance of fringes on the selected frame.
+;
+;...When called interactively, query the user for MODE. Valid values
+;for MODE include `none', `default', `left-only', `right-only',
+;`minimal' and `half'.
+;
+;When used in a Lisp program, MODE can be a cons cell where the
+;integer in car specifies the left fringe width and the integer in
+;cdr specifies the right fringe width. MODE can also be a single
+;integer that specifies both the left and the right fringe width.
+;If a fringe width specification is nil, that means to use the
+;default width (8 pixels). This command may round up the left and
+;right width specifications to ensure that their sum is a multiple
+;of the character width of a frame. It never rounds up a fringe
+;width of 0.
+;
+;Fringe widths set by `set-window-fringes' override the default
+;fringe widths set by this command. If you want to set the
+;default appearance of fringes on all frames, see the command
+;`fringe-mode'."
+; (interactive (list (fringe-query-bitmap-group)))
+; (modify-frame-parameters
+; (selected-frame)
+; (list (cons 'left-fringe (if (consp mode) (car mode) mode))
+; (cons 'right-fringe (if (consp mode) (cdr mode) mode)))))
+;
+
(provide 'fringe)
;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d
Index: lisp/ibuffer.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ibuffer.el,v
retrieving revision 1.57
diff -u -r1.57 ibuffer.el
--- lisp/ibuffer.el 1 Sep 2003 15:45:12 -0000 1.57
+++ lisp/ibuffer.el 21 Mar 2004 02:53:43 -0000
@@ -199,7 +199,7 @@
:group 'ibuffer)
(defcustom ibuffer-eliding-string "..."
- "The string to use for eliding long columns."
+ "The string to use for eliding long lines."
:type 'string
:group 'ibuffer)
Index: src/dispextern.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v
retrieving revision 1.170
diff -u -r1.170 dispextern.h
--- src/dispextern.h 19 Mar 2004 00:42:24 -0000 1.170
+++ src/dispextern.h 21 Mar 2004 02:53:44 -0000
@@ -1171,6 +1171,20 @@
? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
: 0)
+/* Return the fringe mode relative to selected/unselected window,
+ parameters W the window, AFFID Active Fringe Face ID */
+
+#define CURRENT_FRINGE_FACE_ID_2(W,AFFID) \
+ (!fringe_in_non_selected_windows \
+ || ((W) == XWINDOW (selected_window)) \
+ ? AFFID \
+ : FRINGE_INACTIVE_FACE_ID)
+
+/* see above, FRINGE_FACE_ID is the default */
+
+#define CURRENT_FRINGE_FACE_ID(W) \
+ CURRENT_FRINGE_FACE_ID_2(W,FRINGE_FACE_ID)
+
/* Return the desired face id for the mode line of a window, depending
on whether the window is selected or not, or if the window is the
scrolling window for the currently active minibuffer window.
@@ -1518,6 +1532,7 @@
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
+ FRINGE_INACTIVE_FACE_ID,
HEADER_LINE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
@@ -2521,6 +2536,7 @@
extern Lisp_Object Qtool_bar;
extern Lisp_Object Vshow_trailing_whitespace;
extern int mode_line_in_non_selected_windows;
+extern int fringe_in_non_selected_windows;
extern int redisplaying_p;
extern Lisp_Object Vimage_types;
extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
Index: src/fringe.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fringe.c,v
retrieving revision 1.10
diff -u -r1.10 fringe.c
--- src/fringe.c 1 Mar 2004 23:56:44 -0000 1.10
+++ src/fringe.c 21 Mar 2004 02:53:45 -0000
@@ -413,13 +413,14 @@
struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] =
{
{ NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
+ /* bits, height, width,period, align , dynamic*/
{ FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (left_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (right_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
- { FRBITS (continued_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
- { FRBITS (continuation_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
+ { FRBITS (continued_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
+ { FRBITS (continuation_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
{ FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
{ FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 },
@@ -478,20 +479,21 @@
if (which != NO_FRINGE_BITMAP)
{
+ face_id = CURRENT_FRINGE_FACE_ID(w);
}
else if (left_p)
{
which = row->left_fringe_bitmap;
- face_id = row->left_fringe_face_id;
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, row->left_fringe_face_id);
}
else
{
which = row->right_fringe_bitmap;
- face_id = row->right_fringe_face_id;
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, row->right_fringe_face_id);
}
if (face_id == DEFAULT_FACE_ID)
- face_id = fringe_faces[which];
+ face_id = CURRENT_FRINGE_FACE_ID_2(w, fringe_faces[which]);
fb = fringe_bitmaps[which];
if (fb == NULL)
@@ -800,7 +802,8 @@
else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
left = row->left_user_fringe_bitmap;
- left_face_id = row->left_user_fringe_face_id;
+ left_face_id =
+ CURRENT_FRINGE_FACE_ID_2(w,row->left_user_fringe_face_id);
}
else if (row->indicate_bob_p && boundary_pos <= 0)
left = ((row->indicate_eob_p && boundary_pos < 0)
@@ -826,7 +829,8 @@
else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP)
{
right = row->right_user_fringe_bitmap;
- right_face_id = row->right_user_fringe_face_id;
+ right_face_id =
+ CURRENT_FRINGE_FACE_ID_2(w,row->right_user_fringe_face_id);
}
else if (row->indicate_bob_p && boundary_pos > 0)
right = ((row->indicate_eob_p && boundary_pos >= 0)
@@ -860,8 +864,8 @@
redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
cur->left_fringe_bitmap = left;
cur->right_fringe_bitmap = right;
- cur->left_fringe_face_id = left_face_id;
- cur->right_fringe_face_id = right_face_id;
+ cur->left_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,left_face_id);
+ cur->right_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,right_face_id);
}
if (row->overlay_arrow_p != cur->overlay_arrow_p)
@@ -872,8 +876,8 @@
row->left_fringe_bitmap = left;
row->right_fringe_bitmap = right;
- row->left_fringe_face_id = left_face_id;
- row->right_fringe_face_id = right_face_id;
+ row->left_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,left_face_id);
+ row->right_fringe_face_id = CURRENT_FRINGE_FACE_ID_2(w,right_face_id);
}
return redraw_p;
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.462
diff -u -r1.462 window.c
--- src/window.c 4 Mar 2004 17:16:23 -0000 1.462
+++ src/window.c 21 Mar 2004 02:53:51 -0000
@@ -129,6 +129,10 @@
minibuffer is active. */
int mode_line_in_non_selected_windows;
+/* Non-zero means to use fringe-inactive face in all windows but the
+ selected-window. */
+int fringe_in_non_selected_windows;
+
/* If a window gets smaller than either of these, it is removed. */
EMACS_INT window_min_height;
@@ -1775,8 +1779,10 @@
window = Fnext_window (window, Qnil, all_frames);
for (; i < 0; ++i)
window = Fprevious_window (window, Qnil, all_frames);
-
- Fselect_window (window, Qnil);
+ if (window != selected_window) {
+ //selected_window->circa row->redraw_fringe_bitmaps_p = 1;
+ Fselect_window (window, Qnil);
+ }
return Qnil;
}
@@ -6475,6 +6481,10 @@
If the minibuffer is active, the `minibuffer-scroll-window' mode line
is displayed in the `mode-line' face. */);
mode_line_in_non_selected_windows = 1;
+
+ DEFVAR_BOOL ("fringe-in-non-selected-windows", &fringe_in_non_selected_windows,
+ doc: /* Non-nil means to use `fringe-inactive' face in non-selected windows. */);
+ fringe_in_non_selected_windows = 1;
DEFVAR_LISP ("other-window-scroll-buffer", &Vother_window_scroll_buffer,
doc: /* If non-nil, this is a buffer and \\[scroll-other-window] should scroll its window. */);
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.289
diff -u -r1.289 xfaces.c
--- src/xfaces.c 9 Feb 2004 15:39:49 -0000 1.289
+++ src/xfaces.c 21 Mar 2004 02:53:57 -0000
@@ -322,7 +322,7 @@
/* Names of basic faces. */
-Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe;
+Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe, Qfringe_inactive;
Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu;
Lisp_Object Qmode_line_inactive;
extern Lisp_Object Qmode_line;
@@ -6626,6 +6626,7 @@
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
+ realize_named_face (f, Qfringe_inactive, FRINGE_INACTIVE_FACE_ID);
realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
@@ -7701,6 +7702,8 @@
staticpro (&Qregion);
Qfringe = intern ("fringe");
staticpro (&Qfringe);
+ Qfringe_inactive = intern ("fringe-inactive");
+ staticpro (&Qfringe_inactive);
Qheader_line = intern ("header-line");
staticpro (&Qheader_line);
Qscroll_bar = intern ("scroll-bar");
[-- Attachment #3: Type: text/plain, Size: 232 bytes --]
Saluti,
MARco
--
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
[-- Attachment #4: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-21 3:27 ` Marco Munari
@ 2004-03-22 10:59 ` Kim F. Storm
2004-03-23 2:27 ` Marco Munari 16479.36044
0 siblings, 1 reply; 59+ messages in thread
From: Kim F. Storm @ 2004-03-22 10:59 UTC (permalink / raw)
Cc: emacs-devel
Marco Munari <mar@i.am> writes:
> related to previous discussion with Kim and , an updated patch follows
>
> the additional news:
> fringe.c: i remove my bitmap redefinition (but i keep change
> on default ALIGN of thos bitmap), and i move my bitmaps in a
> customizable variable fringe-bitmap-group in fringe.el, which can be
> default nil
> tiny (0)
> small (1)
> medium (2)
> all bitmaps valuea are defined in a octal string,
> i was in dubt about the name of fringe-bitmap-group, is it fine or it
> is better fringe-bitmaps-group or something else?
What about a name which says that this has to do with size of
the standard bitmaps, e.g.
fringe-standard-bitmap-size
> [I'm waiting papers in my address box in Italy, right?]
I don't know. You can ask assign@gnu.org if they are on the way.
> +(defvar fringe-bitmap-group nil)
> +(setq fringe-bitmap-group nil) ;orrible, but a way to avoid undefined in conditions
I don't see how that is necessary.
> + ((and (eq nil value)
> + ;;(not (eq fringe-bitmap-group value)) ;how to compare to previous
use = or equal
> + (setq fringe-bitmap-group value)) ;how to use symbol?
(set symbol value) -- but don't do that ... see my comment below
> +
> +;;;###autoload
> +(defcustom fringe-bitmap-group nil
> + "*Specify the bitmap set (related to size) of fringe bitmaps
> +nil is the default bitpapset (quit big)
> +0 (tiny) for smallest bitmap as possible"
> + :type '(choice (const :tag "Default size" nil)
> + (const :tag "tiny" 0)
> + (const :tag "small" 1)
> + (const :tag "medium" 2))
> + :group 'frames
> + :require 'fringe
> + :set 'set-fringe-bitmap-group)
> +
> +;;The following part close to the end is not well done and not necessary
> +;;so commented as it can be removed
I think that set-fringe-standard-bitmap-size should be interactive.
You can then use a lambda form in the :set of the above defcustom to
call it with the required parameters, something like.
:set (lambda (symbol value)
(set-fringe-standard-bitmap-size value))
> +;;;;###autoload
> +;(defun set-fringe-style (&optional mode)
> +; "...Set the default appearance of fringes on the selected frame.
Why is this function removed ?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 59+ messages in thread
* Re: More enhancements to fringe bitmaps.
2004-03-22 10:59 ` Kim F. Storm
@ 2004-03-23 2:27 ` Marco Munari 16479.36044
0 siblings, 0 replies; 59+ messages in thread
From: Marco Munari 16479.36044 @ 2004-03-23 2:27 UTC (permalink / raw)
Cc: emacs-devel
~\/~ "Kim" == Kim F Storm <storm@cua.dk> writes:
Kim> Marco Munari <mar@i.am> writes:
...
Kim> What about a name which says that this has to do with size of the
Kim> standard bitmaps, e.g.
Kim> fringe-standard-bitmap-size
Ok, as you prefer (i was in dubt, in the beginning in fact i call it
locally similarly with "-size" insted of "-group", i changed to group
because i thought that it was not precisely a size, than when i change
all image in order of size, "-size" is again apropriate)
> > +(defvar fringe-bitmap-group nil)
> > +(setq fringe-bitmap-group nil) ;orrible, but a way to avoid undefined in conditions
Kim> I don't see how that is necessary.
me too, but i in the original fringe.el we can see:
(defvar fringe-mode)
...
(defcustom fringe-mode nil ...
i don't see necessity of the first existing definition
i just removed my absurd setq statement, it was an experiment because i
misunderstend an error on fringe-standard-bitmap-size comparison
Don't consider my patch virtual commit intention for all file,
fringe.el section was uncleaned, with evidence )
> > + ((and (eq nil value)
> > + ;;(not (eq fringe-bitmap-group value)) ;how to compare to previous
Kim> use = or equal
> > + (setq fringe-bitmap-group value)) ;how to use symbol?
Kim> (set symbol value) -- but don't do that ... see my comment below
> > +
> > +;;;###autoload
> > +(defcustom fringe-bitmap-group nil
> > +"*Specify the bitmap set (related to size) of fringe bitmaps
> > +nil is the default bitpapset (quit big)
> > +0 (tiny) for smallest bitmap as possible"
> > + :type '(choice (const :tag "Default size" nil)
> > + (const :tag "tiny" 0) > + (const :tag "small" 1)
> > +(const :tag "medium" 2)) > + :group 'frames :require 'fringe
> > + :set 'set-fringe-bitmap-group)
> > +
> > +;;The following part close to the end is not well done and
> > +;;not necessary so commented as it can be removed
Kim> I think that set-fringe-standard-bitmap-size should be
Kim> interactive.
M-x customize-variable fringe-standard-bitmap-size
is an alternative interactive way
i didn't introduce too much new interactive user ways to set it's value
because existing set-fringe-style could even automatically set
new fringe-standard-bitmaps-size to a proper value, depending on the
fringe width (the default bitmap size for example is too much big for
size less then half).
Kim> You can then use a lambda form in the :set of the above defcustom
Kim> to call it with the required parameters, something like.
Kim> :set (lambda (symbol value)
Kim> (set-fringe-standard-bitmap-size value))
> > +;;;;###autoload
> > +;(defun set-fringe-style (&optional mode)
> > +; "...Set the default appearance of fringes on the selected
> > +;frame.
Kim> Why is this function removed ?
justification endpoint:
Not removed, but precisely copyed from above and commented out
for future renaming and changing or remove.. use), i know it's
a bad way to write code but i used it as a template (in my
-work in progress- point of view, there was similarity
on handling fringe-mode and the new variable).
In that time... before to go to sleep and send the mail, i commented
all the rest to keep some changes.
I will send a better cleanup remake of fringe.el in next days
Saluti,
MARco
--
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
^ permalink raw reply [flat|nested] 59+ messages in thread
end of thread, other threads:[~2004-03-23 2:27 UTC | newest]
Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-09 1:01 More enhancements to fringe bitmaps Kim F. Storm
2004-02-09 2:48 ` YAMAMOTO Mitsuharu
2004-02-09 14:54 ` Kim F. Storm
2004-02-09 14:27 ` Jason Rumney
2004-02-09 20:09 ` Harald Maier
2004-02-11 2:54 ` YAMAMOTO Mitsuharu
2004-02-11 11:17 ` Kim F. Storm
2004-02-11 11:28 ` YAMAMOTO Mitsuharu
2004-02-11 14:03 ` Stefan Monnier
2004-02-12 0:58 ` YAMAMOTO Mitsuharu
2004-02-14 0:39 ` Kim F. Storm
2004-02-14 8:08 ` Harald Maier
2004-02-14 15:31 ` YAMAMOTO Mitsuharu
2004-02-15 17:19 ` Kim F. Storm
2004-02-16 10:22 ` YAMAMOTO Mitsuharu
2004-02-16 13:22 ` Kim F. Storm
2004-02-17 3:13 ` YAMAMOTO Mitsuharu
2004-02-17 22:41 ` Kim F. Storm
2004-02-18 2:32 ` YAMAMOTO Mitsuharu
2004-02-18 22:04 ` Kim F. Storm
2004-02-19 4:28 ` YAMAMOTO Mitsuharu
2004-02-19 8:38 ` Jason Rumney
2004-02-19 9:52 ` Kim F. Storm
2004-02-09 8:54 ` Masatake YAMATO
2004-02-09 16:49 ` Kim F. Storm
2004-02-10 1:28 ` Johan Bockgård
2004-02-14 0:58 ` Kim F. Storm
2004-02-09 15:02 ` Matt Hodges
2004-02-14 0:46 ` Kim F. Storm
2004-02-09 19:54 ` Tak Ota
2004-02-09 20:37 ` Tak Ota
2004-03-08 13:48 ` Marco Munari 16447.64651
2004-03-08 23:52 ` Kim F. Storm
2004-03-11 15:27 ` Miles Bader
2004-03-17 13:59 ` Marco Munari
2004-03-11 17:06 ` Marco Munari 16464.32679
2004-03-11 0:22 ` Marco Munari 16447.64651
2004-03-17 3:56 ` Miles Bader
2004-03-18 5:08 ` Marc Munari 16473.4929
2004-03-18 13:27 ` Kim F. Storm
2004-03-18 19:05 ` Marco Munari 16473.54072
2004-03-18 23:43 ` Kim F. Storm
2004-03-19 3:44 ` Marco Munari
2004-03-19 14:04 ` Kim F. Storm
2004-03-21 3:27 ` Marco Munari
2004-03-22 10:59 ` Kim F. Storm
2004-03-23 2:27 ` Marco Munari 16479.36044
-- strict thread matches above, loose matches on Subject: below --
2004-02-11 23:41 Nick Roberts
2004-02-12 1:18 ` Miles Bader
2004-02-12 11:55 ` Kim F. Storm
2004-02-12 12:32 ` Miles Bader
2004-02-13 17:34 ` Richard Stallman
2004-02-13 21:53 ` Kim F. Storm
2004-02-12 16:42 ` Nick Roberts
2004-02-12 20:55 ` Miles Bader
2004-02-12 12:07 ` Kim F. Storm
2004-02-12 16:59 ` Nick Roberts
2004-02-12 23:35 ` Kim F. Storm
2004-02-13 19:25 ` Nick Roberts
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.