[COMMIT] Shrink the widget-field-face
12 years, 12 months
Didier Verna
NOTE: This patch has been committed.
Hello,
so here's a first face that needs to be shrinked when its background is
set to something non default (you shoulda seen its face :-). It also
fixes its specification which was wrong, and answers sjt's comment on
top of it.
lisp/ChangeLog addition:
2011-12-27 Didier Verna <didier(a)xemacs.org>
* wid-edit.el (widget-field-face): Set this face to shrink. Fix
incorrect specification.
XEmacs 21.5 source patch:
Diff command: hg diff --git --show-function
Files affected: lisp/wid-edit.el
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -88,22 +88,18 @@ This exists as a variable so it can be s
;; TTY gets special definitions here and in the next defface, because
;; the gray colors defined for other displays cause black text on a black
;; background, at least on light-background TTYs.
-(defface widget-field-face '(
- ;; #### sjt sez: XEmacs doesn't like this.
- ;; The Custom face editor widget shows a Lisp
- ;; form, not a face structure. Does it produce
- ;; the right face on TTYs?
- ;; One hypothesis is that the editor doesn't
- ;; grok non-default display types in the value.
- (((type tty))
- (:background "yellow3")
- (:foreground "black"))
+(defface widget-field-face '((((type tty))
+ (:background "yellow3"
+ :foreground "black"
+ :shrink t))
(((class grayscale color)
(background light))
- (:background "gray85"))
+ (:background "gray85"
+ :shrink t))
(((class grayscale color)
(background dark))
- (:background "dim gray"))
+ (:background "dim gray"
+ :shrink t))
(t
(:italic t)))
"Face used for editable fields."
--
Resistance is futile. You will be jazzimilated.
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/XEmacs: didierverna: Replace the 'flush face property with the opposite 'shrink one.
12 years, 12 months
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/75ad4969a16d/
changeset: 75ad4969a16d
user: didierverna
date: 2011-12-26 15:04:25
summary: Replace the 'flush face property with the opposite 'shrink one.
lisp/ChangeLog addition:
2011-12-26 Didier Verna <didier(a)xemacs.org>
* cl-macs.el (face-flush-p): Removed.
* cl-macs.el (face-shrink-p): New.
* faces.el (face-flush-p): Removed.
* faces.el (face-shrink-p): New.
* faces.el (set-face-flush-p): Removed.
* faces.el (set-face-shrink-p): New.
* cus-face.el (custom-face-attributes):
* faces.el (set-face-property):
* faces.el (face-equal):
* x-faces.el (x-init-face-from-resources):
* x-faces.el (make-face-x-resource-internal): Replace the 'flush
property with the opposite 'shrink one.
src/ChangeLog addition:
2011-12-26 Didier Verna <didier(a)xemacs.org>
* lisp.h:
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (update_face_inheritance_mapper):
* faces.c (Fmake_face):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (Fcopy_face):
* faces.c (syms_of_faces):
* faces.c (vars_of_faces):
* faces.c (complex_vars_of_faces):
* faces.h (struct Lisp_Face):
* faces.h (struct face_cachel):
* faces.h (WINDOW_FACE_CACHEL_SHRINK_P):
* faces.h (FACE_SHRINK_P):
* fontcolor.c (face_boolean_validate): Replace the 'flush property
with the opposite 'shrink one.
* redisplay.c (create_text_block):
* redisplay.c (create_string_text_block): Ditto. Invert the logic
for storing a new clear_findex in the display lines.
affected #: 11 files
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[COMMIT] New "flush" face property
13 years
Didier Verna
NOTE: This patch has been committed.
Here's a little present to put under the Christmas tree. The following
patch implements a new face property called "flush". This property
allows you to have text segments displayed as blocks instead of being
ragged right, which is visually nicer in many situations. See the
following blog entry for a more detailed explanation and a screenshot:
http://www.didierverna.com/sciblog/index.php?post/2011/12/22/XEmacs-now-h...
lisp/ChangeLog addition:
2011-12-23 Didier Verna <didier(a)xemacs.org>
* cl-macs.el (face-flush-p): New defsetf.
* faces.el (set-face-property): Document the flush property.
* faces.el (face-flush-p): New function.
* faces.el (set-face-flush-p): New function.
* faces.el (face-equal):
* cus-face.el (custom-face-attributes):
* x-faces.el (x-init-face-from-resources):
* x-faces.el (make-face-x-resource-internal): Handle the flush
property.
src/ChangeLog addition:
2011-12-23 Didier Verna <didier(a)xemacs.org>
* faces.h (struct Lisp_Face): New 'flush slot.
* faces.h (struct face_cachel): New 'flush and 'flush_specified
flags.
* faces.h (WINDOW_FACE_CACHEL_FLUSH_P):
* faces.h (FACE_FLUSH_P): New macros.
* faces.c: Declare Qflush.
* lisp.h: Externalize it.
* faces.c (syms_of_faces): Define it.
* faces.c (vars_of_faces): Update built-in face specifiers.
* faces.c (complex_vars_of_faces): Update specifier fallbacks.
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (update_face_inheritance_mapper):
* faces.c (Fmake_face):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (Fcopy_face):
* fontcolor.c (face_boolean_validate): Handle the flush property.
* redisplay.h (struct display_line): Rename 'default_findex slot to
clearer name 'clear_findex.
* redisplay.h (DISPLAY_LINE_INIT): Update accordingly.
* redisplay-output.c (compare_display_blocks):
* redisplay-output.c (output_display_line):
* redisplay-output.c (redisplay_output_window):
* redisplay.c (regenerate_window_extents_only_changed):
* redisplay.c (regenerate_window_incrementally): Update the
comparison tests between the current and desired display lines to
cope for different 'clear_findex values.
* redisplay.c (create_text_block): Initialize the display line's
'clear_findex slot to DEFAULT_INDEX. Record a new 'clear_findex
value when we encounter a newline character displayed in a flushed
face.
* redisplay.c (create_string_text_block): Record a new
'clear_findex value when we encounter a newline character
displayed in a flushed face.
XEmacs 21.5 source patch:
Diff command: hg diff --git --show-function
Files affected: lisp/cl-macs.el lisp/cus-face.el lisp/faces.el lisp/x-faces.el src/faces.c src/faces.h src/fontcolor.c src/lisp.h src/redisplay-output.c src/redisplay.c src/redisplay.h
diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el
--- a/lisp/cl-macs.el
+++ b/lisp/cl-macs.el
@@ -2120,6 +2120,8 @@ Example: (defsetf nth (n x) (v) (list 's
(defsetf face-foreground (f &optional s) (x) (list 'set-face-foreground f x s))
(defsetf face-underline-p (f &optional s) (x)
(list 'set-face-underline-p f x s))
+(defsetf face-flush-p (f &optional s) (x)
+ (list 'set-face-flush-p f x s))
(defsetf file-modes set-file-modes t)
(defsetf frame-height (&optional f) (v)
`(progn (set-frame-height ,f ,v) ,v))
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -126,6 +126,10 @@ Control whether the text should be strik
:help-echo "\
Control whether the text should be inverted. Works only on TTY-s")
set-face-reverse-p face-reverse-p)
+ (:flush (toggle :format "%[Flush%]: %v\n"
+ :help-echo "\
+Control whether the face should flush to the right border.")
+ set-face-flush-p face-flush-p)
(:inherit
(repeat :tag "Inherit"
:help-echo "List of faces to inherit attributes from."
diff --git a/lisp/faces.el b/lisp/faces.el
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -361,6 +361,12 @@ The following symbols have predefined me
Only used by faces on TTY devices.
For valid instantiators, see `make-face-boolean-specifier'.
+ flush When the end of line is reached in a flushing face, also
+ paint the rest of the line (up to the right border) with
+ that face. The effect will only be visible if the face has
+ a non default background.
+ For valid instantiators, see `make-face-boolean-specifier'.
+
inherit Face name or face object from which to inherit attributes,
or a list of such elements. Attributes from inherited
faces are merged into the face like an underlying face
@@ -897,6 +903,20 @@ See `set-face-property' for the semantic
(interactive (face-interactive "reverse-p" "reversed"))
(set-face-property face 'reverse reverse-p locale tag-set how-to-add))
+(defun face-flush-p (face &optional domain default no-fallback)
+ "Return t if FACE is flushed in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+ (face-property-instance face 'flush domain default no-fallback))
+
+(defun set-face-flush-p (face flush-p &optional locale tag-set how-to-add)
+ "Change whether FACE is flushed in LOCALE.
+FLUSH-P is normally a face-boolean instantiator; see
+ `make-face-boolean-specifier'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+ (interactive (face-interactive "flush-p" "flushed"))
+ (set-face-property face 'flush flush-p locale tag-set how-to-add))
+
(defun face-property-equal (face1 face2 prop domain)
(equal (face-property-instance face1 prop domain)
@@ -916,7 +936,7 @@ See `face-property-instance' for the sem
(error "Invalid specifier domain"))
(let ((device (dfw-device domain))
(common-props '(foreground background font display-table underline
- dim inherit))
+ dim inherit flush))
(win-props '(background-pixmap background-placement strikethru))
(tty-props '(highlight blinking reverse)))
diff --git a/lisp/x-faces.el b/lisp/x-faces.el
--- a/lisp/x-faces.el
+++ b/lisp/x-faces.el
@@ -714,6 +714,10 @@ Otherwise, it returns the next larger ve
(concat name ".attributeStrikethru")
"Face.AttributeStrikethru"
'boolean locale))
+ (fp (x-get-resource-and-maybe-bogosity-check
+ (concat name ".attributeFlush")
+ "Face.AttributeFlush"
+ 'boolean locale))
;; we still resource for these TTY-only resources so that you can
;; specify resources for TTY frames/devices. This is useful when you
;; start up your XEmacs on an X display and later open some TTY
@@ -879,6 +883,22 @@ Otherwise, it returns the next larger ve
(remove-specifier (face-property face 'reverse) locale
tty-tag-set nil))
(set-face-reverse-p face rp locale our-tag-set append))
+ (when fp
+ (cond (device-class
+ (remove-specifier-specs-matching-tag-set-cdrs (face-property
+ face 'flush)
+ locale
+ tty-tag-set)
+ (remove-specifier-specs-matching-tag-set-cdrs (face-property
+ face 'flush)
+ locale
+ x-tag-set))
+ (t
+ (remove-specifier (face-property face 'flush) locale
+ tty-tag-set nil)
+ (remove-specifier (face-property face 'flush) locale
+ x-tag-set nil)))
+ (set-face-flush-p face fp locale our-tag-set append))
))
;; GNU Emacs compatibility. (move to obsolete.el?)
diff --git a/src/faces.c b/src/faces.c
--- a/src/faces.c
+++ b/src/faces.c
@@ -42,7 +42,7 @@ along with XEmacs. If not, see <http://
Lisp_Object Qfacep;
Lisp_Object Qforeground, Qbackground, Qdisplay_table;
Lisp_Object Qbackground_pixmap, Qbackground_placement, Qunderline, Qdim;
-Lisp_Object Qblinking, Qstrikethru, Q_name;
+Lisp_Object Qblinking, Qstrikethru, Qflush, Q_name;
Lisp_Object Qinit_face_from_resources;
Lisp_Object Qinit_frame_faces;
@@ -117,6 +117,7 @@ mark_face (Lisp_Object obj)
mark_object (face->dim);
mark_object (face->blinking);
mark_object (face->reverse);
+ mark_object (face->flush);
mark_object (face->charsets_warned_about);
@@ -171,6 +172,7 @@ face_equal (Lisp_Object obj1, Lisp_Objec
internal_equal (f1->dim, f2->dim, depth) &&
internal_equal (f1->blinking, f2->blinking, depth) &&
internal_equal (f1->reverse, f2->reverse, depth) &&
+ internal_equal (f1->flush, f2->flush, depth) &&
! plists_differ (f1->plist, f2->plist, 0, 0, depth + 1, 0));
}
@@ -207,6 +209,7 @@ face_getprop (Lisp_Object obj, Lisp_Obje
EQ (prop, Qdim) ? f->dim :
EQ (prop, Qblinking) ? f->blinking :
EQ (prop, Qreverse) ? f->reverse :
+ EQ (prop, Qflush) ? f->flush :
EQ (prop, Qdoc_string) ? f->doc_string :
external_plist_get (&f->plist, prop, 0, ERROR_ME));
}
@@ -227,7 +230,8 @@ face_putprop (Lisp_Object obj, Lisp_Obje
EQ (prop, Qhighlight) ||
EQ (prop, Qdim) ||
EQ (prop, Qblinking) ||
- EQ (prop, Qreverse))
+ EQ (prop, Qreverse) ||
+ EQ (prop, Qflush))
return 0;
if (EQ (prop, Qdoc_string))
@@ -258,7 +262,8 @@ face_remprop (Lisp_Object obj, Lisp_Obje
EQ (prop, Qhighlight) ||
EQ (prop, Qdim) ||
EQ (prop, Qblinking) ||
- EQ (prop, Qreverse))
+ EQ (prop, Qreverse) ||
+ EQ (prop, Qflush))
return -1;
if (EQ (prop, Qdoc_string))
@@ -276,6 +281,7 @@ face_plist (Lisp_Object obj)
Lisp_Face *face = XFACE (obj);
Lisp_Object result = face->plist;
+ result = cons3 (Qflush, face->flush, result);
result = cons3 (Qreverse, face->reverse, result);
result = cons3 (Qblinking, face->blinking, result);
result = cons3 (Qdim, face->dim, result);
@@ -307,6 +313,7 @@ static const struct memory_description f
{ XD_LISP_OBJECT, offsetof (Lisp_Face, dim) },
{ XD_LISP_OBJECT, offsetof (Lisp_Face, blinking) },
{ XD_LISP_OBJECT, offsetof (Lisp_Face, reverse) },
+ { XD_LISP_OBJECT, offsetof (Lisp_Face, flush) },
{ XD_LISP_OBJECT, offsetof (Lisp_Face, plist) },
{ XD_LISP_OBJECT, offsetof (Lisp_Face, charsets_warned_about) },
{ XD_END }
@@ -400,6 +407,7 @@ reset_face (Lisp_Face *f)
f->dim = Qnil;
f->blinking = Qnil;
f->reverse = Qnil;
+ f->flush = Qnil;
f->plist = Qnil;
f->charsets_warned_about = Qnil;
}
@@ -554,7 +562,8 @@ update_face_inheritance_mapper (const vo
EQ (fcl->property, Qhighlight) ||
EQ (fcl->property, Qdim) ||
EQ (fcl->property, Qblinking) ||
- EQ (fcl->property, Qreverse))
+ EQ (fcl->property, Qreverse) ||
+ EQ (fcl->property, Qflush))
{
update_inheritance_mapper_internal (contents, fcl->face, Qunderline);
update_inheritance_mapper_internal (contents, fcl->face, Qstrikethru);
@@ -562,6 +571,7 @@ update_face_inheritance_mapper (const vo
update_inheritance_mapper_internal (contents, fcl->face, Qdim);
update_inheritance_mapper_internal (contents, fcl->face, Qblinking);
update_inheritance_mapper_internal (contents, fcl->face, Qreverse);
+ update_inheritance_mapper_internal (contents, fcl->face, Qflush);
}
return 0;
}
@@ -869,6 +879,8 @@ If TEMPORARY is non-nil, this face will
set_face_boolean_attached_to (f->blinking, face, Qblinking);
f->reverse = Fmake_specifier (Qface_boolean);
set_face_boolean_attached_to (f->reverse, face, Qreverse);
+ f->flush = Fmake_specifier (Qface_boolean);
+ set_face_boolean_attached_to (f->flush, face, Qflush);
if (!NILP (Vdefault_face))
{
/* If the default face has already been created, set it as
@@ -901,6 +913,8 @@ If TEMPORARY is non-nil, this face will
Fget (Vdefault_face, Qblinking, Qunbound));
set_specifier_fallback (f->reverse,
Fget (Vdefault_face, Qreverse, Qunbound));
+ set_specifier_fallback (f->flush,
+ Fget (Vdefault_face, Qflush, Qunbound));
}
/* Add the face to the appropriate list. */
@@ -1471,6 +1485,7 @@ update_face_cachel_data (struct face_cac
FROB (highlight);
FROB (dim);
FROB (reverse);
+ FROB (flush);
FROB (blinking);
#undef FROB
}
@@ -1510,6 +1525,7 @@ merge_face_cachel_data (struct window *w
FROB (highlight);
FROB (dim);
FROB (reverse);
+ FROB (flush);
FROB (blinking);
for (offs = 0; offs < NUM_LEADING_BYTES; ++offs)
@@ -2023,6 +2039,7 @@ LOCALE, TAG-SET, EXACT-P, and HOW-TO-ADD
COPY_PROPERTY (dim);
COPY_PROPERTY (blinking);
COPY_PROPERTY (reverse);
+ COPY_PROPERTY (flush);
#undef COPY_PROPERTY
/* #### should it copy the individual specifiers, if they exist? */
fnew->plist = Fcopy_sequence (fold->plist);
@@ -2162,6 +2179,7 @@ syms_of_faces (void)
/* Qhighlight, Qreverse defined in general.c */
DEFSYMBOL (Qdim);
DEFSYMBOL (Qblinking);
+ DEFSYMBOL (Qflush);
DEFSYMBOL (Qface_alias);
DEFERROR_STANDARD (Qcyclic_face_alias, Qinvalid_state);
@@ -2228,7 +2246,7 @@ If non-zero, display debug information a
Vbuilt_in_face_specifiers =
listu (Qforeground, Qbackground, Qfont, Qdisplay_table, Qbackground_pixmap,
Qbackground_placement, Qunderline, Qstrikethru, Qhighlight, Qdim,
- Qblinking, Qreverse, Qunbound);
+ Qblinking, Qreverse, Qflush, Qunbound);
staticpro (&Vbuilt_in_face_specifiers);
}
@@ -2484,6 +2502,8 @@ complex_vars_of_faces (void)
list1 (Fcons (Qnil, Qnil)));
set_specifier_fallback (Fget (Vdefault_face, Qreverse, Qnil),
list1 (Fcons (Qnil, Qnil)));
+ set_specifier_fallback (Fget (Vdefault_face, Qflush, Qnil),
+ list1 (Fcons (Qnil, Qnil)));
/* gui-element is the parent face of all gui elements such as
modeline, vertical divider and toolbar. */
diff --git a/src/faces.h b/src/faces.h
--- a/src/faces.h
+++ b/src/faces.h
@@ -54,6 +54,7 @@ struct Lisp_Face
Lisp_Object dim;
Lisp_Object blinking;
Lisp_Object reverse;
+ Lisp_Object flush;
Lisp_Object plist;
@@ -180,6 +181,7 @@ struct face_cachel
unsigned int dim :1;
unsigned int blinking :1;
unsigned int reverse :1;
+ unsigned int flush :1;
/* Used when merging to tell if the above field represents an actual
value of this face or a fallback value. */
@@ -197,6 +199,7 @@ struct face_cachel
unsigned int dim_specified :1;
unsigned int blinking_specified :1;
unsigned int reverse_specified :1;
+ unsigned int flush_specified :1;
/* The updated flag is set after we calculate the values for the
face cachel and cleared whenever a face changes, to indicate
@@ -356,6 +359,8 @@ void default_face_width_and_height (Lisp
(WINDOW_FACE_CACHEL (window, index)->blinking)
#define WINDOW_FACE_CACHEL_REVERSE_P(window, index) \
(WINDOW_FACE_CACHEL (window, index)->reverse)
+#define WINDOW_FACE_CACHEL_FLUSH_P(window, index) \
+ (WINDOW_FACE_CACHEL (window, index)->flush)
#define FACE_PROPERTY_SPECIFIER(face, property) Fget (face, property, Qnil)
@@ -417,5 +422,7 @@ extern Lisp_Object Qbackground_placement
(!NILP (FACE_PROPERTY_INSTANCE (face, Qblinking, domain, 0, Qzero)))
#define FACE_REVERSE_P(face, domain) \
(!NILP (FACE_PROPERTY_INSTANCE (face, Qreverse, domain, 0, Qzero)))
+#define FACE_FLUSH_P(face, domain) \
+ (!NILP (FACE_PROPERTY_INSTANCE (face, Qflush, domain, 0, Qzero)))
#endif /* INCLUDED_faces_h_ */
diff --git a/src/fontcolor.c b/src/fontcolor.c
--- a/src/fontcolor.c
+++ b/src/fontcolor.c
@@ -1159,7 +1159,8 @@ face_boolean_validate (Lisp_Object insta
&& !EQ (field, Qhighlight)
&& !EQ (field, Qdim)
&& !EQ (field, Qblinking)
- && !EQ (field, Qreverse))
+ && !EQ (field, Qreverse)
+ && !EQ (field, Qflush))
invalid_constant ("Invalid face-boolean inheritance field",
field);
}
diff --git a/src/lisp.h b/src/lisp.h
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -5144,6 +5144,7 @@ extern Lisp_Object Qdim;
extern Lisp_Object Qdisplay_table;
extern Lisp_Object Qforeground;
extern Lisp_Object Qunderline;
+extern Lisp_Object Qflush;
/* Defined in file-coding.c */
EXFUN (Fcoding_category_list, 0);
diff --git a/src/redisplay-output.c b/src/redisplay-output.c
--- a/src/redisplay-output.c
+++ b/src/redisplay-output.c
@@ -556,6 +556,7 @@ compare_display_blocks (struct window *w
cdl->ascent != ddl->ascent ||
cdl->descent != ddl->descent ||
cdl->clip != ddl->clip ||
+ cdl->clear_findex != ddl->clear_findex ||
force)
{
start_pos = 0;
@@ -788,7 +789,8 @@ output_display_line (struct window *w, d
cdl->ascent != ddl->ascent ||
cdl->descent != ddl->descent ||
cdl->top_clip != ddl->top_clip ||
- cdl->clip != ddl->clip)))
+ cdl->clip != ddl->clip ||
+ cdl->clear_findex != ddl->clear_findex)))
{
int x, y, width, height;
face_index findex;
@@ -807,8 +809,8 @@ output_display_line (struct window *w, d
}
else if (x < ddl->bounds.right_in)
{
- findex = (ddl->default_findex >= DEFAULT_INDEX) ?
- ddl->default_findex
+ findex = (ddl->clear_findex >= DEFAULT_INDEX) ?
+ ddl->clear_findex
: DEFAULT_INDEX;
}
else if (x < ddl->bounds.right_out)
@@ -2425,7 +2427,8 @@ redisplay_output_window (struct window *
else if (cdl->ypos != ddl->ypos ||
cdl->ascent != ddl->ascent ||
cdl->descent != ddl->descent ||
- cdl->clip != ddl->clip)
+ cdl->clip != ddl->clip ||
+ cdl->clear_findex != ddl->clear_findex)
need_to_clear_bottom = 1;
/* #### This kludge is to make sure the modeline shadows get
diff --git a/src/redisplay.c b/src/redisplay.c
--- a/src/redisplay.c
+++ b/src/redisplay.c
@@ -2186,6 +2186,7 @@ create_text_block (struct window *w, str
dl->used_prop_data = 0;
dl->num_chars = 0;
dl->line_continuation = 0;
+ dl->clear_findex = DEFAULT_INDEX;
xzero (data);
data.ef = extent_fragment_new (w->buffer, f);
@@ -2499,6 +2500,12 @@ create_text_block (struct window *w, str
to the line and end this loop. */
else if (data.ch == '\n')
{
+ /* Update the clearing face index when the flush property is
+ set. -- dvl */
+ if ((data.findex > DEFAULT_INDEX)
+ && WINDOW_FACE_CACHEL_FLUSH_P (w, data.findex))
+ dl->clear_findex = data.findex;
+
/* We aren't going to be adding an end glyph so give its
space back in order to make sure that the cursor can
fit. */
@@ -4690,7 +4697,7 @@ create_string_text_block (struct window
dl->line_continuation = 0;
/* Set up faces to use for clearing areas, used by output_display_line. */
- dl->default_findex = default_face;
+ dl->clear_findex = default_face;
if (default_face > DEFAULT_INDEX)
{
dl->left_margin_findex = default_face;
@@ -4931,6 +4938,12 @@ create_string_text_block (struct window
to the line and end this loop. */
else if (data.ch == '\n')
{
+ /* Update the clearing face index when the flush property is
+ set. -- dvl */
+ if ((data.findex > DEFAULT_INDEX)
+ && WINDOW_FACE_CACHEL_FLUSH_P (w, data.findex))
+ dl->clear_findex = data.findex;
+
/* We aren't going to be adding an end glyph so give its
space back in order to make sure that the cursor can
fit. */
@@ -5871,7 +5884,8 @@ regenerate_window_extents_only_changed (
|| (cdl->cursor_elt == -1 && ddl->cursor_elt != -1)
|| old_start != ddl->charpos
|| old_end != ddl->end_charpos
- || initial_size != Dynarr_length (db->runes))
+ || initial_size != Dynarr_length (db->runes)
+ || cdl->clear_findex != ddl->clear_findex)
{
return 0;
}
@@ -6020,7 +6034,8 @@ regenerate_window_incrementally (struct
|| cdl->descent != ddl->descent
|| cdl->top_clip != ddl->top_clip
|| (cdl->cursor_elt != -1 && ddl->cursor_elt == -1)
- || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1))
+ || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1)
+ || cdl->clear_findex != ddl->clear_findex)
{
return 0;
}
diff --git a/src/redisplay.h b/src/redisplay.h
--- a/src/redisplay.h
+++ b/src/redisplay.h
@@ -322,17 +322,17 @@ struct display_line
glyph_block_dynarr *left_glyphs;
glyph_block_dynarr *right_glyphs;
- face_index left_margin_findex;
- face_index right_margin_findex;
- face_index default_findex;
+ face_index left_margin_findex;
+ face_index right_margin_findex;
+ face_index clear_findex;
};
-#define DISPLAY_LINE_INIT(dl) \
- do \
- { \
- xzero (dl); \
- dl.default_findex = DEFAULT_INDEX; \
- } \
+#define DISPLAY_LINE_INIT(dl) \
+ do \
+ { \
+ xzero (dl); \
+ dl.clear_findex = DEFAULT_INDEX; \
+ } \
while (0)
#define DISPLAY_LINE_HEIGHT(dl) \
--
Resistance is futile. You will be jazzimilated.
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Re: [AC21.5R21.4] Fix bugs and improve documentation of syntax cache
13 years
Vin Shelton
Hi, Steve -
On Mon, Aug 8, 2011 at 2:40 AM, Stephen J. Turnbull <stephen(a)xemacs.org> wrote:
> APPROVE COMMIT 21.5 RECOMMEND 21.5
>
> Vin: the bug fixes, especially Alan's patch, should be applied to 21.4
> IMO. If you want a 21.4-specific patch I'll be happy to work that up
> on request, but I'm still working on syntax table bugs.
The patches do not apply cleanly because the sources are quite
different. Are you sure these are necessary? Please review the 21.4
sources and generate appropriate patches if necessary.
Thanks,
Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/XEmacs: didierverna: The "flush" face property.
13 years
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/b0d712bbc2a6/
changeset: b0d712bbc2a6
user: didierverna
date: 2011-12-23 10:56:16
summary: The "flush" face property.
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2011-12-23 Didier Verna <didier(a)xemacs.org>
* faces.h (struct Lisp_Face): New 'flush slot.
* faces.h (struct face_cachel): New 'flush and 'flush_specified
flags.
* faces.h (WINDOW_FACE_CACHEL_FLUSH_P):
* faces.h (FACE_FLUSH_P): New macros.
* faces.c: Declare Qflush.
* lisp.h: Externalize it.
* faces.c (syms_of_faces): Define it.
* faces.c (vars_of_faces): Update built-in face specifiers.
* faces.c (complex_vars_of_faces): Update specifier fallbacks.
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (update_face_inheritance_mapper):
* faces.c (Fmake_face):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (Fcopy_face):
* fontcolor.c (face_boolean_validate): Handle the flush property.
* redisplay.h (struct display_line): Rename 'default_findex slot to
clearer name 'clear_findex.
* redisplay.h (DISPLAY_LINE_INIT): Update accordingly.
* redisplay-output.c (compare_display_blocks):
* redisplay-output.c (output_display_line):
* redisplay-output.c (redisplay_output_window):
* redisplay.c (regenerate_window_extents_only_changed):
* redisplay.c (regenerate_window_incrementally): Update the
comparison tests between the current and desired display lines to
cope for different 'clear_findex values.
* redisplay.c (create_text_block): Initialize the display line's
'clear_findex slot to DEFAULT_INDEX. Record a new 'clear_findex
value when we encounter a newline character displayed in a flushed
face.
* redisplay.c (create_string_text_block): Record a new
'clear_findex value when we encounter a newline character
displayed in a flushed face.
lisp/ChangeLog addition:
2011-12-23 Didier Verna <didier(a)xemacs.org>
* cl-macs.el (face-flush-p): New defsetf.
* faces.el (set-face-property): Document the flush property.
* faces.el (face-flush-p): New function.
* faces.el (set-face-flush-p): New function.
* faces.el (face-equal):
* cus-face.el (custom-face-attributes):
* x-faces.el (x-init-face-from-resources):
* x-faces.el (make-face-x-resource-internal): Handle the flush
property.
affected #: 13 files
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH Packages] Re: Bug in cperl-mode.el - unexpanded CVS keyword
13 years
Vin Shelton
Dear developers -
On Thu, Dec 22, 2011 at 10:00 AM, Vin Shelton wrote:
> Does that mean you're in favor of manually expanding the keywords
> where appropriate and leaving them fossilized in amber? (I'd guess
> that "where appropriate" means wherever they are used in code.) If
> so, I'll download the pre-built packages and extract the current
> values of '$Revision$' and update the affected packages. Manually
> updating those keywords will " 'ardly hever 'appen " (to coin a
> phrase).
Included is the modest list of references to $Revision$ used in code
in the packages. I have updated the version numbers to the most
recent ones from the released packages. I left out erc because there
were too many occurrences and I was too lazy.
I'll commit these changes sometime over the weekend unless I hear any
objections.
By the way, working with the packages in the current repo structure is
less than ideal. Here's how I generated this diff:
cd ~/scmroot/xemacs-packages
for d in *-packages/*(/); do
cd $d
hg diff
cd -
done
This results in diffs that don't actually say what repository they are
against! For instance the first chunk of diffs come from edit-utils,
but that is not obvious from the diff.
Suggestions welcome.
- Vin
diff -r 6809d81c434e ChangeLog
--- a/ChangeLog Sat Sep 03 14:45:06 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:49 2011 -0500
@@ -1,3 +1,9 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * allout.el (outline-version):
+ * winring.el (winring-version): Set $Revision to the most recent
+ CVS revision number.
+
2011-05-11 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.44 released.
diff -r 6809d81c434e allout.el
--- a/allout.el Sat Sep 03 14:45:06 2011 +0200
+++ b/allout.el Thu Dec 22 15:11:49 2011 -0500
@@ -509,7 +509,7 @@
;;;_ : Version
;;;_ = outline-version
(defvar outline-version
- (let ((rcs-rev "$Revision$"))
+ (let ((rcs-rev "$Revision: 1.1 $"))
(condition-case err
(save-match-data
(string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
diff -r 6809d81c434e winring.el
--- a/winring.el Sat Sep 03 14:45:06 2011 +0200
+++ b/winring.el Thu Dec 22 15:11:49 2011 -0500
@@ -8,7 +8,7 @@
;; Created: March 1997
;; Keywords: frames tools
-(defconst winring-version "$Revision$"
+(defconst winring-version "$Revision: 1.2 $"
"winring version number.")
;; This file is part of GNU Emacs.
diff -r 689c9d91c5de ChangeLog
--- a/ChangeLog Sat Sep 03 14:45:55 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:50 2011 -0500
@@ -1,3 +1,8 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * forms.el (forms-version): Set $Revision to the most recent CVS
+ revision number.
+
2003-10-31 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.15 released.
diff -r 689c9d91c5de forms.el
--- a/forms.el Sat Sep 03 14:45:55 2011 +0200
+++ b/forms.el Thu Dec 22 15:11:50 2011 -0500
@@ -302,7 +302,7 @@
(provide 'forms) ;;; official
(provide 'forms-mode) ;;; for compatibility
-(defconst forms-version (substring "$Revision$" 11 -2)
+(defconst forms-version (substring "$Revision: 1.3 $" 11 -2)
"The version number of forms-mode (as string). The complete RCS id is:
$Id$")
diff -r c149ad62c874 ChangeLog
--- a/ChangeLog Sat Sep 03 14:49:34 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:52 2011 -0500
@@ -1,3 +1,8 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * net-utils.el (net-utils-version): Set $Revision to the most
+ recent CVS revision number.
+
2008-04-07 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.56 released.
diff -r c149ad62c874 net-utils.el
--- a/net-utils.el Sat Sep 03 14:49:34 2011 +0200
+++ b/net-utils.el Thu Dec 22 15:11:52 2011 -0500
@@ -71,7 +71,7 @@
(require 'font-lock)
(autoload 'ffap-string-at-point "ffap"))
-(defconst net-utils-version (substring "$Revision$" 11 -2)
+(defconst net-utils-version (substring "$Revision: 1.5 $" 11 -2)
"The version number of net-utils (as string). The complete RCS id is:
$Id$")
diff -r be87a7f039ff ChangeLog
--- a/ChangeLog Sat Sep 03 14:50:00 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:53 2011 -0500
@@ -1,3 +1,8 @@
+2011-12-21 Vin Shelton <acs(a)xemacs.org>
+
+ * cperl-mode.el (cperl-version): Since mercurial is not doing
+ keyword expansion, fill the revision in manually.
+
2008-04-20 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.14 released.
diff -r be87a7f039ff cperl-mode.el
--- a/cperl-mode.el Sat Sep 03 14:50:00 2011 +0200
+++ b/cperl-mode.el Thu Dec 22 15:11:53 2011 -0500
@@ -10629,7 +10629,7 @@
(cperl-fontify-syntaxically to)))))
(defvar cperl-version
- (let ((v "$Revision$"))
+ (let ((v "$Revision: 6.2 $"))
(string-match ":\\s *\\([0-9.]+\\)" v)
(substring v (match-beginning 1) (match-end 1)))
"Version of IZ-supported CPerl package this file is based on.")
diff -r af4ec0ea580f ChangeLog
--- a/ChangeLog Sat Sep 03 14:50:20 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:53 2011 -0500
@@ -1,3 +1,9 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * verilog-mode.el (verilog-mode-version):
+ * ksh-mode.el (ksh-mode): Set $Revision to the most recent CVS
+ revision number.
+
2011-05-16 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.25 released.
diff -r af4ec0ea580f ksh-mode.el
--- a/ksh-mode.el Sat Sep 03 14:50:20 2011 +0200
+++ b/ksh-mode.el Thu Dec 22 15:11:53 2011 -0500
@@ -237,7 +237,7 @@
;; Conception of this mode.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defconst ksh-mode-version "$Revision$"
+(defconst ksh-mode-version "$Revision: 1.4 $"
"*Version numbers of this version of ksh-mode")
;;
@@ -505,7 +505,7 @@
;;;###autoload
(defun ksh-mode ()
- "ksh-mode $Revision$ - Major mode for editing (Bourne, Korn or Bourne again)
+ "ksh-mode $Revision: 1.4 $ - Major mode for editing (Bourne, Korn
or Bourne again)
shell scripts.
Special key bindings and commands:
\\{ksh-mode-map}
diff -r af4ec0ea580f verilog-mode.el
--- a/verilog-mode.el Sat Sep 03 14:50:20 2011 +0200
+++ b/verilog-mode.el Thu Dec 22 15:11:53 2011 -0500
@@ -120,7 +120,7 @@
;;;###autoload(add-to-list 'auto-mode-alist
'("\\.\\(vh?\\|svh?\\|dv\\)\\'" . verilog-mode))
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version (substring "$$Revision$$" 12 -3)
+(defconst verilog-mode-version (substring "$$Revision: 463 $$" 12 -3)
"Version of this Verilog mode.")
(defconst verilog-mode-release-date (substring "$$Date$$" 8 -3)
"Release date of this Verilog mode.")
diff -r a7ab7206d8fa ChangeLog
--- a/ChangeLog Sat Sep 03 14:51:46 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:55 2011 -0500
@@ -1,3 +1,8 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * folding.el (folding-version): Set $Revision to the most recent
+ CVS revision number.
+
2010-10-19 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.00 released.
diff -r a7ab7206d8fa folding.el
--- a/folding.el Sat Sep 03 14:51:46 2011 +0200
+++ b/folding.el Thu Dec 22 15:11:55 2011 -0500
@@ -1810,7 +1810,7 @@
(defvar folding-stack nil
"Internal. A list of marker pairs representing folds entered so far.")
-(defvar folding-version (substring "$Revision$" 11 15)
+(defvar folding-version (substring "$Revision: 1.25 $" 11 15)
"Version number of folding.el.")
;;}}}
diff -r 9c8d90ff0183 ChangeLog
--- a/ChangeLog Sat Sep 03 14:54:05 2011 +0200
+++ b/ChangeLog Thu Dec 22 15:11:56 2011 -0500
@@ -1,3 +1,8 @@
+2011-12-22 Vin Shelton <acs(a)xemacs.org>
+
+ * bench.el (bench-version): Set $Revision to the most recent CVS
+ revision number.
+
2011-02-27 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.82 released.
diff -r 9c8d90ff0183 bench.el
--- a/bench.el Sat Sep 03 14:54:05 2011 +0200
+++ b/bench.el Thu Dec 22 15:11:56 2011 -0500
@@ -340,7 +340,7 @@
)
;=============================================================================
-(defconst bench-version (let ((rcsvers "$Revision$"))
+(defconst bench-version (let ((rcsvers "$Revision: 1.4 $"))
(substring rcsvers 11 (- (length rcsvers) 2)))
"*Version number of bench.el")
>
> IMO, at some point soon, all the packages need to be re-released just
> so we can build from the latest sources and track down problems like
> this.
>
> - Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/XEmacs: kehoea: Move the functionality of #'cl-macroexpand into Fmacroexpand, eval.c
13 years
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/5f4f92a31875/
changeset: 5f4f92a31875
user: kehoea
date: 2011-12-22 13:51:03
summary: Move the functionality of #'cl-macroexpand into Fmacroexpand, eval.c
src/ChangeLog addition:
2011-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* eval.c (Fmacroexpand): Rename Fmacroexpand_internal, add the
functionality that used to be in #'cl-macroexpand--it makes no
sense for us, and needlessly slows things down, to have two
separate functions.
* eval.c:
* eval.c (syms_of_eval):
Move byte-compile-macro-environment here, now it's used by
#'macroexpand.
lisp/ChangeLog addition:
2011-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp-runtime.el:
* bytecomp-runtime.el (byte-compile-macro-environment): Moved to
eval.c.
* cl.el:
* cl.el ('cl-macroexpand): New alias.
* cl.el ('macroexpand-internal): New alias.
* cl.el (cl-macroexpand): Move the functionality of this to
#'macroexpand (formerly #'macroexpand-internal) in eval.c; since
CL is always loaded in XEmacs, it brings nothing and slows things
down to have the two functions separate.
affected #: 5 files
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches