* Reformat all of src/
@ 2016-12-28 0:59 Chris Gregory
2016-12-28 3:43 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 45+ messages in thread
From: Chris Gregory @ 2016-12-28 0:59 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
I found it irritating that there was inconsistent usage of tabs and
spaces at the beginning of lines. So I reformatted the entirety of the
src directory such that all lines that begin with 8 spaces now begin
with tabs, and all lines that begin with 1 tab and 8 spaces now begin
with 2 tabs, and so on.
Here was the bash command I used for future reference (run it about 10 times):
$ find src -name '*.c' -o -name '*.h' | xargs perl -pe 's/^(\t*) {8}/$1\t/' -i
Diff is attached. It is rather large.
[-- Attachment #2: diff --]
[-- Type: application/octet-stream, Size: 1124326 bytes --]
diff --git a/src/alloc.c b/src/alloc.c
index 121d704..a7a90f4 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1261,7 +1261,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, 0);
+ mallopt (M_MMAP_MAX, 0);
#endif
#ifdef USE_ALIGNED_ALLOC
@@ -1284,7 +1284,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+ mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
#endif
#if ! USE_LSB_TAG
@@ -1994,14 +1994,14 @@ allocate_string_data (struct Lisp_String *s,
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, 0);
+ mallopt (M_MMAP_MAX, 0);
#endif
b = lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP);
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+ mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
#endif
data = b->data;
@@ -3167,14 +3167,14 @@ vector_nbytes (struct Lisp_Vector *v)
if (size & PSEUDOVECTOR_FLAG)
{
if (PSEUDOVECTOR_TYPEP (&v->header, PVEC_BOOL_VECTOR))
- {
- struct Lisp_Bool_Vector *bv = (struct Lisp_Bool_Vector *) v;
+ {
+ struct Lisp_Bool_Vector *bv = (struct Lisp_Bool_Vector *) v;
ptrdiff_t word_bytes = (bool_vector_words (bv->size)
* sizeof (bits_word));
ptrdiff_t boolvec_bytes = bool_header_size + word_bytes;
verify (header_size <= bool_header_size);
nwords = (boolvec_bytes - header_size + word_size - 1) / word_size;
- }
+ }
else
nwords = ((size & PSEUDOVECTOR_SIZE_MASK)
+ ((size & PSEUDOVECTOR_REST_MASK)
@@ -3311,7 +3311,7 @@ sweep_vectors (void)
from vector blocks. This code should be redesigned if some
pseudovector type grows beyond VBLOCK_BYTES_MAX. */
eassert (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_BOOL_VECTOR));
- total_vector_slots += vector_nbytes (vector) / word_size;
+ total_vector_slots += vector_nbytes (vector) / word_size;
}
else
total_vector_slots
@@ -3344,7 +3344,7 @@ allocate_vectorlike (ptrdiff_t len)
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, 0);
+ mallopt (M_MMAP_MAX, 0);
#endif
if (nbytes <= VBLOCK_BYTES_MAX)
@@ -3362,11 +3362,11 @@ allocate_vectorlike (ptrdiff_t len)
#ifdef DOUG_LEA_MALLOC
if (!mmap_lisp_allowed_p ())
- mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+ mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
#endif
if (find_suspicious_object_in_range (p, (char *) p + nbytes))
- emacs_abort ();
+ emacs_abort ();
consing_since_gc += nbytes;
vector_cells_consed += len;
@@ -3937,7 +3937,7 @@ init_finalizer_list (struct Lisp_Finalizer *head)
static void
finalizer_insert (struct Lisp_Finalizer *element,
- struct Lisp_Finalizer *finalizer)
+ struct Lisp_Finalizer *finalizer)
{
eassert (finalizer->prev == NULL);
eassert (finalizer->next == NULL);
@@ -3977,17 +3977,17 @@ mark_finalizer_list (struct Lisp_Finalizer *head)
static void
queue_doomed_finalizers (struct Lisp_Finalizer *dest,
- struct Lisp_Finalizer *src)
+ struct Lisp_Finalizer *src)
{
struct Lisp_Finalizer *finalizer = src->next;
while (finalizer != src)
{
struct Lisp_Finalizer *next = finalizer->next;
if (!finalizer->base.gcmarkbit && !NILP (finalizer->function))
- {
- unchain_finalizer (finalizer);
- finalizer_insert (dest, finalizer);
- }
+ {
+ unchain_finalizer (finalizer);
+ finalizer_insert (dest, finalizer);
+ }
finalizer = next;
}
@@ -4277,7 +4277,7 @@ mem_insert_fixup (struct mem_node *x)
y->color = MEM_BLACK;
x->parent->parent->color = MEM_RED;
x = x->parent->parent;
- }
+ }
else
{
/* Parent and uncle have different colors; parent is
@@ -4286,13 +4286,13 @@ mem_insert_fixup (struct mem_node *x)
{
x = x->parent;
mem_rotate_left (x);
- }
+ }
x->parent->color = MEM_BLACK;
x->parent->parent->color = MEM_RED;
mem_rotate_right (x->parent->parent);
- }
- }
+ }
+ }
else
{
/* This is the symmetrical case of above. */
@@ -4304,7 +4304,7 @@ mem_insert_fixup (struct mem_node *x)
y->color = MEM_BLACK;
x->parent->parent->color = MEM_RED;
x = x->parent->parent;
- }
+ }
else
{
if (x == x->parent->left)
@@ -4316,8 +4316,8 @@ mem_insert_fixup (struct mem_node *x)
x->parent->color = MEM_BLACK;
x->parent->parent->color = MEM_RED;
mem_rotate_left (x->parent->parent);
- }
- }
+ }
+ }
}
/* The root may have been changed to red due to the algorithm. Set
@@ -4329,7 +4329,7 @@ mem_insert_fixup (struct mem_node *x)
/* (x) (y)
/ \ / \
a (y) ===> (x) c
- / \ / \
+ / \ / \
b c a b */
static void
@@ -4469,13 +4469,13 @@ mem_delete_fixup (struct mem_node *x)
x->parent->color = MEM_RED;
mem_rotate_left (x->parent);
w = x->parent->right;
- }
+ }
if (w->left->color == MEM_BLACK && w->right->color == MEM_BLACK)
{
w->color = MEM_RED;
x = x->parent;
- }
+ }
else
{
if (w->right->color == MEM_BLACK)
@@ -4484,14 +4484,14 @@ mem_delete_fixup (struct mem_node *x)
w->color = MEM_RED;
mem_rotate_right (w);
w = x->parent->right;
- }
+ }
w->color = x->parent->color;
x->parent->color = MEM_BLACK;
w->right->color = MEM_BLACK;
mem_rotate_left (x->parent);
x = mem_root;
- }
- }
+ }
+ }
else
{
struct mem_node *w = x->parent->left;
@@ -4502,13 +4502,13 @@ mem_delete_fixup (struct mem_node *x)
x->parent->color = MEM_RED;
mem_rotate_right (x->parent);
w = x->parent->left;
- }
+ }
if (w->right->color == MEM_BLACK && w->left->color == MEM_BLACK)
{
w->color = MEM_RED;
x = x->parent;
- }
+ }
else
{
if (w->left->color == MEM_BLACK)
@@ -4517,15 +4517,15 @@ mem_delete_fixup (struct mem_node *x)
w->color = MEM_RED;
mem_rotate_left (w);
w = x->parent->left;
- }
+ }
w->color = x->parent->color;
x->parent->color = MEM_BLACK;
w->left->color = MEM_BLACK;
mem_rotate_right (x->parent);
x = mem_root;
- }
- }
+ }
+ }
}
x->color = MEM_BLACK;
@@ -4795,7 +4795,7 @@ mark_maybe_pointer (void *p)
if (sizeof (Lisp_Object) == sizeof (void *) || !HAVE_MODULES)
{
if (!maybe_lisp_pointer (p))
- return;
+ return;
}
else
{
@@ -4975,13 +4975,13 @@ test_setjmp (void)
{
/* Came here after the longjmp at the end of the function.
- If x == 1, the longjmp has restored the register to its
- value before the setjmp, and we can hope that setjmp
- saves all such registers in the jmp_buf, although that
+ If x == 1, the longjmp has restored the register to its
+ value before the setjmp, and we can hope that setjmp
+ saves all such registers in the jmp_buf, although that
isn't sure.
- For other values of X, either something really strange is
- taking place, or the setjmp just didn't save the register. */
+ For other values of X, either something really strange is
+ taking place, or the setjmp just didn't save the register. */
if (x == 1)
fprintf (stderr, SETJMP_WILL_LIKELY_WORK);
@@ -5633,28 +5633,28 @@ compact_font_cache_entry (Lisp_Object entry)
are not marked too. But we must be sure that nothing is
marked within OBJ before we really drop it. */
for (i = 0; i < size; i++)
- {
- Lisp_Object objlist;
-
- if (VECTOR_MARKED_P (GC_XFONT_ENTITY (AREF (obj_cdr, i))))
- break;
-
- objlist = AREF (AREF (obj_cdr, i), FONT_OBJLIST_INDEX);
- for (; CONSP (objlist); objlist = XCDR (objlist))
- {
- Lisp_Object val = XCAR (objlist);
- struct font *font = GC_XFONT_OBJECT (val);
-
- if (!NILP (AREF (val, FONT_TYPE_INDEX))
- && VECTOR_MARKED_P(font))
- break;
- }
- if (CONSP (objlist))
+ {
+ Lisp_Object objlist;
+
+ if (VECTOR_MARKED_P (GC_XFONT_ENTITY (AREF (obj_cdr, i))))
+ break;
+
+ objlist = AREF (AREF (obj_cdr, i), FONT_OBJLIST_INDEX);
+ for (; CONSP (objlist); objlist = XCDR (objlist))
+ {
+ Lisp_Object val = XCAR (objlist);
+ struct font *font = GC_XFONT_OBJECT (val);
+
+ if (!NILP (AREF (val, FONT_TYPE_INDEX))
+ && VECTOR_MARKED_P(font))
+ break;
+ }
+ if (CONSP (objlist))
{
/* Found a marked font, bail out. */
break;
}
- }
+ }
if (i == size)
{
@@ -6537,7 +6537,7 @@ mark_object (Lisp_Object arg)
CHECK_ALLOCATED_AND_LIVE_SYMBOL ();
ptr->gcmarkbit = 1;
/* Attempt to catch bogus objects. */
- eassert (valid_lisp_object_p (ptr->function));
+ eassert (valid_lisp_object_p (ptr->function));
mark_object (ptr->function);
mark_object (ptr->plist);
switch (ptr->redirect)
@@ -6593,12 +6593,12 @@ mark_object (Lisp_Object arg)
case Lisp_Misc_Overlay:
mark_overlay (XOVERLAY (obj));
- break;
+ break;
- case Lisp_Misc_Finalizer:
- XMISCANY (obj)->gcmarkbit = true;
- mark_object (XFINALIZER (obj)->function);
- break;
+ case Lisp_Misc_Finalizer:
+ XMISCANY (obj)->gcmarkbit = true;
+ mark_object (XFINALIZER (obj)->function);
+ break;
#ifdef HAVE_MODULES
case Lisp_Misc_User_Ptr:
@@ -6739,59 +6739,59 @@ sweep_conses (void)
/* Scan the mark bits an int at a time. */
for (i = 0; i < ilim; i++)
- {
- if (cblk->gcmarkbits[i] == BITS_WORD_MAX)
- {
- /* Fast path - all cons cells for this int are marked. */
- cblk->gcmarkbits[i] = 0;
- num_used += BITS_PER_BITS_WORD;
- }
- else
- {
- /* Some cons cells for this int are not marked.
- Find which ones, and free them. */
- int start, pos, stop;
-
- start = i * BITS_PER_BITS_WORD;
- stop = lim - start;
- if (stop > BITS_PER_BITS_WORD)
- stop = BITS_PER_BITS_WORD;
- stop += start;
-
- for (pos = start; pos < stop; pos++)
- {
- if (!CONS_MARKED_P (&cblk->conses[pos]))
- {
- this_free++;
- cblk->conses[pos].u.chain = cons_free_list;
- cons_free_list = &cblk->conses[pos];
- cons_free_list->car = Vdead;
- }
- else
- {
- num_used++;
- CONS_UNMARK (&cblk->conses[pos]);
- }
- }
- }
- }
+ {
+ if (cblk->gcmarkbits[i] == BITS_WORD_MAX)
+ {
+ /* Fast path - all cons cells for this int are marked. */
+ cblk->gcmarkbits[i] = 0;
+ num_used += BITS_PER_BITS_WORD;
+ }
+ else
+ {
+ /* Some cons cells for this int are not marked.
+ Find which ones, and free them. */
+ int start, pos, stop;
+
+ start = i * BITS_PER_BITS_WORD;
+ stop = lim - start;
+ if (stop > BITS_PER_BITS_WORD)
+ stop = BITS_PER_BITS_WORD;
+ stop += start;
+
+ for (pos = start; pos < stop; pos++)
+ {
+ if (!CONS_MARKED_P (&cblk->conses[pos]))
+ {
+ this_free++;
+ cblk->conses[pos].u.chain = cons_free_list;
+ cons_free_list = &cblk->conses[pos];
+ cons_free_list->car = Vdead;
+ }
+ else
+ {
+ num_used++;
+ CONS_UNMARK (&cblk->conses[pos]);
+ }
+ }
+ }
+ }
lim = CONS_BLOCK_SIZE;
/* If this block contains only free conses and we have already
- seen more than two blocks worth of free conses then deallocate
- this block. */
+ seen more than two blocks worth of free conses then deallocate
+ this block. */
if (this_free == CONS_BLOCK_SIZE && num_free > CONS_BLOCK_SIZE)
- {
- *cprev = cblk->next;
- /* Unhook from the free list. */
- cons_free_list = cblk->conses[0].u.chain;
- lisp_align_free (cblk);
- }
+ {
+ *cprev = cblk->next;
+ /* Unhook from the free list. */
+ cons_free_list = cblk->conses[0].u.chain;
+ lisp_align_free (cblk);
+ }
else
- {
- num_free += this_free;
- cprev = &cblk->next;
- }
+ {
+ num_free += this_free;
+ cprev = &cblk->next;
+ }
}
total_conses = num_used;
total_free_conses = num_free;
@@ -6813,33 +6813,33 @@ sweep_floats (void)
register int i;
int this_free = 0;
for (i = 0; i < lim; i++)
- if (!FLOAT_MARKED_P (&fblk->floats[i]))
- {
- this_free++;
- fblk->floats[i].u.chain = float_free_list;
- float_free_list = &fblk->floats[i];
- }
- else
- {
- num_used++;
- FLOAT_UNMARK (&fblk->floats[i]);
- }
+ if (!FLOAT_MARKED_P (&fblk->floats[i]))
+ {
+ this_free++;
+ fblk->floats[i].u.chain = float_free_list;
+ float_free_list = &fblk->floats[i];
+ }
+ else
+ {
+ num_used++;
+ FLOAT_UNMARK (&fblk->floats[i]);
+ }
lim = FLOAT_BLOCK_SIZE;
/* If this block contains only free floats and we have already
- seen more than two blocks worth of free floats then deallocate
- this block. */
+ seen more than two blocks worth of free floats then deallocate
+ this block. */
if (this_free == FLOAT_BLOCK_SIZE && num_free > FLOAT_BLOCK_SIZE)
- {
- *fprev = fblk->next;
- /* Unhook from the free list. */
- float_free_list = fblk->floats[0].u.chain;
- lisp_align_free (fblk);
- }
+ {
+ *fprev = fblk->next;
+ /* Unhook from the free list. */
+ float_free_list = fblk->floats[0].u.chain;
+ lisp_align_free (fblk);
+ }
else
- {
- num_free += this_free;
- fprev = &fblk->next;
- }
+ {
+ num_free += this_free;
+ fprev = &fblk->next;
+ }
}
total_floats = num_used;
total_free_floats = num_free;
@@ -6862,35 +6862,35 @@ sweep_intervals (void)
int this_free = 0;
for (i = 0; i < lim; i++)
- {
- if (!iblk->intervals[i].gcmarkbit)
- {
- set_interval_parent (&iblk->intervals[i], interval_free_list);
- interval_free_list = &iblk->intervals[i];
- this_free++;
- }
- else
- {
- num_used++;
- iblk->intervals[i].gcmarkbit = 0;
- }
- }
+ {
+ if (!iblk->intervals[i].gcmarkbit)
+ {
+ set_interval_parent (&iblk->intervals[i], interval_free_list);
+ interval_free_list = &iblk->intervals[i];
+ this_free++;
+ }
+ else
+ {
+ num_used++;
+ iblk->intervals[i].gcmarkbit = 0;
+ }
+ }
lim = INTERVAL_BLOCK_SIZE;
/* If this block contains only free intervals and we have already
- seen more than two blocks worth of free intervals then
- deallocate this block. */
+ seen more than two blocks worth of free intervals then
+ deallocate this block. */
if (this_free == INTERVAL_BLOCK_SIZE && num_free > INTERVAL_BLOCK_SIZE)
- {
- *iprev = iblk->next;
- /* Unhook from the free list. */
- interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
- lisp_free (iblk);
- }
+ {
+ *iprev = iblk->next;
+ /* Unhook from the free list. */
+ interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
+ lisp_free (iblk);
+ }
else
- {
- num_free += this_free;
- iprev = &iblk->next;
- }
+ {
+ num_free += this_free;
+ iprev = &iblk->next;
+ }
}
total_intervals = num_used;
total_free_intervals = num_free;
@@ -6917,41 +6917,41 @@ sweep_symbols (void)
union aligned_Lisp_Symbol *end = sym + lim;
for (; sym < end; ++sym)
- {
- if (!sym->s.gcmarkbit)
- {
- if (sym->s.redirect == SYMBOL_LOCALIZED)
- xfree (SYMBOL_BLV (&sym->s));
- sym->s.next = symbol_free_list;
- symbol_free_list = &sym->s;
- symbol_free_list->function = Vdead;
- ++this_free;
- }
- else
- {
- ++num_used;
- sym->s.gcmarkbit = 0;
- /* Attempt to catch bogus objects. */
- eassert (valid_lisp_object_p (sym->s.function));
- }
- }
+ {
+ if (!sym->s.gcmarkbit)
+ {
+ if (sym->s.redirect == SYMBOL_LOCALIZED)
+ xfree (SYMBOL_BLV (&sym->s));
+ sym->s.next = symbol_free_list;
+ symbol_free_list = &sym->s;
+ symbol_free_list->function = Vdead;
+ ++this_free;
+ }
+ else
+ {
+ ++num_used;
+ sym->s.gcmarkbit = 0;
+ /* Attempt to catch bogus objects. */
+ eassert (valid_lisp_object_p (sym->s.function));
+ }
+ }
lim = SYMBOL_BLOCK_SIZE;
/* If this block contains only free symbols and we have already
- seen more than two blocks worth of free symbols then deallocate
- this block. */
+ seen more than two blocks worth of free symbols then deallocate
+ this block. */
if (this_free == SYMBOL_BLOCK_SIZE && num_free > SYMBOL_BLOCK_SIZE)
- {
- *sprev = sblk->next;
- /* Unhook from the free list. */
- symbol_free_list = sblk->symbols[0].s.next;
- lisp_free (sblk);
- }
+ {
+ *sprev = sblk->next;
+ /* Unhook from the free list. */
+ symbol_free_list = sblk->symbols[0].s.next;
+ lisp_free (sblk);
+ }
else
- {
- num_free += this_free;
- sprev = &sblk->next;
- }
+ {
+ num_free += this_free;
+ sprev = &sblk->next;
+ }
}
total_symbols = num_used;
total_free_symbols = num_free;
@@ -6977,13 +6977,13 @@ sweep_misc (void)
int this_free = 0;
for (i = 0; i < lim; i++)
- {
- if (!mblk->markers[i].m.u_any.gcmarkbit)
- {
- if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
- unchain_marker (&mblk->markers[i].m.u_marker);
- else if (mblk->markers[i].m.u_any.type == Lisp_Misc_Finalizer)
- unchain_finalizer (&mblk->markers[i].m.u_finalizer);
+ {
+ if (!mblk->markers[i].m.u_any.gcmarkbit)
+ {
+ if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
+ unchain_marker (&mblk->markers[i].m.u_marker);
+ else if (mblk->markers[i].m.u_any.type == Lisp_Misc_Finalizer)
+ unchain_finalizer (&mblk->markers[i].m.u_finalizer);
#ifdef HAVE_MODULES
else if (mblk->markers[i].m.u_any.type == Lisp_Misc_User_Ptr)
{
@@ -6992,36 +6992,36 @@ sweep_misc (void)
uptr->finalizer (uptr->p);
}
#endif
- /* Set the type of the freed object to Lisp_Misc_Free.
- We could leave the type alone, since nobody checks it,
- but this might catch bugs faster. */
- mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
- mblk->markers[i].m.u_free.chain = marker_free_list;
- marker_free_list = &mblk->markers[i].m;
- this_free++;
- }
- else
- {
- num_used++;
- mblk->markers[i].m.u_any.gcmarkbit = 0;
- }
- }
+ /* Set the type of the freed object to Lisp_Misc_Free.
+ We could leave the type alone, since nobody checks it,
+ but this might catch bugs faster. */
+ mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
+ mblk->markers[i].m.u_free.chain = marker_free_list;
+ marker_free_list = &mblk->markers[i].m;
+ this_free++;
+ }
+ else
+ {
+ num_used++;
+ mblk->markers[i].m.u_any.gcmarkbit = 0;
+ }
+ }
lim = MARKER_BLOCK_SIZE;
/* If this block contains only free markers and we have already
- seen more than two blocks worth of free markers then deallocate
- this block. */
+ seen more than two blocks worth of free markers then deallocate
+ this block. */
if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
- {
- *mprev = mblk->next;
- /* Unhook from the free list. */
- marker_free_list = mblk->markers[0].m.u_free.chain;
- lisp_free (mblk);
- }
+ {
+ *mprev = mblk->next;
+ /* Unhook from the free list. */
+ marker_free_list = mblk->markers[0].m.u_free.chain;
+ lisp_free (mblk);
+ }
else
- {
- num_free += this_free;
- mprev = &mblk->next;
- }
+ {
+ num_free += this_free;
+ mprev = &mblk->next;
+ }
}
total_markers = num_used;
@@ -7038,16 +7038,16 @@ sweep_buffers (void)
for (buffer = all_buffers; buffer; buffer = *bprev)
if (!VECTOR_MARKED_P (buffer))
{
- *bprev = buffer->next;
- lisp_free (buffer);
+ *bprev = buffer->next;
+ lisp_free (buffer);
}
else
{
- VECTOR_UNMARK (buffer);
- /* Do not use buffer_(set|get)_intervals here. */
- buffer->text->intervals = balance_intervals (buffer->text->intervals);
- total_buffers++;
- bprev = &buffer->next;
+ VECTOR_UNMARK (buffer);
+ /* Do not use buffer_(set|get)_intervals here. */
+ buffer->text->intervals = balance_intervals (buffer->text->intervals);
+ total_buffers++;
+ bprev = &buffer->next;
}
}
@@ -7275,8 +7275,8 @@ detect_suspicious_free (void* ptr)
for (i = 0; i < ARRAYELTS (suspicious_objects); ++i)
if (suspicious_objects[i] == ptr)
{
- note_suspicious_free (ptr);
- suspicious_objects[i] = NULL;
+ note_suspicious_free (ptr);
+ suspicious_objects[i] = NULL;
}
}
@@ -7481,7 +7481,7 @@ do hash-consing of the objects allocated to pure space. */);
doc: /* Accumulated time elapsed in garbage collections.
The time is in seconds as a floating point value. */);
DEFVAR_INT ("gcs-done", gcs_done,
- doc: /* Accumulated number of garbage collections done. */);
+ doc: /* Accumulated number of garbage collections done. */);
defsubr (&Scons);
defsubr (&Slist);
diff --git a/src/atimer.c b/src/atimer.c
index 64c9e8a..e4f78eb 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -84,7 +84,7 @@ unblock_atimers (sigset_t const *oldset)
static void set_alarm (void);
static void schedule_atimer (struct atimer *);
static struct atimer *append_atimer_lists (struct atimer *,
- struct atimer *);
+ struct atimer *);
/* Start a new atimer of type TYPE. TIMESTAMP specifies when the timer is
ripe. FN is the function to call when the timer fires.
diff --git a/src/atimer.h b/src/atimer.h
index 17183c8..eace60e 100644
--- a/src/atimer.h
+++ b/src/atimer.h
@@ -70,7 +70,7 @@ struct atimer
/* Function prototypes. */
struct atimer *start_atimer (enum atimer_type, struct timespec,
- atimer_callback, void *);
+ atimer_callback, void *);
void cancel_atimer (struct atimer *);
void do_pending_atimers (void);
void init_atimer (void);
diff --git a/src/bidi.c b/src/bidi.c
index 5824de5..e7543d0 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2186,8 +2186,8 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
if (bidi_it->type == NEUTRAL_B)
{
/* We've got a new isolating sequence, compute the directional
- type of sos and initialize per-run variables (UAX#9, clause
- X10). */
+ type of sos and initialize per-run variables (UAX#9, clause
+ X10). */
bidi_set_sos_type (bidi_it, prev_level, new_level);
}
if (type == NEUTRAL_S || type == NEUTRAL_WS
@@ -3315,8 +3315,8 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
all the levels higher than it. In other words, given the levels
like this:
- 11111112222222333333334443343222222111111112223322111
- A B C
+ 11111112222222333333334443343222222111111112223322111
+ A B C
and assuming we are at point A scanning left to right, this
function moves to point C, whereas the UAX#9 ``level 2 run'' ends
@@ -3434,8 +3434,8 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
where to continue after a level change, and in what direction,
is tricky. For example, given a text like below:
- abcdefgh
- 11336622
+ abcdefgh
+ 11336622
(where the numbers below the text show the resolved levels),
the result of reordering according to UAX#9 should be this:
diff --git a/src/buffer.c b/src/buffer.c
index 28cf702..c8e4782 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -106,8 +106,8 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS];
int last_per_buffer_idx;
static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
- bool after, Lisp_Object arg1,
- Lisp_Object arg2, Lisp_Object arg3);
+ bool after, Lisp_Object arg1,
+ Lisp_Object arg2, Lisp_Object arg3);
static void swap_out_buffer_local_variables (struct buffer *b);
static void reset_buffer_local_variables (struct buffer *, bool);
@@ -394,7 +394,7 @@ followed by the rest of the buffers. */)
(XFRAME (frame)->buried_buffer_list));
/* Remove from GENERAL any buffer that duplicates one in
- FRAMELIST or PREVLIST. */
+ FRAMELIST or PREVLIST. */
tail = framelist;
while (CONSP (tail))
{
@@ -985,52 +985,52 @@ reset_buffer_local_variables (struct buffer *b, bool permanent_too)
{
Lisp_Object tmp, last = Qnil;
for (tmp = BVAR (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp))
- {
- Lisp_Object local_var = XCAR (XCAR (tmp));
- Lisp_Object prop = Fget (local_var, Qpermanent_local);
-
- if (!NILP (prop))
- {
- /* If permanent-local, keep it. */
- last = tmp;
- if (EQ (prop, Qpermanent_local_hook))
- {
- /* This is a partially permanent hook variable.
- Preserve only the elements that want to be preserved. */
- Lisp_Object list, newlist;
- list = XCDR (XCAR (tmp));
- if (!CONSP (list))
- newlist = list;
- else
- for (newlist = Qnil; CONSP (list); list = XCDR (list))
- {
- Lisp_Object elt = XCAR (list);
- /* Preserve element ELT if it's t,
- if it is a function with a `permanent-local-hook' property,
- or if it's not a symbol. */
- if (! SYMBOLP (elt)
- || EQ (elt, Qt)
- || !NILP (Fget (elt, Qpermanent_local_hook)))
- newlist = Fcons (elt, newlist);
- }
- newlist = Fnreverse (newlist);
- if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE)
- notify_variable_watchers (local_var, newlist,
- Qmakunbound, Fcurrent_buffer ());
- XSETCDR (XCAR (tmp), newlist);
- continue; /* Don't do variable write trapping twice. */
- }
- }
- /* Delete this local variable. */
- else if (NILP (last))
- bset_local_var_alist (b, XCDR (tmp));
- else
- XSETCDR (last, XCDR (tmp));
-
- if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE)
- notify_variable_watchers (local_var, Qnil,
- Qmakunbound, Fcurrent_buffer ());
- }
+ {
+ Lisp_Object local_var = XCAR (XCAR (tmp));
+ Lisp_Object prop = Fget (local_var, Qpermanent_local);
+
+ if (!NILP (prop))
+ {
+ /* If permanent-local, keep it. */
+ last = tmp;
+ if (EQ (prop, Qpermanent_local_hook))
+ {
+ /* This is a partially permanent hook variable.
+ Preserve only the elements that want to be preserved. */
+ Lisp_Object list, newlist;
+ list = XCDR (XCAR (tmp));
+ if (!CONSP (list))
+ newlist = list;
+ else
+ for (newlist = Qnil; CONSP (list); list = XCDR (list))
+ {
+ Lisp_Object elt = XCAR (list);
+ /* Preserve element ELT if it's t,
+ if it is a function with a `permanent-local-hook' property,
+ or if it's not a symbol. */
+ if (! SYMBOLP (elt)
+ || EQ (elt, Qt)
+ || !NILP (Fget (elt, Qpermanent_local_hook)))
+ newlist = Fcons (elt, newlist);
+ }
+ newlist = Fnreverse (newlist);
+ if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE)
+ notify_variable_watchers (local_var, newlist,
+ Qmakunbound, Fcurrent_buffer ());
+ XSETCDR (XCAR (tmp), newlist);
+ continue; /* Don't do variable write trapping twice. */
+ }
+ }
+ /* Delete this local variable. */
+ else if (NILP (last))
+ bset_local_var_alist (b, XCDR (tmp));
+ else
+ XSETCDR (last, XCDR (tmp));
+
+ if (XSYMBOL (local_var)->trapped_write == SYMBOL_TRAPPED_WRITE)
+ notify_variable_watchers (local_var, Qnil,
+ Qmakunbound, Fcurrent_buffer ());
+ }
}
for (i = 0; i < last_per_buffer_idx; ++i)
@@ -2002,8 +2002,8 @@ the current buffer's major mode. */)
}
if (NILP (function)) /* If function is `fundamental-mode', allow it to run
- so that `run-mode-hooks' and thus
- `hack-local-variables' get run. */
+ so that `run-mode-hooks' and thus
+ `hack-local-variables' get run. */
return Qnil;
count = SPECPDL_INDEX ();
@@ -2227,7 +2227,7 @@ advance_to_char_boundary (ptrdiff_t byte_pos)
if (! CHAR_HEAD_P (c))
{
/* We should advance BYTE_POS only when C is a constituent of a
- multibyte sequence. */
+ multibyte sequence. */
ptrdiff_t orig_byte_pos = byte_pos;
do
@@ -2240,8 +2240,8 @@ advance_to_char_boundary (ptrdiff_t byte_pos)
if (byte_pos < orig_byte_pos)
byte_pos = orig_byte_pos;
/* If C is a constituent of a multibyte sequence, BYTE_POS was
- surely advance to the correct character boundary. If C is
- not, BYTE_POS was unchanged. */
+ surely advance to the correct character boundary. If C is
+ not, BYTE_POS was unchanged. */
}
return byte_pos;
@@ -3989,7 +3989,7 @@ buffer. */)
{
/* Redisplay where the overlay was. */
if (ob)
- modify_overlay (ob, o_beg, o_end);
+ modify_overlay (ob, o_beg, o_end);
/* Redisplay where the overlay is going to be. */
modify_overlay (b, n_beg, n_end);
@@ -5272,7 +5272,7 @@ init_buffer (int initialized)
init_buffer_once and init_window_once (which are not called
in the dumped Emacs), and by the first call to coding.c routines. */
FOR_EACH_BUFFER (b)
- {
+ {
b->text->beg = NULL;
enlarge_buffer_text (b, 0);
}
@@ -5284,7 +5284,7 @@ init_buffer (int initialized)
/* Only buffers with allocated buffer text should be present at
this point in temacs. */
FOR_EACH_BUFFER (b)
- {
+ {
eassert (b->text->beg != NULL);
}
}
@@ -5303,45 +5303,45 @@ init_buffer (int initialized)
if (!pwd)
{
fprintf (stderr, "Error getting directory: %s\n",
- emacs_strerror (errno));
+ emacs_strerror (errno));
bset_directory (current_buffer, Qnil);
}
else
{
/* Maybe this should really use some standard subroutine
- whose definition is filename syntax dependent. */
+ whose definition is filename syntax dependent. */
len = strlen (pwd);
if (!(IS_DIRECTORY_SEP (pwd[len - 1])))
- {
- /* Grow buffer to add directory separator and '\0'. */
- pwd = realloc (pwd, len + 2);
- if (!pwd)
- fatal ("get_current_dir_name: %s\n", strerror (errno));
- pwd[len] = DIRECTORY_SEP;
- pwd[len + 1] = '\0';
- len++;
- }
+ {
+ /* Grow buffer to add directory separator and '\0'. */
+ pwd = realloc (pwd, len + 2);
+ if (!pwd)
+ fatal ("get_current_dir_name: %s\n", strerror (errno));
+ pwd[len] = DIRECTORY_SEP;
+ pwd[len + 1] = '\0';
+ len++;
+ }
/* At this moment, we still don't know how to decode the directory
- name. So, we keep the bytes in unibyte form so that file I/O
- routines correctly get the original bytes. */
+ name. So, we keep the bytes in unibyte form so that file I/O
+ routines correctly get the original bytes. */
bset_directory (current_buffer, make_unibyte_string (pwd, len));
/* Add /: to the front of the name
- if it would otherwise be treated as magic. */
+ if it would otherwise be treated as magic. */
temp = Ffind_file_name_handler (BVAR (current_buffer, directory), Qt);
if (! NILP (temp)
- /* If the default dir is just /, TEMP is non-nil
- because of the ange-ftp completion handler.
- However, it is not necessary to turn / into /:/.
- So avoid doing that. */
- && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
- {
- AUTO_STRING (slash_colon, "/:");
- bset_directory (current_buffer,
- concat2 (slash_colon,
- BVAR (current_buffer, directory)));
- }
+ /* If the default dir is just /, TEMP is non-nil
+ because of the ange-ftp completion handler.
+ However, it is not necessary to turn / into /:/.
+ So avoid doing that. */
+ && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
+ {
+ AUTO_STRING (slash_colon, "/:");
+ bset_directory (current_buffer,
+ concat2 (slash_colon,
+ BVAR (current_buffer, directory)));
+ }
}
temp = get_minibuffer (0);
@@ -5489,20 +5489,20 @@ A string is printed verbatim in the mode line except for %-constructs:
For a modified read-only buffer, %* gives % and %+ gives *.
%s -- print process status. %l -- print the current line number.
%c -- print the current column number (this makes editing slower).
- To make the column number update correctly in all cases,
+ To make the column number update correctly in all cases,
`column-number-mode' must be non-nil.
%i -- print the size of the buffer.
%I -- like %i, but use k, M, G, etc., to abbreviate.
%p -- print percent of buffer above top of window, or Top, Bot or All.
%P -- print percent of buffer above bottom of window, perhaps plus Top,
- or print Bottom or All.
+ or print Bottom or All.
%n -- print Narrow if appropriate.
%t -- visited file is text or binary (if OS supports this distinction).
%z -- print mnemonics of keyboard, terminal, and buffer coding systems.
%Z -- like %z, but including the end-of-line format.
%e -- print error message about full memory.
%@ -- print @ or hyphen. @ means that default-directory is on a
- remote machine.
+ remote machine.
%[ -- print one [ for each recursive editing level. %] similar.
%% -- print %. %- -- print infinitely many dashes.
Decimal digits after the % specify field width to which to pad. */);
@@ -5515,7 +5515,7 @@ A value of nil means to use the current buffer's major mode, provided
it is not marked as "special". */);
DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name),
- Qnil,
+ Qnil,
doc: /* Pretty name of current buffer's major mode.
Usually a string, but can use any of the constructs for `mode-line-format',
which see.
diff --git a/src/bytecode.c b/src/bytecode.c
index 3bb96c2..0424640 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -63,12 +63,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
if (byte_metering_on) \
{ \
if (XFASTINT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \
- XSETFASTINT (METER_1 (this_code), \
+ XSETFASTINT (METER_1 (this_code), \
XFASTINT (METER_1 (this_code)) + 1); \
if (last_code \
&& (XFASTINT (METER_2 (last_code, this_code)) \
< MOST_POSITIVE_FIXNUM)) \
- XSETFASTINT (METER_2 (last_code, this_code), \
+ XSETFASTINT (METER_2 (last_code, this_code), \
XFASTINT (METER_2 (last_code, this_code)) + 1); \
} \
}
@@ -572,7 +572,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
&& !SYMBOL_TRAPPED_WRITE_P (sym))
SET_SYMBOL_VAL (XSYMBOL (sym), val);
else
- set_internal (sym, val, Qnil, SET_INTERNAL_SET);
+ set_internal (sym, val, Qnil, SET_INTERNAL_SET);
}
NEXT;
@@ -1478,7 +1478,7 @@ integer, it is incremented each time that symbol's function is called. */);
int i = 256;
while (i--)
ASET (Vbyte_code_meter, i,
- Fmake_vector (make_number (256), make_number (0)));
+ Fmake_vector (make_number (256), make_number (0)));
}
#endif
}
diff --git a/src/callint.c b/src/callint.c
index c0afc7b..46a08ef 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -450,7 +450,7 @@ invoke it. If KEYS is omitted or nil, the return value of
error ("Attempt to select inactive minibuffer window");
/* If the current buffer wants to clean up, let it. */
- run_hook (Qmouse_leave_buffer_hook);
+ run_hook (Qmouse_leave_buffer_hook);
Fselect_window (w, Qnil);
}
@@ -531,7 +531,7 @@ invoke it. If KEYS is omitted or nil, the return value of
Qnil, Qnil);
break;
- case 'c': /* Character. */
+ case 'c': /* Character. */
/* Prompt in `minibuffer-prompt' face. */
Fput_text_property (make_number (0),
make_number (SCHARS (callint_message)),
diff --git a/src/callproc.c b/src/callproc.c
index 02db348..5da7d5d 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1393,9 +1393,9 @@ getenv_internal (const char *var, ptrdiff_t varlen, char **value,
char* tmpval = getenv (var);
if (tmpval)
{
- *value = tmpval;
- *valuelen = strlen (tmpval);
- return 1;
+ *value = tmpval;
+ *valuelen = strlen (tmpval);
+ return 1;
}
}
#endif
@@ -1478,25 +1478,25 @@ init_callproc_1 (void)
Vdata_directory = decode_env_path ("EMACSDATA",
#ifdef HAVE_NS
- etc_dir ? etc_dir :
+ etc_dir ? etc_dir :
#endif
- PATH_DATA, 0);
+ PATH_DATA, 0);
Vdata_directory = Ffile_name_as_directory (Fcar (Vdata_directory));
Vdoc_directory = decode_env_path ("EMACSDOC",
#ifdef HAVE_NS
- etc_dir ? etc_dir :
+ etc_dir ? etc_dir :
#endif
- PATH_DOC, 0);
+ PATH_DOC, 0);
Vdoc_directory = Ffile_name_as_directory (Fcar (Vdoc_directory));
/* Check the EMACSPATH environment variable, defaulting to the
PATH_EXEC path from epaths.h. */
Vexec_path = decode_env_path ("EMACSPATH",
#ifdef HAVE_NS
- path_exec ? path_exec :
+ path_exec ? path_exec :
#endif
- PATH_EXEC, 0);
+ PATH_EXEC, 0);
Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
/* FIXME? For ns, path_exec should go at the front? */
Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path);
diff --git a/src/ccl.c b/src/ccl.c
index b9dc52e..4dcdb28 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -75,7 +75,7 @@ static Lisp_Object Vccl_program_table;
cccccccccccccccccccc rrr XXXXX
or
|------------- constant or other args ----------------|
- cccccccccccccccccccccccccccc
+ cccccccccccccccccccccccccccc
where `cc...c' is a 17-bit, 20-bit, or 28-bit integer indicating a
constant value or a relative/absolute jump address, `RRR'
@@ -896,8 +896,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))
{
/* We can't just signal Qquit, instead break the loop as if
- the whole data is processed. Don't reset Vquit_flag, it
- must be handled later at a safer place. */
+ the whole data is processed. Don't reset Vquit_flag, it
+ must be handled later at a safer place. */
if (src)
src = source + src_size;
ccl->status = CCL_STAT_QUIT;
@@ -1054,7 +1054,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
int prog_id;
/* If FFF is nonzero, the CCL program ID is in the
- following code. */
+ following code. */
if (rrr)
prog_id = XINT (ccl_prog[ic++]);
else
@@ -1119,7 +1119,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
if (src)
src = src_end;
/* ccl->ic should points to this command code again to
- suppress further processing. */
+ suppress further processing. */
ic--;
CCL_SUCCESS;
@@ -1700,8 +1700,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
if (destination)
{
/* We can insert an error message only if DESTINATION is
- specified and we still have a room to store the message
- there. */
+ specified and we still have a room to store the message
+ there. */
char msg[256];
int msglen;
@@ -1826,8 +1826,8 @@ resolve_symbol_ccl_program (Lisp_Object ccl)
else if (SYMBOLP (contents))
{
/* This is the old style for embedding symbols. This style
- may lead to a bug if, for instance, a translation table
- and a code conversion map have the same name. */
+ may lead to a bug if, for instance, a translation table
+ and a code conversion map have the same name. */
val = Fget (contents, Qtranslation_table_id);
if (RANGED_INTEGERP (0, val, INT_MAX))
ASET (result, i, val);
diff --git a/src/ccl.h b/src/ccl.h
index 10860f5..c2d8f81 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -77,7 +77,7 @@ struct ccl_spec {
extern bool setup_ccl_program (struct ccl_program *, Lisp_Object);
extern void ccl_driver (struct ccl_program *, int *, int *, int, int,
- Lisp_Object);
+ Lisp_Object);
#define CHECK_CCL_PROGRAM(x) \
do { \
diff --git a/src/character.c b/src/character.c
index 75a7dab..8639c0a 100644
--- a/src/character.c
+++ b/src/character.c
@@ -637,7 +637,7 @@ count_size_as_multibyte (const unsigned char *str, ptrdiff_t len)
{
int n = *str < 0x80 ? 1 : 2;
if (INT_ADD_WRAPV (bytes, n, &bytes))
- string_overflow ();
+ string_overflow ();
}
return bytes;
}
diff --git a/src/character.h b/src/character.h
index fc8a0dd..d8356bd 100644
--- a/src/character.h
+++ b/src/character.h
@@ -30,7 +30,7 @@ INLINE_HEADER_BEGIN
/* character code 1st byte byte sequence
-------------- -------- -------------
- 0-7F 00..7F 0xxxxxxx
+ 0-7F 00..7F 0xxxxxxx
80-7FF C2..DF 110xxxxx 10xxxxxx
800-FFFF E0..EF 1110xxxx 10xxxxxx 10xxxxxx
10000-1FFFFF F0..F7 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
@@ -657,7 +657,7 @@ typedef enum {
extern EMACS_INT char_resolve_modifier_mask (EMACS_INT) ATTRIBUTE_CONST;
extern int char_string (unsigned, unsigned char *);
extern int string_char (const unsigned char *,
- const unsigned char **, int *);
+ const unsigned char **, int *);
extern int translate_char (Lisp_Object, int c);
extern ptrdiff_t count_size_as_multibyte (const unsigned char *, ptrdiff_t);
@@ -666,7 +666,7 @@ extern ptrdiff_t str_as_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t,
extern ptrdiff_t str_to_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t);
extern ptrdiff_t str_as_unibyte (unsigned char *, ptrdiff_t);
extern ptrdiff_t str_to_unibyte (const unsigned char *, unsigned char *,
- ptrdiff_t);
+ ptrdiff_t);
extern ptrdiff_t strwidth (const char *, ptrdiff_t);
extern ptrdiff_t c_string_width (const unsigned char *, ptrdiff_t, int,
ptrdiff_t *, ptrdiff_t *);
diff --git a/src/charset.c b/src/charset.c
index 09520cc..a8f9de2 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -2279,14 +2279,14 @@ init_charset (void)
if (! file_accessible_directory_p (tempdir))
{
/* This used to be non-fatal (dir_warning), but it should not
- happen, and if it does sooner or later it will cause some
- obscure problem (eg bug#6401), so better abort. */
+ happen, and if it does sooner or later it will cause some
+ obscure problem (eg bug#6401), so better abort. */
fprintf (stderr, "Error: charsets directory not found:\n\
%s\n\
Emacs will not function correctly without the character map files.\n%s\
Please check your installation!\n",
- SDATA (tempdir),
- egetenv("EMACSDATA") ? "The EMACSDATA environment \
+ SDATA (tempdir),
+ egetenv("EMACSDATA") ? "The EMACSDATA environment \
variable is set, maybe it has the wrong value?\n" : "");
exit (1);
}
diff --git a/src/charset.h b/src/charset.h
index 8e77567..cb8340b 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -537,8 +537,8 @@ extern unsigned encode_char (struct charset *, int);
extern int string_xstring_p (Lisp_Object);
extern void map_charset_chars (void (*) (Lisp_Object, Lisp_Object),
- Lisp_Object, Lisp_Object,
- struct charset *, unsigned, unsigned);
+ Lisp_Object, Lisp_Object,
+ struct charset *, unsigned, unsigned);
INLINE_HEADER_END
diff --git a/src/cm.c b/src/cm.c
index e135889..3f5e4db 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -90,11 +90,11 @@ addcol (tty, n) {
if (tty->Wcm->cm_magicwrap)
; /* "limbo" */
else if (tty->Wcm->cm_autowrap) {
- curX (tty) = 0;
- curY (tty) ++; /* Beware end of screen! */
+ curX (tty) = 0;
+ curY (tty) ++; /* Beware end of screen! */
}
else
- curX (tty)--;
+ curX (tty)--;
}
}
#endif
@@ -176,17 +176,17 @@ cmcostinit (struct tty_display_info *tty)
static int
calccost (struct tty_display_info *tty,
- int srcy, int srcx, int dsty, int dstx, int doit)
+ int srcy, int srcx, int dsty, int dstx, int doit)
{
register int deltay,
- deltax,
- c,
- totalcost;
+ deltax,
+ c,
+ totalcost;
int ntabs,
- n2tabs,
- tabx,
- tab2x,
- tabcost;
+ n2tabs,
+ tabx,
+ tab2x,
+ tabcost;
register const char *p;
/* If have just wrapped on a terminal with xn,
@@ -211,7 +211,7 @@ calccost (struct tty_display_info *tty,
totalcost = c * deltay;
if (doit)
do
- emacs_tputs (tty, p, 1, cmputc);
+ emacs_tputs (tty, p, 1, cmputc);
while (--deltay > 0);
x:
if ((deltax = dstx - srcx) == 0)
@@ -267,7 +267,7 @@ calccost (struct tty_display_info *tty,
totalcost += tabcost; /* use the tabs */
if (doit)
while (--ntabs >= 0)
- emacs_tputs (tty, tty->Wcm->cm_tab, 1, cmputc);
+ emacs_tputs (tty, tty->Wcm->cm_tab, 1, cmputc);
srcx = tabx;
}
@@ -294,7 +294,7 @@ calccost (struct tty_display_info *tty,
totalcost += c * deltax;
if (doit)
do
- emacs_tputs (tty, p, 1, cmputc);
+ emacs_tputs (tty, p, 1, cmputc);
while (--deltax > 0);
done:
return totalcost;
@@ -317,10 +317,10 @@ void
cmgoto (struct tty_display_info *tty, int row, int col)
{
int homecost,
- crcost,
- llcost,
- relcost,
- directcost;
+ crcost,
+ llcost,
+ relcost,
+ directcost;
int use UNINIT;
char *p;
const char *dcm;
@@ -339,21 +339,21 @@ cmgoto (struct tty_display_info *tty, int row, int col)
relcost = calccost (tty, curY (tty), curX (tty), row, col, 0);
use = USEREL;
if ((homecost = tty->Wcm->cc_home) < BIG)
- homecost += calccost (tty, 0, 0, row, col, 0);
+ homecost += calccost (tty, 0, 0, row, col, 0);
if (homecost < relcost)
- relcost = homecost, use = USEHOME;
+ relcost = homecost, use = USEHOME;
if ((llcost = tty->Wcm->cc_ll) < BIG)
- llcost += calccost (tty, tty->Wcm->cm_rows - 1, 0, row, col, 0);
+ llcost += calccost (tty, tty->Wcm->cm_rows - 1, 0, row, col, 0);
if (llcost < relcost)
- relcost = llcost, use = USELL;
+ relcost = llcost, use = USELL;
if ((crcost = tty->Wcm->cc_cr) < BIG) {
if (tty->Wcm->cm_autolf)
- if (curY (tty) + 1 >= tty->Wcm->cm_rows)
- crcost = BIG;
+ if (curY (tty) + 1 >= tty->Wcm->cm_rows)
+ crcost = BIG;
else
- crcost += calccost (tty, curY (tty) + 1, 0, row, col, 0);
+ crcost += calccost (tty, curY (tty) + 1, 0, row, col, 0);
else
- crcost += calccost (tty, curY (tty), 0, row, col, 0);
+ crcost += calccost (tty, curY (tty), 0, row, col, 0);
}
if (crcost < relcost)
relcost = crcost, use = USECR;
@@ -378,8 +378,8 @@ cmgoto (struct tty_display_info *tty, int row, int col)
/* compute REAL direct cost */
cost = 0;
p = (dcm == tty->Wcm->cm_habs
- ? tgoto (dcm, row, col)
- : tgoto (dcm, col, row));
+ ? tgoto (dcm, row, col)
+ : tgoto (dcm, col, row));
emacs_tputs (tty, p, 1, evalcost);
if (cost <= relcost)
{ /* really is cheaper */
diff --git a/src/cmds.c b/src/cmds.c
index 4003d8b..8fec7ba 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -326,7 +326,7 @@ internal_self_insert (int c, EMACS_INT n)
len = CHAR_STRING (c, str);
if (len == 1)
/* If C has modifier bits, this makes C an appropriate
- one-byte char. */
+ one-byte char. */
c = *str;
}
else
@@ -496,7 +496,7 @@ syms_of_cmds (void)
{
DEFSYM (Qundo_auto_amalgamate, "undo-auto-amalgamate");
DEFSYM (Qundo_auto__this_command_amalgamating,
- "undo-auto--this-command-amalgamating");
+ "undo-auto--this-command-amalgamating");
DEFSYM (Qkill_forward_chars, "kill-forward-chars");
diff --git a/src/coding.c b/src/coding.c
index f2a92c9..449d67a 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3154,9 +3154,9 @@ detect_coding_iso_2022 (struct coding_system *coding,
{
found |= CATEGORY_MASK_ISO_8_1;
/* Check the length of succeeding codes of the range
- 0xA0..0FF. If the byte length is even, we include
- CATEGORY_MASK_ISO_8_2 in `found'. We can check this
- only when we are not single shifting. */
+ 0xA0..0FF. If the byte length is even, we include
+ CATEGORY_MASK_ISO_8_2 in `found'. We can check this
+ only when we are not single shifting. */
if (! single_shifting
&& ! (rejected & CATEGORY_MASK_ISO_8_2))
{
@@ -3915,8 +3915,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
}
/* Now we know CHARSET and 1st position code C1 of a character.
- Produce a decoded character while getting 2nd and 3rd
- position codes C2, C3 if necessary. */
+ Produce a decoded character while getting 2nd and 3rd
+ position codes C2, C3 if necessary. */
if (CHARSET_DIMENSION (charset) > 1)
{
ONE_MORE_BYTE (c2);
@@ -9396,7 +9396,7 @@ DEFUN ("encode-coding-region", Fencode_coding_region, Sencode_coding_region,
3, 4, "r\nzCoding system: ",
doc: /* Encode the current region by specified coding system.
When called from a program, takes four arguments:
- START, END, CODING-SYSTEM and DESTINATION.
+ START, END, CODING-SYSTEM and DESTINATION.
START and END are buffer positions.
Optional 4th arguments DESTINATION specifies where the encoded text goes.
@@ -9891,7 +9891,7 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
{
val = XCDR (elt);
/* Here, if VAL is both a valid coding system and a valid
- function symbol, we return VAL as a coding system. */
+ function symbol, we return VAL as a coding system. */
if (CONSP (val))
return val;
if (! SYMBOLP (val))
diff --git a/src/coding.h b/src/coding.h
index 426be62..9cfa146 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -701,9 +701,9 @@ extern void setup_coding_system (Lisp_Object, struct coding_system *);
extern Lisp_Object coding_charset_list (struct coding_system *);
extern Lisp_Object coding_system_charset_list (Lisp_Object);
extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object,
- Lisp_Object, bool, bool, bool);
+ Lisp_Object, bool, bool, bool);
extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object,
- bool);
+ bool);
extern Lisp_Object encode_file_name (Lisp_Object);
extern Lisp_Object decode_file_name (Lisp_Object);
extern Lisp_Object raw_text_coding_system (Lisp_Object);
@@ -714,11 +714,11 @@ extern Lisp_Object complement_process_encoding_system (Lisp_Object);
extern void decode_coding_gap (struct coding_system *,
ptrdiff_t, ptrdiff_t);
extern void decode_coding_object (struct coding_system *,
- Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t, ptrdiff_t, Lisp_Object);
+ Lisp_Object, ptrdiff_t, ptrdiff_t,
+ ptrdiff_t, ptrdiff_t, Lisp_Object);
extern void encode_coding_object (struct coding_system *,
- Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t, ptrdiff_t, Lisp_Object);
+ Lisp_Object, ptrdiff_t, ptrdiff_t,
+ ptrdiff_t, ptrdiff_t, Lisp_Object);
#if defined (WINDOWSNT) || defined (CYGWIN)
diff --git a/src/composite.c b/src/composite.c
index da92135..4a644a8 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -286,7 +286,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
if ((len % 2) == 0)
goto invalid_composition;
/* All elements should be integers (character or encoded
- composition rule). */
+ composition rule). */
for (i = 0; i < len; i++)
{
if (!INTEGERP (key_contents[i]))
@@ -538,8 +538,8 @@ update_compositions (ptrdiff_t from, ptrdiff_t to, int check_mask)
if (check_mask & CHECK_INSIDE)
{
/* In this case, we are sure that (check & CHECK_TAIL) is also
- nonzero. Thus, here we should check only compositions before
- (to - 1). */
+ nonzero. Thus, here we should check only compositions before
+ (to - 1). */
while (from < to - 1
&& find_composition (from, to, &start, &from, &prop, Qnil)
&& composition_valid_p (start, from, prop)
@@ -1475,7 +1475,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
/* Provided that we have these possible compositions now:
POS: 1 2 3 4 5 6 7 8 9
- |-A-|
+ |-A-|
|-B-|-C-|--D--|
Here, it is known that characters after positions 1 and 9 can
@@ -1488,8 +1488,8 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
Now we have these cases (1 through 4):
- -- character after POS is ... --
- not composable composable
+ -- character after POS is ... --
+ not composable composable
LIMIT <= POS (1) (3)
POS < LIMIT (2) (4)
diff --git a/src/composite.h b/src/composite.h
index 80e1740..33ab892 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -199,7 +199,7 @@ extern void update_compositions (ptrdiff_t, ptrdiff_t, int);
extern void make_composition_value_copy (Lisp_Object);
extern void syms_of_composite (void);
extern void compose_text (ptrdiff_t, ptrdiff_t, Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
/* Return the method of a composition with property PROP. */
@@ -314,16 +314,16 @@ extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
extern bool composition_gstring_p (Lisp_Object);
extern int composition_gstring_width (Lisp_Object, ptrdiff_t, ptrdiff_t,
- struct font_metrics *);
+ struct font_metrics *);
extern void composition_compute_stop_pos (struct composition_it *,
- ptrdiff_t, ptrdiff_t, ptrdiff_t,
- Lisp_Object);
+ ptrdiff_t, ptrdiff_t, ptrdiff_t,
+ Lisp_Object);
extern bool composition_reseat_it (struct composition_it *, ptrdiff_t,
ptrdiff_t, ptrdiff_t, struct window *,
struct face *, Lisp_Object);
extern int composition_update_it (struct composition_it *,
- ptrdiff_t, ptrdiff_t, Lisp_Object);
+ ptrdiff_t, ptrdiff_t, Lisp_Object);
extern ptrdiff_t composition_adjust_point (ptrdiff_t, ptrdiff_t);
diff --git a/src/conf_post.h b/src/conf_post.h
index 060b912..865c897 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -318,7 +318,7 @@ extern int emacs_setenv_TZ (char const *);
INLINE int
incr (int i)
{
- return i + 1;
+ return i + 1;
}
...
INLINE_HEADER_END
diff --git a/src/cygw32.c b/src/cygw32.c
index ca9069a..4ada4ee 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -73,7 +73,7 @@ conv_filename_to_w32_unicode (Lisp_Object in, int absolute_p)
converted = make_uninit_string (converted_len - 1);
if (cygwin_conv_path (flags, SDATA (in),
- SDATA (converted), converted_len))
+ SDATA (converted), converted_len))
error ("cygwin_conv_path: %s", strerror (errno));
return unbind_to (count, converted);
@@ -128,7 +128,7 @@ For the reverse operation, see `cygwin-convert-file-name-to-windows'. */)
(Lisp_Object file, Lisp_Object absolute_p)
{
return conv_filename_from_w32_unicode (to_unicode (file, &file),
- EQ (absolute_p, Qnil) ? 0 : 1);
+ EQ (absolute_p, Qnil) ? 0 : 1);
}
void
diff --git a/src/data.c b/src/data.c
index e2c1a28..77ecc6e 100644
--- a/src/data.c
+++ b/src/data.c
@@ -221,9 +221,9 @@ for example, (type-of 1) returns `integer'. */)
case Lisp_Misc_Overlay:
return Qoverlay;
case Lisp_Misc_Float:
- return Qfloat;
- case Lisp_Misc_Finalizer:
- return Qfinalizer;
+ return Qfloat;
+ case Lisp_Misc_Finalizer:
+ return Qfinalizer;
#ifdef HAVE_MODULES
case Lisp_Misc_User_Ptr:
return Quser_ptr;
@@ -1267,7 +1267,7 @@ DEFUN ("set", Fset, Sset, 2, 2, 0,
void
set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
- enum Set_Internal_Bind bindflag)
+ enum Set_Internal_Bind bindflag)
{
bool voide = EQ (newval, Qunbound);
struct Lisp_Symbol *sym;
@@ -1283,23 +1283,23 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
{
case SYMBOL_NOWRITE:
if (NILP (Fkeywordp (symbol))
- || !EQ (newval, Fsymbol_value (symbol)))
- xsignal1 (Qsetting_constant, symbol);
+ || !EQ (newval, Fsymbol_value (symbol)))
+ xsignal1 (Qsetting_constant, symbol);
else
- /* Allow setting keywords to their own value. */
- return;
+ /* Allow setting keywords to their own value. */
+ return;
case SYMBOL_TRAPPED_WRITE:
/* Setting due to thread-switching doesn't count. */
if (bindflag != SET_INTERNAL_THREAD_SWITCH)
- notify_variable_watchers (symbol, voide? Qnil : newval,
- (bindflag == SET_INTERNAL_BIND? Qlet :
- bindflag == SET_INTERNAL_UNBIND? Qunlet :
- voide? Qmakunbound : Qset),
- where);
+ notify_variable_watchers (symbol, voide? Qnil : newval,
+ (bindflag == SET_INTERNAL_BIND? Qlet :
+ bindflag == SET_INTERNAL_UNBIND? Qunlet :
+ voide? Qmakunbound : Qset),
+ where);
/* FALLTHROUGH! */
case SYMBOL_UNTRAPPED_WRITE:
- break;
+ break;
default: emacs_abort ();
}
@@ -1397,7 +1397,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
int offset = XBUFFER_OBJFWD (innercontents)->offset;
int idx = PER_BUFFER_IDX (offset);
if (idx > 0
- && bindflag == SET_INTERNAL_SET
+ && bindflag == SET_INTERNAL_SET
&& !let_shadows_buffer_binding_p (sym))
SET_PER_BUFFER_VALUE_P (buf, idx, 1);
}
@@ -1498,9 +1498,9 @@ DEFUN ("get-variable-watchers", Fget_variable_watchers, Sget_variable_watchers,
void
notify_variable_watchers (Lisp_Object symbol,
- Lisp_Object newval,
- Lisp_Object operation,
- Lisp_Object where)
+ Lisp_Object newval,
+ Lisp_Object operation,
+ Lisp_Object where)
{
symbol = Findirect_variable (symbol);
@@ -1526,12 +1526,12 @@ notify_variable_watchers (Lisp_Object symbol,
Lisp_Object watcher = XCAR (watchers);
/* Call subr directly to avoid gc. */
if (SUBRP (watcher))
- {
- Lisp_Object args[] = { symbol, newval, operation, where };
- funcall_subr (XSUBR (watcher), ARRAYELTS (args), args);
- }
+ {
+ Lisp_Object args[] = { symbol, newval, operation, where };
+ funcall_subr (XSUBR (watcher), ARRAYELTS (args), args);
+ }
else
- CALLN (Ffuncall, watcher, symbol, newval, operation, where);
+ CALLN (Ffuncall, watcher, symbol, newval, operation, where);
}
unbind_to (count, Qnil);
@@ -1616,7 +1616,7 @@ local bindings in certain buffers. */)
void
set_default_internal (Lisp_Object symbol, Lisp_Object value,
- enum Set_Internal_Bind bindflag)
+ enum Set_Internal_Bind bindflag)
{
struct Lisp_Symbol *sym;
@@ -1626,21 +1626,21 @@ set_default_internal (Lisp_Object symbol, Lisp_Object value,
{
case SYMBOL_NOWRITE:
if (NILP (Fkeywordp (symbol))
- || !EQ (value, Fsymbol_value (symbol)))
- xsignal1 (Qsetting_constant, symbol);
+ || !EQ (value, Fsymbol_value (symbol)))
+ xsignal1 (Qsetting_constant, symbol);
else
- /* Allow setting keywords to their own value. */
- return;
+ /* Allow setting keywords to their own value. */
+ return;
case SYMBOL_TRAPPED_WRITE:
/* Don't notify here if we're going to call Fset anyway. */
if (sym->redirect != SYMBOL_PLAINVAL
- /* Setting due to thread switching doesn't count. */
- && bindflag != SET_INTERNAL_THREAD_SWITCH)
- notify_variable_watchers (symbol, value, Qset_default, Qnil);
+ /* Setting due to thread switching doesn't count. */
+ && bindflag != SET_INTERNAL_THREAD_SWITCH)
+ notify_variable_watchers (symbol, value, Qset_default, Qnil);
/* FALLTHROUGH! */
case SYMBOL_UNTRAPPED_WRITE:
- break;
+ break;
default: emacs_abort ();
}
@@ -1660,7 +1660,7 @@ set_default_internal (Lisp_Object symbol, Lisp_Object value,
/* If the default binding is now loaded, set the REALVALUE slot too. */
if (blv->fwd && EQ (blv->defcell, blv->valcell))
store_symval_forwarding (blv->fwd, value, NULL);
- return;
+ return;
}
case SYMBOL_FORWARDED:
{
@@ -1688,8 +1688,8 @@ set_default_internal (Lisp_Object symbol, Lisp_Object value,
}
}
else
- set_internal (symbol, value, Qnil, bindflag);
- return;
+ set_internal (symbol, value, Qnil, bindflag);
+ return;
}
default: emacs_abort ();
}
@@ -1753,8 +1753,8 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded,
XSETSYMBOL (symbol, sym);
tem = Fcons (symbol, (forwarded
- ? do_symval_forwarding (valcontents.fwd)
- : valcontents.value));
+ ? do_symval_forwarding (valcontents.fwd)
+ : valcontents.value));
/* Buffer_Local_Values cannot have as realval a buffer-local
or keyboard-local forwarding. */
@@ -2459,13 +2459,13 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, enum Arith_Comparison comparis
static Lisp_Object
arithcompare_driver (ptrdiff_t nargs, Lisp_Object *args,
- enum Arith_Comparison comparison)
+ enum Arith_Comparison comparison)
{
ptrdiff_t argnum;
for (argnum = 1; argnum < nargs; ++argnum)
{
if (EQ (Qnil, arithcompare (args[argnum - 1], args[argnum], comparison)))
- return Qnil;
+ return Qnil;
}
return Qt;
}
@@ -2717,7 +2717,7 @@ enum arithop
};
static Lisp_Object float_arith_driver (double, ptrdiff_t, enum arithop,
- ptrdiff_t, Lisp_Object *);
+ ptrdiff_t, Lisp_Object *);
static Lisp_Object
arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
{
@@ -3028,7 +3028,7 @@ ash_lsh_impl (register Lisp_Object value, Lisp_Object count, bool lsh)
XSETINT (val, lsh ? 0 : XINT (value) < 0 ? -1 : 0);
else
XSETINT (val, lsh ? XUINT (value) >> -XINT (count) : \
- XINT (value) >> -XINT (count));
+ XINT (value) >> -XINT (count));
return val;
}
@@ -3154,16 +3154,16 @@ count_one_bits_word (bits_word w)
}
enum bool_vector_op { bool_vector_exclusive_or,
- bool_vector_union,
- bool_vector_intersection,
- bool_vector_set_difference,
- bool_vector_subsetp };
+ bool_vector_union,
+ bool_vector_intersection,
+ bool_vector_set_difference,
+ bool_vector_subsetp };
static Lisp_Object
bool_vector_binop_driver (Lisp_Object a,
- Lisp_Object b,
- Lisp_Object dest,
- enum bool_vector_op op)
+ Lisp_Object b,
+ Lisp_Object dest,
+ enum bool_vector_op op)
{
EMACS_INT nr_bits;
bits_word *adata, *bdata, *destdata;
@@ -3499,7 +3499,7 @@ A is a bool vector, B is t or nil, and I is an index into A. */)
count = count_trailing_zero_bits (mword);
pos++;
if (count + offset < BITS_PER_BITS_WORD)
- return make_number (count);
+ return make_number (count);
}
/* Scan whole words until we either reach the end of the vector or
@@ -3513,7 +3513,7 @@ A is a bool vector, B is t or nil, and I is an index into A. */)
if (pos < nr_words)
{
/* If we stopped because of a mismatch, see how many bits match
- in the current mword. */
+ in the current mword. */
mword = bits_word_to_host_endian (adata[pos]);
mword ^= twiddle;
count += count_trailing_zero_bits (mword);
@@ -3521,8 +3521,8 @@ A is a bool vector, B is t or nil, and I is an index into A. */)
else if (nr_bits % BITS_PER_BITS_WORD != 0)
{
/* If we hit the end, we might have overshot our count. Reduce
- the total by the number of spare bits at the end of the
- vector. */
+ the total by the number of spare bits at the end of the
+ vector. */
count -= BITS_PER_BITS_WORD - nr_bits % BITS_PER_BITS_WORD;
}
@@ -3633,7 +3633,7 @@ syms_of_data (void)
PUT_ERROR (Qsetting_constant, error_tail,
"Attempt to set a constant symbol");
PUT_ERROR (Qtrapping_constant, error_tail,
- "Attempt to trap writes to a constant symbol");
+ "Attempt to trap writes to a constant symbol");
PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax");
PUT_ERROR (Qinvalid_function, error_tail, "Invalid function");
PUT_ERROR (Qwrong_number_of_arguments, error_tail,
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 08b7cc2..1f5ba4d 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1002,9 +1002,9 @@ xd_add_watch (DBusWatch *watch, void *data)
if (dbus_watch_get_enabled (watch))
{
if (flags & DBUS_WATCH_WRITABLE)
- add_write_fd (fd, xd_read_queued_messages, data);
+ add_write_fd (fd, xd_read_queued_messages, data);
if (flags & DBUS_WATCH_READABLE)
- add_read_fd (fd, xd_read_queued_messages, data);
+ add_read_fd (fd, xd_read_queued_messages, data);
}
return TRUE;
}
@@ -1635,7 +1635,7 @@ xd_read_message (Lisp_Object bus)
dbus_connection_read_write (connection, 0);
while (dbus_connection_get_dispatch_status (connection)
- != DBUS_DISPATCH_COMPLETE)
+ != DBUS_DISPATCH_COMPLETE)
xd_read_message_1 (connection, bus);
return Qnil;
}
diff --git a/src/dired.c b/src/dired.c
index 702917e..b46fa87 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -337,7 +337,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
handler = Ffind_file_name_handler (directory, Qdirectory_files);
if (!NILP (handler))
return call5 (handler, Qdirectory_files, directory,
- full, match, nosort);
+ full, match, nosort);
return directory_files_internal (directory, full, match, nosort, 0, Qnil);
}
@@ -365,7 +365,7 @@ which see. */)
handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes);
if (!NILP (handler))
return call6 (handler, Qdirectory_files_and_attributes,
- directory, full, match, nosort, id_format);
+ directory, full, match, nosort, id_format);
return directory_files_internal (directory, full, match, nosort, 1, id_format);
}
@@ -651,8 +651,8 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
continue;
/* Reject entries where the encoded strings match, but the
- decoded don't. For example, "a" should not match "a-ring" on
- file systems that store decomposed characters. */
+ decoded don't. For example, "a" should not match "a-ring" on
+ file systems that store decomposed characters. */
Lisp_Object zero = make_number (0);
if (check_decoded && SCHARS (file) <= SCHARS (name))
diff --git a/src/dispextern.h b/src/dispextern.h
index 4acf336..df5a41a 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -202,7 +202,7 @@ struct text_pos
do \
{ \
++(POS).charpos; \
- if (MULTIBYTE_P) \
+ if (MULTIBYTE_P) \
INC_POS ((POS).bytepos); \
else \
++(POS).bytepos; \
@@ -215,7 +215,7 @@ struct text_pos
do \
{ \
--(POS).charpos; \
- if (MULTIBYTE_P) \
+ if (MULTIBYTE_P) \
DEC_POS ((POS).bytepos); \
else \
--(POS).bytepos; \
@@ -589,9 +589,9 @@ struct glyph
#define SET_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \
do \
{ \
- (GLYPH).u.ch = (CODE); \
- (GLYPH).face_id = (FACE_ID); \
- (GLYPH).padding_p = (PADDING_P); \
+ (GLYPH).u.ch = (CODE); \
+ (GLYPH).face_id = (FACE_ID); \
+ (GLYPH).padding_p = (PADDING_P); \
} \
while (false)
@@ -793,7 +793,7 @@ enum glyph_row_area
glyphs[LEFT_MARGIN_AREA] glyphs[RIGHT_MARGIN_AREA]
| |
glyphs[TEXT_AREA] |
- glyphs[LAST_AREA]
+ glyphs[LAST_AREA]
Rows in frame matrices reference glyph memory allocated in a frame
glyph pool (see the description of struct glyph_pool). Rows in
@@ -1421,9 +1421,9 @@ struct glyph_string
((!mode_line_in_non_selected_windows \
|| (SELW) == XWINDOW (selected_window) \
|| (minibuf_level > 0 \
- && !NILP (minibuf_selected_window) \
- && (MBW) == XWINDOW (minibuf_window) \
- && (SCRW) == XWINDOW (minibuf_selected_window))) \
+ && !NILP (minibuf_selected_window) \
+ && (MBW) == XWINDOW (minibuf_window) \
+ && (SCRW) == XWINDOW (minibuf_selected_window))) \
? MODE_LINE_FACE_ID \
: MODE_LINE_INACTIVE_FACE_ID)
@@ -1714,7 +1714,7 @@ struct face
bool_bf overstrike : 1;
/* NOTE: this is not used yet, but eventually this impl should be done
- similarly to overstrike */
+ similarly to overstrike */
#ifdef HAVE_NS
/* If non-zero, use geometric rotation (to simulate italic). */
bool_bf synth_ital : 1;
@@ -2850,7 +2850,7 @@ struct redisplay_interface
that contained glyphs in mouse-face were overwritten, so we
have to update the mouse highlight. */
void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
- bool mouse_face_overwritten_p);
+ bool mouse_face_overwritten_p);
/* Flush the display of frame F. For X, this is XFlush. */
void (*flush_display) (struct frame *f);
@@ -2861,23 +2861,23 @@ struct redisplay_interface
/* Set *LEFT and *RIGHT to the left and right overhang of GLYPH on
frame F. */
void (*get_glyph_overhangs) (struct glyph *glyph, struct frame *f,
- int *left, int *right);
+ int *left, int *right);
/* Fix the display of AREA of ROW in window W for overlapping rows.
This function is called from redraw_overlapping_rows after
desired rows have been made current. */
void (*fix_overlapping_area) (struct window *w, struct glyph_row *row,
- enum glyph_row_area area, int);
+ enum glyph_row_area area, int);
#ifdef HAVE_WINDOW_SYSTEM
/* Draw a fringe bitmap in window W of row ROW using parameters P. */
void (*draw_fringe_bitmap) (struct window *w, struct glyph_row *row,
- struct draw_fringe_bitmap_params *p);
+ struct draw_fringe_bitmap_params *p);
/* Define and destroy fringe bitmap no. WHICH. */
void (*define_fringe_bitmap) (int which, unsigned short *bits,
- int h, int wd);
+ int h, int wd);
void (*destroy_fringe_bitmap) (int which);
/* Compute left and right overhang of glyph string S.
@@ -2892,7 +2892,7 @@ struct redisplay_interface
/* Clear the area at (X,Y,WIDTH,HEIGHT) of frame F. */
void (*clear_frame_area) (struct frame *f, int x, int y,
- int width, int height);
+ int width, int height);
/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
at row GLYPH_ROW on window W if ON_P is true. If ON_P is
@@ -2906,7 +2906,7 @@ struct redisplay_interface
/* Draw vertical border for window W from (X,Y_0) to (X,Y_1). */
void (*draw_vertical_window_border) (struct window *w,
- int x, int y_0, int y_1);
+ int x, int y_0, int y_1);
/* Draw window divider for window W from (X_0, Y_0) to (X_1, ,Y_1). */
void (*draw_window_divider) (struct window *w,
@@ -2916,8 +2916,8 @@ struct redisplay_interface
The area at pixel (X,Y) of width WIDTH and height HEIGHT is
shifted right by SHIFT_BY pixels. */
void (*shift_glyphs_for_insert) (struct frame *f,
- int x, int y, int width,
- int height, int shift_by);
+ int x, int y, int width,
+ int height, int shift_by);
/* Start display hourglass cursor on frame F. */
void (*show_hourglass) (struct frame *f);
@@ -3225,8 +3225,8 @@ extern ptrdiff_t bidi_find_first_overridden (struct bidi_it *);
/* Defined in xdisp.c */
struct glyph_row *row_containing_pos (struct window *, ptrdiff_t,
- struct glyph_row *,
- struct glyph_row *, int);
+ struct glyph_row *,
+ struct glyph_row *, int);
int line_bottom_y (struct it *);
int default_line_pixel_height (struct window *);
bool display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
@@ -3246,15 +3246,15 @@ int window_box_right (struct window *, enum glyph_row_area);
int estimate_mode_line_height (struct frame *, enum face_id);
int move_it_to (struct it *, ptrdiff_t, int, int, int, int);
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
- NativeRectangle *, bool);
+ NativeRectangle *, bool);
void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *);
void mark_window_display_accurate (Lisp_Object, bool);
void redisplay_preserve_echo_area (int);
void init_iterator (struct it *, struct window *, ptrdiff_t,
- ptrdiff_t, struct glyph_row *, enum face_id);
+ ptrdiff_t, struct glyph_row *, enum face_id);
void init_iterator_to_row_start (struct it *, struct window *,
- struct glyph_row *);
+ struct glyph_row *);
void start_display (struct it *, struct window *, struct text_pos);
void move_it_vertically (struct it *, int);
void move_it_vertically_backward (struct it *, int);
@@ -3291,7 +3291,7 @@ extern void dump_glyph_string (struct glyph_string *) EXTERNALLY_VISIBLE;
#endif
extern void x_get_glyph_overhangs (struct glyph *, struct frame *,
- int *, int *);
+ int *, int *);
extern void x_produce_glyphs (struct it *);
extern void x_write_glyphs (struct window *, struct glyph_row *,
@@ -3301,12 +3301,12 @@ extern void x_insert_glyphs (struct window *, struct glyph_row *,
extern void x_clear_end_of_line (struct window *, struct glyph_row *,
enum glyph_row_area, int);
extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
- enum glyph_row_area, int);
+ enum glyph_row_area, int);
extern void draw_phys_cursor_glyph (struct window *,
- struct glyph_row *,
- enum draw_glyphs_face);
+ struct glyph_row *,
+ enum draw_glyphs_face);
extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
- struct glyph *, int *, int *, int *);
+ struct glyph *, int *, int *, int *);
extern void erase_phys_cursor (struct window *);
extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
extern void x_update_cursor (struct frame *, bool);
@@ -3315,13 +3315,13 @@ extern void x_draw_vertical_border (struct window *w);
extern void x_draw_right_divider (struct window *w);
extern int get_glyph_string_clip_rects (struct glyph_string *,
- NativeRectangle *, int);
+ NativeRectangle *, int);
extern void get_glyph_string_clip_rect (struct glyph_string *,
- NativeRectangle *nr);
+ NativeRectangle *nr);
extern Lisp_Object find_hot_spot (Lisp_Object, int, int);
extern void handle_tool_bar_click (struct frame *,
- int, int, bool, int);
+ int, int, bool, int);
extern void expose_frame (struct frame *, int, int, int, int);
extern bool x_intersect_rectangles (XRectangle *, XRectangle *, XRectangle *);
@@ -3395,9 +3395,9 @@ ptrdiff_t lookup_image (struct frame *, Lisp_Object);
#endif
RGB_PIXEL_COLOR image_background (struct image *, struct frame *,
- XImagePtr_or_DC ximg);
+ XImagePtr_or_DC ximg);
int image_background_transparent (struct image *, struct frame *,
- XImagePtr_or_DC mask);
+ XImagePtr_or_DC mask);
int image_ascent (struct image *, struct face *, struct glyph_slice *);
@@ -3420,13 +3420,13 @@ void x_free_colors (struct frame *, unsigned long *, int);
#endif
void update_face_from_frame_parameter (struct frame *, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
Lisp_Object tty_color_name (struct frame *, int);
void clear_face_cache (bool);
unsigned long load_color (struct frame *, struct face *, Lisp_Object,
- enum lface_attribute_index);
+ enum lface_attribute_index);
char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
- int *);
+ int *);
#ifdef HAVE_WINDOW_SYSTEM
void prepare_face_for_display (struct frame *, struct face *);
#endif
@@ -3439,11 +3439,11 @@ void init_frame_faces (struct frame *);
void free_frame_faces (struct frame *);
void recompute_basic_faces (struct frame *);
int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
- bool, int);
+ bool, int);
int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
- bool, Lisp_Object);
+ bool, Lisp_Object);
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t *, enum face_id, bool);
+ ptrdiff_t *, enum face_id, bool);
int merge_faces (struct frame *, Lisp_Object, int, int);
int compute_char_face (struct frame *, int, Lisp_Object);
void free_all_realized_faces (Lisp_Object);
@@ -3498,18 +3498,18 @@ int popup_activated (void);
/* Defined in dispnew.c. */
extern Lisp_Object buffer_posn_from_coords (struct window *,
- int *, int *,
- struct display_pos *,
- Lisp_Object *,
- int *, int *, int *, int *);
+ int *, int *,
+ struct display_pos *,
+ Lisp_Object *,
+ int *, int *, int *, int *);
extern Lisp_Object mode_line_string (struct window *, enum window_part,
- int *, int *, ptrdiff_t *,
- Lisp_Object *,
- int *, int *, int *, int *);
+ int *, int *, ptrdiff_t *,
+ Lisp_Object *,
+ int *, int *, int *, int *);
extern Lisp_Object marginal_area_string (struct window *, enum window_part,
- int *, int *, ptrdiff_t *,
- Lisp_Object *,
- int *, int *, int *, int *);
+ int *, int *, ptrdiff_t *,
+ Lisp_Object *,
+ int *, int *, int *, int *);
extern void redraw_frame (struct frame *);
extern bool update_frame (struct frame *, bool, bool);
extern void update_frame_with_menu (struct frame *, int, int);
@@ -3523,10 +3523,10 @@ void clear_glyph_matrix (struct glyph_matrix *);
void clear_current_matrices (struct frame *f);
void clear_desired_matrices (struct frame *);
void shift_glyph_matrix (struct window *, struct glyph_matrix *,
- int, int, int);
+ int, int, int);
void rotate_matrix (struct glyph_matrix *, int, int, int);
void increment_matrix_positions (struct glyph_matrix *,
- int, int, ptrdiff_t, ptrdiff_t);
+ int, int, ptrdiff_t, ptrdiff_t);
void blank_row (struct window *, struct glyph_row *, int);
void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
void clear_glyph_row (struct glyph_row *);
@@ -3576,11 +3576,11 @@ extern void tty_append_glyph (struct it *);
extern int scrolling_max_lines_saved (int, int, unsigned *, unsigned *, int *);
extern void do_line_insertion_deletion_costs (struct frame *, const char *,
- const char *, const char *,
+ const char *, const char *,
const char *, const char *,
const char *, int);
void scrolling_1 (struct frame *, int, int, int, int *, int *, unsigned *,
- unsigned *, int);
+ unsigned *, int);
/* Defined in frame.c */
@@ -3599,16 +3599,16 @@ enum resource_types
extern Display_Info *check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
- Lisp_Object, const char *, const char *class,
- enum resource_types);
+ Lisp_Object, const char *, const char *class,
+ enum resource_types);
extern Lisp_Object x_frame_get_and_record_arg (struct frame *, Lisp_Object,
- Lisp_Object,
+ Lisp_Object,
const char *, const char *,
- enum resource_types);
+ enum resource_types);
extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
- Lisp_Object, Lisp_Object,
- const char *, const char *,
- enum resource_types);
+ Lisp_Object, Lisp_Object,
+ const char *, const char *,
+ enum resource_types);
extern char *x_get_string_resource (XrmDatabase, const char *,
const char *);
diff --git a/src/dispnew.c b/src/dispnew.c
index 70d4de0..5e67c6e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -71,9 +71,9 @@ static int required_matrix_height (struct window *);
static int required_matrix_width (struct window *);
static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
static void build_frame_matrix_from_window_tree (struct glyph_matrix *,
- struct window *);
+ struct window *);
static void build_frame_matrix_from_leaf_window (struct glyph_matrix *,
- struct window *);
+ struct window *);
static void adjust_decode_mode_spec_buffer (struct frame *);
static void fill_up_glyph_row_with_spaces (struct glyph_row *);
static void clear_window_matrices (struct window *, bool);
@@ -83,7 +83,7 @@ static bool update_window_line (struct window *, int, bool *);
static void mirror_make_current (struct window *, int);
#ifdef GLYPH_DEBUG
static void check_matrix_pointers (struct glyph_matrix *,
- struct glyph_matrix *);
+ struct glyph_matrix *);
#endif
static void mirror_line_dance (struct window *, int, int, int *, char *);
static bool update_window_tree (struct window *, bool);
@@ -940,7 +940,7 @@ swap_glyphs_in_rows (struct glyph_row *a, struct glyph_row *b)
while (glyph_a < glyph_a_end)
{
/* Non-ISO HP/UX compiler doesn't like auto struct
- initialization. */
+ initialization. */
struct glyph temp;
temp = *glyph_a;
*glyph_a = *glyph_b;
@@ -1656,7 +1656,7 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
if (in_horz_combination_p)
x += dim.width;
else
- y += dim.height;
+ y += dim.height;
/* Remember maximum glyph matrix dimensions. */
wmax = max (wmax, dim.width);
@@ -2166,13 +2166,13 @@ free_glyphs (struct frame *f)
if (f && f->glyphs_initialized_p)
{
/* Block interrupt input so that we don't get surprised by an X
- event while we're in an inconsistent state. */
+ event while we're in an inconsistent state. */
block_input ();
f->glyphs_initialized_p = 0;
/* Release window sub-matrices. */
if (!NILP (f->root_window))
- free_window_matrices (XWINDOW (f->root_window));
+ free_window_matrices (XWINDOW (f->root_window));
#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
/* Free the dummy window for menu bars without X toolkit and its
@@ -2439,8 +2439,8 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
fill_up_glyph_row_with_spaces (window_row);
/* If only part of W's desired matrix has been built, and
- window_row wasn't displayed, use the corresponding current
- row instead. */
+ window_row wasn't displayed, use the corresponding current
+ row instead. */
if (window_matrix == w->desired_matrix
&& !window_row->enabled_p)
{
@@ -2463,11 +2463,11 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
the corresponding frame row to be updated. */
frame_row->enabled_p = true;
- /* Maybe insert a vertical border between horizontally adjacent
+ /* Maybe insert a vertical border between horizontally adjacent
windows. */
- if (GLYPH_CHAR (right_border_glyph) != 0)
+ if (GLYPH_CHAR (right_border_glyph) != 0)
{
- struct glyph *border = window_row->glyphs[LAST_AREA] - 1;
+ struct glyph *border = window_row->glyphs[LAST_AREA] - 1;
SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
}
@@ -2485,8 +2485,8 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
}
/* Set number of used glyphs in the frame matrix. Since we fill
- up with spaces, and visit leaf windows from left to right it
- can be done simply. */
+ up with spaces, and visit leaf windows from left to right it
+ can be done simply. */
frame_row->used[TEXT_AREA]
= window_matrix->matrix_x + window_matrix->matrix_w;
@@ -2944,7 +2944,7 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
{
if (!glyph_row_slice_p (window_matrix->rows + i,
frame_matrix->rows + j))
- emacs_abort ();
+ emacs_abort ();
++i, ++j;
}
}
@@ -3124,12 +3124,12 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
update_end (f);
if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
- {
- if (FRAME_TTY (f)->termscript)
- fflush (FRAME_TTY (f)->termscript);
+ {
+ if (FRAME_TTY (f)->termscript)
+ fflush (FRAME_TTY (f)->termscript);
if (FRAME_TERMCAP_P (f))
fflush (FRAME_TTY (f)->output);
- }
+ }
/* Check window matrices for lost pointers. */
#ifdef GLYPH_DEBUG
@@ -3284,7 +3284,7 @@ redraw_overlapped_rows (struct window *w, int yb)
area == TEXT_AREA ? row->x : 0);
if (row->used[area])
FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area],
- area, row->used[area]);
+ area, row->used[area]);
FRAME_RIF (f)->clear_end_of_line (w, row, area, -1);
}
@@ -3536,9 +3536,9 @@ update_window (struct window *w, bool force_p)
#endif
/* End the update of window W. Don't set the cursor if we
- paused updating the display because in this case,
- set_window_cursor_after_update hasn't been called, and
- W->output_cursor doesn't contain the cursor location. */
+ paused updating the display because in this case,
+ set_window_cursor_after_update hasn't been called, and
+ W->output_cursor doesn't contain the cursor location. */
rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p);
}
else
@@ -3602,7 +3602,7 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
However, it causes excessive flickering when mouse is moved
across the mode line. Luckily, turning it off for the mode
line doesn't seem to hurt anything. -- cyd.
- But it is still needed for the header line. -- kfs. */
+ But it is still needed for the header line. -- kfs. */
|| (current_row->mouse_face_p
&& !(current_row->mode_line_p && vpos > 0))
|| current_row->x != desired_row->x)
@@ -3618,12 +3618,12 @@ update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
changed_p = 1;
/* This erases the cursor. We do this here because
- notice_overwritten_cursor cannot easily check this, which
- might indicate that the whole functionality of
- notice_overwritten_cursor would better be implemented here.
- On the other hand, we need notice_overwritten_cursor as long
- as mouse highlighting is done asynchronously outside of
- redisplay. */
+ notice_overwritten_cursor cannot easily check this, which
+ might indicate that the whole functionality of
+ notice_overwritten_cursor would better be implemented here.
+ On the other hand, we need notice_overwritten_cursor as long
+ as mouse highlighting is done asynchronously outside of
+ redisplay. */
if (vpos == w->phys_cursor.vpos)
w->phys_cursor_on_p = 0;
}
@@ -4173,13 +4173,13 @@ scrolling_window (struct window *w, bool header_line_p)
i = last_new;
j = last_old;
while (i - 1 > first_new
- && j - 1 > first_old
- && MATRIX_ROW_ENABLED_P (current_matrix, j - 1)
+ && j - 1 > first_old
+ && MATRIX_ROW_ENABLED_P (current_matrix, j - 1)
&& (MATRIX_ROW (current_matrix, j - 1)->y
== MATRIX_ROW (desired_matrix, i - 1)->y)
&& !MATRIX_ROW (desired_matrix, i - 1)->redraw_fringe_bitmaps_p
- && row_equal_p (MATRIX_ROW (desired_matrix, i - 1),
- MATRIX_ROW (current_matrix, j - 1), 1))
+ && row_equal_p (MATRIX_ROW (desired_matrix, i - 1),
+ MATRIX_ROW (current_matrix, j - 1), 1))
--i, --j;
last_new = i;
last_old = j;
@@ -4275,7 +4275,7 @@ scrolling_window (struct window *w, bool header_line_p)
for (i = first_old; i < last_old;)
if (old_lines[i]
&& old_lines[i]->old_uses == 1
- && old_lines[i]->new_uses == 1)
+ && old_lines[i]->new_uses == 1)
{
int p, q;
int new_line = old_lines[i]->new_line_number;
@@ -4341,11 +4341,11 @@ scrolling_window (struct window *w, bool header_line_p)
because there is only one display and we don't have a way to
exchange areas on this display. Example:
- +-----------+ +-----------+
- | A | | B |
- +-----------+ --> +-----------+
- | B | | A |
- +-----------+ +-----------+
+ +-----------+ +-----------+
+ | A | | B |
+ +-----------+ --> +-----------+
+ | B | | A |
+ +-----------+ +-----------+
Instead, prefer bigger moves, and invalidate moves that would
copy from where we copied to. */
@@ -4608,10 +4608,10 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
if (w->cursor.vpos >= 0
/* The cursor vpos may be temporarily out of bounds
- in the following situation: There is one window,
+ in the following situation: There is one window,
with the cursor in the lower half of it. The window
is split, and a message causes a redisplay before
- a new cursor position has been computed. */
+ a new cursor position has been computed. */
&& w->cursor.vpos < WINDOW_TOTAL_LINES (w))
{
int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
@@ -4835,7 +4835,7 @@ update_frame_line (struct frame *f, int vpos)
/* Write the contents of the desired line. */
if (nlen)
{
- cursor_to (f, vpos, 0);
+ cursor_to (f, vpos, 0);
write_glyphs (f, nbody, nlen);
}
@@ -4845,7 +4845,7 @@ update_frame_line (struct frame *f, int vpos)
if (nlen < FRAME_TOTAL_COLS (f))
{
cursor_to (f, vpos, nlen);
- clear_end_of_line (f, FRAME_TOTAL_COLS (f));
+ clear_end_of_line (f, FRAME_TOTAL_COLS (f));
}
else
/* Make sure we are in the right row, otherwise cursor movement
@@ -4967,7 +4967,7 @@ update_frame_line (struct frame *f, int vpos)
tem = (nlen - nsp) - (olen - osp);
if (endmatch && tem
&& (!FRAME_CHAR_INS_DEL_OK (f)
- || endmatch <= char_ins_del_cost (f)[tem]))
+ || endmatch <= char_ins_del_cost (f)[tem]))
endmatch = 0;
/* nsp - osp is the distance to insert or delete.
@@ -5260,7 +5260,7 @@ mode_line_string (struct window *w, enum window_part part,
if (row->mode_line_p && row->enabled_p)
{
/* Find the glyph under X. If we find one with a string object,
- it's the one we were looking for. */
+ it's the one we were looking for. */
glyph = row->glyphs[TEXT_AREA];
end = glyph + row->used[TEXT_AREA];
for (x0 = *x; glyph < end && x0 >= glyph->pixel_width; ++glyph)
@@ -5428,11 +5428,11 @@ handle_window_change_signal (int sig)
Lisp_Object tail, frame;
FOR_EACH_FRAME (tail, frame)
- if (FRAME_TERMCAP_P (XFRAME (frame)) && FRAME_TTY (XFRAME (frame)) == tty)
- /* Record the new sizes, but don't reallocate the data
- structures now. Let that be done later outside of the
- signal handler. */
- change_frame_size (XFRAME (frame), width,
+ if (FRAME_TERMCAP_P (XFRAME (frame)) && FRAME_TTY (XFRAME (frame)) == tty)
+ /* Record the new sizes, but don't reallocate the data
+ structures now. Let that be done later outside of the
+ signal handler. */
+ change_frame_size (XFRAME (frame), width,
height - FRAME_MENU_BAR_LINES (XFRAME (frame)),
0, 1, 0, 0);
}
@@ -5535,8 +5535,8 @@ change_frame_size (struct frame *f, int new_width, int new_height,
if (FRAME_MSDOS_P (f))
{
/* On MS-DOS, all frames use the same screen, so a change in
- size affects all frames. Termcap now supports multiple
- ttys. */
+ size affects all frames. Termcap now supports multiple
+ ttys. */
FOR_EACH_FRAME (tail, frame)
if (! FRAME_WINDOW_P (XFRAME (frame)))
change_frame_size_1 (XFRAME (frame), new_width, new_height,
@@ -6082,13 +6082,13 @@ init_display (void)
#endif
t->display_info.tty->top_frame = selected_frame;
change_frame_size (XFRAME (selected_frame),
- FrameCols (t->display_info.tty),
- FrameRows (t->display_info.tty)
+ FrameCols (t->display_info.tty),
+ FrameRows (t->display_info.tty)
- FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0);
/* Delete the initial terminal. */
if (--initial_terminal->reference_count == 0
- && initial_terminal->delete_terminal_hook)
+ && initial_terminal->delete_terminal_hook)
(*initial_terminal->delete_terminal_hook) (initial_terminal);
/* Update frame parameters to reflect the new type. */
diff --git a/src/doc.c b/src/doc.c
index 6a78ed6..f6eb434 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -183,7 +183,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
}
/* Read a disk block at a time.
- If we read the same block last time, maybe skip this? */
+ If we read the same block last time, maybe skip this? */
if (space_left > 1024 * 8)
space_left = 1024 * 8;
nread = emacs_read (fd, p, space_left);
@@ -606,24 +606,24 @@ the same file name is found in the `doc-directory'. */)
{
end = strchr (p, '\n');
- /* See if this is a file name, and if it is a file in build-files. */
- if (p[1] == 'S')
- {
- skip_file = 0;
- if (end - p > 4 && end[-2] == '.'
- && (end[-1] == 'o' || end[-1] == 'c'))
- {
- ptrdiff_t len = end - p - 2;
- char *fromfile = SAFE_ALLOCA (len + 1);
- memcpy (fromfile, &p[2], len);
- fromfile[len] = 0;
- if (fromfile[len-1] == 'c')
- fromfile[len-1] = 'o';
-
- skip_file = NILP (Fmember (build_string (fromfile),
- Vbuild_files));
- }
- }
+ /* See if this is a file name, and if it is a file in build-files. */
+ if (p[1] == 'S')
+ {
+ skip_file = 0;
+ if (end - p > 4 && end[-2] == '.'
+ && (end[-1] == 'o' || end[-1] == 'c'))
+ {
+ ptrdiff_t len = end - p - 2;
+ char *fromfile = SAFE_ALLOCA (len + 1);
+ memcpy (fromfile, &p[2], len);
+ fromfile[len] = 0;
+ if (fromfile[len-1] == 'c')
+ fromfile[len-1] = 'o';
+
+ skip_file = NILP (Fmember (build_string (fromfile),
+ Vbuild_files));
+ }
+ }
sym = oblookup (Vobarray, p + 2,
multibyte_chars_in_text ((unsigned char *) p + 2,
@@ -641,19 +641,19 @@ the same file name is found in the `doc-directory'. */)
/* Install file-position as variable-documentation property
and make it negative for a user-variable
(doc starts with a `*'). */
- if (!NILP (Fboundp (sym))
- || !NILP (Fmemq (sym, delayed_init)))
- Fput (sym, Qvariable_documentation,
- make_number ((pos + end + 1 - buf)
- * (end[1] == '*' ? -1 : 1)));
+ if (!NILP (Fboundp (sym))
+ || !NILP (Fmemq (sym, delayed_init)))
+ Fput (sym, Qvariable_documentation,
+ make_number ((pos + end + 1 - buf)
+ * (end[1] == '*' ? -1 : 1)));
}
/* Attach a docstring to a function? */
else if (p[1] == 'F')
- {
- if (!NILP (Ffboundp (sym)))
- store_function_docstring (sym, pos + end + 1 - buf);
- }
+ {
+ if (!NILP (Ffboundp (sym)))
+ store_function_docstring (sym, pos + end + 1 - buf);
+ }
else if (p[1] == 'S')
; /* Just a source file name boundary marker. Ignore it. */
@@ -1013,11 +1013,11 @@ syms_of_doc (void)
Vdoc_file_name = Qnil;
DEFVAR_LISP ("build-files", Vbuild_files,
- doc: /* A list of files used to build this Emacs binary. */);
+ doc: /* A list of files used to build this Emacs binary. */);
Vbuild_files = Qnil;
DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style,
- doc: /* Style to use for single quotes in help and messages.
+ doc: /* Style to use for single quotes in help and messages.
Its value should be a symbol. It works by substituting certain single
quotes for grave accent and apostrophe. This is done in help output
and in functions like `message' and `format-message'. It is not done
diff --git a/src/editfns.c b/src/editfns.c
index ccc78e1..e54cd46 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -638,7 +638,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
? get_char_property_and_overlay (make_number (XINT (pos) - 1),
Qfield, Qnil, NULL)
/* Using nil here would be a more obvious choice, but it would
- fail when the buffer starts with a non-sticky field. */
+ fail when the buffer starts with a non-sticky field. */
: after_field);
/* See if we need to handle the case where MERGE_AT_BOUNDARY is nil
@@ -846,24 +846,24 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
if (NILP (Vinhibit_field_text_motion)
&& !EQ (new_pos, old_pos)
&& (!NILP (Fget_char_property (new_pos, Qfield, Qnil))
- || !NILP (Fget_char_property (old_pos, Qfield, Qnil))
- /* To recognize field boundaries, we must also look at the
- previous positions; we could use `Fget_pos_property'
- instead, but in itself that would fail inside non-sticky
- fields (like comint prompts). */
- || (XFASTINT (new_pos) > BEGV
- && !NILP (Fget_char_property (prev_new, Qfield, Qnil)))
- || (XFASTINT (old_pos) > BEGV
- && !NILP (Fget_char_property (prev_old, Qfield, Qnil))))
+ || !NILP (Fget_char_property (old_pos, Qfield, Qnil))
+ /* To recognize field boundaries, we must also look at the
+ previous positions; we could use `Fget_pos_property'
+ instead, but in itself that would fail inside non-sticky
+ fields (like comint prompts). */
+ || (XFASTINT (new_pos) > BEGV
+ && !NILP (Fget_char_property (prev_new, Qfield, Qnil)))
+ || (XFASTINT (old_pos) > BEGV
+ && !NILP (Fget_char_property (prev_old, Qfield, Qnil))))
&& (NILP (inhibit_capture_property)
- /* Field boundaries are again a problem; but now we must
- decide the case exactly, so we need to call
- `get_pos_property' as well. */
- || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil))
- && (XFASTINT (old_pos) <= BEGV
- || NILP (Fget_char_property
+ /* Field boundaries are again a problem; but now we must
+ decide the case exactly, so we need to call
+ `get_pos_property' as well. */
+ || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil))
+ && (XFASTINT (old_pos) <= BEGV
+ || NILP (Fget_char_property
(old_pos, inhibit_capture_property, Qnil))
- || NILP (Fget_char_property
+ || NILP (Fget_char_property
(prev_old, inhibit_capture_property, Qnil))))))
/* It is possible that NEW_POS is not within the same field as
OLD_POS; try to move NEW_POS so that it is. */
@@ -877,9 +877,9 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
field_bound = Ffield_beginning (old_pos, escape_from_edge, new_pos);
if (/* See if ESCAPE_FROM_EDGE caused FIELD_BOUND to jump to the
- other side of NEW_POS, which would mean that NEW_POS is
- already acceptable, and it's not necessary to constrain it
- to FIELD_BOUND. */
+ other side of NEW_POS, which would mean that NEW_POS is
+ already acceptable, and it's not necessary to constrain it
+ to FIELD_BOUND. */
((XFASTINT (field_bound) < XFASTINT (new_pos)) ? fwd : !fwd)
/* NEW_POS should be constrained, but only if either
ONLY_IN_LINE is nil (in which case any constraint is OK),
@@ -2640,8 +2640,8 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */)
\f
DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3,
"(list (read-char-by-name \"Insert character (Unicode name or hex): \")\
- (prefix-numeric-value current-prefix-arg)\
- t))",
+ (prefix-numeric-value current-prefix-arg)\
+ t))",
doc: /* Insert COUNT copies of CHARACTER.
Interactively, prompt for CHARACTER. You can specify CHARACTER in one
of these ways:
@@ -3008,7 +3008,7 @@ determines whether case is significant or ignored. */)
if (!(BUF_BEGV (bp1) <= begp1
&& begp1 <= endp1
- && endp1 <= BUF_ZV (bp1)))
+ && endp1 <= BUF_ZV (bp1)))
args_out_of_range (start1, end1);
/* Likewise for second substring. */
@@ -3046,7 +3046,7 @@ determines whether case is significant or ignored. */)
if (!(BUF_BEGV (bp2) <= begp2
&& begp2 <= endp2
- && endp2 <= BUF_ZV (bp2)))
+ && endp2 <= BUF_ZV (bp2)))
args_out_of_range (start2, end2);
i1 = begp1;
@@ -4205,7 +4205,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
p += padding;
nchars += padding;
}
- info[n].start = nchars;
+ info[n].start = nchars;
if (p > buf
&& multibyte
@@ -4287,8 +4287,8 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
*f = ' '; f += space_flag;
*f = '#'; f += sharp_flag;
*f = '0'; f += zero_flag;
- *f++ = '.';
- *f++ = '*';
+ *f++ = '.';
+ *f++ = '*';
if (conversion == 'd' || conversion == 'i'
|| conversion == 'o' || conversion == 'x'
|| conversion == 'X')
@@ -4423,7 +4423,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
/* Copy the formatted item from sprintf_buf into buf,
inserting padding and excess-precision zeros. */
- char *src = sprintf_buf;
+ char *src = sprintf_buf;
char src0 = src[0];
int exponent_bytes = 0;
bool signedp = src0 == '-' || src0 == '+' || src0 == ' ';
@@ -4444,7 +4444,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
exponent_bytes = src + sprintf_bytes - e;
}
- info[n].start = nchars;
+ info[n].start = nchars;
if (! minus_flag)
{
memset (p, ' ', padding);
@@ -4460,7 +4460,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
int significand_bytes
= sprintf_bytes - signedp - exponent_bytes;
memcpy (p, src, significand_bytes);
- p += significand_bytes;
+ p += significand_bytes;
src += significand_bytes;
memset (p, '0', trailing_zeros);
p += trailing_zeros;
@@ -4931,7 +4931,7 @@ Transposing beyond buffer boundaries is an error. */)
/* First region smaller than second. */
if (len1_byte < len2_byte)
- {
+ {
temp = SAFE_ALLOCA (len2_byte);
/* Don't precompute these addresses. We have to compute them
@@ -4940,26 +4940,26 @@ Transposing beyond buffer boundaries is an error. */)
start1_addr = BYTE_POS_ADDR (start1_byte);
start2_addr = BYTE_POS_ADDR (start2_byte);
- memcpy (temp, start2_addr, len2_byte);
- memcpy (start1_addr + len2_byte, start1_addr, len1_byte);
- memcpy (start1_addr, temp, len2_byte);
- }
+ memcpy (temp, start2_addr, len2_byte);
+ memcpy (start1_addr + len2_byte, start1_addr, len1_byte);
+ memcpy (start1_addr, temp, len2_byte);
+ }
else
/* First region not smaller than second. */
- {
+ {
temp = SAFE_ALLOCA (len1_byte);
start1_addr = BYTE_POS_ADDR (start1_byte);
start2_addr = BYTE_POS_ADDR (start2_byte);
- memcpy (temp, start1_addr, len1_byte);
- memcpy (start1_addr, start2_addr, len2_byte);
- memcpy (start1_addr + len2_byte, temp, len1_byte);
- }
+ memcpy (temp, start1_addr, len1_byte);
+ memcpy (start1_addr, start2_addr, len2_byte);
+ memcpy (start1_addr + len2_byte, temp, len1_byte);
+ }
SAFE_FREE ();
graft_intervals_into_buffer (tmp_interval1, start1 + len2,
- len1, current_buffer, 0);
+ len1, current_buffer, 0);
graft_intervals_into_buffer (tmp_interval2, start1,
- len2, current_buffer, 0);
+ len2, current_buffer, 0);
update_compositions (start1, start1 + len2, CHECK_BORDER);
update_compositions (start1 + len2, end2, CHECK_TAIL);
}
@@ -4970,15 +4970,15 @@ Transposing beyond buffer boundaries is an error. */)
if (len1_byte == len2_byte)
/* Regions are same size, though, how nice. */
- {
+ {
USE_SAFE_ALLOCA;
- modify_text (start1, end1);
- modify_text (start2, end2);
- record_change (start1, len1);
- record_change (start2, len2);
- tmp_interval1 = copy_intervals (cur_intv, start1, len1);
- tmp_interval2 = copy_intervals (cur_intv, start2, len2);
+ modify_text (start1, end1);
+ modify_text (start2, end2);
+ record_change (start1, len1);
+ record_change (start2, len2);
+ tmp_interval1 = copy_intervals (cur_intv, start1, len1);
+ tmp_interval2 = copy_intervals (cur_intv, start2, len2);
tmp_interval3 = validate_interval_range (buf, &startr1, &endr1, 0);
if (tmp_interval3)
@@ -4991,27 +4991,27 @@ Transposing beyond buffer boundaries is an error. */)
temp = SAFE_ALLOCA (len1_byte);
start1_addr = BYTE_POS_ADDR (start1_byte);
start2_addr = BYTE_POS_ADDR (start2_byte);
- memcpy (temp, start1_addr, len1_byte);
- memcpy (start1_addr, start2_addr, len2_byte);
- memcpy (start2_addr, temp, len1_byte);
+ memcpy (temp, start1_addr, len1_byte);
+ memcpy (start1_addr, start2_addr, len2_byte);
+ memcpy (start2_addr, temp, len1_byte);
SAFE_FREE ();
- graft_intervals_into_buffer (tmp_interval1, start2,
- len1, current_buffer, 0);
- graft_intervals_into_buffer (tmp_interval2, start1,
- len2, current_buffer, 0);
- }
+ graft_intervals_into_buffer (tmp_interval1, start2,
+ len1, current_buffer, 0);
+ graft_intervals_into_buffer (tmp_interval2, start1,
+ len2, current_buffer, 0);
+ }
else if (len1_byte < len2_byte) /* Second region larger than first */
- /* Non-adjacent & unequal size, area between must also be shifted. */
- {
+ /* Non-adjacent & unequal size, area between must also be shifted. */
+ {
USE_SAFE_ALLOCA;
- modify_text (start1, end2);
- record_change (start1, (end2 - start1));
- tmp_interval1 = copy_intervals (cur_intv, start1, len1);
- tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
- tmp_interval2 = copy_intervals (cur_intv, start2, len2);
+ modify_text (start1, end2);
+ record_change (start1, (end2 - start1));
+ tmp_interval1 = copy_intervals (cur_intv, start1, len1);
+ tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
+ tmp_interval2 = copy_intervals (cur_intv, start2, len2);
tmp_interval3 = validate_interval_range (buf, &startr1, &endr2, 0);
if (tmp_interval3)
@@ -5021,30 +5021,30 @@ Transposing beyond buffer boundaries is an error. */)
temp = SAFE_ALLOCA (len2_byte);
start1_addr = BYTE_POS_ADDR (start1_byte);
start2_addr = BYTE_POS_ADDR (start2_byte);
- memcpy (temp, start2_addr, len2_byte);
- memcpy (start1_addr + len_mid + len2_byte, start1_addr, len1_byte);
- memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
- memcpy (start1_addr, temp, len2_byte);
+ memcpy (temp, start2_addr, len2_byte);
+ memcpy (start1_addr + len_mid + len2_byte, start1_addr, len1_byte);
+ memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
+ memcpy (start1_addr, temp, len2_byte);
SAFE_FREE ();
- graft_intervals_into_buffer (tmp_interval1, end2 - len1,
- len1, current_buffer, 0);
- graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
- len_mid, current_buffer, 0);
- graft_intervals_into_buffer (tmp_interval2, start1,
- len2, current_buffer, 0);
- }
+ graft_intervals_into_buffer (tmp_interval1, end2 - len1,
+ len1, current_buffer, 0);
+ graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
+ len_mid, current_buffer, 0);
+ graft_intervals_into_buffer (tmp_interval2, start1,
+ len2, current_buffer, 0);
+ }
else
/* Second region smaller than first. */
- {
+ {
USE_SAFE_ALLOCA;
- record_change (start1, (end2 - start1));
- modify_text (start1, end2);
+ record_change (start1, (end2 - start1));
+ modify_text (start1, end2);
- tmp_interval1 = copy_intervals (cur_intv, start1, len1);
- tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
- tmp_interval2 = copy_intervals (cur_intv, start2, len2);
+ tmp_interval1 = copy_intervals (cur_intv, start1, len1);
+ tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
+ tmp_interval2 = copy_intervals (cur_intv, start2, len2);
tmp_interval3 = validate_interval_range (buf, &startr1, &endr2, 0);
if (tmp_interval3)
@@ -5054,19 +5054,19 @@ Transposing beyond buffer boundaries is an error. */)
temp = SAFE_ALLOCA (len1_byte);
start1_addr = BYTE_POS_ADDR (start1_byte);
start2_addr = BYTE_POS_ADDR (start2_byte);
- memcpy (temp, start1_addr, len1_byte);
- memcpy (start1_addr, start2_addr, len2_byte);
- memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
- memcpy (start1_addr + len2_byte + len_mid, temp, len1_byte);
+ memcpy (temp, start1_addr, len1_byte);
+ memcpy (start1_addr, start2_addr, len2_byte);
+ memmove (start1_addr + len2_byte, start1_addr + len1_byte, len_mid);
+ memcpy (start1_addr + len2_byte + len_mid, temp, len1_byte);
SAFE_FREE ();
- graft_intervals_into_buffer (tmp_interval1, end2 - len1,
- len1, current_buffer, 0);
- graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
- len_mid, current_buffer, 0);
- graft_intervals_into_buffer (tmp_interval2, start1,
- len2, current_buffer, 0);
- }
+ graft_intervals_into_buffer (tmp_interval1, end2 - len1,
+ len1, current_buffer, 0);
+ graft_intervals_into_buffer (tmp_interval_mid, start1 + len2,
+ len_mid, current_buffer, 0);
+ graft_intervals_into_buffer (tmp_interval2, start1,
+ len2, current_buffer, 0);
+ }
update_compositions (start1, start1 + len2, CHECK_BORDER);
update_compositions (end2 - len1, end2, CHECK_BORDER);
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 68aeb0c..877ed51 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -311,10 +311,10 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
Lisp_Object value = HASH_VALUE (h, i);
EMACS_INT refcount = XFASTINT (value) - 1;
if (refcount > 0)
- {
- value = make_natnum (refcount);
- set_hash_value_slot (h, i, value);
- }
+ {
+ value = make_natnum (refcount);
+ set_hash_value_slot (h, i, value);
+ }
else
hash_remove_from_table (h, value);
}
@@ -404,12 +404,12 @@ module_make_function (emacs_env *env, ptrdiff_t min_arity, ptrdiff_t max_arity,
/* FIXME: Use a bytecompiled object, or even better a subr. */
Lisp_Object ret = list4 (Qlambda,
- list2 (Qand_rest, Qargs),
- doc,
- list4 (Qapply,
- list2 (Qfunction, Qinternal__module_call),
- envobj,
- Qargs));
+ list2 (Qand_rest, Qargs),
+ doc,
+ list4 (Qapply,
+ list2 (Qfunction, Qinternal__module_call),
+ envobj,
+ Qargs));
return lisp_to_value (ret);
}
@@ -667,7 +667,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0,
if (r != 0)
{
if (FIXNUM_OVERFLOW_P (r))
- xsignal0 (Qoverflow_error);
+ xsignal0 (Qoverflow_error);
xsignal2 (Qmodule_load_failed, file, make_number (r));
}
@@ -727,17 +727,17 @@ usage: (module-call ENVOBJ &rest ARGLIST) */)
return value_to_lisp (ret);
case emacs_funcall_exit_signal:
{
- Lisp_Object symbol = priv.non_local_exit_symbol;
- Lisp_Object data = priv.non_local_exit_data;
- finalize_environment (&priv);
- xsignal (symbol, data);
+ Lisp_Object symbol = priv.non_local_exit_symbol;
+ Lisp_Object data = priv.non_local_exit_data;
+ finalize_environment (&priv);
+ xsignal (symbol, data);
}
case emacs_funcall_exit_throw:
{
- Lisp_Object tag = priv.non_local_exit_symbol;
- Lisp_Object value = priv.non_local_exit_data;
- finalize_environment (&priv);
- Fthrow (tag, value);
+ Lisp_Object tag = priv.non_local_exit_symbol;
+ Lisp_Object value = priv.non_local_exit_data;
+ finalize_environment (&priv);
+ Fthrow (tag, value);
}
default:
eassume (false);
@@ -1026,7 +1026,7 @@ syms_of_module (void)
DEFSYM (Qmodule_environments, "module-environments");
DEFVAR_LISP ("module-environments", Vmodule_environments,
- doc: /* List of active module environments. */);
+ doc: /* List of active module environments. */);
Vmodule_environments = Qnil;
/* Unintern `module-environments' because it is only used
internally. */
@@ -1034,21 +1034,21 @@ syms_of_module (void)
DEFSYM (Qmodule_load_failed, "module-load-failed");
Fput (Qmodule_load_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qmodule_load_failed, Qerror));
+ listn (CONSTYPE_PURE, 2, Qmodule_load_failed, Qerror));
Fput (Qmodule_load_failed, Qerror_message,
- build_pure_c_string ("Module load failed"));
+ build_pure_c_string ("Module load failed"));
DEFSYM (Qinvalid_module_call, "invalid-module-call");
Fput (Qinvalid_module_call, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qinvalid_module_call, Qerror));
+ listn (CONSTYPE_PURE, 2, Qinvalid_module_call, Qerror));
Fput (Qinvalid_module_call, Qerror_message,
- build_pure_c_string ("Invalid module call"));
+ build_pure_c_string ("Invalid module call"));
DEFSYM (Qinvalid_arity, "invalid-arity");
Fput (Qinvalid_arity, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qinvalid_arity, Qerror));
+ listn (CONSTYPE_PURE, 2, Qinvalid_arity, Qerror));
Fput (Qinvalid_arity, Qerror_message,
- build_pure_c_string ("Invalid function arity"));
+ build_pure_c_string ("Invalid function arity"));
/* Unintern `module-refs-hash' because it is internal-only and Lisp
code or modules should not access it. */
diff --git a/src/emacs-module.h b/src/emacs-module.h
index ae7311b..8c55f96 100644
--- a/src/emacs-module.h
+++ b/src/emacs-module.h
@@ -119,12 +119,12 @@ struct emacs_env_25
void *data);
emacs_value (*funcall) (emacs_env *env,
- emacs_value function,
- ptrdiff_t nargs,
- emacs_value args[]);
+ emacs_value function,
+ ptrdiff_t nargs,
+ emacs_value args[]);
emacs_value (*intern) (emacs_env *env,
- const char *symbol_name);
+ const char *symbol_name);
/* Type conversion. */
@@ -156,9 +156,9 @@ struct emacs_env_25
Return true if the string was successfully copied. */
bool (*copy_string_contents) (emacs_env *env,
- emacs_value value,
- char *buffer,
- ptrdiff_t *size_inout);
+ emacs_value value,
+ char *buffer,
+ ptrdiff_t *size_inout);
/* Create a Lisp string from a utf8 encoded string. */
emacs_value (*make_string) (emacs_env *env,
diff --git a/src/emacs.c b/src/emacs.c
index eff3f9d..4a3e681 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -243,8 +243,8 @@ Initialization options:\n\
",
"\
--quick, -Q equivalent to:\n\
- -q --no-site-file --no-site-lisp --no-splash\n\
- --no-x-resources\n\
+ -q --no-site-file --no-site-lisp --no-splash\n\
+ --no-x-resources\n\
--script FILE run FILE as an Emacs Lisp script\n\
--terminal, -t DEVICE use DEVICE for terminal I/O\n\
--user, -u USER load ~USER/.emacs instead of your own\n\
@@ -275,15 +275,15 @@ Display options:\n\
\n\
--background-color, -bg COLOR window background color\n\
--basic-display, -D disable many display features;\n\
- used for debugging Emacs\n\
+ used for debugging Emacs\n\
--border-color, -bd COLOR main border color\n\
--border-width, -bw WIDTH width of main border\n\
",
"\
--color, --color=MODE override color mode for character terminals;\n\
- MODE defaults to `auto', and\n\
- can also be `never', `always',\n\
- or a mode name like `ansi8'\n\
+ MODE defaults to `auto', and\n\
+ can also be `never', `always',\n\
+ or a mode name like `ansi8'\n\
--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\
--font, -fn FONT default font; must be fixed-width\n\
--foreground-color, -fg COLOR window foreground color\n\
@@ -368,16 +368,16 @@ terminate_due_to_signal (int sig, int backtrace_limit)
{
/* If fatal error occurs in code below, avoid infinite recursion. */
if (! fatal_error_in_progress)
- {
- fatal_error_in_progress = 1;
+ {
+ fatal_error_in_progress = 1;
- totally_unblock_input ();
- if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
- Fkill_emacs (make_number (sig));
+ totally_unblock_input ();
+ if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
+ Fkill_emacs (make_number (sig));
- shut_down_emacs (sig, Qnil);
- emacs_backtrace (backtrace_limit);
- }
+ shut_down_emacs (sig, Qnil);
+ emacs_backtrace (backtrace_limit);
+ }
}
/* Signal the same code; this time it will really be fatal.
@@ -597,7 +597,7 @@ DEFUN ("invocation-directory", Finvocation_directory, Sinvocation_directory,
static bool
argmatch (char **argv, int argc, const char *sstr, const char *lstr,
- int minlen, char **valptr, int *skipptr)
+ int minlen, char **valptr, int *skipptr)
{
char *p = NULL;
ptrdiff_t arglen;
@@ -816,11 +816,11 @@ main (int argc, char **argv)
#endif
original_pwd = emacs_get_current_dir_name ();
if (chdir (ch_to_dir) != 0)
- {
- fprintf (stderr, "%s: Can't chdir to %s: %s\n",
- argv[0], ch_to_dir, strerror (errno));
- exit (1);
- }
+ {
+ fprintf (stderr, "%s: Can't chdir to %s: %s\n",
+ argv[0], ch_to_dir, strerror (errno));
+ exit (1);
+ }
}
#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK) && !defined (CYGWIN)
@@ -1013,41 +1013,41 @@ main (int argc, char **argv)
{
#ifndef DOS_NT
if (daemon_type == 2)
- {
- /* Start as a background daemon: fork a new child process which
- will run the rest of the initialization code, then exit.
-
- Detaching a daemon requires the following steps:
- - fork
- - setsid
- - exit the parent
- - close the tty file-descriptors
-
- We only want to do the last 2 steps once the daemon is ready to
- serve requests, i.e. after loading .emacs (initialization).
- OTOH initialization may start subprocesses (e.g. ispell) and these
- should be run from the proper process (the one that will end up
- running as daemon) and with the proper "session id" in order for
- them to keep working after detaching, so fork and setsid need to be
- performed before initialization.
-
- We want to avoid exiting before the server socket is ready, so
- use a pipe for synchronization. The parent waits for the child
- to close its end of the pipe (using `daemon-initialized')
- before exiting. */
- if (emacs_pipe (daemon_pipe) != 0)
- {
- fprintf (stderr, "Cannot pipe!\n");
- exit (1);
- }
- } /* daemon_type == 2 */
+ {
+ /* Start as a background daemon: fork a new child process which
+ will run the rest of the initialization code, then exit.
+
+ Detaching a daemon requires the following steps:
+ - fork
+ - setsid
+ - exit the parent
+ - close the tty file-descriptors
+
+ We only want to do the last 2 steps once the daemon is ready to
+ serve requests, i.e. after loading .emacs (initialization).
+ OTOH initialization may start subprocesses (e.g. ispell) and these
+ should be run from the proper process (the one that will end up
+ running as daemon) and with the proper "session id" in order for
+ them to keep working after detaching, so fork and setsid need to be
+ performed before initialization.
+
+ We want to avoid exiting before the server socket is ready, so
+ use a pipe for synchronization. The parent waits for the child
+ to close its end of the pipe (using `daemon-initialized')
+ before exiting. */
+ if (emacs_pipe (daemon_pipe) != 0)
+ {
+ fprintf (stderr, "Cannot pipe!\n");
+ exit (1);
+ }
+ } /* daemon_type == 2 */
#ifdef HAVE_LIBSYSTEMD
/* Read the number of sockets passed through by systemd. */
int systemd_socket = sd_listen_fds (1);
if (systemd_socket > 1)
- fprintf (stderr,
+ fprintf (stderr,
("\n"
"Warning: systemd passed more than one socket to Emacs.\n"
"Try 'Accept=false' in the Emacs socket unit file.\n"));
@@ -1064,107 +1064,107 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#endif /* USE_GTK */
if (daemon_type == 2)
- {
- pid_t f;
+ {
+ pid_t f;
#ifndef DAEMON_MUST_EXEC
- f = fork ();
+ f = fork ();
#else /* DAEMON_MUST_EXEC */
- if (!dname_arg || !strchr (dname_arg, '\n'))
- f = fork (); /* in orig */
- else
- f = 0; /* in exec'd */
+ if (!dname_arg || !strchr (dname_arg, '\n'))
+ f = fork (); /* in orig */
+ else
+ f = 0; /* in exec'd */
#endif /* !DAEMON_MUST_EXEC */
- if (f > 0)
- {
- int retval;
- char buf[1];
-
- /* Close unused writing end of the pipe. */
- emacs_close (daemon_pipe[1]);
-
- /* Just wait for the child to close its end of the pipe. */
- do
- {
- retval = read (daemon_pipe[0], &buf, 1);
- }
- while (retval == -1 && errno == EINTR);
-
- if (retval < 0)
- {
- fprintf (stderr, "Error reading status from child\n");
- exit (1);
- }
- else if (retval == 0)
- {
- fprintf (stderr, "Error: server did not start correctly\n");
- exit (1);
- }
-
- emacs_close (daemon_pipe[0]);
- exit (0);
- }
- if (f < 0)
- {
- emacs_perror ("fork");
- exit (EXIT_CANCELED);
- }
+ if (f > 0)
+ {
+ int retval;
+ char buf[1];
+
+ /* Close unused writing end of the pipe. */
+ emacs_close (daemon_pipe[1]);
+
+ /* Just wait for the child to close its end of the pipe. */
+ do
+ {
+ retval = read (daemon_pipe[0], &buf, 1);
+ }
+ while (retval == -1 && errno == EINTR);
+
+ if (retval < 0)
+ {
+ fprintf (stderr, "Error reading status from child\n");
+ exit (1);
+ }
+ else if (retval == 0)
+ {
+ fprintf (stderr, "Error: server did not start correctly\n");
+ exit (1);
+ }
+
+ emacs_close (daemon_pipe[0]);
+ exit (0);
+ }
+ if (f < 0)
+ {
+ emacs_perror ("fork");
+ exit (EXIT_CANCELED);
+ }
#ifdef DAEMON_MUST_EXEC
- {
- /* In orig process, forked as child, OR in exec'd. */
- if (!dname_arg || !strchr (dname_arg, '\n'))
- { /* In orig, child: now exec w/special daemon name. */
- char fdStr[80];
- int fdStrlen =
- snprintf (fdStr, sizeof fdStr,
- "--old-daemon=\n%d,%d\n%s", daemon_pipe[0],
- daemon_pipe[1], dname_arg ? dname_arg : "");
-
- if (! (0 <= fdStrlen && fdStrlen < sizeof fdStr))
- {
- fprintf (stderr, "daemon: child name too long\n");
- exit (EXIT_CANNOT_INVOKE);
- }
-
- argv[skip_args] = fdStr;
-
- fcntl (daemon_pipe[0], F_SETFD, 0);
- fcntl (daemon_pipe[1], F_SETFD, 0);
- execvp (argv[0], argv);
- emacs_perror (argv[0]);
- exit (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
- }
-
- /* In exec'd: parse special dname into pipe and name info. */
- if (!dname_arg || !strchr (dname_arg, '\n')
- || strlen (dname_arg) < 1 || strlen (dname_arg) > 70)
- {
- fprintf (stderr, "emacs daemon: daemon name absent or too long\n");
- exit (EXIT_CANNOT_INVOKE);
- }
- dname_arg2[0] = '\0';
- sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]),
- dname_arg2);
- dname_arg = *dname_arg2 ? dname_arg2 : NULL;
- fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC);
- }
+ {
+ /* In orig process, forked as child, OR in exec'd. */
+ if (!dname_arg || !strchr (dname_arg, '\n'))
+ { /* In orig, child: now exec w/special daemon name. */
+ char fdStr[80];
+ int fdStrlen =
+ snprintf (fdStr, sizeof fdStr,
+ "--old-daemon=\n%d,%d\n%s", daemon_pipe[0],
+ daemon_pipe[1], dname_arg ? dname_arg : "");
+
+ if (! (0 <= fdStrlen && fdStrlen < sizeof fdStr))
+ {
+ fprintf (stderr, "daemon: child name too long\n");
+ exit (EXIT_CANNOT_INVOKE);
+ }
+
+ argv[skip_args] = fdStr;
+
+ fcntl (daemon_pipe[0], F_SETFD, 0);
+ fcntl (daemon_pipe[1], F_SETFD, 0);
+ execvp (argv[0], argv);
+ emacs_perror (argv[0]);
+ exit (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
+ }
+
+ /* In exec'd: parse special dname into pipe and name info. */
+ if (!dname_arg || !strchr (dname_arg, '\n')
+ || strlen (dname_arg) < 1 || strlen (dname_arg) > 70)
+ {
+ fprintf (stderr, "emacs daemon: daemon name absent or too long\n");
+ exit (EXIT_CANNOT_INVOKE);
+ }
+ dname_arg2[0] = '\0';
+ sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]),
+ dname_arg2);
+ dname_arg = *dname_arg2 ? dname_arg2 : NULL;
+ fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC);
+ }
#endif /* DAEMON_MUST_EXEC */
- /* Close unused reading end of the pipe. */
- emacs_close (daemon_pipe[0]);
+ /* Close unused reading end of the pipe. */
+ emacs_close (daemon_pipe[0]);
- setsid ();
- } /* daemon_type == 2 */
+ setsid ();
+ } /* daemon_type == 2 */
#elif defined(WINDOWSNT)
/* Indicate that we want daemon mode. */
w32_daemon_event = CreateEvent (NULL, TRUE, FALSE, W32_DAEMON_EVENT);
if (w32_daemon_event == NULL)
- {
- fprintf (stderr, "Couldn't create MS-Windows event for daemon: %s\n",
+ {
+ fprintf (stderr, "Couldn't create MS-Windows event for daemon: %s\n",
w32_strerror (0));
- exit (1);
- }
+ exit (1);
+ }
#else /* MSDOS */
fprintf (stderr, "This platform does not support daemon mode.\n");
exit (1);
@@ -1212,7 +1212,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
face names. */
syms_of_xfaces ();
/* XXX syms_of_keyboard uses some symbols in keymap.c. It would
- be better to arrange things not to have this dependency. */
+ be better to arrange things not to have this dependency. */
syms_of_keymap ();
/* Call syms_of_keyboard before init_window_once because
keyboard sets up symbols that include some face names that
@@ -1276,22 +1276,22 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#ifdef NS_IMPL_COCOA
/* Started from GUI? */
/* FIXME: Do the right thing if getenv returns NULL, or if
- chdir fails. */
+ chdir fails. */
if (! inhibit_window_system && ! isatty (STDIN_FILENO) && ! ch_to_dir)
- chdir (getenv ("HOME"));
+ chdir (getenv ("HOME"));
if (skip_args < argc)
- {
- if (!strncmp (argv[skip_args], "-psn", 4))
- {
- skip_args += 1;
- if (! ch_to_dir) chdir (getenv ("HOME"));
- }
- else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4))
- {
- skip_args += 2;
- if (! ch_to_dir) chdir (getenv ("HOME"));
- }
- }
+ {
+ if (!strncmp (argv[skip_args], "-psn", 4))
+ {
+ skip_args += 1;
+ if (! ch_to_dir) chdir (getenv ("HOME"));
+ }
+ else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4))
+ {
+ skip_args += 2;
+ if (! ch_to_dir) chdir (getenv ("HOME"));
+ }
+ }
#endif /* COCOA */
}
#endif /* HAVE_NS */
@@ -1337,9 +1337,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
if (! no_site_lisp)
{
- if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
- || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
- no_site_lisp = 1;
+ if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
+ || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
+ no_site_lisp = 1;
}
/* Don't actually discard this arg. */
@@ -1351,7 +1351,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
int count_before = skip_args;
if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args)
- || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
+ || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args))
no_site_lisp = 1;
skip_args = count_before;
@@ -1940,7 +1940,7 @@ sort_args (int argc, char **argv)
emacs_abort ();
/* Copy the highest priority remaining option, with its args, to NEW.
- Unless it is a duplicate of the previous one. */
+ Unless it is a duplicate of the previous one. */
if (! (options[best] == 0
&& ! strcmp (new[to - 1], argv[best])))
{
@@ -2137,7 +2137,7 @@ You must run Emacs in batch mode in order to dump it. */)
fprintf (stderr, "**************************************************\n");
fprintf (stderr, "Warning: Your system has a gap between BSS and the\n");
fprintf (stderr, "heap (%"pMu" bytes). This usually means that exec-shield\n",
- heap_bss_diff);
+ heap_bss_diff);
fprintf (stderr, "or something similar is in effect. The dump may\n");
fprintf (stderr, "fail because of this. See the section about\n");
fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n");
@@ -2366,39 +2366,39 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
element = ((p - path) ? make_unibyte_string (path, p - path)
: empty_element);
if (! NILP (element))
- {
+ {
#ifdef WINDOWSNT
- /* Relative file names in the default path are interpreted as
- being relative to $emacs_dir. */
- if (edir && defaulted
- && strncmp (path, emacs_dir_env, emacs_dir_len) == 0)
- element = Fexpand_file_name (Fsubstring
- (element,
- make_number (emacs_dir_len),
- Qnil),
- build_unibyte_string (emacs_dir));
-#endif
-
- /* Add /: to the front of the name
- if it would otherwise be treated as magic. */
- tem = Ffind_file_name_handler (element, Qt);
-
- /* However, if the handler says "I'm safe",
- don't bother adding /:. */
- if (SYMBOLP (tem))
- {
- Lisp_Object prop;
- prop = Fget (tem, intern ("safe-magic"));
- if (! NILP (prop))
- tem = Qnil;
- }
-
- if (! NILP (tem))
+ /* Relative file names in the default path are interpreted as
+ being relative to $emacs_dir. */
+ if (edir && defaulted
+ && strncmp (path, emacs_dir_env, emacs_dir_len) == 0)
+ element = Fexpand_file_name (Fsubstring
+ (element,
+ make_number (emacs_dir_len),
+ Qnil),
+ build_unibyte_string (emacs_dir));
+#endif
+
+ /* Add /: to the front of the name
+ if it would otherwise be treated as magic. */
+ tem = Ffind_file_name_handler (element, Qt);
+
+ /* However, if the handler says "I'm safe",
+ don't bother adding /:. */
+ if (SYMBOLP (tem))
+ {
+ Lisp_Object prop;
+ prop = Fget (tem, intern ("safe-magic"));
+ if (! NILP (prop))
+ tem = Qnil;
+ }
+
+ if (! NILP (tem))
{
AUTO_STRING (slash_colon, "/:");
element = concat2 (slash_colon, element);
}
- } /* !NILP (element) */
+ } /* !NILP (element) */
lpath = Fcons (element, lpath);
if (*p)
@@ -2454,12 +2454,12 @@ from the parent process and its tty file descriptors. */)
err |= emacs_close (nfd) != 0;
/* Closing the pipe will notify the parent that it can exit.
- FIXME: In case some other process inherited the pipe, closing it here
- won't notify the parent because it's still open elsewhere, so we
- additionally send a byte, just to make sure the parent really exits.
- Instead, we should probably close the pipe in start-process and
- call-process to make sure the pipe is never inherited by
- subprocesses. */
+ FIXME: In case some other process inherited the pipe, closing it here
+ won't notify the parent because it's still open elsewhere, so we
+ additionally send a byte, just to make sure the parent really exits.
+ Instead, we should probably close the pipe in start-process and
+ call-process to make sure the pipe is never inherited by
+ subprocesses. */
err |= write (daemon_pipe[1], "\n", 1) < 0;
err |= emacs_close (daemon_pipe[1]) != 0;
}
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index c04adf2..64e8aac 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -42,11 +42,11 @@ struct _EmacsFixedPrivate
static void emacs_fixed_get_preferred_width (GtkWidget *widget,
- gint *minimum,
- gint *natural);
+ gint *minimum,
+ gint *natural);
static void emacs_fixed_get_preferred_height (GtkWidget *widget,
- gint *minimum,
- gint *natural);
+ gint *minimum,
+ gint *natural);
static GType emacs_fixed_get_type (void);
G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED)
@@ -99,11 +99,11 @@ emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
if (gtk_widget_get_has_window (widget))
{
if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (gtk_widget_get_window (widget),
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
+ gdk_window_move_resize (gtk_widget_get_window (widget),
+ allocation->x,
+ allocation->y,
+ allocation->width,
+ allocation->height);
}
for (GList *children = priv->children; children; children = children->next)
@@ -111,7 +111,7 @@ emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
GtkFixedChild *child = children->data;
if (!gtk_widget_get_visible (child->widget))
- continue;
+ continue;
GtkRequisition child_requisition;
gtk_widget_get_preferred_size (child->widget, &child_requisition, NULL);
@@ -121,21 +121,21 @@ emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
child_allocation.y = child->y;
if (!gtk_widget_get_has_window (widget))
- {
- child_allocation.x += allocation->x;
- child_allocation.y += allocation->y;
- }
+ {
+ child_allocation.x += allocation->x;
+ child_allocation.y += allocation->y;
+ }
child_allocation.width = child_requisition.width;
child_allocation.height = child_requisition.height;
struct xwidget_view *xv
- = g_object_get_data (G_OBJECT (child->widget), XG_XWIDGET_VIEW);
+ = g_object_get_data (G_OBJECT (child->widget), XG_XWIDGET_VIEW);
if (xv)
- {
- child_allocation.width = xv->clip_right;
- child_allocation.height = xv->clip_bottom - xv->clip_top;
- }
+ {
+ child_allocation.width = xv->clip_right;
+ child_allocation.height = xv->clip_bottom - xv->clip_top;
+ }
gtk_widget_size_allocate (child->widget, &child_allocation);
}
@@ -162,7 +162,7 @@ static void
emacs_fixed_init (EmacsFixed *fixed)
{
fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, emacs_fixed_get_type (),
- EmacsFixedPrivate);
+ EmacsFixedPrivate);
fixed->priv->f = 0;
}
@@ -177,8 +177,8 @@ emacs_fixed_new (struct frame *f)
static void
emacs_fixed_get_preferred_width (GtkWidget *widget,
- gint *minimum,
- gint *natural)
+ gint *minimum,
+ gint *natural)
{
EmacsFixed *fixed = EMACS_FIXED (widget);
EmacsFixedPrivate *priv = fixed->priv;
@@ -189,8 +189,8 @@ emacs_fixed_get_preferred_width (GtkWidget *widget,
static void
emacs_fixed_get_preferred_height (GtkWidget *widget,
- gint *minimum,
- gint *natural)
+ gint *minimum,
+ gint *natural)
{
EmacsFixed *fixed = EMACS_FIXED (widget);
EmacsFixedPrivate *priv = fixed->priv;
@@ -206,9 +206,9 @@ emacs_fixed_get_preferred_height (GtkWidget *widget,
void
XSetWMSizeHints (Display* d,
- Window w,
- XSizeHints* hints,
- Atom prop)
+ Window w,
+ XSizeHints* hints,
+ Atom prop)
{
struct x_display_info *dpyinfo = x_display_info_for_display (d);
struct frame *f = x_top_window_to_frame (dpyinfo, w);
diff --git a/src/eval.c b/src/eval.c
index e50e26a..e1c0d32 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -504,7 +504,7 @@ usage: (setq [SYM VAL]...) */)
Lisp_Object numargs = Flength (args);
if (XINT (numargs) & 1)
- xsignal2 (Qwrong_number_of_arguments, Qsetq, numargs);
+ xsignal2 (Qwrong_number_of_arguments, Qsetq, numargs);
do
{
@@ -626,7 +626,7 @@ The return value is BASE-VARIABLE. */)
still works. */
if (NILP (Fboundp (base_variable)))
set_internal (base_variable, find_symbol_value (new_alias),
- Qnil, SET_INTERNAL_BIND);
+ Qnil, SET_INTERNAL_BIND);
{
union specbinding *p;
@@ -1163,7 +1163,7 @@ Both TAG and VALUE are evalled. */
for (c = handlerlist; c; c = c->next)
{
if (c->type == CATCHER_ALL)
- unwind_to_catch (c, Fcons (tag, value));
+ unwind_to_catch (c, Fcons (tag, value));
if (c->type == CATCHER && EQ (c->tag_or_ch, tag))
unwind_to_catch (c, value);
}
@@ -1968,13 +1968,13 @@ it defines a macro. */)
Lisp_Object kind = Fnth (make_number (4), fundef);
if (! (EQ (kind, Qt) || EQ (kind, Qmacro)))
- {
- fprintf(stderr, "nil");
- }
+ {
+ fprintf(stderr, "nil");
+ }
else
- {
- fprintf(stderr, "t");
- }
+ {
+ fprintf(stderr, "t");
+ }
fprintf(stderr, ")\n");
}
@@ -2803,57 +2803,57 @@ funcall_subr (struct Lisp_Subr *subr, ptrdiff_t numargs, Lisp_Object *args)
Lisp_Object internal_argbuf[8];
Lisp_Object *internal_args;
if (subr->max_args > numargs)
- {
- eassert (subr->max_args <= ARRAYELTS (internal_argbuf));
- internal_args = internal_argbuf;
- memcpy (internal_args, args, numargs * word_size);
- memclear (internal_args + numargs,
- (subr->max_args - numargs) * word_size);
- }
+ {
+ eassert (subr->max_args <= ARRAYELTS (internal_argbuf));
+ internal_args = internal_argbuf;
+ memcpy (internal_args, args, numargs * word_size);
+ memclear (internal_args + numargs,
+ (subr->max_args - numargs) * word_size);
+ }
else
- internal_args = args;
+ internal_args = args;
switch (subr->max_args)
- {
- case 0:
- return (subr->function.a0 ());
- case 1:
- return (subr->function.a1 (internal_args[0]));
- case 2:
- return (subr->function.a2
- (internal_args[0], internal_args[1]));
- case 3:
- return (subr->function.a3
- (internal_args[0], internal_args[1], internal_args[2]));
- case 4:
- return (subr->function.a4
- (internal_args[0], internal_args[1], internal_args[2],
- internal_args[3]));
- case 5:
- return (subr->function.a5
- (internal_args[0], internal_args[1], internal_args[2],
- internal_args[3], internal_args[4]));
- case 6:
- return (subr->function.a6
- (internal_args[0], internal_args[1], internal_args[2],
- internal_args[3], internal_args[4], internal_args[5]));
- case 7:
- return (subr->function.a7
- (internal_args[0], internal_args[1], internal_args[2],
- internal_args[3], internal_args[4], internal_args[5],
- internal_args[6]));
- case 8:
- return (subr->function.a8
- (internal_args[0], internal_args[1], internal_args[2],
- internal_args[3], internal_args[4], internal_args[5],
- internal_args[6], internal_args[7]));
-
- default:
-
- /* If a subr takes more than 8 arguments without using MANY
- or UNEVALLED, we need to extend this function to support it.
- Until this is done, there is no way to call the function. */
- emacs_abort ();
- }
+ {
+ case 0:
+ return (subr->function.a0 ());
+ case 1:
+ return (subr->function.a1 (internal_args[0]));
+ case 2:
+ return (subr->function.a2
+ (internal_args[0], internal_args[1]));
+ case 3:
+ return (subr->function.a3
+ (internal_args[0], internal_args[1], internal_args[2]));
+ case 4:
+ return (subr->function.a4
+ (internal_args[0], internal_args[1], internal_args[2],
+ internal_args[3]));
+ case 5:
+ return (subr->function.a5
+ (internal_args[0], internal_args[1], internal_args[2],
+ internal_args[3], internal_args[4]));
+ case 6:
+ return (subr->function.a6
+ (internal_args[0], internal_args[1], internal_args[2],
+ internal_args[3], internal_args[4], internal_args[5]));
+ case 7:
+ return (subr->function.a7
+ (internal_args[0], internal_args[1], internal_args[2],
+ internal_args[3], internal_args[4], internal_args[5],
+ internal_args[6]));
+ case 8:
+ return (subr->function.a8
+ (internal_args[0], internal_args[1], internal_args[2],
+ internal_args[3], internal_args[4], internal_args[5],
+ internal_args[6], internal_args[7]));
+
+ default:
+
+ /* If a subr takes more than 8 arguments without using MANY
+ or UNEVALLED, we need to extend this function to support it.
+ Until this is done, there is no way to call the function. */
+ emacs_abort ();
+ }
}
}
@@ -2964,19 +2964,19 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
xsignal1 (Qinvalid_function, fun);
if (EQ (next, Qand_rest))
- {
- if (rest || previous_optional_or_rest)
- xsignal1 (Qinvalid_function, fun);
- rest = 1;
- previous_optional_or_rest = true;
- }
+ {
+ if (rest || previous_optional_or_rest)
+ xsignal1 (Qinvalid_function, fun);
+ rest = 1;
+ previous_optional_or_rest = true;
+ }
else if (EQ (next, Qand_optional))
- {
- if (optional || rest || previous_optional_or_rest)
- xsignal1 (Qinvalid_function, fun);
- optional = 1;
- previous_optional_or_rest = true;
- }
+ {
+ if (optional || rest || previous_optional_or_rest)
+ xsignal1 (Qinvalid_function, fun);
+ optional = 1;
+ previous_optional_or_rest = true;
+ }
else
{
Lisp_Object arg;
@@ -2999,7 +2999,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
else
/* Dynamically bind NEXT. */
specbind (next, arg);
- previous_optional_or_rest = false;
+ previous_optional_or_rest = false;
}
}
@@ -3110,7 +3110,7 @@ lambda_arity (Lisp_Object fun)
xsignal1 (Qinvalid_function, fun);
syms_left = AREF (fun, COMPILED_ARGLIST);
if (INTEGERP (syms_left))
- return get_byte_code_arity (syms_left);
+ return get_byte_code_arity (syms_left);
}
else
emacs_abort ();
@@ -3129,10 +3129,10 @@ lambda_arity (Lisp_Object fun)
optional = true;
else
{
- if (!optional)
- minargs++;
- maxargs++;
- }
+ if (!optional)
+ minargs++;
+ maxargs++;
+ }
}
if (!NILP (syms_left))
@@ -3207,7 +3207,7 @@ let_shadows_global_binding_p (Lisp_Object symbol)
static void
do_specbind (struct Lisp_Symbol *sym, union specbinding *bind,
- Lisp_Object value, enum Set_Internal_Bind bindflag)
+ Lisp_Object value, enum Set_Internal_Bind bindflag)
{
switch (sym->redirect)
{
@@ -3215,14 +3215,14 @@ do_specbind (struct Lisp_Symbol *sym, union specbinding *bind,
if (!sym->trapped_write)
SET_SYMBOL_VAL (sym, value);
else
- set_internal (specpdl_symbol (bind), value, Qnil, bindflag);
+ set_internal (specpdl_symbol (bind), value, Qnil, bindflag);
break;
case SYMBOL_FORWARDED:
if (BUFFER_OBJFWDP (SYMBOL_FWD (sym))
&& specpdl_kind (bind) == SPECPDL_LET_DEFAULT)
{
- set_default_internal (specpdl_symbol (bind), value, bindflag);
+ set_default_internal (specpdl_symbol (bind), value, bindflag);
return;
}
/* FALLTHROUGH */
@@ -3299,7 +3299,7 @@ specbind (Lisp_Object symbol, Lisp_Object value)
{
specpdl_ptr->let.kind = SPECPDL_LET_DEFAULT;
grow_specpdl ();
- do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND);
+ do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND);
return;
}
}
@@ -3307,7 +3307,7 @@ specbind (Lisp_Object symbol, Lisp_Object value)
specpdl_ptr->let.kind = SPECPDL_LET;
grow_specpdl ();
- do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND);
+ do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND);
break;
}
default: emacs_abort ();
@@ -3363,15 +3363,15 @@ rebind_for_thread_switch (void)
Lisp_Object value = specpdl_saved_value (bind);
Lisp_Object sym = specpdl_symbol (bind);
bind->let.saved_value = Qnil;
- do_specbind (XSYMBOL (sym), bind, value,
- SET_INTERNAL_THREAD_SWITCH);
+ do_specbind (XSYMBOL (sym), bind, value,
+ SET_INTERNAL_THREAD_SWITCH);
}
}
}
static void
do_one_unbind (union specbinding *this_binding, bool unwinding,
- enum Set_Internal_Bind bindflag)
+ enum Set_Internal_Bind bindflag)
{
eassert (unwinding || this_binding->kind >= SPECPDL_LET);
switch (this_binding->kind)
@@ -3400,7 +3400,7 @@ do_one_unbind (union specbinding *this_binding, bool unwinding,
SET_SYMBOL_VAL (XSYMBOL (sym), specpdl_old_value (this_binding));
else
set_internal (sym, specpdl_old_value (this_binding),
- Qnil, bindflag);
+ Qnil, bindflag);
break;
}
else
@@ -3411,8 +3411,8 @@ do_one_unbind (union specbinding *this_binding, bool unwinding,
}
case SPECPDL_LET_DEFAULT:
set_default_internal (specpdl_symbol (this_binding),
- specpdl_old_value (this_binding),
- bindflag);
+ specpdl_old_value (this_binding),
+ bindflag);
break;
case SPECPDL_LET_LOCAL:
{
@@ -3424,7 +3424,7 @@ do_one_unbind (union specbinding *this_binding, bool unwinding,
/* If this was a local binding, reset the value in the appropriate
buffer, but only if that buffer's binding still exists. */
if (!NILP (Flocal_variable_p (symbol, where)))
- set_internal (symbol, old_value, where, bindflag);
+ set_internal (symbol, old_value, where, bindflag);
}
break;
}
@@ -3518,7 +3518,7 @@ unbind_for_thread_switch (struct thread_state *thr)
{
Lisp_Object sym = specpdl_symbol (bind);
bind->let.saved_value = find_symbol_value (sym);
- do_one_unbind (bind, false, SET_INTERNAL_THREAD_SWITCH);
+ do_one_unbind (bind, false, SET_INTERNAL_THREAD_SWITCH);
}
}
}
@@ -3543,8 +3543,8 @@ get_backtrace_starting_at (Lisp_Object base)
{ /* Skip up to `base'. */
base = Findirect_function (base, Qt);
while (backtrace_p (pdl)
- && !EQ (base, Findirect_function (backtrace_function (pdl), Qt)))
- pdl = backtrace_next (pdl);
+ && !EQ (base, Findirect_function (backtrace_function (pdl), Qt)))
+ pdl = backtrace_next (pdl);
}
return pdl;
@@ -3716,7 +3716,7 @@ backtrace_eval_unrewind (int distance)
{
set_specpdl_old_value
(tmp, Fbuffer_local_value (symbol, where));
- set_internal (symbol, old_value, where, SET_INTERNAL_UNBIND);
+ set_internal (symbol, old_value, where, SET_INTERNAL_UNBIND);
}
}
break;
diff --git a/src/fileio.c b/src/fileio.c
index 1a744e0..73dfece 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -178,7 +178,7 @@ check_writable (const char *filename, int amode)
int faccessat_errno = errno;
struct stat st;
if (stat (filename, &st) < 0)
- return 0;
+ return 0;
res = (st.st_uid == -1 || st.st_gid == -1);
errno = faccessat_errno;
}
@@ -725,7 +725,7 @@ make_temp_name (Lisp_Object prefix, bool base64_p)
p[2] = make_temp_name_tbl[num & 63], num >>= 6;
/* Poor man's congruential RN generator. Replace with
- ++make_temp_name_count for debugging. */
+ ++make_temp_name_count for debugging. */
make_temp_name_count += 25229;
make_temp_name_count %= 225307;
@@ -839,7 +839,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
/* "/" is not considered a root directory on DOS_NT, so using "/"
here causes an infinite recursion in, e.g., the following:
- (let (default-directory)
+ (let (default-directory)
(expand-file-name "a"))
To avoid this, we set default_directory to the root of the
@@ -1059,7 +1059,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
We set newdir to be the appropriate prefix if one is needed:
- the relevant user directory if nm starts with ~ or ~user
- the specified drive's working dir (DOS/NT only) if nm does not
- start with /
+ start with /
- the value of default_directory.
Note that these prefixes are not guaranteed to be absolute (except
@@ -1282,7 +1282,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
}
/* Keep only a prefix from newdir if nm starts with slash
- (//server/share for UNC, nothing otherwise). */
+ (//server/share for UNC, nothing otherwise). */
if (IS_DIRECTORY_SEP (nm[0]) && collapse_newdir)
{
#ifdef WINDOWSNT
@@ -2189,10 +2189,10 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal,
DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2,
"(list (read-file-name \
- (if (and delete-by-moving-to-trash (null current-prefix-arg)) \
- \"Move file to trash: \" \"Delete file: \") \
- nil default-directory (confirm-nonexistent-file-or-buffer)) \
- (null current-prefix-arg))",
+ (if (and delete-by-moving-to-trash (null current-prefix-arg)) \
+ \"Move file to trash: \" \"Delete file: \") \
+ nil default-directory (confirm-nonexistent-file-or-buffer)) \
+ (null current-prefix-arg))",
doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink.
If file has multiple names, it continues to exist with the other names.
TRASH non-nil means to trash the file instead of deleting, provided
@@ -2401,11 +2401,11 @@ This is what happens in interactive use with M-x. */)
int rename_errno = errno;
if (rename_errno == EXDEV)
{
- ptrdiff_t count;
- symlink_target = Ffile_symlink_p (file);
- if (! NILP (symlink_target))
- Fmake_symbolic_link (symlink_target, newname,
- NILP (ok_if_already_exists) ? Qnil : Qt);
+ ptrdiff_t count;
+ symlink_target = Ffile_symlink_p (file);
+ if (! NILP (symlink_target))
+ Fmake_symbolic_link (symlink_target, newname,
+ NILP (ok_if_already_exists) ? Qnil : Qt);
else if (!NILP (Ffile_directory_p (file)))
call4 (Qcopy_directory, file, newname, Qt, Qnil);
else
@@ -3043,7 +3043,7 @@ or if Emacs was not compiled with SELinux support. */)
fail = (lsetfilecon (SSDATA (encoded_absname),
context_str (parsed_con))
!= 0);
- /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
+ /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
if (fail && errno != ENOTSUP)
report_file_error ("Doing lsetfilecon", absname);
@@ -3281,11 +3281,11 @@ Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of
if (set_file_times (-1, SSDATA (encoded_absname), t, t) != 0)
{
#ifdef MSDOS
- /* Setting times on a directory always fails. */
- if (file_directory_p (SSDATA (encoded_absname)))
- return Qnil;
+ /* Setting times on a directory always fails. */
+ if (file_directory_p (SSDATA (encoded_absname)))
+ return Qnil;
#endif
- report_file_error ("Setting file times", absname);
+ report_file_error ("Setting file times", absname);
}
}
@@ -3725,8 +3725,8 @@ by calling `format-decode', which see. */)
else if (BEG < Z)
{
/* Decide the coding system to use for reading the file now
- because we can't use an optimized method for handling
- `coding:' tag if the current buffer is not empty. */
+ because we can't use an optimized method for handling
+ `coding:' tag if the current buffer is not empty. */
if (!NILP (Vcoding_system_for_read))
coding_system = Vcoding_system_for_read;
else
@@ -3791,7 +3791,7 @@ by calling `format-decode', which see. */)
set_buffer_internal (prev);
/* Discard the unwind protect for recovering the
- current buffer. */
+ current buffer. */
specpdl_ptr--;
/* Rewind the file for the actual read done later. */
@@ -3803,7 +3803,7 @@ by calling `format-decode', which see. */)
if (NILP (coding_system))
{
/* If we have not yet decided a coding system, check
- file-coding-system-alist. */
+ file-coding-system-alist. */
coding_system = CALLN (Ffind_operation_coding_system,
Qinsert_file_contents, orig_filename,
visit, beg, end, replace);
@@ -3882,7 +3882,7 @@ by calling `format-decode', which see. */)
if (CODING_REQUIRE_DECODING (&coding))
/* We found that the file should be decoded somehow.
- Let's give up here. */
+ Let's give up here. */
{
giveup_match_end = true;
break;
@@ -3972,19 +3972,19 @@ by calling `format-decode', which see. */)
if (! giveup_match_end)
{
ptrdiff_t temp;
- ptrdiff_t this_count = SPECPDL_INDEX ();
+ ptrdiff_t this_count = SPECPDL_INDEX ();
/* We win! We can handle REPLACE the optimized way. */
/* Extend the start of non-matching text area to multibyte
- character boundary. */
+ character boundary. */
if (! NILP (BVAR (current_buffer, enable_multibyte_characters)))
while (same_at_start > BEGV_BYTE
&& ! CHAR_HEAD_P (FETCH_BYTE (same_at_start)))
same_at_start--;
/* Extend the end of non-matching text area to multibyte
- character boundary. */
+ character boundary. */
if (! NILP (BVAR (current_buffer, enable_multibyte_characters)))
while (same_at_end < ZV_BYTE
&& ! CHAR_HEAD_P (FETCH_BYTE (same_at_end)))
@@ -4002,19 +4002,19 @@ by calling `format-decode', which see. */)
beg_offset += same_at_start - BEGV_BYTE;
end_offset -= ZV_BYTE - same_at_end;
- /* This binding is to avoid ask-user-about-supersession-threat
+ /* This binding is to avoid ask-user-about-supersession-threat
being called in insert_from_buffer or del_range_bytes (via
prepare_to_modify_buffer).
- AFAICT we could avoid ask-user-about-supersession-threat by setting
- current_buffer->modtime earlier, but we could still end up calling
- ask-user-about-supersession-threat if the file is modified while
- we read it, so we bind buffer-file-name instead. */
- specbind (intern ("buffer-file-name"), Qnil);
+ AFAICT we could avoid ask-user-about-supersession-threat by setting
+ current_buffer->modtime earlier, but we could still end up calling
+ ask-user-about-supersession-threat if the file is modified while
+ we read it, so we bind buffer-file-name instead. */
+ specbind (intern ("buffer-file-name"), Qnil);
del_range_byte (same_at_start, same_at_end);
/* Insert from the file at the proper position. */
temp = BYTE_TO_CHAR (same_at_start);
SET_PT_BOTH (temp, same_at_start);
- unbind_to (this_count, Qnil);
+ unbind_to (this_count, Qnil);
/* If display currently starts at beginning of line,
keep it that way. */
@@ -4119,8 +4119,8 @@ by calling `format-decode', which see. */)
/* Truncate the buffer to the size of the file. */
if (same_at_start != same_at_end)
{
- /* See previous specbind for the reason behind this. */
- specbind (intern ("buffer-file-name"), Qnil);
+ /* See previous specbind for the reason behind this. */
+ specbind (intern ("buffer-file-name"), Qnil);
del_range_byte (same_at_start, same_at_end);
}
inserted = 0;
@@ -4596,8 +4596,8 @@ by calling `format-decode', which see. */)
SET_PT_BOTH (opoint, opoint_byte);
else
/* after_insert_file_functions did modify buffer's
- characters => consider entire buffer changed and
- leave point at point-min. */
+ characters => consider entire buffer changed and
+ leave point at point-min. */
inserted = XFASTINT (insval);
}
}
@@ -4640,12 +4640,12 @@ by calling `format-decode', which see. */)
characters. */
if (current_buffer->base_buffer && current_buffer->base_buffer->newline_cache)
invalidate_region_cache (current_buffer->base_buffer,
- current_buffer->base_buffer->newline_cache,
- PT - BEG, Z - PT - inserted);
+ current_buffer->base_buffer->newline_cache,
+ PT - BEG, Z - PT - inserted);
else if (current_buffer->newline_cache)
invalidate_region_cache (current_buffer,
- current_buffer->newline_cache,
- PT - BEG, Z - PT - inserted);
+ current_buffer->newline_cache,
+ PT - BEG, Z - PT - inserted);
if (read_quit)
quit ();
@@ -4943,7 +4943,7 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
unsavable chars (as was the case with X-Symbol). */
Vlast_coding_system_used
= choose_write_coding_system (start, end, filename,
- append, visit, lockname, &coding);
+ append, visit, lockname, &coding);
if (open_and_close_file && !auto_saving)
{
@@ -5242,8 +5242,8 @@ build_annotations (Lisp_Object start, Lisp_Object end)
Vwrite_region_annotations_so_far = annotations;
/* Value is either a list of annotations or nil if the function
- has written annotations to a temporary buffer, which is now
- current. */
+ has written annotations to a temporary buffer, which is now
+ current. */
res = call5 (Qformat_annotate_function, XCAR (p), start, end,
original_buffer, make_number (i));
if (current_buffer != given_buffer)
@@ -5513,10 +5513,10 @@ An argument specifies the modification time value to use
filename = ENCODE_FILE (filename);
if (stat (SSDATA (filename), &st) >= 0)
- {
+ {
current_buffer->modtime = get_stat_mtime (&st);
- current_buffer->modtime_size = st.st_size;
- }
+ current_buffer->modtime_size = st.st_size;
+ }
}
return Qnil;
@@ -5533,7 +5533,7 @@ auto_save_error (Lisp_Object error_val)
Lisp_Object msg = CALLN (Fformat, format, BVAR (current_buffer, name),
Ferror_message_string (error_val));
call3 (intern ("display-warning"),
- intern ("auto-save"), msg, intern ("error"));
+ intern ("auto-save"), msg, intern ("error"));
return Qnil;
}
@@ -5654,8 +5654,8 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil);
/* Don't try to create the directory when shutting down Emacs,
- because creating the directory might signal an error, and
- that would leave Emacs in a strange state. */
+ because creating the directory might signal an error, and
+ that would leave Emacs in a strange state. */
if (!NILP (Vrun_hooks))
{
Lisp_Object dir;
@@ -6172,7 +6172,7 @@ the operating system crashes. By default, it is non-nil in batch mode. */);
write_region_inhibit_fsync = 0; /* See also `init_fileio' above. */
DEFVAR_BOOL ("delete-by-moving-to-trash", delete_by_moving_to_trash,
- doc: /* Specifies whether to use the system's trash can.
+ doc: /* Specifies whether to use the system's trash can.
When non-nil, certain file deletion commands use the function
`move-file-to-trash' instead of deleting files outright.
This includes interactive calls to `delete-file' and
diff --git a/src/filelock.c b/src/filelock.c
index a4b742a..f306d3d 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -448,15 +448,15 @@ lock_file_1 (char *lfname, bool force)
if (boot)
{
if (sizeof lock_info_str
- <= snprintf (lock_info_str, sizeof lock_info_str,
- "%s@%s.%"pMd":%"pMd,
- user_name, host_name, pid, boot))
- return ENAMETOOLONG;
+ <= snprintf (lock_info_str, sizeof lock_info_str,
+ "%s@%s.%"pMd":%"pMd,
+ user_name, host_name, pid, boot))
+ return ENAMETOOLONG;
}
else if (sizeof lock_info_str
- <= snprintf (lock_info_str, sizeof lock_info_str,
- "%s@%s.%"pMd,
- user_name, host_name, pid))
+ <= snprintf (lock_info_str, sizeof lock_info_str,
+ "%s@%s.%"pMd,
+ user_name, host_name, pid))
return ENAMETOOLONG;
return create_lock_file (lfname, lock_info_str, force);
@@ -592,21 +592,21 @@ current_lock_owner (lock_info_type *owner, char *lfname)
&& memcmp (at + 1, SSDATA (system_name), SBYTES (system_name)) == 0)
{
if (pid == getpid ())
- ret = 2; /* We own it. */
+ ret = 2; /* We own it. */
else if (0 < pid && pid <= TYPE_MAXIMUM (pid_t)
- && (kill (pid, 0) >= 0 || errno == EPERM)
+ && (kill (pid, 0) >= 0 || errno == EPERM)
&& (boot_time == 0
|| (boot_time <= TYPE_MAXIMUM (time_t)
&& within_one_second (boot_time, get_boot_time ()))))
- ret = 1; /* An existing process on this machine owns it. */
+ ret = 1; /* An existing process on this machine owns it. */
/* The owner process is dead or has a strange pid, so try to
- zap the lockfile. */
+ zap the lockfile. */
else
- return unlink (lfname);
+ return unlink (lfname);
}
else
{ /* If we wanted to support the check for stale locks on remote machines,
- here's where we'd do it. */
+ here's where we'd do it. */
ret = 1;
}
diff --git a/src/fns.c b/src/fns.c
index dfc7842..e7dfd0f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3130,7 +3130,7 @@ static const short base64_char_to_value[128] =
.--------. .--------. .--------.
|aaaaaabb| |bbbbcccc| |ccdddddd|
`--------' `--------' `--------'
- 6 2 4 4 2 6
+ 6 2 4 4 2 6
.--------+--------+--------+--------.
|00aaaaaa|00bbbbbb|00cccccc|00dddddd|
`--------+--------+--------+--------'
@@ -3949,8 +3949,8 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
set_hash_index (h, Fmake_vector (make_number (index_size), Qnil));
/* Update the free list. Do it so that new entries are added at
- the end of the free list. This makes some operations like
- maphash faster. */
+ the end of the free list. This makes some operations like
+ maphash faster. */
for (i = old_size; i < new_size - 1; ++i)
set_hash_next_slot (h, i, make_number (i + 1));
diff --git a/src/font.c b/src/font.c
index 36e7166..5bad17e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -238,7 +238,7 @@ font_build_object (int vectorsize, Lisp_Object type,
static int font_pixel_size (struct frame *f, Lisp_Object);
static Lisp_Object font_open_entity (struct frame *, Lisp_Object, int);
static Lisp_Object font_matching_entity (struct frame *, Lisp_Object *,
- Lisp_Object);
+ Lisp_Object);
static unsigned font_encode_char (Lisp_Object, int);
/* Number of registered font drivers. */
@@ -330,7 +330,7 @@ font_pixel_size (struct frame *f, Lisp_Object spec)
int
font_style_to_value (enum font_property_index prop, Lisp_Object val,
- bool noerror)
+ bool noerror)
{
Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX);
int len;
@@ -409,7 +409,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
Lisp_Object
font_style_symbolic (Lisp_Object font, enum font_property_index prop,
- bool for_face)
+ bool for_face)
{
Lisp_Object val = AREF (font, prop);
Lisp_Object table, elt;
@@ -724,9 +724,9 @@ font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val)
prev = extra, extra = XCDR (extra);
if (NILP (prev))
- ASET (font, FONT_EXTRA_INDEX, Fcons (Fcons (prop, val), extra));
+ ASET (font, FONT_EXTRA_INDEX, Fcons (Fcons (prop, val), extra));
else
- XSETCDR (prev, Fcons (Fcons (prop, val), extra));
+ XSETCDR (prev, Fcons (Fcons (prop, val), extra));
return val;
}
@@ -1483,24 +1483,24 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font)
if (prop >= FONT_FOUNDRY_INDEX
&& prop < FONT_EXTRA_INDEX)
- ASET (font, prop, font_prop_validate (prop, Qnil, val));
+ ASET (font, prop, font_prop_validate (prop, Qnil, val));
else
- {
- extra_props = nconc2 (extra_props,
- list1 (Fcons (key, val)));
- }
+ {
+ extra_props = nconc2 (extra_props,
+ list1 (Fcons (key, val)));
+ }
}
p = q;
}
}
if (! NILP (extra_props))
- {
- struct font_driver_list *driver_list = font_driver_list;
- for ( ; driver_list; driver_list = driver_list->next)
- if (driver_list->driver->filter_properties)
- (*driver_list->driver->filter_properties) (font, extra_props);
- }
+ {
+ struct font_driver_list *driver_list = font_driver_list;
+ for ( ; driver_list; driver_list = driver_list->next)
+ if (driver_list->driver->filter_properties)
+ (*driver_list->driver->filter_properties) (font, extra_props);
+ }
}
else
@@ -2353,7 +2353,7 @@ font_update_sort_order (int *order)
static bool
font_check_otf_features (Lisp_Object script, Lisp_Object langsys,
- Lisp_Object features, Lisp_Object table)
+ Lisp_Object features, Lisp_Object table)
{
Lisp_Object val;
bool negative;
@@ -2544,7 +2544,7 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
cons (FONT-SPEC . [FONT-ENTITY ...]). */
static void font_clear_cache (struct frame *, Lisp_Object,
- struct font_driver const *);
+ struct font_driver const *);
static void
font_prepare_cache (struct frame *f, struct font_driver const *driver)
@@ -2880,12 +2880,12 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
{
Lisp_Object fn = XCAR (objlist);
if (! NILP (AREF (fn, FONT_TYPE_INDEX))
- && XFONT_OBJECT (fn)->pixel_size == pixel_size)
- {
- if (driver_list->driver->cached_font_ok == NULL
- || driver_list->driver->cached_font_ok (f, fn, entity))
- return fn;
- }
+ && XFONT_OBJECT (fn)->pixel_size == pixel_size)
+ {
+ if (driver_list->driver->cached_font_ok == NULL
+ || driver_list->driver->cached_font_ok (f, fn, entity))
+ return fn;
+ }
}
/* We always open a font of manageable size; i.e non-zero average
@@ -3656,36 +3656,36 @@ font_filter_properties (Lisp_Object font,
for (i = 0; boolean_properties[i] != NULL; ++i)
for (it = alist; ! NILP (it); it = XCDR (it))
{
- Lisp_Object key = XCAR (XCAR (it));
- Lisp_Object val = XCDR (XCAR (it));
- char *keystr = SSDATA (SYMBOL_NAME (key));
+ Lisp_Object key = XCAR (XCAR (it));
+ Lisp_Object val = XCDR (XCAR (it));
+ char *keystr = SSDATA (SYMBOL_NAME (key));
- if (strcmp (boolean_properties[i], keystr) == 0)
- {
- const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false")
+ if (strcmp (boolean_properties[i], keystr) == 0)
+ {
+ const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false")
: SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val))
: "true";
- if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0
- || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0
- || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0
- || strcmp ("Off", str) == 0)
- val = Qnil;
+ if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0
+ || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0
+ || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0
+ || strcmp ("Off", str) == 0)
+ val = Qnil;
else
- val = Qt;
+ val = Qt;
- Ffont_put (font, key, val);
- }
+ Ffont_put (font, key, val);
+ }
}
for (i = 0; non_boolean_properties[i] != NULL; ++i)
for (it = alist; ! NILP (it); it = XCDR (it))
{
- Lisp_Object key = XCAR (XCAR (it));
- Lisp_Object val = XCDR (XCAR (it));
- char *keystr = SSDATA (SYMBOL_NAME (key));
- if (strcmp (non_boolean_properties[i], keystr) == 0)
- Ffont_put (font, key, val);
+ Lisp_Object key = XCAR (XCAR (it));
+ Lisp_Object val = XCDR (XCAR (it));
+ char *keystr = SSDATA (SYMBOL_NAME (key));
+ if (strcmp (non_boolean_properties[i], keystr) == 0)
+ Ffont_put (font, key, val);
}
}
@@ -3985,8 +3985,8 @@ copy_font_spec (Lisp_Object font)
for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail))
if (!EQ (XCAR (XCAR (tail)), QCfont_entity))
{
- *pcdr = Fcons (Fcons (XCAR (XCAR (tail)), CDR (XCAR (tail))), Qnil);
- pcdr = xcdr_addr (*pcdr);
+ *pcdr = Fcons (Fcons (XCAR (XCAR (tail)), CDR (XCAR (tail))), Qnil);
+ pcdr = xcdr_addr (*pcdr);
}
XSETFONT (new_spec, spec);
@@ -4429,11 +4429,11 @@ GSTRING. */)
GLYPHS[0].FROM_IDX == 0
GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX
if (GLYPHS[i].FROM_IDX == GLYPHS[i-1].FROM_IDX)
- ;; GLYPHS[i] and GLYPHS[i-1] belongs to the same grapheme cluster
- GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX
+ ;; GLYPHS[i] and GLYPHS[i-1] belongs to the same grapheme cluster
+ GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX
else
- ;; Be sure to cover all characters.
- GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 */
+ ;; Be sure to cover all characters.
+ GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 */
glyph = LGSTRING_GLYPH (gstring, 0);
from = LGLYPH_FROM (glyph);
to = LGLYPH_TO (glyph);
@@ -5063,17 +5063,17 @@ where
as follows:
If the font is OpenType font, the form of the list is
- (opentype GSUB GPOS)
+ (opentype GSUB GPOS)
where GSUB shows which "GSUB" features the font supports, and GPOS
shows which "GPOS" features the font supports. Both GSUB and GPOS are
lists of the form:
((SCRIPT (LANGSYS FEATURE ...) ...) ...)
where
- SCRIPT is a symbol representing OpenType script tag.
- LANGSYS is a symbol representing OpenType langsys tag, or nil
- representing the default langsys.
- FEATURE is a symbol representing OpenType feature tag.
+ SCRIPT is a symbol representing OpenType script tag.
+ LANGSYS is a symbol representing OpenType langsys tag, or nil
+ representing the default langsys.
+ FEATURE is a symbol representing OpenType feature tag.
If the font is not an OpenType font, there are no elements
in CAPABILITY except the font format symbol.
diff --git a/src/font.h b/src/font.h
index af0214c..dabd921 100644
--- a/src/font.h
+++ b/src/font.h
@@ -620,7 +620,7 @@ struct font_driver
/* Open a font specified by FONT_ENTITY on frame F. If the font is
scalable, open it with PIXEL_SIZE. */
Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity,
- int pixel_size);
+ int pixel_size);
/* Close FONT. NOTE: this can be called by GC. */
void (*close) (struct font *font);
@@ -658,15 +658,15 @@ struct font_driver
fill the background in advance. It is assured that WITH_BACKGROUND
is false when (FROM > 0 || TO < S->nchars). */
int (*draw) (struct glyph_string *s, int from, int to,
- int x, int y, bool with_background);
+ int x, int y, bool with_background);
/* Optional.
Store bitmap data for glyph-code CODE of FONT in BITMAP. It is
intended that this method is called from the other font-driver
for actual drawing. */
int (*get_bitmap) (struct font *font, unsigned code,
- struct font_bitmap *bitmap,
- int bits_per_pixel);
+ struct font_bitmap *bitmap,
+ int bits_per_pixel);
/* Optional.
Free bitmap data in BITMAP. */
@@ -679,7 +679,7 @@ struct font_driver
code is CODE. Store the coordinates in *X and *Y. Return 0 if
the operations was successful. Otherwise return -1. */
int (*anchor_point) (struct font *font, unsigned code, int index,
- int *x, int *y);
+ int *x, int *y);
/* Optional.
Return a list describing which scripts/languages FONT
@@ -702,8 +702,8 @@ struct font_driver
applicable to the input data, return 0. If GSTRING-OUT is too
short, return -1. */
int (*otf_drive) (struct font *font, Lisp_Object features,
- Lisp_Object gstring_in, int from, int to,
- Lisp_Object gstring_out, int idx, bool alternate_subst);
+ Lisp_Object gstring_in, int from, int to,
+ Lisp_Object gstring_out, int idx, bool alternate_subst);
/* Optional.
Make the font driver ready for frame F. Usually this function
@@ -746,7 +746,7 @@ struct font_driver
selector N (1..256) defines a glyph, that glyph code is stored in
the (N-1)th element of VARIATIONS. */
int (*get_variation_glyphs) (struct font *font,
- int c, unsigned variations[256]);
+ int c, unsigned variations[256]);
void (*filter_properties) (Lisp_Object font, Lisp_Object properties);
@@ -755,8 +755,8 @@ struct font_driver
Return non-zero if FONT_OBJECT can be used as a (cached) font
for ENTITY on frame F. */
bool (*cached_font_ok) (struct frame *f,
- Lisp_Object font_object,
- Lisp_Object entity);
+ Lisp_Object font_object,
+ Lisp_Object entity);
/* Optional
@@ -799,12 +799,12 @@ extern Lisp_Object font_build_object (int, Lisp_Object, Lisp_Object, double);
extern Lisp_Object find_font_encoding (Lisp_Object);
extern int font_registry_charsets (Lisp_Object, struct charset **,
- struct charset **);
+ struct charset **);
extern int font_style_to_value (enum font_property_index prop,
- Lisp_Object name, bool noerror);
+ Lisp_Object name, bool noerror);
extern Lisp_Object font_style_symbolic (Lisp_Object font,
- enum font_property_index prop,
- bool for_face);
+ enum font_property_index prop,
+ bool for_face);
extern bool font_match_p (Lisp_Object spec, Lisp_Object font);
extern Lisp_Object font_list_entities (struct frame *, Lisp_Object);
@@ -815,14 +815,14 @@ extern Lisp_Object font_get_frame (Lisp_Object font_object);
extern int font_has_char (struct frame *, Lisp_Object, int);
extern void font_clear_prop (Lisp_Object *attrs,
- enum font_property_index prop);
+ enum font_property_index prop);
extern Lisp_Object font_find_for_lface (struct frame *f, Lisp_Object *lface,
- Lisp_Object spec, int c);
+ Lisp_Object spec, int c);
extern Lisp_Object font_open_for_lface (struct frame *f, Lisp_Object entity,
- Lisp_Object *lface,
- Lisp_Object spec);
+ Lisp_Object *lface,
+ Lisp_Object spec);
extern Lisp_Object font_load_for_lface (struct frame *f, Lisp_Object *lface,
- Lisp_Object spec);
+ Lisp_Object spec);
extern void font_prepare_for_face (struct frame *f, struct face *face);
extern void font_done_for_face (struct frame *f, struct face *face);
extern void clear_font_cache (struct frame *);
@@ -835,8 +835,8 @@ extern Lisp_Object font_intern_prop (const char *str, ptrdiff_t len,
extern void font_update_sort_order (int *order);
extern void font_parse_family_registry (Lisp_Object family,
- Lisp_Object registry,
- Lisp_Object spec);
+ Lisp_Object registry,
+ Lisp_Object spec);
extern int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font);
extern ptrdiff_t font_unparse_xlfd (Lisp_Object font, int pixel_size,
@@ -859,7 +859,7 @@ extern Lisp_Object font_range (ptrdiff_t, ptrdiff_t, ptrdiff_t *,
extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object);
extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop,
- Lisp_Object val);
+ Lisp_Object val);
#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
extern void font_put_frame_data (struct frame *, Lisp_Object, void *);
@@ -869,7 +869,7 @@ extern void *font_get_frame_data (struct frame *f, Lisp_Object);
extern void font_filter_properties (Lisp_Object font,
Lisp_Object alist,
const char *const boolean_properties[],
- const char *const non_boolean_properties[]);
+ const char *const non_boolean_properties[]);
extern void font_drop_xrender_surfaces (struct frame *f);
diff --git a/src/fontset.c b/src/fontset.c
index 38ff780..9e9e3e0 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -925,19 +925,19 @@ face_for_char (struct frame *f, struct face *face, int c,
&& c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol))
{
/* Fonts often have characters for punctuation and other
- symbols, even if they don't match the 'symbol' script. So
- check if the character is present in the current ASCII face
- first, and if so, use the same font as used by that face.
- This avoids unnecessarily switching to another font when the
- frame's default font will do. We only do this for symbols so
- that users could still setup fontsets to force Emacs to use
- specific fonts for characters from other scripts, because
- choice of fonts is frequently affected by cultural
- preferences and font features, not by font coverage.
- However, these considerations are unlikely to be relevant to
- punctuation and other symbols, since the latter generally
- aren't specific to any culture, and don't require
- sophisticated OTF features. */
+ symbols, even if they don't match the 'symbol' script. So
+ check if the character is present in the current ASCII face
+ first, and if so, use the same font as used by that face.
+ This avoids unnecessarily switching to another font when the
+ frame's default font will do. We only do this for symbols so
+ that users could still setup fontsets to force Emacs to use
+ specific fonts for characters from other scripts, because
+ choice of fonts is frequently affected by cultural
+ preferences and font features, not by font coverage.
+ However, these considerations are unlikely to be relevant to
+ punctuation and other symbols, since the latter generally
+ aren't specific to any culture, and don't require
+ sophisticated OTF features. */
Lisp_Object font_object;
if (face->ascii_face->font)
diff --git a/src/fontset.h b/src/fontset.h
index 91d690a..051a294 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -32,7 +32,7 @@ struct face;
extern void free_face_fontset (struct frame *, struct face *);
extern int face_for_char (struct frame *, struct face *, int,
- ptrdiff_t, Lisp_Object);
+ ptrdiff_t, Lisp_Object);
extern Lisp_Object font_for_char (struct face *, int, ptrdiff_t, Lisp_Object);
extern int make_fontset_for_ascii_face (struct frame *, int, struct face *);
diff --git a/src/frame.c b/src/frame.c
index 70ae309..a9806c0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -429,11 +429,11 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit,
equals 4. */
{
inhibit_horizontal = (windows_width >= min_windows_width
- && (inhibit == 4
- || frame_inhibit_resize (f, true, parameter)));
+ && (inhibit == 4
+ || frame_inhibit_resize (f, true, parameter)));
inhibit_vertical = (windows_height >= min_windows_height
- && (inhibit == 4
- || frame_inhibit_resize (f, false, parameter)));
+ && (inhibit == 4
+ || frame_inhibit_resize (f, false, parameter)));
}
else
/* Otherwise inhibit if INHIBIT equals 5. */
@@ -759,9 +759,9 @@ make_frame_without_minibuffer (Lisp_Object mini_window, KBOARD *kb,
if (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
|| ! FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame))))
{
- Lisp_Object frame_dummy;
+ Lisp_Object frame_dummy;
- XSETFRAME (frame_dummy, f);
+ XSETFRAME (frame_dummy, f);
/* If there's no minibuffer frame to use, create one. */
kset_default_minibuffer_frame
(kb, call1 (intern ("make-initial-minibuffer-frame"), display));
@@ -953,8 +953,8 @@ make_terminal_frame (struct terminal *terminal)
static Lisp_Object
get_future_frame_param (Lisp_Object parameter,
- Lisp_Object supplied_parms,
- char *current_value)
+ Lisp_Object supplied_parms,
+ char *current_value)
{
Lisp_Object result;
@@ -1013,8 +1013,8 @@ affects all frames on the same terminal device. */)
terminal = Fassq (Qterminal, parms);
if (CONSP (terminal))
{
- terminal = XCDR (terminal);
- t = decode_live_terminal (terminal);
+ terminal = XCDR (terminal);
+ t = decode_live_terminal (terminal);
}
#ifdef MSDOS
if (t && t != the_only_display_info.terminal)
@@ -1032,16 +1032,16 @@ affects all frames on the same terminal device. */)
USE_SAFE_ALLOCA;
tty = get_future_frame_param
- (Qtty, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
- ? FRAME_TTY (XFRAME (selected_frame))->name
- : NULL));
+ (Qtty, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
+ ? FRAME_TTY (XFRAME (selected_frame))->name
+ : NULL));
if (!NILP (tty))
SAFE_ALLOCA_STRING (name, tty);
tty_type = get_future_frame_param
- (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
- ? FRAME_TTY (XFRAME (selected_frame))->type
- : NULL));
+ (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
+ ? FRAME_TTY (XFRAME (selected_frame))->type
+ : NULL));
if (!NILP (tty_type))
SAFE_ALLOCA_STRING (type, tty_type);
@@ -1615,7 +1615,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
&& (FRAME_TERMINAL (XFRAME (frame))
== FRAME_TERMINAL (XFRAME (frame1)))
&& FRAME_VISIBLE_P (XFRAME (frame1)))
- break;
+ break;
/* If there is none, find *some* other frame. */
if (NILP (frame1) || EQ (frame1, frame))
@@ -1736,7 +1736,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
Lisp_Object tmp;
XSETTERMINAL (tmp, terminal);
- kb = NULL;
+ kb = NULL;
Fdelete_terminal (tmp, NILP (force) ? Qt : force);
}
else
@@ -3193,21 +3193,21 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
val = values[i];
if (EQ (prop, Qwidth))
- {
+ {
if (RANGED_INTEGERP (0, val, INT_MAX))
width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
&& RANGED_INTEGERP (0, XCDR (val), INT_MAX))
width = XFASTINT (XCDR (val));
- }
+ }
else if (EQ (prop, Qheight))
- {
+ {
if (RANGED_INTEGERP (0, val, INT_MAX))
height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
&& RANGED_INTEGERP (0, XCDR (val), INT_MAX))
height = XFASTINT (XCDR (val));
- }
+ }
else if (EQ (prop, Qtop))
top = val;
else if (EQ (prop, Qleft))
@@ -3976,12 +3976,12 @@ x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
newval[i] = 1.0;
if (CONSP (arg))
- {
- item = CAR (arg);
- arg = CDR (arg);
- }
+ {
+ item = CAR (arg);
+ arg = CDR (arg);
+ }
else
- item = arg;
+ item = arg;
if (NILP (item))
alpha = - 1.0;
@@ -4294,7 +4294,7 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
|| !strcmp (SSDATA (tem), "true"))
return make_number (1);
return make_number (atoi (SSDATA (tem)));
- break;
+ break;
case RES_TYPE_FLOAT:
return make_float (atof (SSDATA (tem)));
@@ -4303,7 +4303,7 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
tem = Fdowncase (tem);
if (!strcmp (SSDATA (tem), "on")
#ifdef HAVE_NS
- || !strcmp (SSDATA (tem), "yes")
+ || !strcmp (SSDATA (tem), "yes")
#endif
|| !strcmp (SSDATA (tem), "true"))
return Qt;
@@ -4321,13 +4321,13 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
lower = Fdowncase (tem);
if (!strcmp (SSDATA (lower), "on")
#ifdef HAVE_NS
- || !strcmp (SSDATA (lower), "yes")
+ || !strcmp (SSDATA (lower), "yes")
#endif
|| !strcmp (SSDATA (lower), "true"))
return Qt;
else if (!strcmp (SSDATA (lower), "off")
#ifdef HAVE_NS
- || !strcmp (SSDATA (lower), "no")
+ || !strcmp (SSDATA (lower), "no")
#endif
|| !strcmp (SSDATA (lower), "false"))
return Qnil;
@@ -4770,12 +4770,12 @@ frame_make_pointer_invisible (struct frame *f)
if (! NILP (Vmake_pointer_invisible))
{
if (f && FRAME_LIVE_P (f) && !f->pointer_invisible
- && FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
- {
- f->mouse_moved = 0;
- FRAME_TERMINAL (f)->toggle_invisible_pointer_hook (f, 1);
- f->pointer_invisible = 1;
- }
+ && FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
+ {
+ f->mouse_moved = 0;
+ FRAME_TERMINAL (f)->toggle_invisible_pointer_hook (f, 1);
+ f->pointer_invisible = 1;
+ }
}
}
@@ -4824,10 +4824,10 @@ free_monitors (struct MonitorInfo *monitors, int n_monitors)
Lisp_Object
make_monitor_attribute_list (struct MonitorInfo *monitors,
- int n_monitors,
- int primary_monitor,
- Lisp_Object monitor_frames,
- const char *source)
+ int n_monitors,
+ int primary_monitor,
+ Lisp_Object monitor_frames,
+ const char *source)
{
Lisp_Object attributes_list = Qnil;
Lisp_Object primary_monitor_attributes = Qnil;
@@ -4845,23 +4845,23 @@ make_monitor_attribute_list (struct MonitorInfo *monitors,
geometry = list4i (mi->geom.x, mi->geom.y,
mi->geom.width, mi->geom.height);
attributes = Fcons (Fcons (Qsource, build_string (source)),
- attributes);
+ attributes);
attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)),
attributes);
attributes = Fcons (Fcons (Qmm_size,
- list2i (mi->mm_width, mi->mm_height)),
- attributes);
+ list2i (mi->mm_width, mi->mm_height)),
+ attributes);
attributes = Fcons (Fcons (Qworkarea, workarea), attributes);
attributes = Fcons (Fcons (Qgeometry, geometry), attributes);
if (mi->name)
- attributes = Fcons (Fcons (Qname, make_string (mi->name,
- strlen (mi->name))),
- attributes);
+ attributes = Fcons (Fcons (Qname, make_string (mi->name,
+ strlen (mi->name))),
+ attributes);
if (i == primary_monitor)
- primary_monitor_attributes = attributes;
+ primary_monitor_attributes = attributes;
else
- attributes_list = Fcons (attributes, attributes_list);
+ attributes_list = Fcons (attributes, attributes_list);
}
if (!NILP (primary_monitor_attributes))
@@ -5093,8 +5093,8 @@ Setting this variable does not affect existing frames, only new ones. */);
#endif
DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion",
- scroll_bar_adjust_thumb_portion_p,
- doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF.
+ scroll_bar_adjust_thumb_portion_p,
+ doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF.
Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards
even if the end of the buffer is shown (i.e. overscrolling).
Set to nil if you want the thumb to be at the bottom when the end of the buffer
@@ -5103,7 +5103,7 @@ is visible. In this case you can not overscroll. */);
scroll_bar_adjust_thumb_portion_p = 1;
DEFVAR_LISP ("terminal-frame", Vterminal_frame,
- doc: /* The initial frame-object, which represents Emacs's stdout. */);
+ doc: /* The initial frame-object, which represents Emacs's stdout. */);
DEFVAR_LISP ("mouse-position-function", Vmouse_position_function,
doc: /* If non-nil, function to transform normal value of `mouse-position'.
@@ -5122,16 +5122,16 @@ when the mouse is over clickable text. */);
Vmouse_highlight = Qt;
DEFVAR_LISP ("make-pointer-invisible", Vmake_pointer_invisible,
- doc: /* If non-nil, make pointer invisible while typing.
+ doc: /* If non-nil, make pointer invisible while typing.
The pointer becomes visible again when the mouse is moved. */);
Vmake_pointer_invisible = Qt;
DEFVAR_LISP ("focus-in-hook", Vfocus_in_hook,
- doc: /* Normal hook run when a frame gains input focus. */);
+ doc: /* Normal hook run when a frame gains input focus. */);
Vfocus_in_hook = Qnil;
DEFVAR_LISP ("focus-out-hook", Vfocus_out_hook,
- doc: /* Normal hook run when a frame loses input focus. */);
+ doc: /* Normal hook run when a frame loses input focus. */);
Vfocus_out_hook = Qnil;
DEFVAR_LISP ("delete-frame-functions", Vdelete_frame_functions,
@@ -5147,7 +5147,7 @@ recursively). */);
DEFSYM (Qdelete_frame_functions, "delete-frame-functions");
DEFVAR_LISP ("menu-bar-mode", Vmenu_bar_mode,
- doc: /* Non-nil if Menu-Bar mode is enabled.
+ doc: /* Non-nil if Menu-Bar mode is enabled.
See the command `menu-bar-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
@@ -5155,7 +5155,7 @@ or call the function `menu-bar-mode'. */);
Vmenu_bar_mode = Qt;
DEFVAR_LISP ("tool-bar-mode", Vtool_bar_mode,
- doc: /* Non-nil if Tool-Bar mode is enabled.
+ doc: /* Non-nil if Tool-Bar mode is enabled.
See the command `tool-bar-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
@@ -5245,7 +5245,7 @@ even if this option is non-nil. */);
#endif
DEFVAR_LISP ("frame-size-history", frame_size_history,
- doc: /* History of frame size adjustments.
+ doc: /* History of frame size adjustments.
If non-nil, list recording frame size adjustment. Adjustments are
recorded only if the first element of this list is a positive number.
Adding an adjustment decrements that number by one.
diff --git a/src/frame.h b/src/frame.h
index 5e3ee68..284e995 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1117,8 +1117,8 @@ extern struct frame *make_frame (bool);
#ifdef HAVE_WINDOW_SYSTEM
extern struct frame *make_minibuffer_frame (void);
extern struct frame *make_frame_without_minibuffer (Lisp_Object,
- struct kboard *,
- Lisp_Object);
+ struct kboard *,
+ Lisp_Object);
extern bool display_available (void);
#endif
@@ -1495,10 +1495,10 @@ struct MonitorInfo {
extern void free_monitors (struct MonitorInfo *monitors, int n_monitors);
extern Lisp_Object make_monitor_attribute_list (struct MonitorInfo *monitors,
- int n_monitors,
- int primary_monitor,
- Lisp_Object monitor_frames,
- const char *source);
+ int n_monitors,
+ int primary_monitor,
+ Lisp_Object monitor_frames,
+ const char *source);
#endif /* HAVE_WINDOW_SYSTEM */
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 67b43b6..b0c9969 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -67,8 +67,8 @@ enum metrics_status
static int
ftcrfont_glyph_extents (struct font *font,
- unsigned glyph,
- struct font_metrics *metrics)
+ unsigned glyph,
+ struct font_metrics *metrics)
{
struct ftcrfont_info *ftcrfont_info = (struct ftcrfont_info *) font;
int row, col;
@@ -182,9 +182,9 @@ ftcrfont_close (struct font *font)
static void
ftcrfont_text_extents (struct font *font,
- unsigned *code,
- int nglyphs,
- struct font_metrics *metrics)
+ unsigned *code,
+ int nglyphs,
+ struct font_metrics *metrics)
{
int width, i;
@@ -216,7 +216,7 @@ ftcrfont_text_extents (struct font *font,
static int
ftcrfont_draw (struct glyph_string *s,
- int from, int to, int x, int y, bool with_background)
+ int from, int to, int x, int y, bool with_background)
{
struct frame *f = s->f;
struct face *face = s->face;
diff --git a/src/ftfont.c b/src/ftfont.c
index bcc10c4..67daf80 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -76,7 +76,7 @@ enum ftfont_cache_for
};
static Lisp_Object ftfont_lookup_cache (Lisp_Object,
- enum ftfont_cache_for);
+ enum ftfont_cache_for);
#define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM))
@@ -1085,9 +1085,9 @@ ftfont_list_family (struct frame *f)
Lisp_Object
ftfont_open2 (struct frame *f,
- Lisp_Object entity,
- int pixel_size,
- Lisp_Object font_object)
+ Lisp_Object entity,
+ int pixel_size,
+ Lisp_Object font_object)
{
struct ftfont_info *ftfont_info;
struct font *font;
diff --git a/src/ftfont.h b/src/ftfont.h
index 90abb45..2057fcc 100644
--- a/src/ftfont.h
+++ b/src/ftfont.h
@@ -38,9 +38,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
extern Lisp_Object ftfont_open2 (struct frame *f,
- Lisp_Object entity,
- int pixel_size,
- Lisp_Object font_object);
+ Lisp_Object entity,
+ int pixel_size,
+ Lisp_Object font_object);
extern size_t ftfont_info_size;
#endif /* EMACS_FTFONT_H */
diff --git a/src/ftxfont.c b/src/ftxfont.c
index d1632e3..42e4cb9 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -116,8 +116,8 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr
static int
ftxfont_draw_bitmap (struct frame *f, GC gc_fore, GC *gcs, struct font *font,
- unsigned int code, int x, int y, XPoint *p, int size,
- int *n, bool flush)
+ unsigned int code, int x, int y, XPoint *p, int size,
+ int *n, bool flush)
{
struct font_bitmap bitmap;
unsigned char *b;
@@ -137,14 +137,14 @@ ftxfont_draw_bitmap (struct frame *f, GC gc_fore, GC *gcs, struct font *font,
p[n[0]].y = y - bitmap.top + i;
if (++n[0] == size)
{
- XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
gc_fore, p, size, CoordModeOrigin);
n[0] = 0;
}
}
}
if (flush && n[0] > 0)
- XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
gc_fore, p, n[0], CoordModeOrigin);
}
else
@@ -166,7 +166,7 @@ ftxfont_draw_bitmap (struct frame *f, GC gc_fore, GC *gcs, struct font *font,
pp[n[idx]].y = y - bitmap.top + i;
if (++(n[idx]) == size)
{
- XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
idx == 6 ? gc_fore : gcs[idx], pp, size,
CoordModeOrigin);
n[idx] = 0;
@@ -178,10 +178,10 @@ ftxfont_draw_bitmap (struct frame *f, GC gc_fore, GC *gcs, struct font *font,
{
for (i = 0; i < 6; i++)
if (n[i] > 0)
- XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
gcs[i], p + 0x100 * i, n[i], CoordModeOrigin);
if (n[6] > 0)
- XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ XDrawPoints (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
gc_fore, p + 0x600, n[6], CoordModeOrigin);
}
}
@@ -244,7 +244,7 @@ ftxfont_close (struct font *font)
static int
ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y,
- bool with_background)
+ bool with_background)
{
struct frame *f = s->f;
struct face *face = s->face;
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 30d0753..5694405 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -137,11 +137,11 @@ include the following symbols:
`change' -- watch for file changes
`attribute-change' -- watch for file attributes changes, like
- permissions or modification time
+ permissions or modification time
`watch-mounts' -- watch for mount events
`send-moved' -- pair `deleted' and `created' events caused by
- file renames and send a single `renamed' event
- instead
+ file renames and send a single `renamed' event
+ instead
When any event happens, Emacs will call the CALLBACK function passing
it a single argument EVENT, which is of the form
@@ -154,7 +154,7 @@ ACTION is the description of the event. It could be any one of the
`changed' -- FILE has changed
`changes-done-hint' -- a hint that this was probably the last change
- in a set of changes
+ in a set of changes
`deleted' -- FILE was deleted
`created' -- FILE was created
`attribute-changed' -- a FILE attribute was changed
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 3f7bbda..174244c 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -826,7 +826,7 @@ _malloc_internal_nolock (size_t size)
final free block; if so we don't need to get as much. */
if (_heaplimit != 0 && block + lastblocks == _heaplimit &&
/* We can't do this if we will have to make the heap info
- table bigger to accommodate the new space. */
+ table bigger to accommodate the new space. */
block + wantblocks <= heapsize &&
get_contiguous_space ((wantblocks - lastblocks) * BLOCKSIZE,
ADDRESS (block + lastblocks)))
@@ -1380,7 +1380,7 @@ _realloc_internal_nolock (void *ptr, size_t size)
the thing we just freed. Unfortunately it might
have been coalesced with its neighbors. */
if (_heapindex == block)
- (void) _malloc_internal_nolock (blocks * BLOCKSIZE);
+ (void) _malloc_internal_nolock (blocks * BLOCKSIZE);
else
{
void *previous
diff --git a/src/gnutls.c b/src/gnutls.c
index af2ba52..e200158 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -119,7 +119,7 @@ DEF_DLL_FN (void, gnutls_transport_set_push_function,
DEF_DLL_FN (int, gnutls_x509_crt_check_hostname,
(gnutls_x509_crt_t, const char *));
DEF_DLL_FN (int, gnutls_x509_crt_check_issuer,
- (gnutls_x509_crt_t, gnutls_x509_crt_t));
+ (gnutls_x509_crt_t, gnutls_x509_crt_t));
DEF_DLL_FN (void, gnutls_x509_crt_deinit, (gnutls_x509_crt_t));
DEF_DLL_FN (int, gnutls_x509_crt_import,
(gnutls_x509_crt_t, const gnutls_datum_t *,
@@ -261,7 +261,7 @@ init_gnutls_functions (void)
{
Lisp_Object name = CAR_SAFE (Fget (Qgnutls, QCloaded_from));
GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
- STRINGP (name) ? (const char *) SDATA (name) : "unknown");
+ STRINGP (name) ? (const char *) SDATA (name) : "unknown");
}
return 1;
@@ -590,18 +590,18 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
ret = 1;
switch (err)
- {
- case GNUTLS_E_AGAIN:
- GNUTLS_LOG2 (3,
- max_log_level,
- "retry:",
- str);
- default:
- GNUTLS_LOG2 (1,
- max_log_level,
- "non-fatal error:",
- str);
- }
+ {
+ case GNUTLS_E_AGAIN:
+ GNUTLS_LOG2 (3,
+ max_log_level,
+ "retry:",
+ str);
+ default:
+ GNUTLS_LOG2 (1,
+ max_log_level,
+ "non-fatal error:",
+ str);
+ }
}
if (err == GNUTLS_E_WARNING_ALERT_RECEIVED
@@ -994,7 +994,7 @@ DEFUN ("gnutls-peer-status-warning-describe", Fgnutls_peer_status_warning_descri
if (EQ (status_symbol, intern (":unknown-ca")))
return build_string ("the certificate was signed by an unknown "
- "and therefore untrusted authority");
+ "and therefore untrusted authority");
if (EQ (status_symbol, intern (":not-ca")))
return build_string ("certificate signer is not a CA");
@@ -1062,7 +1062,7 @@ The return value is a property list with top-level keys :warnings and
not yet set. */
if (XPROCESS (proc)->gnutls_certificate != NULL &&
gnutls_x509_crt_check_issuer(XPROCESS (proc)->gnutls_certificate,
- XPROCESS (proc)->gnutls_certificate))
+ XPROCESS (proc)->gnutls_certificate))
warnings = Fcons (intern (":self-signed"), warnings);
if (!NILP (warnings))
@@ -1072,8 +1072,8 @@ The return value is a property list with top-level keys :warnings and
not yet set. */
if (XPROCESS (proc)->gnutls_certificate != NULL)
result = nconc2 (result, list2
- (intern (":certificate"),
- gnutls_certificate_details (XPROCESS (proc)->gnutls_certificate)));
+ (intern (":certificate"),
+ gnutls_certificate_details (XPROCESS (proc)->gnutls_certificate)));
state = XPROCESS (proc)->gnutls_state;
@@ -1222,29 +1222,29 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist)
if (!NILP (warnings))
{
for (Lisp_Object tail = warnings; CONSP (tail); tail = XCDR (tail))
- {
- Lisp_Object warning = XCAR (tail);
- Lisp_Object message = Fgnutls_peer_status_warning_describe (warning);
- if (!NILP (message))
- GNUTLS_LOG2 (1, max_log_level, "verification:", SSDATA (message));
- }
+ {
+ Lisp_Object warning = XCAR (tail);
+ Lisp_Object message = Fgnutls_peer_status_warning_describe (warning);
+ if (!NILP (message))
+ GNUTLS_LOG2 (1, max_log_level, "verification:", SSDATA (message));
+ }
}
if (peer_verification != 0)
{
if (verify_error_all
- || !NILP (Fmember (QCtrustfiles, verify_error)))
- {
+ || !NILP (Fmember (QCtrustfiles, verify_error)))
+ {
emacs_gnutls_deinit (proc);
boot_error (p,
"Certificate validation failed %s, verification code %x",
c_hostname, peer_verification);
return Qnil;
- }
+ }
else
{
- GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:",
- c_hostname);
+ GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:",
+ c_hostname);
}
}
@@ -1292,15 +1292,15 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist)
{
XPROCESS (proc)->gnutls_extra_peer_verification
|= CERTIFICATE_NOT_MATCHING;
- if (verify_error_all
- || !NILP (Fmember (QChostname, verify_error)))
- {
+ if (verify_error_all
+ || !NILP (Fmember (QChostname, verify_error)))
+ {
gnutls_x509_crt_deinit (gnutls_verify_cert);
emacs_gnutls_deinit (proc);
boot_error (p, "The x509 certificate does not match \"%s\"",
c_hostname);
return Qnil;
- }
+ }
else
GNUTLS_LOG2 (1, max_log_level, "x509 certificate does not match:",
c_hostname);
@@ -1723,7 +1723,7 @@ syms_of_gnutls (void)
#else
make_number (-1)
#endif
- );
+ );
#ifdef HAVE_GNUTLS
gnutls_global_initialized = 0;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 3d35a3d..545b75b 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -77,8 +77,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#if ! GTK_CHECK_VERSION (2, 14, 0)
#define gtk_adjustment_configure(adj, xvalue, xlower, \
- xupper, xstep_increment, \
- xpage_increment, xpagesize) \
+ xupper, xstep_increment, \
+ xpage_increment, xpagesize) \
do { \
adj->lower = xlower; \
adj->upper = xupper; \
@@ -151,7 +151,7 @@ static GtkWidget * xg_get_widget_from_map (ptrdiff_t idx);
\f
/***********************************************************************
- Display handling functions
+ Display handling functions
***********************************************************************/
/* Keep track of the default display, or NULL if there is none. Emacs
@@ -172,9 +172,9 @@ xg_set_screen (GtkWidget *w, struct frame *f)
GdkScreen *gscreen = gdk_display_get_default_screen (gdpy);
if (GTK_IS_MENU (w))
- gtk_menu_set_screen (GTK_MENU (w), gscreen);
+ gtk_menu_set_screen (GTK_MENU (w), gscreen);
else
- gtk_window_set_screen (GTK_WINDOW (w), gscreen);
+ gtk_window_set_screen (GTK_WINDOW (w), gscreen);
}
}
@@ -222,13 +222,13 @@ xg_display_close (Display *dpy)
/* Find another display. */
for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
- if (dpyinfo->display != dpy)
- {
+ if (dpyinfo->display != dpy)
+ {
gdpy_new = gdk_x11_lookup_xdisplay (dpyinfo->display);
gdk_display_manager_set_default_display (gdk_display_manager_get (),
gdpy_new);
- break;
- }
+ break;
+ }
gdpy_def = gdpy_new;
}
@@ -245,7 +245,7 @@ xg_display_close (Display *dpy)
\f
/***********************************************************************
- Utility functions
+ Utility functions
***********************************************************************/
/* Create and return the cursor to be used for popup menus and
@@ -262,8 +262,8 @@ xg_create_default_cursor (Display *dpy)
static GdkPixbuf *
xg_get_pixbuf_from_pix_and_mask (struct frame *f,
- Pixmap pix,
- Pixmap mask)
+ Pixmap pix,
+ Pixmap mask)
{
GdkPixbuf *icon_buf = 0;
int iunused;
@@ -273,7 +273,7 @@ xg_get_pixbuf_from_pix_and_mask (struct frame *f,
if (FRAME_DISPLAY_INFO (f)->red_bits != 8)
return 0;
XGetGeometry (FRAME_X_DISPLAY (f), pix, &wunused, &iunused, &iunused,
- &width, &height, &uunused, &depth);
+ &width, &height, &uunused, &depth);
if (depth != 24)
return 0;
XImage *xim = XGetImage (FRAME_X_DISPLAY (f), pix, 0, 0, width, height,
@@ -335,9 +335,9 @@ file_for_image (Lisp_Object image)
static GtkWidget *
xg_get_image_for_pixmap (struct frame *f,
- struct image *img,
- GtkWidget *widget,
- GtkImage *old_widget)
+ struct image *img,
+ GtkWidget *widget,
+ GtkImage *old_widget)
{
GdkPixbuf *icon_buf;
@@ -356,9 +356,9 @@ xg_get_image_for_pixmap (struct frame *f,
{
char *encoded_file = SSDATA (ENCODE_FILE (file));
if (! old_widget)
- old_widget = GTK_IMAGE (gtk_image_new_from_file (encoded_file));
+ old_widget = GTK_IMAGE (gtk_image_new_from_file (encoded_file));
else
- gtk_image_set_from_file (old_widget, encoded_file);
+ gtk_image_set_from_file (old_widget, encoded_file);
return GTK_WIDGET (old_widget);
}
@@ -381,9 +381,9 @@ xg_get_image_for_pixmap (struct frame *f,
if (icon_buf)
{
if (! old_widget)
- old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf));
+ old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf));
else
- gtk_image_set_from_pixbuf (old_widget, icon_buf);
+ gtk_image_set_from_pixbuf (old_widget, icon_buf);
g_object_unref (G_OBJECT (icon_buf));
}
@@ -474,20 +474,20 @@ get_utf8_string (const char *str)
GError *err = NULL;
while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read,
- &bytes_written, &err))
- && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)
- {
- ++nr_bad;
- p += bytes_written+1;
- g_error_free (err);
- err = NULL;
- }
+ &bytes_written, &err))
+ && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)
+ {
+ ++nr_bad;
+ p += bytes_written+1;
+ g_error_free (err);
+ err = NULL;
+ }
if (err)
- {
- g_error_free (err);
- err = NULL;
- }
+ {
+ g_error_free (err);
+ err = NULL;
+ }
if (cp) g_free (cp);
len = strlen (str);
@@ -500,27 +500,27 @@ get_utf8_string (const char *str)
p = (unsigned char *)str;
while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read,
- &bytes_written, &err))
- && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)
- {
- memcpy (up, p, bytes_written);
- up += bytes_written;
- up += sprintf (up, "\\%03o", p[bytes_written]);
- p += bytes_written + 1;
- g_error_free (err);
- err = NULL;
- }
+ &bytes_written, &err))
+ && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)
+ {
+ memcpy (up, p, bytes_written);
+ up += bytes_written;
+ up += sprintf (up, "\\%03o", p[bytes_written]);
+ p += bytes_written + 1;
+ g_error_free (err);
+ err = NULL;
+ }
if (cp)
- {
- strcpy (up, cp);
- g_free (cp);
- }
+ {
+ strcpy (up, cp);
+ g_free (cp);
+ }
if (err)
- {
- g_error_free (err);
- err = NULL;
- }
+ {
+ g_error_free (err);
+ err = NULL;
+ }
}
return utf8_str;
}
@@ -531,8 +531,8 @@ get_utf8_string (const char *str)
bool
xg_check_special_colors (struct frame *f,
- const char *color_name,
- XColor *color)
+ const char *color_name,
+ XColor *color)
{
bool success_p = 0;
bool get_bg = strcmp ("gtk_selection_bg_color", color_name) == 0;
@@ -555,9 +555,9 @@ xg_check_special_colors (struct frame *f,
gtk_style_context_get_background_color (gsty, state, &col);
sprintf (buf, "rgb:%04x/%04x/%04x",
- (unsigned) (col.red * 65535),
- (unsigned) (col.green * 65535),
- (unsigned) (col.blue * 65535));
+ (unsigned) (col.red * 65535),
+ (unsigned) (col.green * 65535),
+ (unsigned) (col.blue * 65535));
success_p = x_parse_color (f, buf, color) != 0;
#else
GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f));
@@ -580,7 +580,7 @@ xg_check_special_colors (struct frame *f,
\f
/***********************************************************************
- Tooltips
+ Tooltips
***********************************************************************/
/* Gtk+ calls this callback when the parent of our tooltip dummy changes.
We use that to pop down the tooltip. This happens if Gtk+ for some
@@ -590,8 +590,8 @@ xg_check_special_colors (struct frame *f,
static void
hierarchy_ch_cb (GtkWidget *widget,
- GtkWidget *previous_toplevel,
- gpointer user_data)
+ GtkWidget *previous_toplevel,
+ gpointer user_data)
{
struct frame *f = user_data;
struct x_output *x = f->output_data.x;
@@ -609,11 +609,11 @@ hierarchy_ch_cb (GtkWidget *widget,
static gboolean
qttip_cb (GtkWidget *widget,
- gint xpos,
- gint ypos,
- gboolean keyboard_mode,
- GtkTooltip *tooltip,
- gpointer user_data)
+ gint xpos,
+ gint ypos,
+ gboolean keyboard_mode,
+ GtkTooltip *tooltip,
+ gpointer user_data)
{
struct frame *f = user_data;
struct x_output *x = f->output_data.x;
@@ -634,11 +634,11 @@ qttip_cb (GtkWidget *widget,
p = gtk_widget_get_parent (x->ttip_lbl);
list = gtk_container_get_children (GTK_CONTAINER (p));
for (iter = list; iter; iter = g_list_next (iter))
- {
- GtkWidget *w = GTK_WIDGET (iter->data);
- if (GTK_IS_LABEL (w))
- gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
- }
+ {
+ GtkWidget *w = GTK_WIDGET (iter->data);
+ if (GTK_IS_LABEL (w))
+ gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
+ }
g_list_free (list);
/* ATK needs an empty title for some reason. */
@@ -648,7 +648,7 @@ qttip_cb (GtkWidget *widget,
gtk_widget_realize (x->ttip_lbl);
g_signal_connect (x->ttip_lbl, "hierarchy-changed",
- G_CALLBACK (hierarchy_ch_cb), f);
+ G_CALLBACK (hierarchy_ch_cb), f);
}
return FALSE;
}
@@ -660,9 +660,9 @@ qttip_cb (GtkWidget *widget,
bool
xg_prepare_tooltip (struct frame *f,
- Lisp_Object string,
- int *width,
- int *height)
+ Lisp_Object string,
+ int *width,
+ int *height)
{
#ifndef USE_GTK_TOOLTIP
return 0;
@@ -690,13 +690,13 @@ xg_prepare_tooltip (struct frame *f,
g_object_set (settings, "gtk-enable-tooltips", FALSE, NULL);
/* Record that we disabled it so it can be enabled again. */
g_object_set_data (G_OBJECT (x->ttip_window), "restore-tt",
- (gpointer)f);
+ (gpointer)f);
}
/* Prevent Gtk+ from hiding tooltip on mouse move and such. */
g_object_set_data (G_OBJECT
- (gtk_widget_get_display (GTK_WIDGET (x->ttip_window))),
- "gdk-display-current-tooltip", NULL);
+ (gtk_widget_get_display (GTK_WIDGET (x->ttip_window))),
+ "gdk-display-current-tooltip", NULL);
/* Put our dummy widget in so we can get callbacks for unrealize and
hierarchy-changed. */
@@ -746,12 +746,12 @@ xg_hide_tooltip (struct frame *f)
gtk_widget_hide (GTK_WIDGET (win));
if (g_object_get_data (G_OBJECT (win), "restore-tt"))
- {
- GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win));
- GdkScreen *screen = gdk_window_get_screen (gwin);
- GtkSettings *settings = gtk_settings_get_for_screen (screen);
- g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL);
- }
+ {
+ GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win));
+ GdkScreen *screen = gdk_window_get_screen (gwin);
+ GtkSettings *settings = gtk_settings_get_for_screen (screen);
+ g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL);
+ }
unblock_input ();
ret = 1;
@@ -791,23 +791,23 @@ xg_set_geometry (struct frame *f)
guint id;
if (xneg)
- left = -left;
+ left = -left;
if (yneg)
- top = -top;
+ top = -top;
sprintf (geom_str, "=%dx%d%c%d%c%d",
- FRAME_PIXEL_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f),
- (xneg ? '-' : '+'), left,
- (yneg ? '-' : '+'), top);
+ FRAME_PIXEL_WIDTH (f),
+ FRAME_PIXEL_HEIGHT (f),
+ (xneg ? '-' : '+'), left,
+ (yneg ? '-' : '+'), top);
/* Silence warning about visible children. */
id = g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
- | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+ | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
if (!gtk_window_parse_geometry (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- geom_str))
- fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
+ geom_str))
+ fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
g_log_remove_handler ("Gtk", id);
}
@@ -997,8 +997,8 @@ static void
xg_height_or_width_changed (struct frame *f)
{
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
+ FRAME_TOTAL_PIXEL_WIDTH (f),
+ FRAME_TOTAL_PIXEL_HEIGHT (f));
f->output_data.x->hint_flags = 0;
x_wm_set_size_hint (f, 0, 0);
}
@@ -1019,7 +1019,7 @@ xg_win_to_widget (Display *dpy, Window wdesc)
block_input ();
gdkwin = gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (dpy),
- wdesc);
+ wdesc);
if (gdkwin)
{
GdkEvent event;
@@ -1062,8 +1062,8 @@ xg_set_widget_bg (struct frame *f, GtkWidget *w, unsigned long pixel)
static void
style_changed_cb (GObject *go,
- GParamSpec *spec,
- gpointer user_data)
+ GParamSpec *spec,
+ gpointer user_data)
{
struct input_event event;
GdkDisplay *gdpy = user_data;
@@ -1086,17 +1086,17 @@ style_changed_cb (GObject *go,
{
Lisp_Object rest, frame;
FOR_EACH_FRAME (rest, frame)
- {
- struct frame *f = XFRAME (frame);
- if (FRAME_LIVE_P (f)
- && FRAME_X_P (f)
- && FRAME_X_DISPLAY (f) == dpy)
- {
- x_set_scroll_bar_default_width (f);
- x_set_scroll_bar_default_height (f);
- xg_frame_set_char_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
- }
- }
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_LIVE_P (f)
+ && FRAME_X_P (f)
+ && FRAME_X_DISPLAY (f) == dpy)
+ {
+ x_set_scroll_bar_default_width (f);
+ x_set_scroll_bar_default_height (f);
+ xg_frame_set_char_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
+ }
+ }
}
}
@@ -1104,8 +1104,8 @@ style_changed_cb (GObject *go,
static gboolean
delete_cb (GtkWidget *widget,
- GdkEvent *event,
- gpointer user_data)
+ GdkEvent *event,
+ gpointer user_data)
{
return TRUE;
}
@@ -1202,13 +1202,13 @@ xg_create_frame_widgets (struct frame *f)
gtk_widget_set_double_buffered (wfixed, FALSE);
gtk_window_set_wmclass (GTK_WINDOW (wtop),
- SSDATA (Vx_resource_name),
- SSDATA (Vx_resource_class));
+ SSDATA (Vx_resource_name),
+ SSDATA (Vx_resource_class));
/* Add callback to do nothing on WM_DELETE_WINDOW. The default in
GTK is to destroy the widget. We want Emacs to do that instead. */
g_signal_connect (G_OBJECT (wtop), "delete-event",
- G_CALLBACK (delete_cb), f);
+ G_CALLBACK (delete_cb), f);
/* Convert our geometry parameters into a geometry string
and specify it.
@@ -1218,16 +1218,16 @@ xg_create_frame_widgets (struct frame *f)
= gtk_window_get_gravity (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
gtk_widget_add_events (wfixed,
- GDK_POINTER_MOTION_MASK
- | GDK_EXPOSURE_MASK
- | GDK_BUTTON_PRESS_MASK
- | GDK_BUTTON_RELEASE_MASK
- | GDK_KEY_PRESS_MASK
- | GDK_ENTER_NOTIFY_MASK
- | GDK_LEAVE_NOTIFY_MASK
- | GDK_FOCUS_CHANGE_MASK
- | GDK_STRUCTURE_MASK
- | GDK_VISIBILITY_NOTIFY_MASK);
+ GDK_POINTER_MOTION_MASK
+ | GDK_EXPOSURE_MASK
+ | GDK_BUTTON_PRESS_MASK
+ | GDK_BUTTON_RELEASE_MASK
+ | GDK_KEY_PRESS_MASK
+ | GDK_ENTER_NOTIFY_MASK
+ | GDK_LEAVE_NOTIFY_MASK
+ | GDK_FOCUS_CHANGE_MASK
+ | GDK_STRUCTURE_MASK
+ | GDK_VISIBILITY_NOTIFY_MASK);
/* Must realize the windows so the X window gets created. It is used
by callers of this function. */
@@ -1267,14 +1267,14 @@ xg_create_frame_widgets (struct frame *f)
GtkSettings *gs = gtk_settings_get_for_screen (screen);
/* Only connect this signal once per screen. */
if (! g_signal_handler_find (G_OBJECT (gs),
- G_SIGNAL_MATCH_FUNC,
- 0, 0, 0,
- (gpointer) G_CALLBACK (style_changed_cb),
- 0))
+ G_SIGNAL_MATCH_FUNC,
+ 0, 0, 0,
+ (gpointer) G_CALLBACK (style_changed_cb),
+ 0))
{
- g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name",
- G_CALLBACK (style_changed_cb),
- gdk_screen_get_display (screen));
+ g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name",
+ G_CALLBACK (style_changed_cb),
+ gdk_screen_get_display (screen));
}
}
@@ -1292,10 +1292,10 @@ xg_free_frame_widgets (struct frame *f)
struct x_output *x = f->output_data.x;
#endif
struct xg_frame_tb_info *tbinfo
- = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY);
+ = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
+ TB_INFO_KEY);
if (tbinfo)
- xfree (tbinfo);
+ xfree (tbinfo);
/* x_free_frame_resources should have taken care of it */
eassert (!FRAME_X_DOUBLE_BUFFERED_P (f));
@@ -1305,9 +1305,9 @@ xg_free_frame_widgets (struct frame *f)
FRAME_GTK_OUTER_WIDGET (f) = 0;
#ifdef USE_GTK_TOOLTIP
if (x->ttip_lbl)
- gtk_widget_destroy (x->ttip_lbl);
+ gtk_widget_destroy (x->ttip_lbl);
if (x->ttip_widget)
- g_object_unref (G_OBJECT (x->ttip_widget));
+ g_object_unref (G_OBJECT (x->ttip_widget));
#endif
}
}
@@ -1344,7 +1344,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
x_wm_supports (f, FRAME_DISPLAY_INFO (f)->Xatom_net_wm_state_fullscreen)))
{
/* Don't set hints when maximized or fullscreen. Apparently KWin and
- Gtk3 don't get along and the frame shrinks (!).
+ Gtk3 don't get along and the frame shrinks (!).
*/
return;
}
@@ -1424,7 +1424,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
{
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- NULL, &size_hints, hint_flags);
+ NULL, &size_hints, hint_flags);
f->output_data.x->size_hints = size_hints;
f->output_data.x->hint_flags = hint_flags;
unblock_input ();
@@ -1447,14 +1447,14 @@ xg_set_background_color (struct frame *f, unsigned long bg)
Lisp_Object bar;
for (bar = FRAME_SCROLL_BARS (f);
- !NILP (bar);
- bar = XSCROLL_BAR (bar)->next)
- {
- GtkWidget *scrollbar =
- xg_get_widget_from_map (XSCROLL_BAR (bar)->x_window);
- GtkWidget *webox = gtk_widget_get_parent (scrollbar);
- xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
- }
+ !NILP (bar);
+ bar = XSCROLL_BAR (bar)->next)
+ {
+ GtkWidget *scrollbar =
+ xg_get_widget_from_map (XSCROLL_BAR (bar)->x_window);
+ GtkWidget *webox = gtk_widget_get_parent (scrollbar);
+ xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
+ }
unblock_input ();
}
@@ -1468,8 +1468,8 @@ void
xg_set_frame_icon (struct frame *f, Pixmap icon_pixmap, Pixmap icon_mask)
{
GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (f,
- icon_pixmap,
- icon_mask);
+ icon_pixmap,
+ icon_mask);
if (gp)
gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp);
}
@@ -1477,7 +1477,7 @@ xg_set_frame_icon (struct frame *f, Pixmap icon_pixmap, Pixmap icon_mask)
\f
/***********************************************************************
- Dialog functions
+ Dialog functions
***********************************************************************/
/* Return the dialog title to use for a dialog of type KEY.
This is the encoding used by lwlib. We use the same for GTK. */
@@ -1539,8 +1539,8 @@ dialog_delete_callback (GtkWidget *w, GdkEvent *event, gpointer user_data)
static GtkWidget *
create_dialog (widget_value *wv,
- GCallback select_cb,
- GCallback deactivate_cb)
+ GCallback select_cb,
+ GCallback deactivate_cb)
{
const char *title = get_dialog_title (wv->name[0]);
int total_buttons = wv->name[1] - '0';
@@ -1560,8 +1560,8 @@ create_dialog (widget_value *wv,
#if GTK_CHECK_VERSION (3, 12, 0)
GtkBuilder *gbld = gtk_builder_new ();
GObject *go = gtk_buildable_get_internal_child (GTK_BUILDABLE (wd),
- gbld,
- "action_area");
+ gbld,
+ "action_area");
GtkBox *cur_box = GTK_BOX (go);
g_object_unref (G_OBJECT (gbld));
#else
@@ -1592,7 +1592,7 @@ create_dialog (widget_value *wv,
}
g_signal_connect (G_OBJECT (wdialog), "delete-event",
- G_CALLBACK (dialog_delete_callback), 0);
+ G_CALLBACK (dialog_delete_callback), 0);
if (deactivate_cb)
{
@@ -1607,44 +1607,44 @@ create_dialog (widget_value *wv,
GtkRequisition req;
if (item->name && strcmp (item->name, "message") == 0)
- {
- GtkBox *wvbox = GTK_BOX (gtk_dialog_get_content_area (wd));
- /* This is the text part of the dialog. */
- w = gtk_label_new (utf8_label);
- gtk_box_pack_start (wvbox, gtk_label_new (""), FALSE, FALSE, 0);
- gtk_box_pack_start (wvbox, w, TRUE, TRUE, 0);
+ {
+ GtkBox *wvbox = GTK_BOX (gtk_dialog_get_content_area (wd));
+ /* This is the text part of the dialog. */
+ w = gtk_label_new (utf8_label);
+ gtk_box_pack_start (wvbox, gtk_label_new (""), FALSE, FALSE, 0);
+ gtk_box_pack_start (wvbox, w, TRUE, TRUE, 0);
#if GTK_CHECK_VERSION (3, 14, 0)
- gtk_widget_set_halign (w, GTK_ALIGN_START);
- gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
+ gtk_widget_set_halign (w, GTK_ALIGN_START);
+ gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
#else
- gtk_misc_set_alignment (GTK_MISC (w), 0.1, 0.5);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.1, 0.5);
#endif
- /* Try to make dialog look better. Must realize first so
- the widget can calculate the size it needs. */
- gtk_widget_realize (w);
- gtk_widget_get_preferred_size (w, NULL, &req);
- gtk_box_set_spacing (wvbox, req.height);
+ /* Try to make dialog look better. Must realize first so
+ the widget can calculate the size it needs. */
+ gtk_widget_realize (w);
+ gtk_widget_get_preferred_size (w, NULL, &req);
+ gtk_box_set_spacing (wvbox, req.height);
if (item->value && strlen (item->value) > 0)
- button_spacing = 2*req.width/strlen (item->value);
- if (button_spacing < 10) button_spacing = 10;
- }
+ button_spacing = 2*req.width/strlen (item->value);
+ if (button_spacing < 10) button_spacing = 10;
+ }
else
- {
- /* This is one button to add to the dialog. */
- w = gtk_button_new_with_label (utf8_label);
- if (! item->enabled)
- gtk_widget_set_sensitive (w, FALSE);
- if (select_cb)
- g_signal_connect (G_OBJECT (w), "clicked",
- select_cb, item->call_data);
-
- gtk_box_pack_start (cur_box, w, TRUE, TRUE, button_spacing);
- if (++button_nr == left_buttons)
- {
- if (make_two_rows)
- cur_box = GTK_BOX (whbox_down);
- }
- }
+ {
+ /* This is one button to add to the dialog. */
+ w = gtk_button_new_with_label (utf8_label);
+ if (! item->enabled)
+ gtk_widget_set_sensitive (w, FALSE);
+ if (select_cb)
+ g_signal_connect (G_OBJECT (w), "clicked",
+ select_cb, item->call_data);
+
+ gtk_box_pack_start (cur_box, w, TRUE, TRUE, button_spacing);
+ if (++button_nr == left_buttons)
+ {
+ if (make_two_rows)
+ cur_box = GTK_BOX (whbox_down);
+ }
+ }
if (utf8_label)
g_free (utf8_label);
@@ -1728,7 +1728,7 @@ xg_dialog_run (struct frame *f, GtkWidget *w)
xg_set_screen (w, f);
gtk_window_set_transient_for (GTK_WINDOW (w),
- GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
+ GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
gtk_window_set_destroy_with_parent (GTK_WINDOW (w), TRUE);
gtk_window_set_modal (GTK_WINDOW (w), TRUE);
@@ -1738,9 +1738,9 @@ xg_dialog_run (struct frame *f, GtkWidget *w)
dd.timerid = 0;
g_signal_connect (G_OBJECT (w),
- "response",
- G_CALLBACK (xg_dialog_response_cb),
- &dd);
+ "response",
+ G_CALLBACK (xg_dialog_response_cb),
+ &dd);
/* Don't destroy the widget if closed by the window manager close button. */
g_signal_connect (G_OBJECT (w), "delete-event", G_CALLBACK (gtk_true), NULL);
gtk_widget_show (w);
@@ -1758,7 +1758,7 @@ xg_dialog_run (struct frame *f, GtkWidget *w)
\f
/***********************************************************************
- File dialog functions
+ File dialog functions
***********************************************************************/
/* Return true if the old file selection dialog is being used. */
@@ -1815,12 +1815,12 @@ xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
toggle_on = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (wtoggle));
if (!!visible != !!toggle_on)
- {
- gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb);
- g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible);
- g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject);
- }
+ {
+ gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb);
+ g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible);
+ g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject);
+ }
x_gtk_show_hidden_files = visible;
}
}
@@ -1849,18 +1849,18 @@ xg_get_file_with_chooser (struct frame *f,
GtkWidget *wmessage UNINIT;
GtkWindow *gwin = GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f));
GtkFileChooserAction action = (mustmatch_p ?
- GTK_FILE_CHOOSER_ACTION_OPEN :
- GTK_FILE_CHOOSER_ACTION_SAVE);
+ GTK_FILE_CHOOSER_ACTION_OPEN :
+ GTK_FILE_CHOOSER_ACTION_SAVE);
if (only_dir_p)
action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
filewin = gtk_file_chooser_dialog_new (prompt, gwin, action,
- XG_TEXT_CANCEL, GTK_RESPONSE_CANCEL,
- (mustmatch_p || only_dir_p ?
- XG_TEXT_OPEN : XG_TEXT_OK),
- GTK_RESPONSE_OK,
- NULL);
+ XG_TEXT_CANCEL, GTK_RESPONSE_CANCEL,
+ (mustmatch_p || only_dir_p ?
+ XG_TEXT_OPEN : XG_TEXT_OK),
+ GTK_RESPONSE_OK,
+ NULL);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filewin), TRUE);
wbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -1875,20 +1875,20 @@ xg_get_file_with_chooser (struct frame *f,
}
gtk_widget_show (wtoggle);
g_signal_connect (G_OBJECT (wtoggle), "clicked",
- G_CALLBACK (xg_toggle_visibility_cb), filewin);
+ G_CALLBACK (xg_toggle_visibility_cb), filewin);
g_signal_connect (G_OBJECT (filewin), "notify",
- G_CALLBACK (xg_toggle_notify_cb), wtoggle);
+ G_CALLBACK (xg_toggle_notify_cb), wtoggle);
if (x_gtk_file_dialog_help_text)
{
char *z = msgbuf;
/* Gtk+ 2.10 has the file name text entry box integrated in the dialog.
- Show the C-l help text only for versions < 2.10. */
+ Show the C-l help text only for versions < 2.10. */
if (gtk_check_version (2, 10, 0) && action != GTK_FILE_CHOOSER_ACTION_SAVE)
- z = stpcpy (z, "\nType C-l to display a file name text entry box.\n");
+ z = stpcpy (z, "\nType C-l to display a file name text entry box.\n");
strcpy (z, "\nIf you don't like this file selector, use the "
- "corresponding\nkey binding or customize "
- "use-file-dialog to turn it off.");
+ "corresponding\nkey binding or customize "
+ "use-file-dialog to turn it off.");
wmessage = gtk_label_new (msgbuf);
gtk_widget_show (wmessage);
@@ -1907,26 +1907,26 @@ xg_get_file_with_chooser (struct frame *f,
file = build_string (default_filename);
/* File chooser does not understand ~/... in the file name. It must be
- an absolute name starting with /. */
+ an absolute name starting with /. */
if (default_filename[0] != '/')
- file = Fexpand_file_name (file, Qnil);
+ file = Fexpand_file_name (file, Qnil);
utf8_filename = SSDATA (ENCODE_UTF_8 (file));
if (! NILP (Ffile_directory_p (file)))
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
- utf8_filename);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
+ utf8_filename);
else
- {
- gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
- utf8_filename);
- if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
- {
- char *cp = strrchr (utf8_filename, '/');
- if (cp) ++cp;
- else cp = utf8_filename;
- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp);
- }
- }
+ {
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
+ utf8_filename);
+ if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
+ {
+ char *cp = strrchr (utf8_filename, '/');
+ if (cp) ++cp;
+ else cp = utf8_filename;
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp);
+ }
+ }
}
*func = xg_get_file_name_from_chooser;
@@ -1957,10 +1957,10 @@ xg_get_file_name_from_selector (GtkWidget *w)
static GtkWidget *
xg_get_file_with_selection (struct frame *f,
- char *prompt,
- char *default_filename,
- bool mustmatch_p, bool only_dir_p,
- xg_get_file_func *func)
+ char *prompt,
+ char *default_filename,
+ bool mustmatch_p, bool only_dir_p,
+ xg_get_file_func *func)
{
GtkWidget *filewin;
GtkFileSelection *filesel;
@@ -1999,10 +1999,10 @@ xg_get_file_with_selection (struct frame *f,
char *
xg_get_file_name (struct frame *f,
- char *prompt,
- char *default_filename,
- bool mustmatch_p,
- bool only_dir_p)
+ char *prompt,
+ char *default_filename,
+ bool mustmatch_p,
+ bool only_dir_p)
{
GtkWidget *w = 0;
char *fn = 0;
@@ -2013,14 +2013,14 @@ xg_get_file_name (struct frame *f,
if (xg_uses_old_file_dialog ())
w = xg_get_file_with_selection (f, prompt, default_filename,
- mustmatch_p, only_dir_p, &func);
+ mustmatch_p, only_dir_p, &func);
else
w = xg_get_file_with_chooser (f, prompt, default_filename,
- mustmatch_p, only_dir_p, &func);
+ mustmatch_p, only_dir_p, &func);
#else /* not HAVE_GTK_FILE_SELECTION_NEW */
w = xg_get_file_with_chooser (f, prompt, default_filename,
- mustmatch_p, only_dir_p, &func);
+ mustmatch_p, only_dir_p, &func);
#endif /* not HAVE_GTK_FILE_SELECTION_NEW */
gtk_widget_set_name (w, "emacs-filedialog");
@@ -2034,7 +2034,7 @@ xg_get_file_name (struct frame *f,
}
/***********************************************************************
- GTK font chooser
+ GTK font chooser
***********************************************************************/
#ifdef HAVE_FREETYPE
@@ -2086,12 +2086,12 @@ xg_get_font (struct frame *f, const char *default_name)
number */
char *p = strrchr (default_name, '-');
if (p)
- {
- char *ep = p+1;
- while (c_isdigit (*ep))
- ++ep;
- if (*ep == '\0') *p = ' ';
- }
+ {
+ char *ep = p+1;
+ while (c_isdigit (*ep))
+ ++ep;
+ if (*ep == '\0') *p = ' ';
+ }
}
else if (x_last_font_name)
default_name = x_last_font_name;
@@ -2126,7 +2126,7 @@ xg_get_font (struct frame *f, const char *default_name)
QCweight, XG_WEIGHT_TO_SYMBOL (weight),
QCslant, XG_STYLE_TO_SYMBOL (style),
QCtype,
- FONT_TYPE_WANTED);
+ FONT_TYPE_WANTED);
pango_font_description_free (desc);
dupstring (&x_last_font_name, name);
@@ -2154,7 +2154,7 @@ xg_get_font (struct frame *f, const char *default_name)
\f
/***********************************************************************
- Menu functions.
+ Menu functions.
***********************************************************************/
/* The name of menu items that can be used for customization. Since GTK
@@ -2215,8 +2215,8 @@ make_cl_data (xg_menu_cb_data *cl_data, struct frame *f, GCallback highlight_cb)
static void
update_cl_data (xg_menu_cb_data *cl_data,
- struct frame *f,
- GCallback highlight_cb)
+ struct frame *f,
+ GCallback highlight_cb)
{
if (cl_data)
{
@@ -2237,10 +2237,10 @@ unref_cl_data (xg_menu_cb_data *cl_data)
{
cl_data->ref_count--;
if (cl_data->ref_count == 0)
- {
- xg_list_remove (&xg_menu_cb_list, &cl_data->ptrs);
- xfree (cl_data);
- }
+ {
+ xg_list_remove (&xg_menu_cb_list, &cl_data->ptrs);
+ xfree (cl_data);
+ }
}
}
@@ -2260,7 +2260,7 @@ xg_mark_data (void)
xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data *) iter;
if (! NILP (cb_data->help))
- mark_object (cb_data->help);
+ mark_object (cb_data->help);
}
FOR_EACH_FRAME (rest, frame)
@@ -2268,16 +2268,16 @@ xg_mark_data (void)
struct frame *f = XFRAME (frame);
if (FRAME_X_P (f) && FRAME_GTK_OUTER_WIDGET (f))
- {
- struct xg_frame_tb_info *tbinfo
- = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY);
- if (tbinfo)
- {
- mark_object (tbinfo->last_tool_bar);
- mark_object (tbinfo->style);
- }
- }
+ {
+ struct xg_frame_tb_info *tbinfo
+ = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
+ TB_INFO_KEY);
+ if (tbinfo)
+ {
+ mark_object (tbinfo->last_tool_bar);
+ mark_object (tbinfo->style);
+ }
+ }
}
}
@@ -2305,8 +2305,8 @@ menuitem_destroy_callback (GtkWidget *w, gpointer client_data)
static gboolean
menuitem_highlight_callback (GtkWidget *w,
- GdkEventCrossing *event,
- gpointer client_data)
+ GdkEventCrossing *event,
+ gpointer client_data)
{
GdkEvent ev;
GtkWidget *subwidget;
@@ -2318,11 +2318,11 @@ menuitem_highlight_callback (GtkWidget *w,
if (data)
{
if (! NILP (data->help) && data->cl_data->highlight_cb)
- {
- gpointer call_data = event->type == GDK_LEAVE_NOTIFY ? 0 : data;
- GtkCallback func = (GtkCallback) data->cl_data->highlight_cb;
- (*func) (subwidget, call_data);
- }
+ {
+ gpointer call_data = event->type == GDK_LEAVE_NOTIFY ? 0 : data;
+ GtkCallback func = (GtkCallback) data->cl_data->highlight_cb;
+ (*func) (subwidget, call_data);
+ }
}
return FALSE;
@@ -2390,9 +2390,9 @@ make_widget_for_menu_item (const char *utf8_label, const char *utf8_key)
static GtkWidget *
make_menu_item (const char *utf8_label,
- const char *utf8_key,
- widget_value *item,
- GSList **group)
+ const char *utf8_key,
+ widget_value *item,
+ GSList **group)
{
GtkWidget *w;
GtkWidget *wtoadd = 0;
@@ -2419,7 +2419,7 @@ make_menu_item (const char *utf8_label,
else w = gtk_radio_menu_item_new_with_label (*group, utf8_label);
*group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (w));
if (item->selected)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), TRUE);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (w), TRUE);
}
else
{
@@ -2450,11 +2450,11 @@ make_menu_item (const char *utf8_label,
static GtkWidget *
xg_create_one_menuitem (widget_value *item,
- struct frame *f,
- GCallback select_cb,
- GCallback highlight_cb,
- xg_menu_cb_data *cl_data,
- GSList **group)
+ struct frame *f,
+ GCallback select_cb,
+ GCallback highlight_cb,
+ xg_menu_cb_data *cl_data,
+ GSList **group)
{
char *utf8_label;
char *utf8_key;
@@ -2479,9 +2479,9 @@ xg_create_one_menuitem (widget_value *item,
cb_data->call_data = item->call_data;
g_signal_connect (G_OBJECT (w),
- "destroy",
- G_CALLBACK (menuitem_destroy_callback),
- cb_data);
+ "destroy",
+ G_CALLBACK (menuitem_destroy_callback),
+ cb_data);
/* Put cb_data in widget, so we can get at it when modifying menubar */
g_object_set_data (G_OBJECT (w), XG_ITEM_DATA, cb_data);
@@ -2490,8 +2490,8 @@ xg_create_one_menuitem (widget_value *item,
if (item->call_data && ! item->contents)
{
if (select_cb)
- cb_data->select_id
- = g_signal_connect (G_OBJECT (w), "activate", select_cb, cb_data);
+ cb_data->select_id
+ = g_signal_connect (G_OBJECT (w), "activate", select_cb, cb_data);
}
return w;
@@ -2519,15 +2519,15 @@ xg_create_one_menuitem (widget_value *item,
static GtkWidget *
create_menus (widget_value *data,
- struct frame *f,
- GCallback select_cb,
- GCallback deactivate_cb,
- GCallback highlight_cb,
- bool pop_up_p,
- bool menu_bar_p,
- GtkWidget *topmenu,
- xg_menu_cb_data *cl_data,
- const char *name)
+ struct frame *f,
+ GCallback select_cb,
+ GCallback deactivate_cb,
+ GCallback highlight_cb,
+ bool pop_up_p,
+ bool menu_bar_p,
+ GtkWidget *topmenu,
+ xg_menu_cb_data *cl_data,
+ const char *name)
{
widget_value *item;
GtkWidget *wmenu = topmenu;
@@ -2537,42 +2537,42 @@ create_menus (widget_value *data,
{
if (! menu_bar_p)
{
- wmenu = gtk_menu_new ();
- xg_set_screen (wmenu, f);
- /* Connect this to the menu instead of items so we get enter/leave for
- disabled items also. TODO: Still does not get enter/leave for
- disabled items in detached menus. */
- g_signal_connect (G_OBJECT (wmenu),
- "enter-notify-event",
- G_CALLBACK (menuitem_highlight_callback),
- NULL);
- g_signal_connect (G_OBJECT (wmenu),
- "leave-notify-event",
- G_CALLBACK (menuitem_highlight_callback),
- NULL);
+ wmenu = gtk_menu_new ();
+ xg_set_screen (wmenu, f);
+ /* Connect this to the menu instead of items so we get enter/leave for
+ disabled items also. TODO: Still does not get enter/leave for
+ disabled items in detached menus. */
+ g_signal_connect (G_OBJECT (wmenu),
+ "enter-notify-event",
+ G_CALLBACK (menuitem_highlight_callback),
+ NULL);
+ g_signal_connect (G_OBJECT (wmenu),
+ "leave-notify-event",
+ G_CALLBACK (menuitem_highlight_callback),
+ NULL);
}
else
- {
- wmenu = gtk_menu_bar_new ();
- /* Set width of menu bar to a small value so it doesn't enlarge
- a small initial frame size. The width will be set to the
- width of the frame later on when it is added to a container.
- height -1: Natural height. */
- gtk_widget_set_size_request (wmenu, 1, -1);
- }
+ {
+ wmenu = gtk_menu_bar_new ();
+ /* Set width of menu bar to a small value so it doesn't enlarge
+ a small initial frame size. The width will be set to the
+ width of the frame later on when it is added to a container.
+ height -1: Natural height. */
+ gtk_widget_set_size_request (wmenu, 1, -1);
+ }
/* Put cl_data on the top menu for easier access. */
cl_data = make_cl_data (cl_data, f, highlight_cb);
g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data);
g_signal_connect (G_OBJECT (wmenu), "destroy",
- G_CALLBACK (menu_destroy_callback), cl_data);
+ G_CALLBACK (menu_destroy_callback), cl_data);
if (name)
- gtk_widget_set_name (wmenu, name);
+ gtk_widget_set_name (wmenu, name);
if (deactivate_cb)
- g_signal_connect (G_OBJECT (wmenu),
- "selection-done", deactivate_cb, 0);
+ g_signal_connect (G_OBJECT (wmenu),
+ "selection-done", deactivate_cb, 0);
}
for (item = data; item; item = item->next)
@@ -2580,50 +2580,50 @@ create_menus (widget_value *data,
GtkWidget *w;
if (pop_up_p && !item->contents && !item->call_data
- && !menu_separator_name_p (item->name))
- {
- char *utf8_label;
- /* A title for a popup. We do the same as GTK does when
- creating titles, but it does not look good. */
- group = NULL;
- utf8_label = get_utf8_string (item->name);
-
- w = gtk_menu_item_new_with_label (utf8_label);
- gtk_widget_set_sensitive (w, FALSE);
- if (utf8_label) g_free (utf8_label);
- }
+ && !menu_separator_name_p (item->name))
+ {
+ char *utf8_label;
+ /* A title for a popup. We do the same as GTK does when
+ creating titles, but it does not look good. */
+ group = NULL;
+ utf8_label = get_utf8_string (item->name);
+
+ w = gtk_menu_item_new_with_label (utf8_label);
+ gtk_widget_set_sensitive (w, FALSE);
+ if (utf8_label) g_free (utf8_label);
+ }
else if (menu_separator_name_p (item->name))
- {
- group = NULL;
- /* GTK only have one separator type. */
- w = gtk_separator_menu_item_new ();
- }
+ {
+ group = NULL;
+ /* GTK only have one separator type. */
+ w = gtk_separator_menu_item_new ();
+ }
else
- {
- w = xg_create_one_menuitem (item,
- f,
- item->contents ? 0 : select_cb,
- highlight_cb,
- cl_data,
- &group);
-
- /* Create a possibly empty submenu for menu bar items, since some
- themes don't highlight items correctly without it. */
- if (item->contents || menu_bar_p)
- {
- GtkWidget *submenu = create_menus (item->contents,
- f,
- select_cb,
- deactivate_cb,
- highlight_cb,
- 0,
- 0,
- 0,
- cl_data,
- 0);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
- }
- }
+ {
+ w = xg_create_one_menuitem (item,
+ f,
+ item->contents ? 0 : select_cb,
+ highlight_cb,
+ cl_data,
+ &group);
+
+ /* Create a possibly empty submenu for menu bar items, since some
+ themes don't highlight items correctly without it. */
+ if (item->contents || menu_bar_p)
+ {
+ GtkWidget *submenu = create_menus (item->contents,
+ f,
+ select_cb,
+ deactivate_cb,
+ highlight_cb,
+ 0,
+ 0,
+ 0,
+ cl_data,
+ 0);
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
+ }
+ }
gtk_menu_shell_append (GTK_MENU_SHELL (wmenu), w);
gtk_widget_set_name (w, MENU_ITEM_NAME);
@@ -2661,7 +2661,7 @@ xg_create_widget (const char *type, const char *name, struct frame *f,
w = create_dialog (val, select_cb, deactivate_cb);
xg_set_screen (w, f);
gtk_window_set_transient_for (GTK_WINDOW (w),
- GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
+ GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
gtk_window_set_destroy_with_parent (GTK_WINDOW (w), TRUE);
gtk_widget_set_name (w, "emacs-dialog");
gtk_window_set_modal (GTK_WINDOW (w), TRUE);
@@ -2669,29 +2669,29 @@ xg_create_widget (const char *type, const char *name, struct frame *f,
else if (menu_bar_p || pop_up_p)
{
w = create_menus (val->contents,
- f,
- select_cb,
- deactivate_cb,
- highlight_cb,
- pop_up_p,
- menu_bar_p,
- 0,
- 0,
- name);
+ f,
+ select_cb,
+ deactivate_cb,
+ highlight_cb,
+ pop_up_p,
+ menu_bar_p,
+ 0,
+ 0,
+ name);
/* Set the cursor to an arrow for popup menus when they are mapped.
- This is done by default for menu bar menus. */
+ This is done by default for menu bar menus. */
if (pop_up_p)
- {
- /* Must realize so the GdkWindow inside the widget is created. */
- gtk_widget_realize (w);
- xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor);
- }
+ {
+ /* Must realize so the GdkWindow inside the widget is created. */
+ gtk_widget_realize (w);
+ xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor);
+ }
}
else
{
fprintf (stderr, "bad type in xg_create_widget: %s, doing nothing\n",
- type);
+ type);
}
return w;
@@ -2774,8 +2774,8 @@ xg_update_menubar (GtkWidget *menubar,
/* Add a blank entry so the menubar doesn't collapse to nothing. */
gtk_menu_shell_insert (GTK_MENU_SHELL (menubar),
- gtk_menu_item_new_with_label (""),
- 0);
+ gtk_menu_item_new_with_label (""),
+ 0);
/* All updated. */
val = 0;
iter = 0;
@@ -2784,7 +2784,7 @@ xg_update_menubar (GtkWidget *menubar,
{
/* Item(s) added. Add all new items in one call. */
create_menus (val, f, select_cb, deactivate_cb, highlight_cb,
- 0, 1, menubar, cl_data, 0);
+ 0, 1, menubar, cl_data, 0);
/* All updated. */
val = 0;
@@ -2809,129 +2809,129 @@ xg_update_menubar (GtkWidget *menubar,
/* See if the changed entry (val) is present later in the menu bar */
for (iter2 = iter;
- iter2 && ! val_in_menubar;
- iter2 = g_list_next (iter2))
- {
- witem2 = GTK_MENU_ITEM (iter2->data);
- val_in_menubar = xg_item_label_same_p (witem2, val->name);
- }
+ iter2 && ! val_in_menubar;
+ iter2 = g_list_next (iter2))
+ {
+ witem2 = GTK_MENU_ITEM (iter2->data);
+ val_in_menubar = xg_item_label_same_p (witem2, val->name);
+ }
/* See if the current entry (iter) is present later in the
- specification for the new menu bar. */
+ specification for the new menu bar. */
for (cur = val; cur && ! iter_in_new_menubar; cur = cur->next)
- iter_in_new_menubar = xg_item_label_same_p (witem, cur->name);
+ iter_in_new_menubar = xg_item_label_same_p (witem, cur->name);
if (val_in_menubar && ! iter_in_new_menubar)
- {
- int nr = pos;
-
- /* This corresponds to:
- Current: A B C
- New: A C
- Remove B. */
-
- g_object_ref (G_OBJECT (witem));
- gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem));
- gtk_widget_destroy (GTK_WIDGET (witem));
-
- /* Must get new list since the old changed. */
- g_list_free (*list);
- *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
- while (nr-- > 0) iter = g_list_next (iter);
- }
+ {
+ int nr = pos;
+
+ /* This corresponds to:
+ Current: A B C
+ New: A C
+ Remove B. */
+
+ g_object_ref (G_OBJECT (witem));
+ gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem));
+ gtk_widget_destroy (GTK_WIDGET (witem));
+
+ /* Must get new list since the old changed. */
+ g_list_free (*list);
+ *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
+ while (nr-- > 0) iter = g_list_next (iter);
+ }
else if (! val_in_menubar && ! iter_in_new_menubar)
- {
- /* This corresponds to:
- Current: A B C
- New: A X C
- Rename B to X. This might seem to be a strange thing to do,
- since if there is a menu under B it will be totally wrong for X.
- But consider editing a C file. Then there is a C-mode menu
- (corresponds to B above).
- If then doing C-x C-f the minibuf menu (X above) replaces the
- C-mode menu. When returning from the minibuffer, we get
- back the C-mode menu. Thus we do:
- Rename B to X (C-mode to minibuf menu)
- Rename X to B (minibuf to C-mode menu).
- If the X menu hasn't been invoked, the menu under B
- is up to date when leaving the minibuffer. */
- GtkLabel *wlabel = GTK_LABEL (XG_BIN_CHILD (witem));
- char *utf8_label = get_utf8_string (val->name);
-
- /* GTK menu items don't notice when their labels have been
- changed from underneath them, so we have to explicitly
- use g_object_notify to tell listeners (e.g., a GMenuModel
- bridge that might be loaded) that the item's label has
- changed. */
- gtk_label_set_text (wlabel, utf8_label);
+ {
+ /* This corresponds to:
+ Current: A B C
+ New: A X C
+ Rename B to X. This might seem to be a strange thing to do,
+ since if there is a menu under B it will be totally wrong for X.
+ But consider editing a C file. Then there is a C-mode menu
+ (corresponds to B above).
+ If then doing C-x C-f the minibuf menu (X above) replaces the
+ C-mode menu. When returning from the minibuffer, we get
+ back the C-mode menu. Thus we do:
+ Rename B to X (C-mode to minibuf menu)
+ Rename X to B (minibuf to C-mode menu).
+ If the X menu hasn't been invoked, the menu under B
+ is up to date when leaving the minibuffer. */
+ GtkLabel *wlabel = GTK_LABEL (XG_BIN_CHILD (witem));
+ char *utf8_label = get_utf8_string (val->name);
+
+ /* GTK menu items don't notice when their labels have been
+ changed from underneath them, so we have to explicitly
+ use g_object_notify to tell listeners (e.g., a GMenuModel
+ bridge that might be loaded) that the item's label has
+ changed. */
+ gtk_label_set_text (wlabel, utf8_label);
#if GTK_CHECK_VERSION (2, 16, 0)
- g_object_notify (G_OBJECT (witem), "label");
+ g_object_notify (G_OBJECT (witem), "label");
#endif
- if (utf8_label) g_free (utf8_label);
- iter = g_list_next (iter);
- val = val->next;
- ++pos;
- }
+ if (utf8_label) g_free (utf8_label);
+ iter = g_list_next (iter);
+ val = val->next;
+ ++pos;
+ }
else if (! val_in_menubar && iter_in_new_menubar)
- {
- /* This corresponds to:
- Current: A B C
- New: A X B C
- Insert X. */
-
- int nr = pos;
- GSList *group = 0;
- GtkWidget *w = xg_create_one_menuitem (val,
- f,
- select_cb,
- highlight_cb,
- cl_data,
- &group);
-
- /* Create a possibly empty submenu for menu bar items, since some
- themes don't highlight items correctly without it. */
- GtkWidget *submenu = create_menus (NULL, f,
- select_cb, deactivate_cb,
- highlight_cb,
- 0, 0, 0, cl_data, 0);
-
- gtk_widget_set_name (w, MENU_ITEM_NAME);
- gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
-
- g_list_free (*list);
- *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
- while (nr-- > 0) iter = g_list_next (iter);
- iter = g_list_next (iter);
- val = val->next;
- ++pos;
- }
+ {
+ /* This corresponds to:
+ Current: A B C
+ New: A X B C
+ Insert X. */
+
+ int nr = pos;
+ GSList *group = 0;
+ GtkWidget *w = xg_create_one_menuitem (val,
+ f,
+ select_cb,
+ highlight_cb,
+ cl_data,
+ &group);
+
+ /* Create a possibly empty submenu for menu bar items, since some
+ themes don't highlight items correctly without it. */
+ GtkWidget *submenu = create_menus (NULL, f,
+ select_cb, deactivate_cb,
+ highlight_cb,
+ 0, 0, 0, cl_data, 0);
+
+ gtk_widget_set_name (w, MENU_ITEM_NAME);
+ gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos);
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
+
+ g_list_free (*list);
+ *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
+ while (nr-- > 0) iter = g_list_next (iter);
+ iter = g_list_next (iter);
+ val = val->next;
+ ++pos;
+ }
else /* if (val_in_menubar && iter_in_new_menubar) */
- {
- int nr = pos;
- /* This corresponds to:
- Current: A B C
- New: A C B
- Move C before B */
-
- g_object_ref (G_OBJECT (witem2));
- gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem2));
- gtk_menu_shell_insert (GTK_MENU_SHELL (menubar),
- GTK_WIDGET (witem2), pos);
- g_object_unref (G_OBJECT (witem2));
-
- g_list_free (*list);
- *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
- while (nr-- > 0) iter = g_list_next (iter);
- if (iter) iter = g_list_next (iter);
- val = val->next;
- ++pos;
+ {
+ int nr = pos;
+ /* This corresponds to:
+ Current: A B C
+ New: A C B
+ Move C before B */
+
+ g_object_ref (G_OBJECT (witem2));
+ gtk_container_remove (GTK_CONTAINER (menubar), GTK_WIDGET (witem2));
+ gtk_menu_shell_insert (GTK_MENU_SHELL (menubar),
+ GTK_WIDGET (witem2), pos);
+ g_object_unref (G_OBJECT (witem2));
+
+ g_list_free (*list);
+ *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
+ while (nr-- > 0) iter = g_list_next (iter);
+ if (iter) iter = g_list_next (iter);
+ val = val->next;
+ ++pos;
}
}
/* Update the rest of the menu bar. */
xg_update_menubar (menubar, f, list, iter, pos, val,
- select_cb, deactivate_cb, highlight_cb, cl_data);
+ select_cb, deactivate_cb, highlight_cb, cl_data);
}
/* Update the menu item W so it corresponds to VAL.
@@ -2941,10 +2941,10 @@ xg_update_menubar (GtkWidget *menubar,
static void
xg_update_menu_item (widget_value *val,
- GtkWidget *w,
- GCallback select_cb,
- GCallback highlight_cb,
- xg_menu_cb_data *cl_data)
+ GtkWidget *w,
+ GCallback select_cb,
+ GCallback highlight_cb,
+ xg_menu_cb_data *cl_data)
{
GtkWidget *wchild;
GtkLabel *wlbl = 0;
@@ -2970,14 +2970,14 @@ xg_update_menu_item (widget_value *val,
g_list_free (list);
if (! utf8_key)
- {
- /* Remove the key and keep just the label. */
- g_object_ref (G_OBJECT (wlbl));
- gtk_container_remove (GTK_CONTAINER (w), wchild);
- gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (wlbl));
- g_object_unref (G_OBJECT (wlbl));
- wkey = 0;
- }
+ {
+ /* Remove the key and keep just the label. */
+ g_object_ref (G_OBJECT (wlbl));
+ gtk_container_remove (GTK_CONTAINER (w), wchild);
+ gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (wlbl));
+ g_object_unref (G_OBJECT (wlbl));
+ wkey = 0;
+ }
}
else /* Just a label. */
@@ -2986,17 +2986,17 @@ xg_update_menu_item (widget_value *val,
/* Check if there is now a key. */
if (utf8_key)
- {
- GtkWidget *wtoadd = make_widget_for_menu_item (utf8_label, utf8_key);
- GList *list = gtk_container_get_children (GTK_CONTAINER (wtoadd));
+ {
+ GtkWidget *wtoadd = make_widget_for_menu_item (utf8_label, utf8_key);
+ GList *list = gtk_container_get_children (GTK_CONTAINER (wtoadd));
- wlbl = GTK_LABEL (list->data);
- wkey = GTK_LABEL (list->next->data);
- g_list_free (list);
+ wlbl = GTK_LABEL (list->data);
+ wkey = GTK_LABEL (list->next->data);
+ g_list_free (list);
- gtk_container_remove (GTK_CONTAINER (w), wchild);
- gtk_container_add (GTK_CONTAINER (w), wtoadd);
- }
+ gtk_container_remove (GTK_CONTAINER (w), wchild);
+ gtk_container_add (GTK_CONTAINER (w), wtoadd);
+ }
}
if (wkey) old_key = gtk_label_get_label (wkey);
@@ -3031,18 +3031,18 @@ xg_update_menu_item (widget_value *val,
/* We assume the callback functions don't change. */
if (val->call_data && ! val->contents)
- {
- /* This item shall have a select callback. */
- if (! cb_data->select_id)
- cb_data->select_id
- = g_signal_connect (G_OBJECT (w), "activate",
- select_cb, cb_data);
- }
+ {
+ /* This item shall have a select callback. */
+ if (! cb_data->select_id)
+ cb_data->select_id
+ = g_signal_connect (G_OBJECT (w), "activate",
+ select_cb, cb_data);
+ }
else if (cb_data->select_id)
- {
- g_signal_handler_disconnect (w, cb_data->select_id);
- cb_data->select_id = 0;
- }
+ {
+ g_signal_handler_disconnect (w, cb_data->select_id);
+ cb_data->select_id = 0;
+ }
}
#if GTK_CHECK_VERSION (2, 16, 0)
@@ -3109,65 +3109,65 @@ xg_update_submenu (GtkWidget *submenu,
if (cur->button_type == BUTTON_TYPE_RADIO && ! first_radio)
first_radio = iter;
else if (cur->button_type != BUTTON_TYPE_RADIO
- && ! GTK_IS_RADIO_MENU_ITEM (w))
+ && ! GTK_IS_RADIO_MENU_ITEM (w))
first_radio = 0;
if (GTK_IS_SEPARATOR_MENU_ITEM (w))
{
- if (! menu_separator_name_p (cur->name))
- break;
+ if (! menu_separator_name_p (cur->name))
+ break;
}
else if (GTK_IS_CHECK_MENU_ITEM (w))
{
- if (cur->button_type != BUTTON_TYPE_TOGGLE)
- break;
- xg_update_toggle_item (cur, w);
- xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
+ if (cur->button_type != BUTTON_TYPE_TOGGLE)
+ break;
+ xg_update_toggle_item (cur, w);
+ xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
}
else if (GTK_IS_RADIO_MENU_ITEM (w))
{
- if (cur->button_type != BUTTON_TYPE_RADIO)
- break;
- xg_update_radio_item (cur, w);
- xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
+ if (cur->button_type != BUTTON_TYPE_RADIO)
+ break;
+ xg_update_radio_item (cur, w);
+ xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
}
else if (GTK_IS_MENU_ITEM (w))
{
- GtkMenuItem *witem = GTK_MENU_ITEM (w);
- GtkWidget *sub;
-
- if (cur->button_type != BUTTON_TYPE_NONE ||
- menu_separator_name_p (cur->name))
- break;
-
- xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
-
- sub = gtk_menu_item_get_submenu (witem);
- if (sub && ! cur->contents)
- {
- /* Not a submenu anymore. */
- g_object_ref (G_OBJECT (sub));
- remove_submenu (witem);
- gtk_widget_destroy (sub);
- }
- else if (cur->contents)
- {
- GtkWidget *nsub;
-
- nsub = xg_update_submenu (sub, f, cur->contents,
- select_cb, deactivate_cb,
- highlight_cb, cl_data);
-
- /* If this item just became a submenu, we must set it. */
- if (nsub != sub)
- gtk_menu_item_set_submenu (witem, nsub);
- }
+ GtkMenuItem *witem = GTK_MENU_ITEM (w);
+ GtkWidget *sub;
+
+ if (cur->button_type != BUTTON_TYPE_NONE ||
+ menu_separator_name_p (cur->name))
+ break;
+
+ xg_update_menu_item (cur, w, select_cb, highlight_cb, cl_data);
+
+ sub = gtk_menu_item_get_submenu (witem);
+ if (sub && ! cur->contents)
+ {
+ /* Not a submenu anymore. */
+ g_object_ref (G_OBJECT (sub));
+ remove_submenu (witem);
+ gtk_widget_destroy (sub);
+ }
+ else if (cur->contents)
+ {
+ GtkWidget *nsub;
+
+ nsub = xg_update_submenu (sub, f, cur->contents,
+ select_cb, deactivate_cb,
+ highlight_cb, cl_data);
+
+ /* If this item just became a submenu, we must set it. */
+ if (nsub != sub)
+ gtk_menu_item_set_submenu (witem, nsub);
+ }
}
else
{
- /* Structural difference. Remove everything from here and down
- in SUBMENU. */
- break;
+ /* Structural difference. Remove everything from here and down
+ in SUBMENU. */
+ break;
}
}
@@ -3175,7 +3175,7 @@ xg_update_submenu (GtkWidget *submenu,
if (iter)
{
/* If we are adding new menu items below, we must remove from
- first radio button so that radio groups become correct. */
+ first radio button so that radio groups become correct. */
if (cur && first_radio) xg_destroy_widgets (first_radio);
else xg_destroy_widgets (iter);
}
@@ -3184,15 +3184,15 @@ xg_update_submenu (GtkWidget *submenu,
{
/* More items added. Create them. */
newsub = create_menus (cur,
- f,
- select_cb,
- deactivate_cb,
- highlight_cb,
- 0,
- 0,
- submenu,
- cl_data,
- 0);
+ f,
+ select_cb,
+ deactivate_cb,
+ highlight_cb,
+ 0,
+ 0,
+ submenu,
+ cl_data,
+ 0);
}
if (list) g_list_free (list);
@@ -3212,7 +3212,7 @@ xg_update_submenu (GtkWidget *submenu,
void
xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f,
widget_value *val, bool deep_p,
- GCallback select_cb, GCallback deactivate_cb,
+ GCallback select_cb, GCallback deactivate_cb,
GCallback highlight_cb)
{
xg_menu_cb_data *cl_data;
@@ -3223,53 +3223,53 @@ xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f,
cl_data = g_object_get_data (G_OBJECT (menubar), XG_FRAME_DATA);
xg_update_menubar (menubar, f, &list, list, 0, val->contents,
- select_cb, deactivate_cb, highlight_cb, cl_data);
+ select_cb, deactivate_cb, highlight_cb, cl_data);
if (deep_p)
{
widget_value *cur;
/* Update all sub menus.
- We must keep the submenus (GTK menu item widgets) since the
- X Window in the XEvent that activates the menu are those widgets. */
+ We must keep the submenus (GTK menu item widgets) since the
+ X Window in the XEvent that activates the menu are those widgets. */
/* Update cl_data, menu_item things in F may have changed. */
update_cl_data (cl_data, f, highlight_cb);
for (cur = val->contents; cur; cur = cur->next)
- {
- GList *iter;
- GtkWidget *sub = 0;
- GtkWidget *newsub;
- GtkMenuItem *witem = 0;
-
- /* Find sub menu that corresponds to val and update it. */
- for (iter = list ; iter; iter = g_list_next (iter))
- {
- witem = GTK_MENU_ITEM (iter->data);
- if (xg_item_label_same_p (witem, cur->name))
- {
- sub = gtk_menu_item_get_submenu (witem);
- break;
- }
- }
-
- newsub = xg_update_submenu (sub,
- f,
- cur->contents,
- select_cb,
- deactivate_cb,
- highlight_cb,
- cl_data);
- /* sub may still be NULL. If we just updated non deep and added
- a new menu bar item, it has no sub menu yet. So we set the
- newly created sub menu under witem. */
- if (newsub != sub && witem != 0)
- {
- xg_set_screen (newsub, f);
- gtk_menu_item_set_submenu (witem, newsub);
- }
- }
+ {
+ GList *iter;
+ GtkWidget *sub = 0;
+ GtkWidget *newsub;
+ GtkMenuItem *witem = 0;
+
+ /* Find sub menu that corresponds to val and update it. */
+ for (iter = list ; iter; iter = g_list_next (iter))
+ {
+ witem = GTK_MENU_ITEM (iter->data);
+ if (xg_item_label_same_p (witem, cur->name))
+ {
+ sub = gtk_menu_item_get_submenu (witem);
+ break;
+ }
+ }
+
+ newsub = xg_update_submenu (sub,
+ f,
+ cur->contents,
+ select_cb,
+ deactivate_cb,
+ highlight_cb,
+ cl_data);
+ /* sub may still be NULL. If we just updated non deep and added
+ a new menu bar item, it has no sub menu yet. So we set the
+ newly created sub menu under witem. */
+ if (newsub != sub && witem != 0)
+ {
+ xg_set_screen (newsub, f);
+ gtk_menu_item_set_submenu (witem, newsub);
+ }
+ }
}
g_list_free (list);
@@ -3311,7 +3311,7 @@ xg_update_frame_menubar (struct frame *f)
block_input ();
gtk_box_pack_start (GTK_BOX (x->vbox_widget), x->menubar_widget,
- FALSE, FALSE, 0);
+ FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (x->vbox_widget), x->menubar_widget, 0);
g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f);
@@ -3340,7 +3340,7 @@ free_frame_menubar (struct frame *f)
gtk_container_remove (GTK_CONTAINER (x->vbox_widget), x->menubar_widget);
/* The menubar and its children shall be deleted when removed from
- the container. */
+ the container. */
x->menubar_widget = 0;
FRAME_MENUBAR_HEIGHT (f) = 0;
adjust_frame_size (f, -1, -1, 2, 0, Qmenu_bar_lines);
@@ -3363,10 +3363,10 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
if (! x->menubar_widget) return 0;
if (! (event->xbutton.x >= 0
- && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
- && event->xbutton.y >= 0
- && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
- && event->xbutton.same_screen))
+ && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
+ && event->xbutton.y >= 0
+ && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
+ && event->xbutton.same_screen))
return 0;
gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
@@ -3392,7 +3392,7 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
{
GtkWidget *w = GTK_WIDGET (iter->data);
if (gtk_widget_get_mapped (w) && gtk_widget_intersect (w, &rec, NULL))
- break;
+ break;
}
g_list_free (list);
return iter != 0;
@@ -3401,7 +3401,7 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
\f
/***********************************************************************
- Scroll bar functions
+ Scroll bar functions
***********************************************************************/
@@ -3447,7 +3447,7 @@ xg_store_widget_in_map (GtkWidget *w)
new_size, sizeof (GtkWidget *));
for (i = id_to_widget.max_size; i < new_size; ++i)
- id_to_widget.widgets[i] = 0;
+ id_to_widget.widgets[i] = 0;
id_to_widget.max_size = new_size;
}
@@ -3457,12 +3457,12 @@ xg_store_widget_in_map (GtkWidget *w)
for (i = 0; i < id_to_widget.max_size; ++i)
{
if (! id_to_widget.widgets[i])
- {
- id_to_widget.widgets[i] = w;
- ++id_to_widget.used;
+ {
+ id_to_widget.widgets[i] = w;
+ ++id_to_widget.used;
- return i;
- }
+ return i;
+ }
}
/* Should never end up here */
@@ -3566,8 +3566,8 @@ xg_get_scroll_id_for_window (Display *dpy, Window wid)
if (w)
{
for (idx = 0; idx < id_to_widget.max_size; ++idx)
- if (id_to_widget.widgets[idx] == w)
- return idx;
+ if (id_to_widget.widgets[idx] == w)
+ return idx;
}
return -1;
@@ -3586,11 +3586,11 @@ xg_gtk_scroll_destroy (GtkWidget *widget, gpointer data)
static void
xg_finish_scroll_bar_creation (struct frame *f,
- GtkWidget *wscroll,
- struct scroll_bar *bar,
- GCallback scroll_callback,
- GCallback end_callback,
- const char *scroll_bar_name)
+ GtkWidget *wscroll,
+ struct scroll_bar *bar,
+ GCallback scroll_callback,
+ GCallback end_callback,
+ const char *scroll_bar_name)
{
GtkWidget *webox = gtk_event_box_new ();
@@ -3603,17 +3603,17 @@ xg_finish_scroll_bar_creation (struct frame *f,
ptrdiff_t scroll_id = xg_store_widget_in_map (wscroll);
g_signal_connect (G_OBJECT (wscroll),
- "destroy",
- G_CALLBACK (xg_gtk_scroll_destroy),
- (gpointer) scroll_id);
+ "destroy",
+ G_CALLBACK (xg_gtk_scroll_destroy),
+ (gpointer) scroll_id);
g_signal_connect (G_OBJECT (wscroll),
- "change-value",
- scroll_callback,
- (gpointer) bar);
+ "change-value",
+ scroll_callback,
+ (gpointer) bar);
g_signal_connect (G_OBJECT (wscroll),
- "button-release-event",
- end_callback,
- (gpointer) bar);
+ "button-release-event",
+ end_callback,
+ (gpointer) bar);
/* The scroll bar widget does not draw on a window of its own. Instead
it draws on the parent window, in this case the edit widget. So
@@ -3649,10 +3649,10 @@ xg_finish_scroll_bar_creation (struct frame *f,
void
xg_create_scroll_bar (struct frame *f,
- struct scroll_bar *bar,
- GCallback scroll_callback,
- GCallback end_callback,
- const char *scroll_bar_name)
+ struct scroll_bar *bar,
+ GCallback scroll_callback,
+ GCallback end_callback,
+ const char *scroll_bar_name)
{
GtkWidget *wscroll;
#ifdef HAVE_GTK3
@@ -3664,12 +3664,12 @@ xg_create_scroll_bar (struct frame *f,
/* Page, step increment values are not so important here, they
will be corrected in x_set_toolkit_scroll_bar_thumb. */
vadj = gtk_adjustment_new (XG_SB_MIN, XG_SB_MIN, XG_SB_MAX,
- 0.1, 0.1, 0.1);
+ 0.1, 0.1, 0.1);
wscroll = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT (vadj));
xg_finish_scroll_bar_creation (f, wscroll, bar, scroll_callback,
- end_callback, scroll_bar_name);
+ end_callback, scroll_bar_name);
bar->horizontal = 0;
}
@@ -3696,12 +3696,12 @@ xg_create_horizontal_scroll_bar (struct frame *f,
/* Page, step increment values are not so important here, they
will be corrected in x_set_toolkit_scroll_bar_thumb. */
hadj = gtk_adjustment_new (YG_SB_MIN, YG_SB_MIN, YG_SB_MAX,
- 0.1, 0.1, 0.1);
+ 0.1, 0.1, 0.1);
wscroll = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (hadj));
xg_finish_scroll_bar_creation (f, wscroll, bar, scroll_callback,
- end_callback, scroll_bar_name);
+ end_callback, scroll_bar_name);
bar->horizontal = 1;
}
@@ -3727,11 +3727,11 @@ xg_remove_scroll_bar (struct frame *f, ptrdiff_t scrollbar_id)
void
xg_update_scrollbar_pos (struct frame *f,
- ptrdiff_t scrollbar_id,
- int top,
- int left,
- int width,
- int height)
+ ptrdiff_t scrollbar_id,
+ int top,
+ int left,
+ int width,
+ int height)
{
GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id);
if (wscroll)
@@ -3749,38 +3749,38 @@ xg_update_scrollbar_pos (struct frame *f,
/* Clear out old position. */
int oldx = -1, oldy = -1, oldw, oldh;
if (gtk_widget_get_parent (wparent) == wfixed)
- {
- gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
- "x", &oldx, "y", &oldy, NULL);
- gtk_widget_get_size_request (wscroll, &oldw, &oldh);
- }
+ {
+ gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
+ "x", &oldx, "y", &oldy, NULL);
+ gtk_widget_get_size_request (wscroll, &oldw, &oldh);
+ }
/* Move and resize to new values. */
gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
if (msl > height)
- {
- /* No room. Hide scroll bar as some themes output a warning if
- the height is less than the min size. */
- gtk_widget_hide (wparent);
- gtk_widget_hide (wscroll);
- }
+ {
+ /* No room. Hide scroll bar as some themes output a warning if
+ the height is less than the min size. */
+ gtk_widget_hide (wparent);
+ gtk_widget_hide (wscroll);
+ }
else
- {
- gtk_widget_show_all (wparent);
- gtk_widget_set_size_request (wscroll, width, height);
- }
+ {
+ gtk_widget_show_all (wparent);
+ gtk_widget_set_size_request (wscroll, width, height);
+ }
if (oldx != -1 && oldw > 0 && oldh > 0)
- {
- /* Clear under old scroll bar position. */
- oldw += (scale - 1) * oldw;
+ {
+ /* Clear under old scroll bar position. */
+ oldw += (scale - 1) * oldw;
oldx -= (scale - 1) * oldw;
- x_clear_area (f, oldx, oldy, oldw, oldh);
- }
+ x_clear_area (f, oldx, oldy, oldw, oldh);
+ }
/* GTK does not redraw until the main loop is entered again, but
- if there are no X events pending we will not enter it. So we sync
- here to get some events. */
+ if there are no X events pending we will not enter it. So we sync
+ here to get some events. */
x_sync (f);
SET_FRAME_GARBAGED (f);
@@ -3814,34 +3814,34 @@ xg_update_horizontal_scrollbar_pos (struct frame *f,
/* Clear out old position. */
int oldx = -1, oldy = -1, oldw, oldh;
if (gtk_widget_get_parent (wparent) == wfixed)
- {
- gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
- "x", &oldx, "y", &oldy, NULL);
- gtk_widget_get_size_request (wscroll, &oldw, &oldh);
- }
+ {
+ gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
+ "x", &oldx, "y", &oldy, NULL);
+ gtk_widget_get_size_request (wscroll, &oldw, &oldh);
+ }
/* Move and resize to new values. */
gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
if (msl > width)
- {
- /* No room. Hide scroll bar as some themes output a warning if
- the width is less than the min size. */
- gtk_widget_hide (wparent);
- gtk_widget_hide (wscroll);
- }
+ {
+ /* No room. Hide scroll bar as some themes output a warning if
+ the width is less than the min size. */
+ gtk_widget_hide (wparent);
+ gtk_widget_hide (wscroll);
+ }
else
- {
- gtk_widget_show_all (wparent);
- gtk_widget_set_size_request (wscroll, width, height);
- }
+ {
+ gtk_widget_show_all (wparent);
+ gtk_widget_set_size_request (wscroll, width, height);
+ }
if (oldx != -1 && oldw > 0 && oldh > 0)
- /* Clear under old scroll bar position. */
- x_clear_area (f, oldx, oldy, oldw, oldh);
+ /* Clear under old scroll bar position. */
+ x_clear_area (f, oldx, oldy, oldw, oldh);
/* GTK does not redraw until the main loop is entered again, but
- if there are no X events pending we will not enter it. So we sync
- here to get some events. */
+ if there are no X events pending we will not enter it. So we sync
+ here to get some events. */
x_sync (f);
SET_FRAME_GARBAGED (f);
@@ -3864,9 +3864,9 @@ int_gtk_range_get_value (GtkRange *range)
void
xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
- int portion,
- int position,
- int whole)
+ int portion,
+ int position,
+ int whole)
{
GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window);
@@ -3885,24 +3885,24 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
adj = gtk_range_get_adjustment (GTK_RANGE (wscroll));
if (scroll_bar_adjust_thumb_portion_p)
- {
- /* We do the same as for MOTIF in xterm.c, use 30 chars per
- line rather than the real portion value. This makes the
- thumb less likely to resize and that looks better. */
- portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
-
- /* When the thumb is at the bottom, position == whole.
- So we need to increase `whole' to make space for the thumb. */
- whole += portion;
- }
+ {
+ /* We do the same as for MOTIF in xterm.c, use 30 chars per
+ line rather than the real portion value. This makes the
+ thumb less likely to resize and that looks better. */
+ portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
+
+ /* When the thumb is at the bottom, position == whole.
+ So we need to increase `whole' to make space for the thumb. */
+ whole += portion;
+ }
if (whole <= 0)
- top = 0, shown = 1;
+ top = 0, shown = 1;
else
- {
- top = (gdouble) position / whole;
- shown = (gdouble) portion / whole;
- }
+ {
+ top = (gdouble) position / whole;
+ shown = (gdouble) portion / whole;
+ }
size = clip_to_bounds (1, shown * XG_SB_RANGE, XG_SB_RANGE);
value = clip_to_bounds (XG_SB_MIN, top * XG_SB_RANGE, XG_SB_MAX - size);
@@ -3926,20 +3926,20 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
if (changed || int_gtk_range_get_value (GTK_RANGE (wscroll)) != value)
{
- block_input ();
+ block_input ();
- /* gtk_range_set_value invokes the callback. Set
- ignore_gtk_scrollbar to make the callback do nothing */
- xg_ignore_gtk_scrollbar = 1;
+ /* gtk_range_set_value invokes the callback. Set
+ ignore_gtk_scrollbar to make the callback do nothing */
+ xg_ignore_gtk_scrollbar = 1;
- if (int_gtk_range_get_value (GTK_RANGE (wscroll)) != value)
- gtk_range_set_value (GTK_RANGE (wscroll), (gdouble)value);
- else if (changed)
- gtk_adjustment_changed (adj);
+ if (int_gtk_range_get_value (GTK_RANGE (wscroll)) != value)
+ gtk_range_set_value (GTK_RANGE (wscroll), (gdouble)value);
+ else if (changed)
+ gtk_adjustment_changed (adj);
- xg_ignore_gtk_scrollbar = 0;
+ xg_ignore_gtk_scrollbar = 0;
- unblock_input ();
+ unblock_input ();
}
}
}
@@ -3994,7 +3994,7 @@ xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
GdkWindow *gwin;
#ifdef HAVE_GTK3
GdkDevice *gdev = gdk_device_manager_get_client_pointer
- (gdk_display_get_device_manager (gdpy));
+ (gdk_display_get_device_manager (gdpy));
gwin = gdk_device_get_window_at_position (gdev, NULL, NULL);
#else
gwin = gdk_display_get_window_at_pointer (gdpy, NULL, NULL);
@@ -4002,8 +4002,8 @@ xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
retval = gwin != gtk_widget_get_window (f->output_data.x->edit_widget);
}
else if (f
- && ((event->type == ButtonRelease && event->xbutton.button < 4)
- || event->type == MotionNotify))
+ && ((event->type == ButtonRelease && event->xbutton.button < 4)
+ || event->type == MotionNotify))
{
/* If we are releasing or moving the scroll bar, it has the grab. */
GtkWidget *w = gtk_grab_get_current ();
@@ -4105,11 +4105,11 @@ xg_print_frames_dialog (Lisp_Object frames)
gtk_print_operation_set_n_pages (print, XINT (Flength (frames)));
g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &frames);
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
- NULL, NULL);
+ NULL, NULL);
if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
{
if (print_settings != NULL)
- g_object_unref (print_settings);
+ g_object_unref (print_settings);
print_settings =
g_object_ref (gtk_print_operation_get_print_settings (print));
}
@@ -4121,7 +4121,7 @@ xg_print_frames_dialog (Lisp_Object frames)
\f
/***********************************************************************
- Tool bar functions
+ Tool bar functions
***********************************************************************/
/* The key for the data we put in the GtkImage widgets. The data is
the image used by Emacs. We use this to see if we need to update
@@ -4148,8 +4148,8 @@ xg_print_frames_dialog (Lisp_Object frames)
static gboolean
xg_tool_bar_button_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
+ GdkEventButton *event,
+ gpointer user_data)
{
intptr_t state = event->state;
gpointer ptr = (gpointer) state;
@@ -4228,8 +4228,8 @@ xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage)
static gboolean
xg_tool_bar_help_callback (GtkWidget *w,
- GdkEventCrossing *event,
- gpointer client_data)
+ GdkEventCrossing *event,
+ gpointer client_data)
{
intptr_t idx = (intptr_t) client_data;
struct frame *f = g_object_get_data (G_OBJECT (w), XG_FRAME_DATA);
@@ -4244,7 +4244,7 @@ xg_tool_bar_help_callback (GtkWidget *w,
help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_HELP);
if (NILP (help))
- help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_CAPTION);
+ help = AREF (f->tool_bar_items, idx + TOOL_BAR_ITEM_CAPTION);
}
else
help = Qnil;
@@ -4269,8 +4269,8 @@ xg_tool_bar_help_callback (GtkWidget *w,
#ifndef HAVE_GTK3
static gboolean
xg_tool_bar_item_expose_callback (GtkWidget *w,
- GdkEventExpose *event,
- gpointer client_data)
+ GdkEventExpose *event,
+ gpointer client_data)
{
gint width, height;
@@ -4306,31 +4306,31 @@ xg_pack_tool_bar (struct frame *f, Lisp_Object pos)
GtkWidget *top_widget = x->toolbar_widget;
toolbar_set_orientation (x->toolbar_widget,
- into_hbox
- ? GTK_ORIENTATION_VERTICAL
- : GTK_ORIENTATION_HORIZONTAL);
+ into_hbox
+ ? GTK_ORIENTATION_VERTICAL
+ : GTK_ORIENTATION_HORIZONTAL);
if (into_hbox)
{
gtk_box_pack_start (GTK_BOX (x->hbox_widget), top_widget,
- FALSE, FALSE, 0);
+ FALSE, FALSE, 0);
if (EQ (pos, Qleft))
- gtk_box_reorder_child (GTK_BOX (x->hbox_widget),
- top_widget,
- 0);
+ gtk_box_reorder_child (GTK_BOX (x->hbox_widget),
+ top_widget,
+ 0);
x->toolbar_in_hbox = true;
}
else
{
bool vbox_pos = x->menubar_widget != 0;
gtk_box_pack_start (GTK_BOX (x->vbox_widget), top_widget,
- FALSE, FALSE, 0);
+ FALSE, FALSE, 0);
if (EQ (pos, Qtop))
- gtk_box_reorder_child (GTK_BOX (x->vbox_widget),
- top_widget,
- vbox_pos);
+ gtk_box_reorder_child (GTK_BOX (x->vbox_widget),
+ top_widget,
+ vbox_pos);
x->toolbar_in_hbox = false;
}
x->toolbar_is_packed = true;
@@ -4340,8 +4340,8 @@ static bool xg_update_tool_bar_sizes (struct frame *f);
static void
tb_size_cb (GtkWidget *widget,
- GdkRectangle *allocation,
- gpointer user_data)
+ GdkRectangle *allocation,
+ gpointer user_data)
{
/* When tool bar is created it has one preferred size. But when size is
allocated between widgets, it may get another. So we must update
@@ -4366,7 +4366,7 @@ xg_create_tool_bar (struct frame *f)
#endif
struct xg_frame_tb_info *tbinfo
= g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY);
+ TB_INFO_KEY);
if (! tbinfo)
{
tbinfo = xmalloc (sizeof (*tbinfo));
@@ -4376,8 +4376,8 @@ xg_create_tool_bar (struct frame *f)
tbinfo->dir = GTK_TEXT_DIR_NONE;
tbinfo->n_last_items = 0;
g_object_set_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY,
- tbinfo);
+ TB_INFO_KEY,
+ tbinfo);
}
x->toolbar_widget = gtk_toolbar_new ();
@@ -4387,7 +4387,7 @@ xg_create_tool_bar (struct frame *f)
gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS);
toolbar_set_orientation (x->toolbar_widget, GTK_ORIENTATION_HORIZONTAL);
g_signal_connect (x->toolbar_widget, "size-allocate",
- G_CALLBACK (tb_size_cb), f);
+ G_CALLBACK (tb_size_cb), f);
#if GTK_CHECK_VERSION (3, 3, 6)
gsty = gtk_widget_get_style_context (x->toolbar_widget);
gtk_style_context_add_class (gsty, "primary-toolbar");
@@ -4412,15 +4412,15 @@ find_rtl_image (struct frame *f, Lisp_Object image, Lisp_Object rtl)
{
Lisp_Object rtl_image = PROP (TOOL_BAR_ITEM_IMAGES);
if (!NILP (file = file_for_image (rtl_image)))
- {
- file = call1 (intern ("file-name-sans-extension"),
- Ffile_name_nondirectory (file));
- if (! NILP (Fequal (file, rtl_name)))
- {
- image = rtl_image;
- break;
- }
- }
+ {
+ file = call1 (intern ("file-name-sans-extension"),
+ Ffile_name_nondirectory (file));
+ if (! NILP (Fequal (file, rtl_name)))
+ {
+ image = rtl_image;
+ break;
+ }
+ }
}
return image;
@@ -4428,16 +4428,16 @@ find_rtl_image (struct frame *f, Lisp_Object image, Lisp_Object rtl)
static GtkToolItem *
xg_make_tool_item (struct frame *f,
- GtkWidget *wimage,
- GtkWidget **wbutton,
- const char *label,
- int i, bool horiz, bool text_image)
+ GtkWidget *wimage,
+ GtkWidget **wbutton,
+ const char *label,
+ int i, bool horiz, bool text_image)
{
GtkToolItem *ti = gtk_tool_item_new ();
GtkWidget *vb = gtk_box_new (horiz
- ? GTK_ORIENTATION_HORIZONTAL
- : GTK_ORIENTATION_VERTICAL,
- 0);
+ ? GTK_ORIENTATION_HORIZONTAL
+ : GTK_ORIENTATION_VERTICAL,
+ 0);
GtkWidget *wb = gtk_button_new ();
/* The eventbox is here so we can have tooltips on disabled items. */
GtkWidget *weventbox = gtk_event_box_new ();
@@ -4479,42 +4479,42 @@ xg_make_tool_item (struct frame *f,
gpointer gi = (gpointer) ii;
g_signal_connect (G_OBJECT (wb), "clicked",
- G_CALLBACK (xg_tool_bar_callback),
- gi);
+ G_CALLBACK (xg_tool_bar_callback),
+ gi);
g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f);
#ifndef HAVE_GTK3
/* Catch expose events to overcome an annoying redraw bug, see
- comment for xg_tool_bar_item_expose_callback. */
+ comment for xg_tool_bar_item_expose_callback. */
g_signal_connect (G_OBJECT (ti),
- "expose-event",
- G_CALLBACK (xg_tool_bar_item_expose_callback),
- 0);
+ "expose-event",
+ G_CALLBACK (xg_tool_bar_item_expose_callback),
+ 0);
#endif
gtk_tool_item_set_homogeneous (ti, FALSE);
/* Callback to save modifier mask (Shift/Control, etc). GTK makes
- no distinction based on modifiers in the activate callback,
- so we have to do it ourselves. */
+ no distinction based on modifiers in the activate callback,
+ so we have to do it ourselves. */
g_signal_connect (wb, "button-release-event",
- G_CALLBACK (xg_tool_bar_button_cb),
- NULL);
+ G_CALLBACK (xg_tool_bar_button_cb),
+ NULL);
g_object_set_data (G_OBJECT (wb), XG_FRAME_DATA, (gpointer)f);
/* Use enter/leave notify to show help. We use the events
- rather than the GtkButton specific signals "enter" and
- "leave", so we can have only one callback. The event
- will tell us what kind of event it is. */
+ rather than the GtkButton specific signals "enter" and
+ "leave", so we can have only one callback. The event
+ will tell us what kind of event it is. */
g_signal_connect (G_OBJECT (weventbox),
- "enter-notify-event",
- G_CALLBACK (xg_tool_bar_help_callback),
- gi);
+ "enter-notify-event",
+ G_CALLBACK (xg_tool_bar_help_callback),
+ gi);
g_signal_connect (G_OBJECT (weventbox),
- "leave-notify-event",
- G_CALLBACK (xg_tool_bar_help_callback),
- gi);
+ "leave-notify-event",
+ G_CALLBACK (xg_tool_bar_help_callback),
+ gi);
}
if (wbutton) *wbutton = wb;
@@ -4531,7 +4531,7 @@ is_box_type (GtkWidget *vb, bool is_horizontal)
{
GtkOrientation ori = gtk_orientable_get_orientation (GTK_ORIENTABLE (vb));
ret = (ori == GTK_ORIENTATION_HORIZONTAL && is_horizontal)
- || (ori == GTK_ORIENTATION_VERTICAL && ! is_horizontal);
+ || (ori == GTK_ORIENTATION_VERTICAL && ! is_horizontal);
}
return ret;
#else
@@ -4568,7 +4568,7 @@ xg_tool_item_stale_p (GtkWidget *wbutton, const char *stock_name,
else if (wimage)
{
gpointer gold_img = g_object_get_data (G_OBJECT (wimage),
- XG_TOOL_BAR_IMAGE_DATA);
+ XG_TOOL_BAR_IMAGE_DATA);
Pixmap old_img = (Pixmap) gold_img;
if (old_img != img->pixmap)
return 1;
@@ -4598,8 +4598,8 @@ xg_update_tool_bar_sizes (struct frame *f)
{
int pos;
gtk_container_child_get (GTK_CONTAINER (x->hbox_widget),
- top_widget,
- "position", &pos, NULL);
+ top_widget,
+ "position", &pos, NULL);
if (pos == 0) nl = req.width;
else nr = req.width;
}
@@ -4607,8 +4607,8 @@ xg_update_tool_bar_sizes (struct frame *f)
{
int pos;
gtk_container_child_get (GTK_CONTAINER (x->vbox_widget),
- top_widget,
- "position", &pos, NULL);
+ top_widget,
+ "position", &pos, NULL);
if (pos == 0 || (pos == 1 && x->menubar_widget)) nt = req.height;
else nb = req.height;
}
@@ -4619,7 +4619,7 @@ xg_update_tool_bar_sizes (struct frame *f)
|| nb != FRAME_TOOLBAR_BOTTOM_HEIGHT (f))
{
FRAME_TOOLBAR_RIGHT_WIDTH (f) = FRAME_TOOLBAR_LEFT_WIDTH (f)
- = FRAME_TOOLBAR_TOP_HEIGHT (f) = FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = 0;
+ = FRAME_TOOLBAR_TOP_HEIGHT (f) = FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = 0;
FRAME_TOOLBAR_LEFT_WIDTH (f) = nl;
FRAME_TOOLBAR_RIGHT_WIDTH (f) = nr;
FRAME_TOOLBAR_TOP_HEIGHT (f) = nt;
@@ -4633,8 +4633,8 @@ xg_update_tool_bar_sizes (struct frame *f)
static char *
find_icon_from_name (char *name,
- GtkIconTheme *icon_theme,
- char **icon_name)
+ GtkIconTheme *icon_theme,
+ char **icon_name)
{
#if ! GTK_CHECK_VERSION (3, 10, 0)
GtkStockItem stock_item;
@@ -4646,7 +4646,7 @@ find_icon_from_name (char *name,
name = NULL;
if (! gtk_icon_theme_has_icon (icon_theme, *icon_name))
- *icon_name = NULL;
+ *icon_name = NULL;
}
#if ! GTK_CHECK_VERSION (3, 10, 0)
@@ -4699,10 +4699,10 @@ update_frame_tool_bar (struct frame *f)
else if (CONSP (Vtool_bar_button_margin))
{
if (RANGED_INTEGERP (1, XCAR (Vtool_bar_button_margin), INT_MAX))
- hmargin = XFASTINT (XCAR (Vtool_bar_button_margin));
+ hmargin = XFASTINT (XCAR (Vtool_bar_button_margin));
if (RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
- vmargin = XFASTINT (XCDR (Vtool_bar_button_margin));
+ vmargin = XFASTINT (XCDR (Vtool_bar_button_margin));
}
/* The natural size (i.e. when GTK uses 0 as margin) looks best,
@@ -4724,7 +4724,7 @@ update_frame_tool_bar (struct frame *f)
/* Are we up to date? */
tbinfo = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY);
+ TB_INFO_KEY);
if (! NILP (tbinfo->last_tool_bar) && ! NILP (f->tool_bar_items)
&& tbinfo->n_last_items == f->n_tool_bar_items
@@ -4799,78 +4799,78 @@ update_frame_tool_bar (struct frame *f)
/* Ignore invalid image specifications. */
image = PROP (TOOL_BAR_ITEM_IMAGES);
if (!valid_image_p (image))
- {
- if (ti)
+ {
+ if (ti)
gtk_container_remove (GTK_CONTAINER (wtoolbar),
GTK_WIDGET (ti));
- continue;
- }
+ continue;
+ }
specified_file = file_for_image (image);
if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock)))
- stock = call1 (Qx_gtk_map_stock, specified_file);
+ stock = call1 (Qx_gtk_map_stock, specified_file);
if (CONSP (stock))
- {
- Lisp_Object tem;
- for (tem = stock; CONSP (tem); tem = XCDR (tem))
- if (! NILP (tem) && STRINGP (XCAR (tem)))
- {
- stock_name = find_icon_from_name (SSDATA (XCAR (tem)),
- icon_theme,
- &icon_name);
- if (stock_name || icon_name) break;
- }
- }
+ {
+ Lisp_Object tem;
+ for (tem = stock; CONSP (tem); tem = XCDR (tem))
+ if (! NILP (tem) && STRINGP (XCAR (tem)))
+ {
+ stock_name = find_icon_from_name (SSDATA (XCAR (tem)),
+ icon_theme,
+ &icon_name);
+ if (stock_name || icon_name) break;
+ }
+ }
else if (STRINGP (stock))
- {
- stock_name = find_icon_from_name (SSDATA (stock),
- icon_theme,
- &icon_name);
- }
+ {
+ stock_name = find_icon_from_name (SSDATA (stock),
+ icon_theme,
+ &icon_name);
+ }
if (stock_name || icon_name)
- icon_size = gtk_toolbar_get_icon_size (wtoolbar);
+ icon_size = gtk_toolbar_get_icon_size (wtoolbar);
if (stock_name == NULL && icon_name == NULL)
- {
- /* No stock image, or stock item not known. Try regular
- image. If image is a vector, choose it according to the
- button state. */
- if (dir == GTK_TEXT_DIR_RTL
- && !NILP (rtl = PROP (TOOL_BAR_ITEM_RTL_IMAGE))
- && STRINGP (rtl))
+ {
+ /* No stock image, or stock item not known. Try regular
+ image. If image is a vector, choose it according to the
+ button state. */
+ if (dir == GTK_TEXT_DIR_RTL
+ && !NILP (rtl = PROP (TOOL_BAR_ITEM_RTL_IMAGE))
+ && STRINGP (rtl))
image = find_rtl_image (f, image, rtl);
- if (VECTORP (image))
- {
- if (enabled_p)
- idx = (selected_p
- ? TOOL_BAR_IMAGE_ENABLED_SELECTED
- : TOOL_BAR_IMAGE_ENABLED_DESELECTED);
- else
- idx = (selected_p
- ? TOOL_BAR_IMAGE_DISABLED_SELECTED
- : TOOL_BAR_IMAGE_DISABLED_DESELECTED);
-
- eassert (ASIZE (image) >= idx);
- image = AREF (image, idx);
- }
- else
- idx = -1;
-
- img_id = lookup_image (f, image);
- img = IMAGE_FROM_ID (f, img_id);
- prepare_image_for_display (f, img);
-
- if (img->load_failed_p || img->pixmap == None)
- {
- if (ti)
+ if (VECTORP (image))
+ {
+ if (enabled_p)
+ idx = (selected_p
+ ? TOOL_BAR_IMAGE_ENABLED_SELECTED
+ : TOOL_BAR_IMAGE_ENABLED_DESELECTED);
+ else
+ idx = (selected_p
+ ? TOOL_BAR_IMAGE_DISABLED_SELECTED
+ : TOOL_BAR_IMAGE_DISABLED_DESELECTED);
+
+ eassert (ASIZE (image) >= idx);
+ image = AREF (image, idx);
+ }
+ else
+ idx = -1;
+
+ img_id = lookup_image (f, image);
+ img = IMAGE_FROM_ID (f, img_id);
+ prepare_image_for_display (f, img);
+
+ if (img->load_failed_p || img->pixmap == None)
+ {
+ if (ti)
gtk_container_remove (GTK_CONTAINER (wtoolbar),
GTK_WIDGET (ti));
- continue;
- }
- }
+ continue;
+ }
+ }
/* If there is an existing widget, check if it's stale; if so,
remove it and make a new tool item from scratch. */
@@ -4883,53 +4883,53 @@ update_frame_tool_bar (struct frame *f)
}
if (ti == NULL)
- {
- GtkWidget *w;
+ {
+ GtkWidget *w;
/* Save the image so we can see if an update is needed the
next time we call xg_tool_item_match_p. */
if (EQ (style, Qtext))
w = NULL;
else if (stock_name)
- {
+ {
#if GTK_CHECK_VERSION (3, 10, 0)
- w = gtk_image_new_from_icon_name (stock_name, icon_size);
+ w = gtk_image_new_from_icon_name (stock_name, icon_size);
#else
- w = gtk_image_new_from_stock (stock_name, icon_size);
+ w = gtk_image_new_from_stock (stock_name, icon_size);
#endif
- g_object_set_data_full (G_OBJECT (w), XG_TOOL_BAR_STOCK_NAME,
- (gpointer) xstrdup (stock_name),
- (GDestroyNotify) xfree);
- }
- else if (icon_name)
- {
- w = gtk_image_new_from_icon_name (icon_name, icon_size);
- g_object_set_data_full (G_OBJECT (w), XG_TOOL_BAR_ICON_NAME,
- (gpointer) xstrdup (icon_name),
- (GDestroyNotify) xfree);
- }
- else
- {
- w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
- g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
- (gpointer)img->pixmap);
- }
+ g_object_set_data_full (G_OBJECT (w), XG_TOOL_BAR_STOCK_NAME,
+ (gpointer) xstrdup (stock_name),
+ (GDestroyNotify) xfree);
+ }
+ else if (icon_name)
+ {
+ w = gtk_image_new_from_icon_name (icon_name, icon_size);
+ g_object_set_data_full (G_OBJECT (w), XG_TOOL_BAR_ICON_NAME,
+ (gpointer) xstrdup (icon_name),
+ (GDestroyNotify) xfree);
+ }
+ else
+ {
+ w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
+ g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
+ (gpointer)img->pixmap);
+ }
#if GTK_CHECK_VERSION (3, 14, 0)
- if (w)
- {
- gtk_widget_set_margin_start (w, hmargin);
- gtk_widget_set_margin_end (w, hmargin);
- gtk_widget_set_margin_top (w, vmargin);
- gtk_widget_set_margin_bottom (w, vmargin);
- }
+ if (w)
+ {
+ gtk_widget_set_margin_start (w, hmargin);
+ gtk_widget_set_margin_end (w, hmargin);
+ gtk_widget_set_margin_top (w, vmargin);
+ gtk_widget_set_margin_bottom (w, vmargin);
+ }
#else
if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
#endif
- ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image);
- gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
- }
+ ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image);
+ gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
+ }
#undef PROP
@@ -4948,7 +4948,7 @@ update_frame_tool_bar (struct frame *f)
if (f->n_tool_bar_items != 0)
{
if (! x->toolbar_is_packed)
- xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f));
+ xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f));
gtk_widget_show_all (x->toolbar_widget);
if (xg_update_tool_bar_sizes (f))
{
@@ -4989,16 +4989,16 @@ free_frame_tool_bar (struct frame *f)
block_input ();
if (x->toolbar_is_packed)
- {
- if (x->toolbar_in_hbox)
- gtk_container_remove (GTK_CONTAINER (x->hbox_widget),
- top_widget);
- else
- gtk_container_remove (GTK_CONTAINER (x->vbox_widget),
- top_widget);
- }
+ {
+ if (x->toolbar_in_hbox)
+ gtk_container_remove (GTK_CONTAINER (x->hbox_widget),
+ top_widget);
+ else
+ gtk_container_remove (GTK_CONTAINER (x->vbox_widget),
+ top_widget);
+ }
else
- gtk_widget_destroy (x->toolbar_widget);
+ gtk_widget_destroy (x->toolbar_widget);
x->toolbar_widget = 0;
x->toolbar_widget = 0;
@@ -5007,14 +5007,14 @@ free_frame_tool_bar (struct frame *f)
FRAME_TOOLBAR_LEFT_WIDTH (f) = FRAME_TOOLBAR_RIGHT_WIDTH (f) = 0;
tbinfo = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY);
+ TB_INFO_KEY);
if (tbinfo)
- {
- xfree (tbinfo);
- g_object_set_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
- TB_INFO_KEY,
- NULL);
- }
+ {
+ xfree (tbinfo);
+ g_object_set_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)),
+ TB_INFO_KEY,
+ NULL);
+ }
frame_size_history_add (f, Qfree_frame_tool_bar, 0, 0, Qnil);
adjust_frame_size (f, -1, -1, 2, 0, Qtool_bar_lines);
@@ -5037,11 +5037,11 @@ xg_change_toolbar_position (struct frame *f, Lisp_Object pos)
if (x->toolbar_is_packed)
{
if (x->toolbar_in_hbox)
- gtk_container_remove (GTK_CONTAINER (x->hbox_widget),
- top_widget);
+ gtk_container_remove (GTK_CONTAINER (x->hbox_widget),
+ top_widget);
else
- gtk_container_remove (GTK_CONTAINER (x->vbox_widget),
- top_widget);
+ gtk_container_remove (GTK_CONTAINER (x->vbox_widget),
+ top_widget);
}
xg_pack_tool_bar (f, pos);
@@ -5060,7 +5060,7 @@ xg_change_toolbar_position (struct frame *f, Lisp_Object pos)
\f
/***********************************************************************
- Initializing
+ Initializing
***********************************************************************/
void
xg_initialize (void)
@@ -5083,33 +5083,33 @@ xg_initialize (void)
id_to_widget.widgets = 0;
settings = gtk_settings_get_for_screen (gdk_display_get_default_screen
- (gdk_display_get_default ()));
+ (gdk_display_get_default ()));
/* Remove F10 as a menu accelerator, it does not mix well with Emacs key
bindings. It doesn't seem to be any way to remove properties,
so we set it to "" which in means "no key". */
gtk_settings_set_string_property (settings,
- "gtk-menu-bar-accel",
- "",
- EMACS_CLASS);
+ "gtk-menu-bar-accel",
+ "",
+ EMACS_CLASS);
/* Make GTK text input widgets use Emacs style keybindings. This is
Emacs after all. */
gtk_settings_set_string_property (settings,
- "gtk-key-theme-name",
- "Emacs",
- EMACS_CLASS);
+ "gtk-key-theme-name",
+ "Emacs",
+ EMACS_CLASS);
/* Make dialogs close on C-g. Since file dialog inherits from
dialog, this works for them also. */
binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_DIALOG));
gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
- "close", 0);
+ "close", 0);
/* Make menus close on C-g. */
binding_set = gtk_binding_set_by_class (g_type_class_ref
- (GTK_TYPE_MENU_SHELL));
+ (GTK_TYPE_MENU_SHELL));
gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
- "cancel", 0);
+ "cancel", 0);
update_theme_scrollbar_width ();
update_theme_scrollbar_height ();
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 8840fe7..a16188f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -80,28 +80,28 @@ typedef struct xg_menu_item_cb_data_
extern bool xg_uses_old_file_dialog (void);
extern char *xg_get_file_name (struct frame *f,
- char *prompt,
- char *default_filename,
- bool mustmatch_p,
- bool only_dir_p);
+ char *prompt,
+ char *default_filename,
+ bool mustmatch_p,
+ bool only_dir_p);
extern Lisp_Object xg_get_font (struct frame *f, const char *);
extern GtkWidget *xg_create_widget (const char *type,
- const char *name,
- struct frame *f,
- struct _widget_value *val,
- GCallback select_cb,
- GCallback deactivate_cb,
- GCallback highlight_cb);
+ const char *name,
+ struct frame *f,
+ struct _widget_value *val,
+ GCallback select_cb,
+ GCallback deactivate_cb,
+ GCallback highlight_cb);
extern void xg_modify_menubar_widgets (GtkWidget *menubar,
- struct frame *f,
- struct _widget_value *val,
- bool deep_p,
- GCallback select_cb,
- GCallback deactivate_cb,
- GCallback highlight_cb);
+ struct frame *f,
+ struct _widget_value *val,
+ bool deep_p,
+ GCallback select_cb,
+ GCallback deactivate_cb,
+ GCallback highlight_cb);
extern void xg_update_frame_menubar (struct frame *f);
@@ -110,10 +110,10 @@ extern bool xg_event_is_for_menubar (struct frame *, const XEvent *);
extern ptrdiff_t xg_get_scroll_id_for_window (Display *dpy, Window wid);
extern void xg_create_scroll_bar (struct frame *f,
- struct scroll_bar *bar,
- GCallback scroll_callback,
- GCallback end_callback,
- const char *scroll_bar_name);
+ struct scroll_bar *bar,
+ GCallback scroll_callback,
+ GCallback end_callback,
+ const char *scroll_bar_name);
extern void xg_create_horizontal_scroll_bar (struct frame *f,
struct scroll_bar *bar,
GCallback scroll_callback,
@@ -122,11 +122,11 @@ extern void xg_create_horizontal_scroll_bar (struct frame *f,
extern void xg_remove_scroll_bar (struct frame *f, ptrdiff_t scrollbar_id);
extern void xg_update_scrollbar_pos (struct frame *f,
- ptrdiff_t scrollbar_id,
- int top,
- int left,
- int width,
- int height);
+ ptrdiff_t scrollbar_id,
+ int top,
+ int left,
+ int width,
+ int height);
extern void xg_update_horizontal_scrollbar_pos (struct frame *f,
ptrdiff_t scrollbar_id,
int top,
@@ -135,9 +135,9 @@ extern void xg_update_horizontal_scrollbar_pos (struct frame *f,
int height);
extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
- int portion,
- int position,
- int whole);
+ int portion,
+ int position,
+ int whole);
extern void xg_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar,
int portion,
int position,
@@ -152,8 +152,8 @@ extern void xg_change_toolbar_position (struct frame *f, Lisp_Object pos);
extern void xg_clear_under_internal_border (struct frame *f);
extern void xg_frame_resized (struct frame *f,
- int pixelwidth,
- int pixelheight);
+ int pixelwidth,
+ int pixelheight);
extern void xg_frame_set_char_size (struct frame *f, int width, int height);
extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc);
@@ -169,8 +169,8 @@ extern bool xg_check_special_colors (struct frame *f,
XColor *color);
extern void xg_set_frame_icon (struct frame *f,
- Pixmap icon_pixmap,
- Pixmap icon_mask);
+ Pixmap icon_pixmap,
+ Pixmap icon_mask);
extern bool xg_prepare_tooltip (struct frame *f,
Lisp_Object string,
diff --git a/src/image.c b/src/image.c
index 45010e7..0ff2548 100644
--- a/src/image.c
+++ b/src/image.c
@@ -111,7 +111,7 @@ typedef struct ns_bitmap_record Bitmap_Record;
static void x_disable_image (struct frame *, struct image *);
static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
static void init_color_table (void);
static unsigned long lookup_rgb_color (struct frame *f, int r, int g, int b);
@@ -433,9 +433,9 @@ static void image_sync_to_pixmaps (struct frame *, struct image *);
`Image type independent image structures' below. */
static unsigned long four_corners_best (XImagePtr ximg,
- int *corners,
- unsigned long width,
- unsigned long height);
+ int *corners,
+ unsigned long width,
+ unsigned long height);
/* Create a mask of a bitmap. Note is this not a perfect mask.
@@ -535,7 +535,7 @@ static struct image_type *lookup_image_type (Lisp_Object);
static void x_laplace (struct frame *, struct image *);
static void x_emboss (struct frame *, struct image *);
static void x_build_heuristic_mask (struct frame *, struct image *,
- Lisp_Object);
+ Lisp_Object);
#ifdef WINDOWSNT
#define CACHE_IMAGE_TYPE(type, status) \
do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0)
@@ -582,7 +582,7 @@ define_image_type (struct image_type *type)
if (type_valid)
{
/* Make a copy of TYPE to avoid a bus error in a dumped Emacs.
- The initialized data segment is read-only. */
+ The initialized data segment is read-only. */
p = xmalloc (sizeof *p);
*p = *type;
p->next = image_types;
@@ -984,7 +984,7 @@ free_image (struct frame *f, struct image *img)
c->images[img->id] = NULL;
/* Windows NT redefines 'free', but in this file, we need to
- avoid the redefinition. */
+ avoid the redefinition. */
#ifdef WINDOWSNT
#undef free
#endif
@@ -1081,7 +1081,7 @@ image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
uppercase letters), so the image placement should err towards
being top-heavy too. It also just generally looks better. */
ascent = (height + FONT_BASE (face->font)
- - FONT_DESCENT (face->font) + 1) / 2;
+ - FONT_DESCENT (face->font) + 1) / 2;
#endif /* HAVE_NTGUI */
}
else
@@ -1103,7 +1103,7 @@ xcolor_to_argb32 (XColor xc)
static uint32_t
get_spec_bg_or_alpha_as_argb (struct image *img,
- struct frame *f)
+ struct frame *f)
{
uint32_t bgcolor = 0;
XColor xbgcolor;
@@ -1117,18 +1117,18 @@ get_spec_bg_or_alpha_as_argb (struct image *img,
static void
create_cairo_image_surface (struct image *img,
- unsigned char *data,
- int width,
- int height)
+ unsigned char *data,
+ int width,
+ int height)
{
cairo_surface_t *surface;
cairo_format_t format = CAIRO_FORMAT_ARGB32;
int stride = cairo_format_stride_for_width (format, width);
surface = cairo_image_surface_create_for_data (data,
- format,
- width,
- height,
- stride);
+ format,
+ width,
+ height,
+ stride);
img->width = width;
img->height = height;
img->cr_data = surface;
@@ -2743,7 +2743,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data,
img->pixmap =
(x_check_image_size (0, img->width, img->height)
? XCreatePixmapFromBitmapData (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
+ FRAME_X_DRAWABLE (f),
data,
img->width, img->height,
fg, bg,
@@ -3105,16 +3105,16 @@ xbm_load (struct frame *f, struct image *img)
bits = (char *) bool_vector_data (data);
#ifdef HAVE_NTGUI
- {
- char *invertedBits;
- int nbytes, i;
- /* Windows mono bitmaps are reversed compared with X. */
- invertedBits = bits;
- nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT;
- SAFE_NALLOCA (bits, nbytes, img->height);
- for (i = 0; i < nbytes; i++)
- bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
- }
+ {
+ char *invertedBits;
+ int nbytes, i;
+ /* Windows mono bitmaps are reversed compared with X. */
+ invertedBits = bits;
+ nbytes = (img->width + CHAR_BIT - 1) / CHAR_BIT;
+ SAFE_NALLOCA (bits, nbytes, img->height);
+ for (i = 0; i < nbytes; i++)
+ bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
+ }
#endif
/* Create the pixmap. */
@@ -3250,7 +3250,7 @@ static struct image_type xpm_type =
#ifdef ALLOC_XPM_COLORS
static struct xpm_cached_color *xpm_cache_color (struct frame *, char *,
- XColor *, int);
+ XColor *, int);
/* An entry in a hash table used to cache color definitions of named
colors. This cache is necessary to speed up XPM image loading in
@@ -3735,18 +3735,18 @@ xpm_load (struct frame *f, struct image *img)
uint32_t bgcolor = get_spec_bg_or_alpha_as_argb (img, f);
for (i = 0; i < height; ++i)
- {
- int k;
- for (k = 0; k < width; ++k)
- {
- int idx = i * img->ximg->bytes_per_line/4 + k;
- int maskidx = mid ? i * img->mask_img->bytes_per_line + k/8 : 0;
- int mask = mid ? mid[maskidx] & (1 << (k % 8)) : 1;
-
- if (mask) od[idx] = id[idx] + 0xff000000; /* ff => full alpha */
- else od[idx] = bgcolor;
- }
- }
+ {
+ int k;
+ for (k = 0; k < width; ++k)
+ {
+ int idx = i * img->ximg->bytes_per_line/4 + k;
+ int maskidx = mid ? i * img->mask_img->bytes_per_line + k/8 : 0;
+ int mask = mid ? mid[maskidx] & (1 << (k % 8)) : 1;
+
+ if (mask) od[idx] = id[idx] + 0xff000000; /* ff => full alpha */
+ else od[idx] = bgcolor;
+ }
+ }
create_cairo_image_surface (img, data, width, height);
}
@@ -3769,7 +3769,7 @@ xpm_load (struct frame *f, struct image *img)
}
else if (img->mask_img)
{
- img->mask = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
+ img->mask = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_DRAWABLE (f),
img->mask_img->width,
img->mask_img->height,
img->mask_img->depth);
@@ -3892,10 +3892,10 @@ xpm_load (struct frame *f, struct image *img)
Only XPM version 3 (without any extensions) is supported. */
static void xpm_put_color_table_v (Lisp_Object, const char *,
- int, Lisp_Object);
+ int, Lisp_Object);
static Lisp_Object xpm_get_color_table_v (Lisp_Object, const char *, int);
static void xpm_put_color_table_h (Lisp_Object, const char *,
- int, Lisp_Object);
+ int, Lisp_Object);
static Lisp_Object xpm_get_color_table_h (Lisp_Object, const char *, int);
/* Tokens returned from xpm_scan. */
@@ -3981,9 +3981,9 @@ xpm_scan (const char **s, const char *end, const char **beg, ptrdiff_t *len)
static Lisp_Object
xpm_make_color_table_v (void (**put_func) (Lisp_Object, const char *, int,
- Lisp_Object),
- Lisp_Object (**get_func) (Lisp_Object, const char *,
- int))
+ Lisp_Object),
+ Lisp_Object (**get_func) (Lisp_Object, const char *,
+ int))
{
*put_func = xpm_put_color_table_v;
*get_func = xpm_get_color_table_v;
@@ -3992,9 +3992,9 @@ xpm_make_color_table_v (void (**put_func) (Lisp_Object, const char *, int,
static void
xpm_put_color_table_v (Lisp_Object color_table,
- const char *chars_start,
- int chars_len,
- Lisp_Object color)
+ const char *chars_start,
+ int chars_len,
+ Lisp_Object color)
{
unsigned char uc = *chars_start;
ASET (color_table, uc, color);
@@ -4002,8 +4002,8 @@ xpm_put_color_table_v (Lisp_Object color_table,
static Lisp_Object
xpm_get_color_table_v (Lisp_Object color_table,
- const char *chars_start,
- int chars_len)
+ const char *chars_start,
+ int chars_len)
{
unsigned char uc = *chars_start;
return AREF (color_table, uc);
@@ -4011,9 +4011,9 @@ xpm_get_color_table_v (Lisp_Object color_table,
static Lisp_Object
xpm_make_color_table_h (void (**put_func) (Lisp_Object, const char *, int,
- Lisp_Object),
- Lisp_Object (**get_func) (Lisp_Object, const char *,
- int))
+ Lisp_Object),
+ Lisp_Object (**get_func) (Lisp_Object, const char *,
+ int))
{
*put_func = xpm_put_color_table_h;
*get_func = xpm_get_color_table_h;
@@ -4025,9 +4025,9 @@ xpm_make_color_table_h (void (**put_func) (Lisp_Object, const char *, int,
static void
xpm_put_color_table_h (Lisp_Object color_table,
- const char *chars_start,
- int chars_len,
- Lisp_Object color)
+ const char *chars_start,
+ int chars_len,
+ Lisp_Object color)
{
struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
EMACS_UINT hash_code;
@@ -4039,8 +4039,8 @@ xpm_put_color_table_h (Lisp_Object color_table,
static Lisp_Object
xpm_get_color_table_h (Lisp_Object color_table,
- const char *chars_start,
- int chars_len)
+ const char *chars_start,
+ int chars_len)
{
struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
ptrdiff_t i =
@@ -4072,9 +4072,9 @@ xpm_str_to_color_key (const char *s)
static bool
xpm_load_image (struct frame *f,
- struct image *img,
- const char *contents,
- const char *end)
+ struct image *img,
+ const char *contents,
+ const char *end)
{
const char *s = contents, *beg, *str;
char buffer[BUFSIZ];
@@ -4105,7 +4105,7 @@ xpm_load_image (struct frame *f,
#define expect_ident(IDENT) \
if (LA1 == XPM_TK_IDENT \
- && strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \
+ && strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \
match (); \
else \
goto failure
@@ -4262,8 +4262,8 @@ xpm_load_image (struct frame *f,
(!EQ (color_val, Qt) ? PIX_MASK_DRAW
: (have_mask = true, PIX_MASK_RETAIN)));
#else
- if (EQ (color_val, Qt))
- ns_set_alpha (ximg, x, y, 0);
+ if (EQ (color_val, Qt))
+ ns_set_alpha (ximg, x, y, 0);
#endif
}
if (y + 1 < height)
@@ -4309,7 +4309,7 @@ xpm_load_image (struct frame *f,
static bool
xpm_load (struct frame *f,
- struct image *img)
+ struct image *img)
{
bool success_p = 0;
Lisp_Object file_name;
@@ -4639,16 +4639,16 @@ init_color_table (void)
static int emboss_matrix[9] = {
/* x - 1 x x + 1 */
- 2, -1, 0, /* y - 1 */
+ 2, -1, 0, /* y - 1 */
-1, 0, 1, /* y */
- 0, 1, -2 /* y + 1 */
+ 0, 1, -2 /* y + 1 */
};
static int laplace_matrix[9] = {
/* x - 1 x x + 1 */
- 1, 0, 0, /* y - 1 */
- 0, 0, 0, /* y */
- 0, 0, -1 /* y + 1 */
+ 1, 0, 0, /* y - 1 */
+ 0, 0, 0, /* y */
+ 0, 0, -1 /* y + 1 */
};
/* Value is the intensity of the color whose red/green/blue values
@@ -4851,8 +4851,8 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus
for (yy = y - 1; yy < y + 2; ++yy)
for (xx = x - 1; xx < x + 2; ++xx, ++i)
if (matrix[i])
- {
- XColor *t = COLOR (colors, xx, yy);
+ {
+ XColor *t = COLOR (colors, xx, yy);
r += matrix[i] * t->red;
g += matrix[i] * t->green;
b += matrix[i] * t->blue;
@@ -5112,7 +5112,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
? PIX_MASK_DRAW : PIX_MASK_RETAIN));
#else
if (XGetPixel (ximg, x, y) == bg)
- ns_set_alpha (ximg, x, y, 0);
+ ns_set_alpha (ximg, x, y, 0);
#endif /* HAVE_NS */
#ifndef HAVE_NS
/* Fill in the background_transparent field while we have the mask handy. */
@@ -5259,7 +5259,7 @@ pbm_scan_number (char **s, char *end)
/* Read decimal number. */
val = c - '0';
while ((c = pbm_next_char (s, end)) != -1 && c_isdigit (c))
- val = 10 * val + c - '0';
+ val = 10 * val + c - '0';
}
return val;
@@ -5411,20 +5411,20 @@ pbm_load (struct frame *f, struct image *img)
/* Get foreground and background colors, maybe allocate colors. */
#ifdef USE_CAIRO
if (! fmt[PBM_FOREGROUND].count
- || ! STRINGP (fmt[PBM_FOREGROUND].value)
- || ! x_defined_color (f, SSDATA (fmt[PBM_FOREGROUND].value), &xfg, 0))
- {
- xfg.pixel = fg;
- x_query_color (f, &xfg);
- }
+ || ! STRINGP (fmt[PBM_FOREGROUND].value)
+ || ! x_defined_color (f, SSDATA (fmt[PBM_FOREGROUND].value), &xfg, 0))
+ {
+ xfg.pixel = fg;
+ x_query_color (f, &xfg);
+ }
fga32 = xcolor_to_argb32 (xfg);
if (! fmt[PBM_BACKGROUND].count
- || ! STRINGP (fmt[PBM_BACKGROUND].value)
- || ! x_defined_color (f, SSDATA (fmt[PBM_BACKGROUND].value), &xbg, 0))
+ || ! STRINGP (fmt[PBM_BACKGROUND].value)
+ || ! x_defined_color (f, SSDATA (fmt[PBM_BACKGROUND].value), &xbg, 0))
{
- xbg.pixel = bg;
- x_query_color (f, &xbg);
+ xbg.pixel = bg;
+ x_query_color (f, &xbg);
}
bga32 = xcolor_to_argb32 (xbg);
#else
@@ -5450,7 +5450,7 @@ pbm_load (struct frame *f, struct image *img)
if (p >= end)
{
#ifdef USE_CAIRO
- xfree (data);
+ xfree (data);
#else
x_destroy_x_image (ximg);
#endif
@@ -5468,7 +5468,7 @@ pbm_load (struct frame *f, struct image *img)
g = pbm_scan_number (&p, end);
#ifdef USE_CAIRO
- *dataptr++ = g ? fga32 : bga32;
+ *dataptr++ = g ? fga32 : bga32;
#else
XPutPixel (ximg, x, y, g ? fg : bg);
#endif
@@ -5485,7 +5485,7 @@ pbm_load (struct frame *f, struct image *img)
if (raw_p && p + expected_size > end)
{
#ifdef USE_CAIRO
- xfree (data);
+ xfree (data);
#else
x_destroy_x_image (ximg);
#endif
@@ -5529,7 +5529,7 @@ pbm_load (struct frame *f, struct image *img)
if (r < 0 || g < 0 || b < 0)
{
#ifdef USE_CAIRO
- xfree (data);
+ xfree (data);
#else
x_destroy_x_image (ximg);
#endif
@@ -5541,7 +5541,7 @@ pbm_load (struct frame *f, struct image *img)
r = (double) r * 255 / max_color_idx;
g = (double) g * 255 / max_color_idx;
b = (double) b * 255 / max_color_idx;
- *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
+ *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
#else
/* RGB values are now in the range 0..max_color_idx.
Scale this to the range 0..0xffff supported by X. */
@@ -6155,12 +6155,12 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
int r, g, b;
#ifdef USE_CAIRO
- int a = 0xff;
+ int a = 0xff;
r = *p++;
g = *p++;
b = *p++;
- if (channels == 4) a = *p++;
- *dataptr++ = (a << 24) | (r << 16) | (g << 8) | b;
+ if (channels == 4) a = *p++;
+ *dataptr++ = (a << 24) | (r << 16) | (g << 8) | b;
#else
r = *p++ << 8;
g = *p++ << 8;
@@ -6255,8 +6255,8 @@ static bool
png_load (struct frame *f, struct image *img)
{
return ns_load_image (f, img,
- image_spec_value (img->spec, QCfile, NULL),
- image_spec_value (img->spec, QCdata, NULL));
+ image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCdata, NULL));
}
@@ -6582,15 +6582,15 @@ our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
bytes = fread (src->buffer, 1, JPEG_STDIO_BUFFER_SIZE, src->file);
if (bytes > 0)
- src->mgr.bytes_in_buffer = bytes;
+ src->mgr.bytes_in_buffer = bytes;
else
- {
- WARNMS (cinfo, JWRN_JPEG_EOF);
- src->finished = 1;
- src->buffer[0] = (JOCTET) 0xFF;
- src->buffer[1] = (JOCTET) JPEG_EOI;
- src->mgr.bytes_in_buffer = 2;
- }
+ {
+ WARNMS (cinfo, JWRN_JPEG_EOF);
+ src->finished = 1;
+ src->buffer[0] = (JOCTET) 0xFF;
+ src->buffer[1] = (JOCTET) JPEG_EOI;
+ src->mgr.bytes_in_buffer = 2;
+ }
src->mgr.next_input_byte = src->buffer;
}
@@ -6610,19 +6610,19 @@ our_stdio_skip_input_data (j_decompress_ptr cinfo, long int num_bytes)
while (num_bytes > 0 && !src->finished)
{
if (num_bytes <= src->mgr.bytes_in_buffer)
- {
- src->mgr.bytes_in_buffer -= num_bytes;
- src->mgr.next_input_byte += num_bytes;
- break;
- }
+ {
+ src->mgr.bytes_in_buffer -= num_bytes;
+ src->mgr.next_input_byte += num_bytes;
+ break;
+ }
else
- {
- num_bytes -= src->mgr.bytes_in_buffer;
- src->mgr.bytes_in_buffer = 0;
- src->mgr.next_input_byte = NULL;
+ {
+ num_bytes -= src->mgr.bytes_in_buffer;
+ src->mgr.bytes_in_buffer = 0;
+ src->mgr.next_input_byte = NULL;
- our_stdio_fill_input_buffer (cinfo);
- }
+ our_stdio_fill_input_buffer (cinfo);
+ }
}
}
@@ -6828,16 +6828,16 @@ jpeg_load_body (struct frame *f, struct image *img,
for (y = 0; y < height; ++y)
{
- jpeg_read_scanlines (&mgr->cinfo, buffer, 1);
-
- for (x = 0; x < width; ++x)
- {
- i = buffer[0][x];
- r = mgr->cinfo.colormap[ir][i];
- g = mgr->cinfo.colormap[ig][i];
- b = mgr->cinfo.colormap[ib][i];
- *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
- }
+ jpeg_read_scanlines (&mgr->cinfo, buffer, 1);
+
+ for (x = 0; x < width; ++x)
+ {
+ i = buffer[0][x];
+ r = mgr->cinfo.colormap[ir][i];
+ g = mgr->cinfo.colormap[ig][i];
+ b = mgr->cinfo.colormap[ib][i];
+ *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
+ }
}
create_cairo_image_surface (img, data, width, height);
@@ -7307,16 +7307,16 @@ tiff_load (struct frame *f, struct image *img)
for (y = 0; y < height; ++y)
{
- uint32 *row = buf + (height - 1 - y) * width;
- for (x = 0; x < width; ++x)
- {
- uint32 abgr = row[x];
- int r = TIFFGetR (abgr);
- int g = TIFFGetG (abgr);
- int b = TIFFGetB (abgr);
- int a = TIFFGetA (abgr);
- *dataptr++ = (a << 24) | (r << 16) | (g << 8) | b;
- }
+ uint32 *row = buf + (height - 1 - y) * width;
+ for (x = 0; x < width; ++x)
+ {
+ uint32 abgr = row[x];
+ int r = TIFFGetR (abgr);
+ int g = TIFFGetG (abgr);
+ int b = TIFFGetB (abgr);
+ int a = TIFFGetA (abgr);
+ *dataptr++ = (a << 24) | (r << 16) | (g << 8) | b;
+ }
}
create_cairo_image_surface (img, data, width, height);
@@ -7369,8 +7369,8 @@ static bool
tiff_load (struct frame *f, struct image *img)
{
return ns_load_image (f, img,
- image_spec_value (img->spec, QCfile, NULL),
- image_spec_value (img->spec, QCdata, NULL));
+ image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCdata, NULL));
}
#endif
@@ -7765,16 +7765,16 @@ gif_load (struct frame *f, struct image *img)
{
XColor color;
if (x_defined_color (f, SSDATA (specified_bg), &color, 0))
- {
- uint32_t *dataptr = data32;
- int r = color.red/256;
- int g = color.green/256;
- int b = color.blue/256;
-
- for (y = 0; y < height; ++y)
- for (x = 0; x < width; ++x)
- *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
- }
+ {
+ uint32_t *dataptr = data32;
+ int r = color.red/256;
+ int g = color.green/256;
+ int b = color.blue/256;
+
+ for (y = 0; y < height; ++y)
+ for (x = 0; x < width; ++x)
+ *dataptr++ = (0xffu << 24) | (r << 16) | (g << 8) | b;
+ }
}
#else
/* Create the X image and pixmap. */
@@ -7904,47 +7904,47 @@ gif_load (struct frame *f, struct image *img)
{
int c = raster[y * subimg_width + x];
if (transparency_color_index != c || disposal != 1)
- {
+ {
#ifdef USE_CAIRO
- uint32_t *dataptr =
- (data32 + ((row + subimg_top) * subimg_width
+ uint32_t *dataptr =
+ (data32 + ((row + subimg_top) * subimg_width
+ x + subimg_left));
- int r = gif_color_map->Colors[c].Red;
- int g = gif_color_map->Colors[c].Green;
- int b = gif_color_map->Colors[c].Blue;
+ int r = gif_color_map->Colors[c].Red;
+ int g = gif_color_map->Colors[c].Green;
+ int b = gif_color_map->Colors[c].Blue;
- if (transparency_color_index != c)
- *dataptr = (0xffu << 24) | (r << 16) | (g << 8) | b;
+ if (transparency_color_index != c)
+ *dataptr = (0xffu << 24) | (r << 16) | (g << 8) | b;
#else
- XPutPixel (ximg, x + subimg_left, row + subimg_top,
- pixel_colors[c]);
+ XPutPixel (ximg, x + subimg_left, row + subimg_top,
+ pixel_colors[c]);
#endif
- }
+ }
}
}
}
else
{
- for (y = 0; y < subimg_height; ++y)
+ for (y = 0; y < subimg_height; ++y)
for (x = 0; x < subimg_width; ++x)
{
int c = raster[y * subimg_width + x];
if (transparency_color_index != c || disposal != 1)
- {
+ {
#ifdef USE_CAIRO
- uint32_t *dataptr =
- (data32 + ((y + subimg_top) * subimg_width
+ uint32_t *dataptr =
+ (data32 + ((y + subimg_top) * subimg_width
+ x + subimg_left));
- int r = gif_color_map->Colors[c].Red;
- int g = gif_color_map->Colors[c].Green;
- int b = gif_color_map->Colors[c].Blue;
- if (transparency_color_index != c)
- *dataptr = (0xffu << 24) | (r << 16) | (g << 8) | b;
+ int r = gif_color_map->Colors[c].Red;
+ int g = gif_color_map->Colors[c].Green;
+ int b = gif_color_map->Colors[c].Blue;
+ if (transparency_color_index != c)
+ *dataptr = (0xffu << 24) | (r << 16) | (g << 8) | b;
#else
- XPutPixel (ximg, x + subimg_left, y + subimg_top,
- pixel_colors[c]);
+ XPutPixel (ximg, x + subimg_left, y + subimg_top,
+ pixel_colors[c]);
#endif
- }
+ }
}
}
}
@@ -8024,7 +8024,7 @@ static bool
gif_load (struct frame *f, struct image *img)
{
return ns_load_image (f, img,
- image_spec_value (img->spec, QCfile, NULL),
+ image_spec_value (img->spec, QCfile, NULL),
image_spec_value (img->spec, QCdata, NULL));
}
#endif /* HAVE_NS */
@@ -8219,7 +8219,7 @@ static struct image_type imagemagick_type =
static void
imagemagick_clear_image (struct frame *f,
- struct image *img)
+ struct image *img)
{
x_clear_image (f, img);
}
@@ -8365,9 +8365,9 @@ imagemagick_get_animation_cache (MagickWand *wand)
cache = *pcache;
if (! cache)
{
- *pcache = cache = imagemagick_create_cache (signature);
- break;
- }
+ *pcache = cache = imagemagick_create_cache (signature);
+ break;
+ }
if (strcmp (signature, cache->signature) == 0)
break;
pcache = &cache->next;
@@ -8567,9 +8567,9 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (NILP (image_spec_value (img->spec, QCrotation, NULL)))
if (MagickAutoOrientImage (image_wand) == MagickFalse)
{
- image_error ("Error applying automatic orientation in image `%s'", img->spec);
- DestroyMagickWand (image_wand);
- return 0;
+ image_error ("Error applying automatic orientation in image `%s'", img->spec);
+ DestroyMagickWand (image_wand);
+ return 0;
}
#endif
@@ -8583,14 +8583,14 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (MagickGetImageDelay (image_wand) > 0)
img->lisp_data =
Fcons (Qdelay,
- Fcons (make_float (MagickGetImageDelay (image_wand) / 100.0),
- img->lisp_data));
+ Fcons (make_float (MagickGetImageDelay (image_wand) / 100.0),
+ img->lisp_data));
if (MagickGetNumberImages (image_wand) > 1)
img->lisp_data =
Fcons (Qcount,
- Fcons (make_number (MagickGetNumberImages (image_wand)),
- img->lisp_data));
+ Fcons (make_number (MagickGetNumberImages (image_wand)),
+ img->lisp_data));
/* If we have an animated image, get the new wand based on the
"super-wand". */
@@ -8642,10 +8642,10 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (CONSP (crop) && TYPE_RANGED_INTEGERP (size_t, XCAR (crop)))
{
/* After some testing, it seems MagickCropImage is the fastest crop
- function in ImageMagick. This crop function seems to do less copying
- than the alternatives, but it still reads the entire image into memory
- before cropping, which is apparently difficult to avoid when using
- imagemagick. */
+ function in ImageMagick. This crop function seems to do less copying
+ than the alternatives, but it still reads the entire image into memory
+ before cropping, which is apparently difficult to avoid when using
+ imagemagick. */
size_t crop_width = XINT (XCAR (crop));
crop = XCDR (crop);
if (CONSP (crop) && TYPE_RANGED_INTEGERP (size_t, XCAR (crop)))
@@ -8678,11 +8678,11 @@ imagemagick_load_image (struct frame *f, struct image *img,
rotation = extract_float (value);
status = MagickRotateImage (image_wand, bg_wand, rotation);
if (status == MagickFalse)
- {
- image_error ("Imagemagick image rotate failed");
+ {
+ image_error ("Imagemagick image rotate failed");
imagemagick_error (image_wand);
- goto imagemagick_error;
- }
+ goto imagemagick_error;
+ }
}
/* Set the canvas background color to the frame or specified
@@ -8725,8 +8725,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (imagemagick_render_type != 0)
{
/* Magicexportimage is normally faster than pixelpushing. This
- method is also well tested. Some aspects of this method are
- ad-hoc and needs to be more researched. */
+ method is also well tested. Some aspects of this method are
+ ad-hoc and needs to be more researched. */
int imagedepth = 24; /*MagickGetImageDepth(image_wand);*/
const char *exportdepth = imagedepth <= 8 ? "I" : "BGRP"; /*"RGBP";*/
/* Try to create a x pixmap to hold the imagemagick pixmap. */
@@ -8753,11 +8753,11 @@ imagemagick_load_image (struct frame *f, struct image *img,
/* break; */
/* } */
/*
- Here im just guessing the format of the bitmap.
- happens to work fine for:
- - bw djvu images
- on rgb display.
- seems about 3 times as fast as pixel pushing(not carefully measured)
+ Here im just guessing the format of the bitmap.
+ happens to work fine for:
+ - bw djvu images
+ on rgb display.
+ seems about 3 times as fast as pixel pushing(not carefully measured)
*/
int pixelwidth = CharPixel; /*??? TODO figure out*/
MagickExportImagePixels (image_wand, 0, 0, width, height,
@@ -8772,48 +8772,48 @@ imagemagick_load_image (struct frame *f, struct image *img,
/* Try to create a x pixmap to hold the imagemagick pixmap. */
if (!image_create_x_image_and_pixmap (f, img, width, height, 0,
&ximg, 0))
- {
+ {
#ifdef COLOR_TABLE_SUPPORT
free_color_table ();
#endif
- image_error ("Imagemagick X bitmap allocation failure");
- goto imagemagick_error;
- }
+ image_error ("Imagemagick X bitmap allocation failure");
+ goto imagemagick_error;
+ }
/* Copy imagemagick image to x with primitive yet robust pixel
- pusher loop. This has been tested a lot with many different
- images. */
+ pusher loop. This has been tested a lot with many different
+ images. */
/* Copy pixels from the imagemagick image structure to the x image map. */
iterator = NewPixelIterator (image_wand);
if (! iterator)
- {
+ {
#ifdef COLOR_TABLE_SUPPORT
free_color_table ();
#endif
x_destroy_x_image (ximg);
- image_error ("Imagemagick pixel iterator creation failed");
- goto imagemagick_error;
- }
+ image_error ("Imagemagick pixel iterator creation failed");
+ goto imagemagick_error;
+ }
image_height = MagickGetImageHeight (image_wand);
for (y = 0; y < image_height; y++)
- {
+ {
size_t row_width;
pixels = PixelGetNextIteratorRow (iterator, &row_width);
- if (! pixels)
- break;
+ if (! pixels)
+ break;
int xlim = min (row_width, width);
for (x = 0; x < xlim; x++)
- {
- PixelGetMagickColor (pixels[x], &pixel);
- XPutPixel (ximg, x, y,
- lookup_rgb_color (f,
+ {
+ PixelGetMagickColor (pixels[x], &pixel);
+ XPutPixel (ximg, x, y,
+ lookup_rgb_color (f,
color_scale * pixel.red,
color_scale * pixel.green,
color_scale * pixel.blue));
- }
- }
+ }
+ }
DestroyPixelIterator (iterator);
}
@@ -8888,7 +8888,7 @@ imagemagick_load (struct frame *f, struct image *img)
return 0;
}
success_p = imagemagick_load_image (f, img, SDATA (data),
- SBYTES (data), NULL);
+ SBYTES (data), NULL);
}
return success_p;
@@ -9198,7 +9198,7 @@ svg_load (struct frame *f, struct image *img)
}
original_filename = BVAR (current_buffer, filename);
success_p = svg_load_image (f, img, SSDATA (data), SBYTES (data),
- (NILP (original_filename) ? NULL
+ (NILP (original_filename) ? NULL
: SSDATA (original_filename)));
}
@@ -9281,22 +9281,22 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
for (int y = 0; y < height; ++y)
{
- const guchar *iconptr = pixels + y * rowstride;
- uint32_t *dataptr = (uint32_t *) (data + y * rowstride);
-
- for (int x = 0; x < width; ++x)
- {
- if (iconptr[3] == 0)
- *dataptr = bgcolor;
- else
- *dataptr = (iconptr[0] << 16)
- | (iconptr[1] << 8)
- | iconptr[2]
- | (iconptr[3] << 24);
-
- iconptr += 4;
- ++dataptr;
- }
+ const guchar *iconptr = pixels + y * rowstride;
+ uint32_t *dataptr = (uint32_t *) (data + y * rowstride);
+
+ for (int x = 0; x < width; ++x)
+ {
+ if (iconptr[3] == 0)
+ *dataptr = bgcolor;
+ else
+ *dataptr = (iconptr[0] << 16)
+ | (iconptr[1] << 8)
+ | iconptr[2]
+ | (iconptr[3] << 24);
+
+ iconptr += 4;
+ ++dataptr;
+ }
}
create_cairo_image_surface (img, data, width, height);
@@ -9881,7 +9881,7 @@ non-numeric, there is no explicit limit on the size of images. */);
#else
make_number (-1)
#endif
- );
+ );
DEFSYM (Qlibjpeg_version, "libjpeg-version");
Fset (Qlibjpeg_version,
#if HAVE_JPEG
diff --git a/src/indent.c b/src/indent.c
index 29c9ffd..c7ae9fc 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -116,7 +116,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w
for (i = 0; i < 256; i++)
if (character_width (i, disptab)
- != XFASTINT (widthtab->contents[i]))
+ != XFASTINT (widthtab->contents[i]))
return 0;
return 1;
@@ -156,7 +156,7 @@ width_run_cache_on_off (void)
if (NILP (BVAR (current_buffer, cache_long_scans))
/* And, for the moment, this feature doesn't work on multibyte
- characters. */
+ characters. */
|| !NILP (BVAR (current_buffer, enable_multibyte_characters)))
{
if (!indirect_p
@@ -170,7 +170,7 @@ width_run_cache_on_off (void)
cache_buffer->width_run_cache = 0;
bset_width_table (current_buffer, Qnil);
}
- }
+ }
return NULL;
}
else
@@ -255,7 +255,7 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob
end = XFASTINT (tmp);
#if 0
/* Don't put the boundary in the middle of multibyte form if
- there is no actual property change. */
+ there is no actual property change. */
if (end == pos + 100
&& !NILP (current_buffer->enable_multibyte_characters)
&& end < ZV)
@@ -1305,20 +1305,20 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
j ^---- next after the point
^--- next char. after the point.
----------
- In case of sigle-column character
+ In case of sigle-column character
----------
abcdefgh\\
033 ^---- next after the point, next char. after the point.
----------
- In case of multi-column character
+ In case of multi-column character
----------
abcdefgh\\
W_ ^---- next after the point
^---- next char. after the point.
----------
- In case of wide-column character
+ In case of wide-column character
The problem here is continuation at a wide-column character.
In this case, the line may shorter less than WIDTH.
@@ -1345,7 +1345,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
|| !NILP (BVAR (current_buffer, truncate_lines)))
{
/* Truncating: skip to newline, unless we are already past
- TO (we need to go back below). */
+ TO (we need to go back below). */
if (pos <= to)
{
pos = find_before_next_newline (pos, to, 1, &pos_byte);
@@ -1443,54 +1443,54 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
wide_column_end_hpos = 0;
/* Consult the width run cache to see if we can avoid inspecting
- the text character-by-character. */
+ the text character-by-character. */
if (width_cache && pos >= next_width_run)
- {
- ptrdiff_t run_end;
- int common_width
- = region_cache_forward (cache_buffer, width_cache, pos, &run_end);
-
- /* A width of zero means the character's width varies (like
- a tab), is meaningless (like a newline), or we just don't
- want to skip over it for some other reason. */
- if (common_width != 0)
- {
- ptrdiff_t run_end_hpos;
-
- /* Don't go past the final buffer posn the user
- requested. */
- if (run_end > to)
- run_end = to;
-
- run_end_hpos = hpos + (run_end - pos) * common_width;
-
- /* Don't go past the final horizontal position the user
- requested. */
- if (vpos == tovpos && run_end_hpos > tohpos)
- {
- run_end = pos + (tohpos - hpos) / common_width;
- run_end_hpos = hpos + (run_end - pos) * common_width;
- }
-
- /* Don't go past the margin. */
- if (run_end_hpos >= width)
- {
- run_end = pos + (width - hpos) / common_width;
- run_end_hpos = hpos + (run_end - pos) * common_width;
- }
-
- hpos = run_end_hpos;
- if (run_end > pos)
- prev_hpos = hpos - common_width;
+ {
+ ptrdiff_t run_end;
+ int common_width
+ = region_cache_forward (cache_buffer, width_cache, pos, &run_end);
+
+ /* A width of zero means the character's width varies (like
+ a tab), is meaningless (like a newline), or we just don't
+ want to skip over it for some other reason. */
+ if (common_width != 0)
+ {
+ ptrdiff_t run_end_hpos;
+
+ /* Don't go past the final buffer posn the user
+ requested. */
+ if (run_end > to)
+ run_end = to;
+
+ run_end_hpos = hpos + (run_end - pos) * common_width;
+
+ /* Don't go past the final horizontal position the user
+ requested. */
+ if (vpos == tovpos && run_end_hpos > tohpos)
+ {
+ run_end = pos + (tohpos - hpos) / common_width;
+ run_end_hpos = hpos + (run_end - pos) * common_width;
+ }
+
+ /* Don't go past the margin. */
+ if (run_end_hpos >= width)
+ {
+ run_end = pos + (width - hpos) / common_width;
+ run_end_hpos = hpos + (run_end - pos) * common_width;
+ }
+
+ hpos = run_end_hpos;
+ if (run_end > pos)
+ prev_hpos = hpos - common_width;
if (pos != run_end)
{
pos = run_end;
pos_byte = CHAR_TO_BYTE (pos);
}
- }
+ }
- next_width_run = run_end + 1;
- }
+ next_width_run = run_end + 1;
+ }
/* We have to scan the text character-by-character. */
else
@@ -1605,7 +1605,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
}
while (pos < to
&& indented_beyond_p (pos, pos_byte,
- selective));
+ selective));
/* Allow for the " ..." that is displayed for them. */
if (selective_rlen)
{
@@ -1680,7 +1680,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
&& width_run_width == 1
&& width_run_start < width_run_end)
know_region_cache (cache_buffer, width_cache,
- width_run_start, width_run_end);
+ width_run_start, width_run_end);
val_compute_motion.bufpos = pos;
val_compute_motion.bytepos = pos_byte;
diff --git a/src/indent.h b/src/indent.h
index f2a4c90..d3dc680 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -35,12 +35,12 @@ struct position *compute_motion (ptrdiff_t from, ptrdiff_t frombyte,
EMACS_INT fromvpos, EMACS_INT fromhpos,
bool did_motion, ptrdiff_t to,
EMACS_INT tovpos, EMACS_INT tohpos,
- EMACS_INT width, ptrdiff_t hscroll,
- int tab_offset, struct window *);
+ EMACS_INT width, ptrdiff_t hscroll,
+ int tab_offset, struct window *);
struct position *vmotion (ptrdiff_t from, ptrdiff_t from_byte,
EMACS_INT vtarget, struct window *);
ptrdiff_t skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p,
- ptrdiff_t to, Lisp_Object window);
+ ptrdiff_t to, Lisp_Object window);
/* Value of point when current_column was called */
extern ptrdiff_t last_known_column_point;
@@ -55,6 +55,6 @@ bool disptab_matches_widthtab (struct Lisp_Char_Table *disptab,
/* Recompute BUF's width table, using the display table DISPTAB. */
void recompute_width_table (struct buffer *buf,
- struct Lisp_Char_Table *disptab);
+ struct Lisp_Char_Table *disptab);
#endif /* EMACS_INDENT_H */
diff --git a/src/inotify.c b/src/inotify.c
index 38c8df5..97515aa 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -109,9 +109,9 @@ inotifyevent_to_event (Lisp_Object watch_object, struct inotify_event const *ev)
name = XCAR (XCDR (watch_object));
return list2 (list4 (make_watch_descriptor (ev->wd),
- mask_to_aspects (ev->mask),
- name,
- make_number (ev->cookie)),
+ mask_to_aspects (ev->mask),
+ name,
+ make_number (ev->cookie)),
Fnth (make_number (2), watch_object));
}
@@ -149,16 +149,16 @@ inotify_callback (int fd, void *_)
watch_object = Fassoc (make_watch_descriptor (ev->wd), watch_list);
if (!NILP (watch_object))
- {
- event.arg = inotifyevent_to_event (watch_object, ev);
+ {
+ event.arg = inotifyevent_to_event (watch_object, ev);
- /* If event was removed automatically: Drop it from watch list. */
- if (ev->mask & IN_IGNORED)
- watch_list = Fdelete (watch_object, watch_list);
+ /* If event was removed automatically: Drop it from watch list. */
+ if (ev->mask & IN_IGNORED)
+ watch_list = Fdelete (watch_object, watch_list);
if (!NILP (event.arg))
kbd_buffer_store_event (&event);
- }
+ }
i += sizeof (*ev) + ev->len;
}
@@ -226,10 +226,10 @@ aspect_to_inotifymask (Lisp_Object aspect)
Lisp_Object x = aspect;
uint32_t mask = 0;
while (CONSP (x))
- {
- mask |= symbol_to_inotifymask (XCAR (x));
- x = XCDR (x);
- }
+ {
+ mask |= symbol_to_inotifymask (XCAR (x));
+ x = XCDR (x);
+ }
return mask;
}
else
@@ -292,7 +292,7 @@ renames (moved-from and moved-to).
See inotify(7) and inotify_add_watch(2) for further information. The inotify fd
is managed internally and there is no corresponding inotify_init. Use
`inotify-rm-watch' to remove a watch.
- */)
+ */)
(Lisp_Object file_name, Lisp_Object aspect, Lisp_Object callback)
{
uint32_t mask;
@@ -338,7 +338,7 @@ DEFUN ("inotify-rm-watch", Finotify_rm_watch, Sinotify_rm_watch, 1, 1, 0,
WATCH-DESCRIPTOR should be an object returned by `inotify-add-watch'.
See inotify_rm_watch(2) for more information.
- */)
+ */)
(Lisp_Object watch_descriptor)
{
Lisp_Object watch_object;
diff --git a/src/insdel.c b/src/insdel.c
index ed914ec..f8d9678 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1353,8 +1353,8 @@ adjust_after_insert (ptrdiff_t from, ptrdiff_t from_byte,
void
replace_range (ptrdiff_t from, ptrdiff_t to, Lisp_Object new,
- bool prepare, bool inherit, bool markers,
- bool adjust_match_data)
+ bool prepare, bool inherit, bool markers,
+ bool adjust_match_data)
{
ptrdiff_t inschars = SCHARS (new);
ptrdiff_t insbytes = SBYTES (new);
@@ -2015,12 +2015,12 @@ invalidate_buffer_caches (struct buffer *buf, ptrdiff_t start, ptrdiff_t end)
}
if (buf->newline_cache)
invalidate_region_cache (buf,
- buf->newline_cache,
- start - BUF_BEG (buf), BUF_Z (buf) - end);
+ buf->newline_cache,
+ start - BUF_BEG (buf), BUF_Z (buf) - end);
if (buf->width_run_cache)
invalidate_region_cache (buf,
- buf->width_run_cache,
- start - BUF_BEG (buf), BUF_Z (buf) - end);
+ buf->width_run_cache,
+ start - BUF_BEG (buf), BUF_Z (buf) - end);
}
/* These macros work with an argument named `preserve_ptr'
diff --git a/src/intervals.c b/src/intervals.c
index e797e25..1ae094e 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -653,7 +653,7 @@ INTERVAL
find_interval (register INTERVAL tree, register ptrdiff_t position)
{
/* The distance from the left edge of the subtree at TREE
- to POSITION. */
+ to POSITION. */
register ptrdiff_t relative_position;
if (!tree)
@@ -809,13 +809,13 @@ update_interval (register INTERVAL i, ptrdiff_t pos)
if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right))
{
i->right->position = INTERVAL_LAST_POS (i)
- + LEFT_TOTAL_LENGTH (i->right);
+ + LEFT_TOTAL_LENGTH (i->right);
i = i->right; /* Move to the right child. */
}
else if (NULL_PARENT (i))
error ("Point %"pD"d after end of properties", pos);
else
- i = INTERVAL_PARENT (i);
+ i = INTERVAL_PARENT (i);
continue;
}
else
@@ -880,8 +880,8 @@ adjust_intervals_for_insertion (INTERVAL tree,
tail = i->plist;
/* Properties font-sticky and rear-nonsticky override
- Vtext_property_default_nonsticky. So, if they are t, we can
- skip one by one checking of properties. */
+ Vtext_property_default_nonsticky. So, if they are t, we can
+ skip one by one checking of properties. */
rear = textget (i->plist, Qrear_nonsticky);
if (! CONSP (rear) && ! NILP (rear))
{
@@ -897,7 +897,7 @@ adjust_intervals_for_insertion (INTERVAL tree,
}
/* Does any actual property pose an actual problem? We break
- the loop if we find a nonsticky property. */
+ the loop if we find a nonsticky property. */
for (; CONSP (tail); tail = Fcdr (XCDR (tail)))
{
Lisp_Object prop, tmp;
@@ -912,7 +912,7 @@ adjust_intervals_for_insertion (INTERVAL tree,
break;
/* Is this particular property recorded as sticky or
- nonsticky in Vtext_property_default_nonsticky? */
+ nonsticky in Vtext_property_default_nonsticky? */
tmp = Fassq (prop, Vtext_property_default_nonsticky);
if (CONSP (tmp))
{
@@ -999,11 +999,11 @@ adjust_intervals_for_insertion (INTERVAL tree,
/* We will need to update the cache here later. */
}
else if (! prev && ! NILP (i->plist))
- {
+ {
/* Just split off a new interval at the left.
Since I wasn't front-sticky, the empty plist is ok. */
i = split_interval_left (i, length);
- }
+ }
}
/* Otherwise just extend the interval. */
@@ -1674,13 +1674,13 @@ graft_intervals_into_buffer (INTERVAL source, ptrdiff_t position,
else
{
/* This call may have some effect because previous_interval may
- update `position' fields of intervals. Thus, don't ignore it
- for the moment. Someone please tell me the truth (K.Handa). */
+ update `position' fields of intervals. Thus, don't ignore it
+ for the moment. Someone please tell me the truth (K.Handa). */
INTERVAL prev = previous_interval (under);
(void) prev;
#if 0
/* But, this code surely has no effect. And, anyway,
- END_NONSTICKY_P is unreliable now. */
+ END_NONSTICKY_P is unreliable now. */
if (prev && !END_NONSTICKY_P (prev))
prev = 0;
#endif /* 0 */
diff --git a/src/intervals.h b/src/intervals.h
index b56c050..9a14fab 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -239,11 +239,11 @@ extern INTERVAL create_root_interval (Lisp_Object);
extern void copy_properties (INTERVAL, INTERVAL);
extern bool intervals_equal (INTERVAL, INTERVAL);
extern void traverse_intervals (INTERVAL, ptrdiff_t,
- void (*) (INTERVAL, Lisp_Object),
- Lisp_Object);
+ void (*) (INTERVAL, Lisp_Object),
+ Lisp_Object);
extern void traverse_intervals_noorder (INTERVAL,
- void (*) (INTERVAL, Lisp_Object),
- Lisp_Object);
+ void (*) (INTERVAL, Lisp_Object),
+ Lisp_Object);
extern INTERVAL split_interval_right (INTERVAL, ptrdiff_t);
extern INTERVAL split_interval_left (INTERVAL, ptrdiff_t);
extern INTERVAL find_interval (INTERVAL, ptrdiff_t);
@@ -252,12 +252,12 @@ extern INTERVAL previous_interval (INTERVAL);
extern INTERVAL merge_interval_left (INTERVAL);
extern void offset_intervals (struct buffer *, ptrdiff_t, ptrdiff_t);
extern void graft_intervals_into_buffer (INTERVAL, ptrdiff_t, ptrdiff_t,
- struct buffer *, bool);
+ struct buffer *, bool);
extern void verify_interval_modification (struct buffer *,
ptrdiff_t, ptrdiff_t);
extern INTERVAL balance_intervals (INTERVAL);
extern void copy_intervals_to_string (Lisp_Object, struct buffer *,
- ptrdiff_t, ptrdiff_t);
+ ptrdiff_t, ptrdiff_t);
extern INTERVAL copy_intervals (INTERVAL, ptrdiff_t, ptrdiff_t);
extern bool compare_string_intervals (Lisp_Object, Lisp_Object);
extern Lisp_Object textget (Lisp_Object, Lisp_Object);
@@ -269,7 +269,7 @@ extern Lisp_Object get_local_map (ptrdiff_t, struct buffer *, Lisp_Object);
extern INTERVAL update_interval (INTERVAL, ptrdiff_t);
extern void set_intervals_multibyte (bool);
extern INTERVAL validate_interval_range (Lisp_Object, Lisp_Object *,
- Lisp_Object *, bool);
+ Lisp_Object *, bool);
extern INTERVAL interval_of (ptrdiff_t, Lisp_Object);
/* Defined in xdisp.c. */
@@ -277,22 +277,22 @@ extern int invisible_prop (Lisp_Object, Lisp_Object);
/* Defined in textprop.c. */
extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object);
+ Lisp_Object, Lisp_Object,
+ Lisp_Object, Lisp_Object);
extern Lisp_Object set_text_properties (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object, Lisp_Object,
+ Lisp_Object);
extern void set_text_properties_1 (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object, INTERVAL);
+ Lisp_Object, Lisp_Object, INTERVAL);
Lisp_Object text_property_list (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
void add_text_properties_from_list (Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object extend_property_ranges (Lisp_Object, Lisp_Object, Lisp_Object);
Lisp_Object get_char_property_and_overlay (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object*);
+ Lisp_Object, Lisp_Object*);
extern int text_property_stickiness (Lisp_Object prop, Lisp_Object pos,
- Lisp_Object buffer);
+ Lisp_Object buffer);
extern void syms_of_textprop (void);
diff --git a/src/keyboard.c b/src/keyboard.c
index 15c7f5f..99eea44 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -353,16 +353,16 @@ static void (*keyboard_init_hook) (void);
static bool get_input_pending (int);
static bool readable_events (int);
static Lisp_Object read_char_x_menu_prompt (Lisp_Object,
- Lisp_Object, bool *);
+ Lisp_Object, bool *);
static Lisp_Object read_char_minibuf_menu_prompt (int, Lisp_Object);
static Lisp_Object make_lispy_event (struct input_event *);
static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
- enum scroll_bar_part,
- Lisp_Object, Lisp_Object,
+ enum scroll_bar_part,
+ Lisp_Object, Lisp_Object,
Time);
static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
- Lisp_Object, const char *const *,
- Lisp_Object *, ptrdiff_t);
+ Lisp_Object, const char *const *,
+ Lisp_Object *, ptrdiff_t);
static Lisp_Object make_lispy_switch_frame (Lisp_Object);
static Lisp_Object make_lispy_focus_in (Lisp_Object);
#ifdef HAVE_WINDOW_SYSTEM
@@ -440,7 +440,7 @@ echo_keystrokes_p (void)
{
return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
: INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
- : false);
+ : false);
}
/* Add C to the echo string, without echoing it immediately. C can be
@@ -586,7 +586,7 @@ echo_now (void)
{
if (!current_kboard->immediate_echo
/* This test breaks calls that use `echo_now' to display the echo_prompt.
- && echo_keystrokes_p () */)
+ && echo_keystrokes_p () */)
{
current_kboard->immediate_echo = true;
echo_update ();
@@ -784,7 +784,7 @@ recursive_edit_unwind (Lisp_Object buffer)
\f
#if 0 /* These two functions are now replaced with
- temporarily_switch_to_single_kboard. */
+ temporarily_switch_to_single_kboard. */
static void
any_kboard_state ()
{
@@ -856,11 +856,11 @@ pop_kboard (void)
for (t = terminal_list; t; t = t->next_terminal)
{
if (t->kboard == p->kboard)
- {
- current_kboard = p->kboard;
- found = true;
- break;
- }
+ {
+ current_kboard = p->kboard;
+ found = true;
+ break;
+ }
}
if (!found)
{
@@ -889,20 +889,20 @@ temporarily_switch_to_single_kboard (struct frame *f)
if (was_locked)
{
if (f != NULL && FRAME_KBOARD (f) != current_kboard)
- /* We can not switch keyboards while in single_kboard mode.
- In rare cases, Lisp code may call `recursive-edit' (or
- `read-minibuffer' or `y-or-n-p') after it switched to a
- locked frame. For example, this is likely to happen
- when server.el connects to a new terminal while Emacs is in
- single_kboard mode. It is best to throw an error instead
- of presenting the user with a frozen screen. */
- error ("Terminal %d is locked, cannot read from it",
- FRAME_TERMINAL (f)->id);
+ /* We can not switch keyboards while in single_kboard mode.
+ In rare cases, Lisp code may call `recursive-edit' (or
+ `read-minibuffer' or `y-or-n-p') after it switched to a
+ locked frame. For example, this is likely to happen
+ when server.el connects to a new terminal while Emacs is in
+ single_kboard mode. It is best to throw an error instead
+ of presenting the user with a frozen screen. */
+ error ("Terminal %d is locked, cannot read from it",
+ FRAME_TERMINAL (f)->id);
else
- /* This call is unnecessary, but helps
- `restore_kboard_configuration' discover if somebody changed
- `current_kboard' behind our back. */
- push_kboard (current_kboard);
+ /* This call is unnecessary, but helps
+ `restore_kboard_configuration' discover if somebody changed
+ `current_kboard' behind our back. */
+ push_kboard (current_kboard);
}
else if (f != NULL)
current_kboard = FRAME_KBOARD (f);
@@ -930,7 +930,7 @@ restore_kboard_configuration (int was_locked)
pop_kboard ();
/* The pop should not change the kboard. */
if (single_kboard && current_kboard != prev)
- emacs_abort ();
+ emacs_abort ();
}
}
@@ -1256,7 +1256,7 @@ some_mouse_moved (void)
sans error-handling encapsulation. */
static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
- bool, bool, bool, bool);
+ bool, bool, bool, bool);
static void adjust_point_for_property (ptrdiff_t, bool);
Lisp_Object
@@ -1291,7 +1291,7 @@ command_loop_1 (void)
/* If there are warnings waiting, process them. */
if (!NILP (Vdelayed_warnings_list))
- safe_run_hooks (Qdelayed_warnings_hook);
+ safe_run_hooks (Qdelayed_warnings_hook);
if (!NILP (Vdeferred_action_list))
safe_run_hooks (Qdeferred_action_function);
@@ -1428,9 +1428,9 @@ command_loop_1 (void)
last_point_position = PT;
/* By default, we adjust point to a boundary of a region that
- has such a property that should be treated intangible
- (e.g. composition, display). But, some commands will set
- this variable differently. */
+ has such a property that should be treated intangible
+ (e.g. composition, display). But, some commands will set
+ this variable differently. */
Vdisable_point_adjustment = Qnil;
/* Process filters and timers may have messed with deactivate-mark.
@@ -1465,26 +1465,26 @@ command_loop_1 (void)
/* Here for a command that isn't executed directly. */
#ifdef HAVE_WINDOW_SYSTEM
- ptrdiff_t scount = SPECPDL_INDEX ();
-
- if (display_hourglass_p
- && NILP (Vexecuting_kbd_macro))
- {
- record_unwind_protect_void (cancel_hourglass);
- start_hourglass ();
- }
+ ptrdiff_t scount = SPECPDL_INDEX ();
+
+ if (display_hourglass_p
+ && NILP (Vexecuting_kbd_macro))
+ {
+ record_unwind_protect_void (cancel_hourglass);
+ start_hourglass ();
+ }
#endif
- /* Ensure that we have added appropriate undo-boundaries as a
- result of changes from the last command. */
- call0 (Qundo_auto__add_boundary);
+ /* Ensure that we have added appropriate undo-boundaries as a
+ result of changes from the last command. */
+ call0 (Qundo_auto__add_boundary);
- /* Record point and buffer, so we can put point into the undo
- information if necessary. */
- point_before_last_command_or_undo = PT;
- buffer_before_last_command_or_undo = current_buffer;
+ /* Record point and buffer, so we can put point into the undo
+ information if necessary. */
+ point_before_last_command_or_undo = PT;
+ buffer_before_last_command_or_undo = current_buffer;
- call1 (Qcommand_execute, Vthis_command);
+ call1 (Qcommand_execute, Vthis_command);
#ifdef HAVE_WINDOW_SYSTEM
/* Do not check display_hourglass_p here, because
@@ -1493,9 +1493,9 @@ command_loop_1 (void)
But don't cancel the hourglass within a macro
just because a command in the macro finishes. */
if (NILP (Vexecuting_kbd_macro))
- unbind_to (scount, Qnil);
+ unbind_to (scount, Qnil);
#endif
- }
+ }
kset_last_prefix_arg (current_kboard, Vcurrent_prefix_arg);
safe_run_hooks (Qpost_command_hook);
@@ -1507,7 +1507,7 @@ command_loop_1 (void)
/* If there are warnings waiting, process them. */
if (!NILP (Vdelayed_warnings_list))
- safe_run_hooks (Qdelayed_warnings_hook);
+ safe_run_hooks (Qdelayed_warnings_hook);
safe_run_hooks (Qdeferred_action_function);
@@ -1664,7 +1664,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
if (check_display
&& PT > BEGV && PT < ZV
&& !NILP (val = get_char_property_and_overlay
- (make_number (PT), Qdisplay, selected_window,
+ (make_number (PT), Qdisplay, selected_window,
&overlay))
&& display_prop_intangible_p (val, overlay, PT, PT_BYTE)
&& (!OVERLAYP (overlay)
@@ -1706,7 +1706,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
TEXT_PROP_MEANS_INVISIBLE (val))
#endif
&& !NILP (val = get_char_property_and_overlay
- (make_number (end), Qinvisible, Qnil, &overlay))
+ (make_number (end), Qinvisible, Qnil, &overlay))
&& (inv = TEXT_PROP_MEANS_INVISIBLE (val)))
{
ellipsis = ellipsis || inv > 1
@@ -1724,7 +1724,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
TEXT_PROP_MEANS_INVISIBLE (val))
#endif
&& !NILP (val = get_char_property_and_overlay
- (make_number (beg - 1), Qinvisible, Qnil, &overlay))
+ (make_number (beg - 1), Qinvisible, Qnil, &overlay))
&& (inv = TEXT_PROP_MEANS_INVISIBLE (val)))
{
ellipsis = ellipsis || inv > 1
@@ -2133,8 +2133,8 @@ do { if (polling_stopped_here) start_polling (); \
static Lisp_Object
read_event_from_main_queue (struct timespec *end_time,
- sys_jmp_buf local_getcjmp,
- bool *used_mouse_menu)
+ sys_jmp_buf local_getcjmp,
+ bool *used_mouse_menu)
{
Lisp_Object c = Qnil;
sys_jmp_buf save_jump;
@@ -2160,20 +2160,20 @@ read_event_from_main_queue (struct timespec *end_time,
{
Lisp_Object last = KVAR (kb, kbd_queue);
if (CONSP (last))
- {
- while (CONSP (XCDR (last)))
+ {
+ while (CONSP (XCDR (last)))
last = XCDR (last);
- if (!NILP (XCDR (last)))
+ if (!NILP (XCDR (last)))
emacs_abort ();
- }
+ }
if (!CONSP (last))
- kset_kbd_queue (kb, list1 (c));
+ kset_kbd_queue (kb, list1 (c));
else
- XSETCDR (last, list1 (c));
+ XSETCDR (last, list1 (c));
kb->kbd_queue_has_data = true;
c = Qnil;
if (single_kboard)
- goto start;
+ goto start;
current_kboard = kb;
return make_number (-2);
}
@@ -2205,9 +2205,9 @@ read_event_from_main_queue (struct timespec *end_time,
to tty input. */
static Lisp_Object
read_decoded_event_from_main_queue (struct timespec *end_time,
- sys_jmp_buf local_getcjmp,
- Lisp_Object prev_event,
- bool *used_mouse_menu)
+ sys_jmp_buf local_getcjmp,
+ Lisp_Object prev_event,
+ bool *used_mouse_menu)
{
#ifndef WINDOWSNT
#define MAX_ENCODED_BYTES 16
@@ -2217,8 +2217,8 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
while (true)
{
Lisp_Object nextevt
- = read_event_from_main_queue (end_time, local_getcjmp,
- used_mouse_menu);
+ = read_event_from_main_queue (end_time, local_getcjmp,
+ used_mouse_menu);
#ifdef WINDOWSNT
/* w32_console already returns decoded events. It either reads
Unicode characters from the Windows keyboard input, or
@@ -2229,10 +2229,10 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
struct frame *frame = XFRAME (selected_frame);
struct terminal *terminal = frame->terminal;
if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame))
- /* Don't apply decoding if we're just reading a raw event
- (e.g. reading bytes sent by the xterm to specify the position
- of a mouse click). */
- && (!EQ (prev_event, Qt))
+ /* Don't apply decoding if we're just reading a raw event
+ (e.g. reading bytes sent by the xterm to specify the position
+ of a mouse click). */
+ && (!EQ (prev_event, Qt))
&& (TERMINAL_KEYBOARD_CODING (terminal)->common_flags
& CODING_REQUIRE_DECODING_MASK)))
return nextevt; /* No decoding needed. */
@@ -2394,7 +2394,7 @@ read_char (int commandflag, Lisp_Object map,
}
/* If the queued event is something that used the mouse,
- set used_mouse_menu accordingly. */
+ set used_mouse_menu accordingly. */
if (used_mouse_menu
/* Also check was_disabled so last-nonmenu-event won't return
a bad value when submenus are involved. (Bug#447) */
@@ -2425,7 +2425,7 @@ read_char (int commandflag, Lisp_Object map,
try to switch frames on us, and the selected window will
remain unchanged.
- Since this event came from a macro, it would be misleading to
+ Since this event came from a macro, it would be misleading to
leave internal_last_event_frame set to wherever the last
real event came from. Normally, a switch-frame event selects
internal_last_event_frame after each command is read, but
@@ -2551,7 +2551,7 @@ read_char (int commandflag, Lisp_Object map,
c = read_char_minibuf_menu_prompt (commandflag, map);
if (INTEGERP (c) && XINT (c) == -2)
- return c; /* wrong_kboard_jmpbuf */
+ return c; /* wrong_kboard_jmpbuf */
if (! NILP (c))
goto exit;
@@ -2604,7 +2604,7 @@ read_char (int commandflag, Lisp_Object map,
XSETCDR (last, list1 (c));
kb->kbd_queue_has_data = true;
current_kboard = kb;
- return make_number (-2); /* wrong_kboard_jmpbuf */
+ return make_number (-2); /* wrong_kboard_jmpbuf */
}
}
goto non_reread;
@@ -2797,7 +2797,7 @@ read_char (int commandflag, Lisp_Object map,
if (kb->kbd_queue_has_data)
{
current_kboard = kb;
- return make_number (-2); /* wrong_kboard_jmpbuf */
+ return make_number (-2); /* wrong_kboard_jmpbuf */
}
}
@@ -2808,12 +2808,12 @@ read_char (int commandflag, Lisp_Object map,
if (NILP (c))
{
c = read_decoded_event_from_main_queue (end_time, local_getcjmp,
- prev_event, used_mouse_menu);
+ prev_event, used_mouse_menu);
if (NILP (c) && end_time
&& timespec_cmp (*end_time, current_timespec ()) <= 0)
- {
- goto exit;
- }
+ {
+ goto exit;
+ }
if (EQ (c, make_number (-2)))
return c;
@@ -2854,7 +2854,7 @@ read_char (int commandflag, Lisp_Object map,
call4 (Qcommand_execute, tem, Qnil, Fvector (1, &last_input_event), Qt);
if (CONSP (c)
- && (EQ (XCAR (c), Qselect_window)
+ && (EQ (XCAR (c), Qselect_window)
#ifdef HAVE_DBUS
|| EQ (XCAR (c), Qdbus_event)
#endif
@@ -2862,7 +2862,7 @@ read_char (int commandflag, Lisp_Object map,
|| EQ (XCAR (c), Qfile_notify)
#endif
|| EQ (XCAR (c), Qconfig_changed_event))
- && !end_time)
+ && !end_time)
/* We stopped being idle for this event; undo that. This
prevents automatic window selection (under
mouse-autoselect-window) from acting as a real input event, for
@@ -3356,13 +3356,13 @@ readable_events (int flags)
| READABLE_EVENTS_IGNORE_SQUEEZABLES
#endif
))
- {
- union buffered_input_event *event = kbd_fetch_ptr;
+ {
+ union buffered_input_event *event = kbd_fetch_ptr;
do
{
- if (event == kbd_buffer + KBD_BUFFER_SIZE)
- event = kbd_buffer;
+ if (event == kbd_buffer + KBD_BUFFER_SIZE)
+ event = kbd_buffer;
if (!(
#ifdef USE_TOOLKIT_SCROLL_BARS
(flags & READABLE_EVENTS_FILTER_EVENTS) &&
@@ -3381,7 +3381,7 @@ readable_events (int flags)
event++;
}
while (event != kbd_store_ptr);
- }
+ }
else
return 1;
}
@@ -3437,7 +3437,7 @@ kbd_buffer_nr_stored (void)
: (kbd_fetch_ptr < kbd_store_ptr
? kbd_store_ptr - kbd_fetch_ptr
: ((kbd_buffer + KBD_BUFFER_SIZE) - kbd_fetch_ptr
- + (kbd_store_ptr - kbd_buffer)));
+ + (kbd_store_ptr - kbd_buffer)));
}
#endif /* Store an event obtained at interrupt level into kbd_buffer, fifo */
@@ -3557,13 +3557,13 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event,
#ifdef subprocesses
if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE / 2
&& ! kbd_on_hold_p ())
- {
- /* Don't read keyboard input until we have processed kbd_buffer.
- This happens when pasting text longer than KBD_BUFFER_SIZE/2. */
- hold_keyboard_input ();
- unrequest_sigio ();
- stop_polling ();
- }
+ {
+ /* Don't read keyboard input until we have processed kbd_buffer.
+ This happens when pasting text longer than KBD_BUFFER_SIZE/2. */
+ hold_keyboard_input ();
+ unrequest_sigio ();
+ stop_polling ();
+ }
#endif /* subprocesses */
}
@@ -3704,7 +3704,7 @@ discard_mouse_events (void)
if (sp->kind == MOUSE_CLICK_EVENT
|| sp->kind == WHEEL_EVENT
- || sp->kind == HORIZ_WHEEL_EVENT
+ || sp->kind == HORIZ_WHEEL_EVENT
#ifdef HAVE_GPM
|| sp->kind == GPM_CLICK_EVENT
#endif
@@ -3758,8 +3758,8 @@ clear_event (union buffered_input_event *event)
static Lisp_Object
kbd_buffer_get_event (KBOARD **kbp,
- bool *used_mouse_menu,
- struct timespec *end_time)
+ bool *used_mouse_menu,
+ struct timespec *end_time)
{
Lisp_Object obj;
@@ -3767,7 +3767,7 @@ kbd_buffer_get_event (KBOARD **kbp,
if (kbd_on_hold_p () && kbd_buffer_nr_stored () < KBD_BUFFER_SIZE / 4)
{
/* Start reading input again because we have processed enough to
- be able to accept new events again. */
+ be able to accept new events again. */
unhold_keyboard_input ();
request_sigio ();
start_polling ();
@@ -3894,22 +3894,22 @@ kbd_buffer_get_event (KBOARD **kbp,
x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
- a window system. */
+ a window system. */
emacs_abort ();
#endif
}
#if defined (HAVE_NS)
else if (event->kind == NS_TEXT_EVENT)
- {
- if (event->ie.code == KEY_NS_PUT_WORKING_TEXT)
- obj = list1 (intern ("ns-put-working-text"));
- else
- obj = list1 (intern ("ns-unput-working-text"));
+ {
+ if (event->ie.code == KEY_NS_PUT_WORKING_TEXT)
+ obj = list1 (intern ("ns-put-working-text"));
+ else
+ obj = list1 (intern ("ns-unput-working-text"));
kbd_fetch_ptr = event + 1;
- if (used_mouse_menu)
- *used_mouse_menu = true;
- }
+ if (used_mouse_menu)
+ *used_mouse_menu = true;
+ }
#endif
#if defined (HAVE_X11) || defined (HAVE_NTGUI) \
@@ -3980,16 +3980,16 @@ kbd_buffer_get_event (KBOARD **kbp,
/* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */
obj = list3 (Qfile_notify, event->ie.arg, event->ie.frame_or_window);
#else
- obj = make_lispy_event (&event->ie);
+ obj = make_lispy_event (&event->ie);
#endif
kbd_fetch_ptr = event + 1;
}
#endif /* USE_FILE_NOTIFY */
else if (event->kind == SAVE_SESSION_EVENT)
- {
- obj = list2 (Qsave_session, event->ie.arg);
+ {
+ obj = list2 (Qsave_session, event->ie.arg);
kbd_fetch_ptr = event + 1;
- }
+ }
/* Just discard these, by returning nil.
With MULTI_KBOARD, these events are used as placeholders
when we need to randomly delete events from the queue.
@@ -3997,7 +3997,7 @@ kbd_buffer_get_event (KBOARD **kbp,
but on some machines it appears they do show up
even without MULTI_KBOARD.) */
/* On Windows NT/9X, NO_EVENT is used to delete extraneous
- mouse events during a popup-menu call. */
+ mouse events during a popup-menu call. */
else if (event->kind == NO_EVENT)
kbd_fetch_ptr = event + 1;
else if (event->kind == HELP_EVENT)
@@ -4024,43 +4024,43 @@ kbd_buffer_get_event (KBOARD **kbp,
switch-frame event if necessary. */
Lisp_Object frame, focus;
- frame = event->ie.frame_or_window;
- focus = FRAME_FOCUS_FRAME (XFRAME (frame));
- if (FRAMEP (focus))
- frame = focus;
+ frame = event->ie.frame_or_window;
+ focus = FRAME_FOCUS_FRAME (XFRAME (frame));
+ if (FRAMEP (focus))
+ frame = focus;
- if (
+ if (
#ifdef HAVE_X11
- ! NILP (event->ie.arg)
- &&
+ ! NILP (event->ie.arg)
+ &&
#endif
- !EQ (frame, internal_last_event_frame)
- && !EQ (frame, selected_frame))
- obj = make_lispy_switch_frame (frame);
- else
- obj = make_lispy_focus_in (frame);
-
- internal_last_event_frame = frame;
- kbd_fetch_ptr = event + 1;
- }
+ !EQ (frame, internal_last_event_frame)
+ && !EQ (frame, selected_frame))
+ obj = make_lispy_switch_frame (frame);
+ else
+ obj = make_lispy_focus_in (frame);
+
+ internal_last_event_frame = frame;
+ kbd_fetch_ptr = event + 1;
+ }
else if (event->kind == FOCUS_OUT_EVENT)
- {
+ {
#ifdef HAVE_WINDOW_SYSTEM
- Display_Info *di;
- Lisp_Object frame = event->ie.frame_or_window;
- bool focused = false;
+ Display_Info *di;
+ Lisp_Object frame = event->ie.frame_or_window;
+ bool focused = false;
- for (di = x_display_list; di && ! focused; di = di->next)
- focused = di->x_highlight_frame != 0;
+ for (di = x_display_list; di && ! focused; di = di->next)
+ focused = di->x_highlight_frame != 0;
- if (!focused)
+ if (!focused)
obj = make_lispy_focus_out (frame);
#endif /* HAVE_WINDOW_SYSTEM */
- kbd_fetch_ptr = event + 1;
- }
+ kbd_fetch_ptr = event + 1;
+ }
#ifdef HAVE_DBUS
else if (event->kind == DBUS_EVENT)
{
@@ -4125,7 +4125,7 @@ kbd_buffer_get_event (KBOARD **kbp,
#ifdef HAVE_NS
/* Certain system events are non-key events. */
if (used_mouse_menu
- && event->kind == NS_NONKEY_EVENT)
+ && event->kind == NS_NONKEY_EVENT)
*used_mouse_menu = true;
#endif
@@ -4152,8 +4152,8 @@ kbd_buffer_get_event (KBOARD **kbp,
/* XXX Can f or mouse_position_hook be NULL here? */
if (f && FRAME_TERMINAL (f)->mouse_position_hook)
- (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, 0, &bar_window,
- &part, &x, &y, &t);
+ (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, 0, &bar_window,
+ &part, &x, &y, &t);
obj = Qnil;
@@ -4247,7 +4247,7 @@ process_special_events (void)
x_handle_selection_event (©);
#else
/* We're getting selection request events, but we don't have
- a window system. */
+ a window system. */
emacs_abort ();
#endif
}
@@ -4387,7 +4387,7 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers)
based on the next ordinary timer.
TIMER_DIFFERENCE is the distance in time from NOW to when
this timer becomes ripe.
- Skip past invalid timers and timers already handled. */
+ Skip past invalid timers and timers already handled. */
if (CONSP (timers))
{
timer = XCAR (timers);
@@ -4470,12 +4470,12 @@ timer_check_2 (Lisp_Object timers, Lisp_Object idle_timers)
/* Since we have handled the event,
we don't need to tell the caller to wake up and do it. */
- /* But the caller must still wait for the next timer, so
- return 0 to indicate that. */
+ /* But the caller must still wait for the next timer, so
+ return 0 to indicate that. */
}
nexttime = make_timespec (0, 0);
- break;
+ break;
}
else
/* When we encounter a timer that is still waiting,
@@ -5426,33 +5426,33 @@ make_lispy_event (struct input_event *event)
{
c &= 0377;
eassert (c == event->code);
- }
-
- /* Caps-lock shouldn't affect interpretation of key chords:
- Control+s should produce C-s whether caps-lock is on or
- not. And Control+Shift+s should produce C-S-s whether
- caps-lock is on or not. */
- if (event->modifiers & ~shift_modifier)
- {
- /* This is a key chord: some non-shift modifier is
- depressed. */
-
- if (uppercasep (c) &&
- !(event->modifiers & shift_modifier))
- {
- /* Got a capital letter without a shift. The caps
- lock is on. Un-capitalize the letter. */
- c = downcase (c);
- }
- else if (lowercasep (c) &&
- (event->modifiers & shift_modifier))
- {
- /* Got a lower-case letter even though shift is
- depressed. The caps lock is on. Capitalize the
- letter. */
- c = upcase (c);
- }
- }
+ }
+
+ /* Caps-lock shouldn't affect interpretation of key chords:
+ Control+s should produce C-s whether caps-lock is on or
+ not. And Control+Shift+s should produce C-S-s whether
+ caps-lock is on or not. */
+ if (event->modifiers & ~shift_modifier)
+ {
+ /* This is a key chord: some non-shift modifier is
+ depressed. */
+
+ if (uppercasep (c) &&
+ !(event->modifiers & shift_modifier))
+ {
+ /* Got a capital letter without a shift. The caps
+ lock is on. Un-capitalize the letter. */
+ c = downcase (c);
+ }
+ else if (lowercasep (c) &&
+ (event->modifiers & shift_modifier))
+ {
+ /* Got a lower-case letter even though shift is
+ depressed. The caps lock is on. Capitalize the
+ letter. */
+ c = upcase (c);
+ }
+ }
if (event->kind == ASCII_KEYSTROKE_EVENT)
{
@@ -5496,7 +5496,7 @@ make_lispy_event (struct input_event *event)
event->modifiers,
Qfunction_key, Qnil,
lispy_accent_keys, &accent_key_syms,
- ARRAYELTS (lispy_accent_keys));
+ ARRAYELTS (lispy_accent_keys));
#if 0
#ifdef XK_kana_A
@@ -5505,7 +5505,7 @@ make_lispy_event (struct input_event *event)
event->modifiers & ~shift_modifier,
Qfunction_key, Qnil,
lispy_kana_keys, &func_key_syms,
- ARRAYELTS (lispy_kana_keys));
+ ARRAYELTS (lispy_kana_keys));
#endif /* XK_kana_A */
#endif /* 0 */
@@ -5516,7 +5516,7 @@ make_lispy_event (struct input_event *event)
event->modifiers,
Qfunction_key, Qnil,
iso_lispy_function_keys, &func_key_syms,
- ARRAYELTS (iso_lispy_function_keys));
+ ARRAYELTS (iso_lispy_function_keys));
#endif
if ((FUNCTION_KEY_OFFSET <= event->code
@@ -5544,18 +5544,18 @@ make_lispy_event (struct input_event *event)
#ifdef HAVE_NTGUI
case MULTIMEDIA_KEY_EVENT:
if (event->code < ARRAYELTS (lispy_multimedia_keys)
- && event->code > 0 && lispy_multimedia_keys[event->code])
- {
- return modify_event_symbol (event->code, event->modifiers,
- Qfunction_key, Qnil,
- lispy_multimedia_keys, &func_key_syms,
- ARRAYELTS (lispy_multimedia_keys));
- }
+ && event->code > 0 && lispy_multimedia_keys[event->code])
+ {
+ return modify_event_symbol (event->code, event->modifiers,
+ Qfunction_key, Qnil,
+ lispy_multimedia_keys, &func_key_syms,
+ ARRAYELTS (lispy_multimedia_keys));
+ }
return Qnil;
#endif
/* A mouse click. Figure out where it is, decide whether it's
- a press, click or drag, and build the appropriate structure. */
+ a press, click or drag, and build the appropriate structure. */
case MOUSE_CLICK_EVENT:
#ifdef HAVE_GPM
case GPM_CLICK_EVENT:
@@ -5695,7 +5695,7 @@ make_lispy_event (struct input_event *event)
last_mouse_y = XINT (event->y);
/* If this is a button press, squirrel away the location, so
- we can decide later whether it was a click or a drag. */
+ we can decide later whether it was a click or a drag. */
if (event->modifiers & down_modifier)
{
if (is_double)
@@ -5713,7 +5713,7 @@ make_lispy_event (struct input_event *event)
}
/* Now we're releasing a button - check the co-ordinates to
- see if this was a click or a drag. */
+ see if this was a click or a drag. */
else if (event->modifiers & up_modifier)
{
/* If we did not see a down before this up, ignore the up.
@@ -5779,7 +5779,7 @@ make_lispy_event (struct input_event *event)
}
else
/* Every mouse event should either have the down_modifier or
- the up_modifier set. */
+ the up_modifier set. */
emacs_abort ();
{
@@ -5855,8 +5855,8 @@ make_lispy_event (struct input_event *event)
the up_modifier set. */
emacs_abort ();
- if (event->kind == HORIZ_WHEEL_EVENT)
- symbol_num += 2;
+ if (event->kind == HORIZ_WHEEL_EVENT)
+ symbol_num += 2;
is_double = (last_mouse_button == - (1 + symbol_num)
&& (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
@@ -5932,7 +5932,7 @@ make_lispy_event (struct input_event *event)
event->modifiers &= ~up_modifier;
if (event->code >= ASIZE (mouse_syms))
- mouse_syms = larger_vector (mouse_syms,
+ mouse_syms = larger_vector (mouse_syms,
event->code - ASIZE (mouse_syms) + 1,
-1);
@@ -5957,7 +5957,7 @@ make_lispy_event (struct input_event *event)
event->modifiers &= ~up_modifier;
if (event->code >= ASIZE (mouse_syms))
- mouse_syms = larger_vector (mouse_syms,
+ mouse_syms = larger_vector (mouse_syms,
event->code - ASIZE (mouse_syms) + 1,
-1);
@@ -6044,14 +6044,14 @@ make_lispy_event (struct input_event *event)
#ifdef HAVE_XWIDGETS
case XWIDGET_EVENT:
{
- return Fcons (Qxwidget_event, event->arg);
+ return Fcons (Qxwidget_event, event->arg);
}
#endif
#if defined HAVE_INOTIFY || defined HAVE_KQUEUE || defined HAVE_GFILENOTIFY
case FILE_NOTIFY_EVENT:
{
- return Fcons (Qfile_notify, event->arg);
+ return Fcons (Qfile_notify, event->arg);
}
#endif /* HAVE_INOTIFY || HAVE_KQUEUE || HAVE_GFILENOTIFY */
@@ -6422,11 +6422,11 @@ apply_modifiers (int modifiers, Lisp_Object base)
/* We have the parsing info now for free, so we could add it to
the caches:
- XSETFASTINT (idx, modifiers);
- Fput (new_symbol, Qevent_symbol_element_mask,
- list2 (base, idx));
- Fput (new_symbol, Qevent_symbol_elements,
- Fcons (base, lispy_modifier_list (modifiers)));
+ XSETFASTINT (idx, modifiers);
+ Fput (new_symbol, Qevent_symbol_element_mask,
+ list2 (base, idx));
+ Fput (new_symbol, Qevent_symbol_elements,
+ Fcons (base, lispy_modifier_list (modifiers)));
Sadly, this is only correct if `base' is indeed a base event,
which is not necessarily the case. -stef */
}
@@ -6578,7 +6578,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin
}
if (CONSP (*symbol_table))
- *symbol_table = Fcons (Fcons (symbol_int, value), *symbol_table);
+ *symbol_table = Fcons (Fcons (symbol_int, value), *symbol_table);
else
ASET (*symbol_table, symbol_num, value);
@@ -6866,9 +6866,9 @@ gobble_input (void)
struct terminal *next = t->next_terminal;
if (t->read_socket_hook)
- {
- int nr;
- struct input_event hold_quit;
+ {
+ int nr;
+ struct input_event hold_quit;
if (input_blocked_p ())
{
@@ -6876,40 +6876,40 @@ gobble_input (void)
break;
}
- EVENT_INIT (hold_quit);
- hold_quit.kind = NO_EVENT;
+ EVENT_INIT (hold_quit);
+ hold_quit.kind = NO_EVENT;
- /* No need for FIONREAD or fcntl; just say don't wait. */
+ /* No need for FIONREAD or fcntl; just say don't wait. */
while ((nr = (*t->read_socket_hook) (t, &hold_quit)) > 0)
nread += nr;
- if (nr == -1) /* Not OK to read input now. */
- {
- err = true;
- }
- else if (nr == -2) /* Non-transient error. */
- {
- /* The terminal device terminated; it should be closed. */
-
- /* Kill Emacs if this was our last terminal. */
- if (!terminal_list->next_terminal)
- /* Formerly simply reported no input, but that
- sometimes led to a failure of Emacs to terminate.
- SIGHUP seems appropriate if we can't reach the
- terminal. */
- /* ??? Is it really right to send the signal just to
- this process rather than to the whole process
- group? Perhaps on systems with FIONREAD Emacs is
- alone in its group. */
+ if (nr == -1) /* Not OK to read input now. */
+ {
+ err = true;
+ }
+ else if (nr == -2) /* Non-transient error. */
+ {
+ /* The terminal device terminated; it should be closed. */
+
+ /* Kill Emacs if this was our last terminal. */
+ if (!terminal_list->next_terminal)
+ /* Formerly simply reported no input, but that
+ sometimes led to a failure of Emacs to terminate.
+ SIGHUP seems appropriate if we can't reach the
+ terminal. */
+ /* ??? Is it really right to send the signal just to
+ this process rather than to the whole process
+ group? Perhaps on systems with FIONREAD Emacs is
+ alone in its group. */
terminate_due_to_signal (SIGHUP, 10);
- /* XXX Is calling delete_terminal safe here? It calls delete_frame. */
+ /* XXX Is calling delete_terminal safe here? It calls delete_frame. */
{
Lisp_Object tmp;
XSETTERMINAL (tmp, t);
Fdelete_terminal (tmp, Qnoelisp);
}
- }
+ }
/* If there was no error, make sure the pointer
is visible for all frames on this terminal. */
@@ -6925,9 +6925,9 @@ gobble_input (void)
}
}
- if (hold_quit.kind != NO_EVENT)
- kbd_buffer_store_event (&hold_quit);
- }
+ if (hold_quit.kind != NO_EVENT)
+ kbd_buffer_store_event (&hold_quit);
+ }
t = next;
}
@@ -6946,7 +6946,7 @@ gobble_input (void)
int
tty_read_avail_input (struct terminal *terminal,
- struct input_event *hold_quit)
+ struct input_event *hold_quit)
{
/* Using KBD_BUFFER_SIZE - 1 here avoids reading more than
the kbd_buffer can really hold. That may prevent loss
@@ -7005,11 +7005,11 @@ tty_read_avail_input (struct terminal *terminal,
gpm_hold_quit.kind = NO_EVENT;
/* gpm==1 if event received.
- gpm==0 if the GPM daemon has closed the connection, in which case
- Gpm_GetEvent closes gpm_fd and clears it to -1, which is why
+ gpm==0 if the GPM daemon has closed the connection, in which case
+ Gpm_GetEvent closes gpm_fd and clears it to -1, which is why
we save it in `fd' so close_gpm can remove it from the
select masks.
- gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
+ gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
while (gpm = Gpm_GetEvent (&event), gpm == 1) {
nread += handle_one_term_event (tty, &event, &gpm_hold_quit);
}
@@ -7029,9 +7029,9 @@ tty_read_avail_input (struct terminal *terminal,
if (ioctl (fileno (tty->input), FIONREAD, &n_to_read) < 0)
{
if (! noninteractive)
- return -2; /* Close this terminal. */
+ return -2; /* Close this terminal. */
else
- n_to_read = 0;
+ n_to_read = 0;
}
if (n_to_read == 0)
return 0;
@@ -7057,36 +7057,36 @@ tty_read_avail_input (struct terminal *terminal,
{
nread = emacs_read (fileno (tty->input), (char *) cbuf, n_to_read);
/* POSIX infers that processes which are not in the session leader's
- process group won't get SIGHUPs at logout time. BSDI adheres to
- this part standard and returns -1 from read (0) with errno==EIO
- when the control tty is taken away.
- Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
+ process group won't get SIGHUPs at logout time. BSDI adheres to
+ this part standard and returns -1 from read (0) with errno==EIO
+ when the control tty is taken away.
+ Jeffrey Honig <jch@bsdi.com> says this is generally safe. */
if (nread == -1 && errno == EIO)
- return -2; /* Close this terminal. */
+ return -2; /* Close this terminal. */
#if defined (AIX) && defined (_BSD)
/* The kernel sometimes fails to deliver SIGHUP for ptys.
- This looks incorrect, but it isn't, because _BSD causes
- O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
- and that causes a value other than 0 when there is no input. */
+ This looks incorrect, but it isn't, because _BSD causes
+ O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
+ and that causes a value other than 0 when there is no input. */
if (nread == 0)
- return -2; /* Close this terminal. */
+ return -2; /* Close this terminal. */
#endif
}
while (
- /* We used to retry the read if it was interrupted.
- But this does the wrong thing when O_NONBLOCK causes
- an EAGAIN error. Does anybody know of a situation
- where a retry is actually needed? */
+ /* We used to retry the read if it was interrupted.
+ But this does the wrong thing when O_NONBLOCK causes
+ an EAGAIN error. Does anybody know of a situation
+ where a retry is actually needed? */
#if 0
- nread < 0 && (errno == EAGAIN || errno == EFAULT
+ nread < 0 && (errno == EAGAIN || errno == EFAULT
#ifdef EBADSLT
- || errno == EBADSLT
+ || errno == EBADSLT
#endif
- )
+ )
#else
- 0
+ 0
#endif
- );
+ );
#ifndef USABLE_FIONREAD
#if defined (USG) || defined (CYGWIN)
@@ -7107,23 +7107,23 @@ tty_read_avail_input (struct terminal *terminal,
buf.kind = ASCII_KEYSTROKE_EVENT;
buf.modifiers = 0;
if (tty->meta_key == 1 && (cbuf[i] & 0x80))
- buf.modifiers = meta_modifier;
+ buf.modifiers = meta_modifier;
if (tty->meta_key != 2)
- cbuf[i] &= ~0x80;
+ cbuf[i] &= ~0x80;
buf.code = cbuf[i];
/* Set the frame corresponding to the active tty. Note that the
- value of selected_frame is not reliable here, redisplay tends
- to temporarily change it. */
+ value of selected_frame is not reliable here, redisplay tends
+ to temporarily change it. */
buf.frame_or_window = tty->top_frame;
buf.arg = Qnil;
kbd_buffer_store_event (&buf);
/* Don't look at input that follows a C-g too closely.
- This reduces lossage due to autorepeat on C-g. */
+ This reduces lossage due to autorepeat on C-g. */
if (buf.kind == ASCII_KEYSTROKE_EVENT
- && buf.code == quit_char)
- break;
+ && buf.code == quit_char)
+ break;
}
return nread;
@@ -7267,18 +7267,18 @@ handle_user_signal (int sig)
for (p = user_signals; p; p = p->next)
if (p->sig == sig)
{
- if (special_event_name
+ if (special_event_name
&& strcmp (special_event_name, p->name) == 0)
- {
- /* Enter the debugger in many ways. */
- debug_on_next_call = true;
- debug_on_quit = true;
- Vquit_flag = Qt;
- Vinhibit_quit = Qnil;
+ {
+ /* Enter the debugger in many ways. */
+ debug_on_next_call = true;
+ debug_on_quit = true;
+ Vquit_flag = Qt;
+ Vinhibit_quit = Qnil;
- /* Eat the event. */
- break;
- }
+ /* Eat the event. */
+ break;
+ }
p->npending++;
#ifdef USABLE_SIGIO
@@ -7386,7 +7386,7 @@ menu_separator_name_p (const char *label)
label += 2;
for (i = 0; separator_names[i]; ++i)
if (strcmp (label, separator_names[i]) == 0)
- return 1;
+ return 1;
}
else
{
@@ -8249,19 +8249,19 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
return 0;
}
else if (EQ (ikey, QChelp))
- /* `:help HELP-STRING'. */
- set_prop (TOOL_BAR_ITEM_HELP, value);
+ /* `:help HELP-STRING'. */
+ set_prop (TOOL_BAR_ITEM_HELP, value);
else if (EQ (ikey, QCvert_only))
- /* `:vert-only t/nil'. */
- set_prop (TOOL_BAR_ITEM_VERT_ONLY, value);
+ /* `:vert-only t/nil'. */
+ set_prop (TOOL_BAR_ITEM_VERT_ONLY, value);
else if (EQ (ikey, QClabel))
- {
- const char *bad_label = "!!?GARBLED ITEM?!!";
- /* `:label LABEL-STRING'. */
- set_prop (TOOL_BAR_ITEM_LABEL,
+ {
+ const char *bad_label = "!!?GARBLED ITEM?!!";
+ /* `:label LABEL-STRING'. */
+ set_prop (TOOL_BAR_ITEM_LABEL,
STRINGP (value) ? value : build_string (bad_label));
- have_label = true;
- }
+ have_label = true;
+ }
else if (EQ (ikey, QCfilter))
/* ':filter FORM'. */
filter = value;
@@ -8285,7 +8285,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
of 4 such specifications for the different button states. */
set_prop (TOOL_BAR_ITEM_IMAGES, value);
else if (EQ (ikey, QCrtl))
- /* ':rtl STRING' */
+ /* ':rtl STRING' */
set_prop (TOOL_BAR_ITEM_RTL_IMAGE, value);
}
@@ -8304,33 +8304,33 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
ptrdiff_t caption_len = strlen (capt);
if (caption_len <= max_lbl && capt[0] != '\0')
- {
- strcpy (buf, capt);
- while (caption_len > 0 && buf[caption_len - 1] == '.')
- caption_len--;
+ {
+ strcpy (buf, capt);
+ while (caption_len > 0 && buf[caption_len - 1] == '.')
+ caption_len--;
buf[caption_len] = '\0';
label = capt = buf;
- }
+ }
if (strlen (label) <= max_lbl && label[0] != '\0')
- {
- ptrdiff_t j;
- if (label != buf)
+ {
+ ptrdiff_t j;
+ if (label != buf)
strcpy (buf, label);
- for (j = 0; buf[j] != '\0'; ++j)
+ for (j = 0; buf[j] != '\0'; ++j)
if (buf[j] == '-')
buf[j] = ' ';
- label = buf;
- }
+ label = buf;
+ }
else
label = "";
new_lbl = Fupcase_initials (build_string (label));
if (SCHARS (new_lbl) <= tool_bar_max_label_size)
- set_prop (TOOL_BAR_ITEM_LABEL, new_lbl);
+ set_prop (TOOL_BAR_ITEM_LABEL, new_lbl);
else
- set_prop (TOOL_BAR_ITEM_LABEL, empty_unibyte_string);
+ set_prop (TOOL_BAR_ITEM_LABEL, empty_unibyte_string);
xfree (buf);
}
@@ -8977,16 +8977,16 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
of echoing, so that it serves as a prompt for the next
character. */
kset_echo_prompt (current_kboard, prompt);
- /* FIXME: This use of echo_now doesn't look quite right and is ugly
- since it forces us to fiddle with current_kboard->immediate_echo
- before and after. */
+ /* FIXME: This use of echo_now doesn't look quite right and is ugly
+ since it forces us to fiddle with current_kboard->immediate_echo
+ before and after. */
current_kboard->immediate_echo = false;
echo_now ();
- if (!echo_keystrokes_p ())
+ if (!echo_keystrokes_p ())
current_kboard->immediate_echo = false;
}
else if (cursor_in_echo_area /* FIXME: Not sure why we test this here,
- maybe we should just drop this test. */
+ maybe we should just drop this test. */
&& echo_keystrokes_p ())
/* This doesn't put in a dash if the echo buffer is empty, so
you don't always see a dash hanging out in the minibuffer. */
@@ -9052,10 +9052,10 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
bool used_mouse_menu = false;
/* Where the last real key started. If we need to throw away a
- key that has expanded into more than one element of keybuf
- (say, a mouse click on the mode line which is being treated
- as [mode-line (mouse-...)], then we backtrack to this point
- of keybuf. */
+ key that has expanded into more than one element of keybuf
+ (say, a mouse click on the mode line which is being treated
+ as [mode-line (mouse-...)], then we backtrack to this point
+ of keybuf. */
int last_real_key_start;
/* These variables are analogous to echo_start and keys_start;
@@ -9137,8 +9137,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
/* Calling read_char with COMMANDFLAG = -2 avoids
redisplay in read_char and its subroutines. */
key = read_char (prevent_redisplay ? -2 : NILP (prompt),
- current_binding, last_nonmenu_event,
- &used_mouse_menu, NULL);
+ current_binding, last_nonmenu_event,
+ &used_mouse_menu, NULL);
if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
/* When switching to a new tty (with a new keyboard),
read_char returns the new buffer, rather than -2
@@ -9982,7 +9982,7 @@ If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */)
process_special_events ();
return (get_input_pending ((NILP (check_timers)
- ? 0 : READABLE_EVENTS_DO_TIMERS_NOW)
+ ? 0 : READABLE_EVENTS_DO_TIMERS_NOW)
| READABLE_EVENTS_FILTER_EVENTS)
? Qt : Qnil);
}
@@ -10288,9 +10288,9 @@ handle_interrupt_signal (int sig)
if (!terminal)
{
/* If there are no frames there, let's pretend that we are a
- well-behaving UN*X program and quit. We must not call Lisp
- in a signal handler, so tell QUIT to exit when it is
- safe. */
+ well-behaving UN*X program and quit. We must not call Lisp
+ in a signal handler, so tell QUIT to exit when it is
+ safe. */
Vquit_flag = Qkill_emacs;
}
else
@@ -10298,9 +10298,9 @@ handle_interrupt_signal (int sig)
/* Otherwise, the SIGINT was probably generated by C-g. */
/* Set internal_last_event_frame to the top frame of the
- controlling tty, if we have a frame there. We disable the
- interrupt key on secondary ttys, so the SIGINT must have come
- from the controlling tty. */
+ controlling tty, if we have a frame there. We disable the
+ interrupt key on secondary ttys, so the SIGINT must have come
+ from the controlling tty. */
internal_last_event_frame = terminal->display_info.tty->top_frame;
handle_interrupt (1);
@@ -10459,27 +10459,27 @@ handle_interrupt (bool in_signal_handler)
gl_state = saved;
}
else
- { /* Else request quit when it's safe. */
+ { /* Else request quit when it's safe. */
int count = NILP (Vquit_flag) ? 1 : force_quit_count + 1;
force_quit_count = count;
if (count == 3)
- {
- immediate_quit = true;
- Vinhibit_quit = Qnil;
- }
- Vquit_flag = Qt;
- }
+ {
+ immediate_quit = true;
+ Vinhibit_quit = Qnil;
+ }
+ Vquit_flag = Qt;
+ }
}
pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
/* TODO: The longjmp in this call throws the NS event loop integration off,
- and it seems to do fine without this. Probably some attention
+ and it seems to do fine without this. Probably some attention
needs to be paid to the setting of waiting_for_input in
- wait_reading_process_output() under HAVE_NS because of the call
- to ns_select there (needed because otherwise events aren't picked up
- outside of polling since we don't get SIGIO like X and we don't have a
- separate event loop thread like W32. */
+ wait_reading_process_output() under HAVE_NS because of the call
+ to ns_select there (needed because otherwise events aren't picked up
+ outside of polling since we don't get SIGIO like X and we don't have a
+ separate event loop thread like W32. */
#ifndef HAVE_NS
if (waiting_for_input && !echoing)
quit_throw_to_read_char (in_signal_handler);
@@ -10935,11 +10935,11 @@ init_keyboard (void)
if (!noninteractive)
{
/* Before multi-tty support, these handlers used to be installed
- only if the current session was a tty session. Now an Emacs
- session may have multiple display types, so we always handle
- SIGINT. There is special code in handle_interrupt_signal to exit
- Emacs on SIGINT when there are no termcap frames on the
- controlling terminal. */
+ only if the current session was a tty session. Now an Emacs
+ session may have multiple display types, so we always handle
+ SIGINT. There is special code in handle_interrupt_signal to exit
+ Emacs on SIGINT when there are no termcap frames on the
+ controlling terminal. */
struct sigaction action;
emacs_sigaction_init (&action, deliver_interrupt_signal);
sigaction (SIGINT, &action, 0);
@@ -11050,7 +11050,7 @@ syms_of_keyboard (void)
DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary");
DEFSYM (Qundo_auto__undoably_changed_buffers,
- "undo-auto--undoably-changed-buffers");
+ "undo-auto--undoably-changed-buffers");
DEFSYM (Qdeferred_action_function, "deferred-action-function");
DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook");
@@ -11462,7 +11462,7 @@ Useful to set before you dump a modified Emacs. */);
XSYMBOL (Qtop_level)->declared_special = false;
DEFVAR_KBOARD ("keyboard-translate-table", Vkeyboard_translate_table,
- doc: /* Translate table for local keyboard input, or nil.
+ doc: /* Translate table for local keyboard input, or nil.
If non-nil, the value should be a char-table. Each character read
from the keyboard is looked up in this char-table. If the value found
there is non-nil, then it is used instead of the actual input character.
@@ -11604,7 +11604,7 @@ and SYMBOL is its name.
See Info node `(elisp)Multiple Terminals'. */);
DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map,
- doc: /* Keymap that translates key sequences to key sequences during input.
+ doc: /* Keymap that translates key sequences to key sequences during input.
This is used mainly for mapping key sequences into some preferred
key events (symbols).
@@ -11650,7 +11650,7 @@ The events that come from bindings in `input-decode-map' are not
themselves looked up in `input-decode-map'. */);
DEFVAR_LISP ("function-key-map", Vfunction_key_map,
- doc: /* The parent keymap of all `local-function-key-map' instances.
+ doc: /* The parent keymap of all `local-function-key-map' instances.
Function key definitions that apply to all terminal devices should go
here. If a mapping is defined in both the current
`local-function-key-map' binding and this variable, then the local
@@ -11658,7 +11658,7 @@ definition will take precedence. */);
Vfunction_key_map = Fmake_sparse_keymap (Qnil);
DEFVAR_LISP ("key-translation-map", Vkey_translation_map,
- doc: /* Keymap of key translations that can override keymaps.
+ doc: /* Keymap of key translations that can override keymaps.
This keymap works like `input-decode-map', but comes after `function-key-map'.
Another difference is that it is global rather than terminal-local. */);
Vkey_translation_map = Fmake_sparse_keymap (Qnil);
@@ -11675,7 +11675,7 @@ whenever `deferred-action-list' is non-nil. */);
Vdeferred_action_function = Qnil;
DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list,
- doc: /* List of warnings to be displayed after this command.
+ doc: /* List of warnings to be displayed after this command.
Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]),
as per the args of `display-warning' (which see).
If this variable is non-nil, `delayed-warnings-hook' will be run
@@ -11801,8 +11801,8 @@ if the command is in this list, the selection is not updated. */);
= list2 (Qhandle_switch_frame, Qhandle_select_window);
DEFVAR_LISP ("debug-on-event",
- Vdebug_on_event,
- doc: /* Enter debugger on this event. When Emacs
+ Vdebug_on_event,
+ doc: /* Enter debugger on this event. When Emacs
receives the special event specified by this variable, it will try to
break into the debugger as soon as possible instead of processing the
event normally through `special-event-map'.
@@ -11812,8 +11812,8 @@ variable are `sigusr1' and `sigusr2'. */);
Vdebug_on_event = intern_c_string ("sigusr2");
DEFVAR_BOOL ("attempt-stack-overflow-recovery",
- attempt_stack_overflow_recovery,
- doc: /* If non-nil, attempt to recover from C stack
+ attempt_stack_overflow_recovery,
+ doc: /* If non-nil, attempt to recover from C stack
overflow. This recovery is unsafe and may lead to deadlocks or data
corruption, but it usually works and may preserve modified buffers
that would otherwise be lost. If nil, treat stack overflow like any
@@ -11821,8 +11821,8 @@ other kind of crash. */);
attempt_stack_overflow_recovery = true;
DEFVAR_BOOL ("attempt-orderly-shutdown-on-fatal-signal",
- attempt_orderly_shutdown_on_fatal_signal,
- doc: /* If non-nil, attempt to perform an orderly
+ attempt_orderly_shutdown_on_fatal_signal,
+ doc: /* If non-nil, attempt to perform an orderly
shutdown when Emacs receives a fatal signal (e.g., a crash).
This cleanup is unsafe and may lead to deadlocks or data corruption,
but it usually works and may preserve modified buffers that would
@@ -11834,8 +11834,8 @@ signals. */);
initial_kboard = allocate_kboard (Qt);
DEFVAR_LISP ("while-no-input-ignore-events",
- Vwhile_no_input_ignore_events,
- doc: /* Ignored events from while-no-input. */);
+ Vwhile_no_input_ignore_events,
+ doc: /* Ignored events from while-no-input. */);
Vwhile_no_input_ignore_events = Qnil;
}
@@ -11901,7 +11901,7 @@ keys_of_keyboard (void)
/* Define a special event which is raised for notification callback
functions. */
initial_define_lispy_key (Vspecial_event_map, "file-notify",
- "file-notify-handle-event");
+ "file-notify-handle-event");
#endif /* USE_FILE_NOTIFY */
initial_define_lispy_key (Vspecial_event_map, "config-changed-event",
diff --git a/src/keyboard.h b/src/keyboard.h
index 435851f..cb2f9be 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -424,7 +424,7 @@ extern bool ignore_mouse_drag_p;
extern Lisp_Object parse_modifiers (Lisp_Object);
extern Lisp_Object reorder_modifiers (Lisp_Object);
extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
- bool *, struct timespec *);
+ bool *, struct timespec *);
extern int parse_solitary_modifier (Lisp_Object symbol);
@@ -477,9 +477,9 @@ extern void kbd_buffer_unget_event (struct selection_input_event *);
#endif
extern void poll_for_input_1 (void);
extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object, ptrdiff_t);
+ Lisp_Object, ptrdiff_t);
extern void kbd_buffer_store_help_event (Lisp_Object, Lisp_Object);
extern Lisp_Object menu_item_eval_property (Lisp_Object);
extern bool kbd_buffer_events_waiting (void);
diff --git a/src/keymap.c b/src/keymap.c
index c4a59ad..d6a4c2f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -92,11 +92,11 @@ static Lisp_Object define_as_prefix (Lisp_Object, Lisp_Object);
static void describe_command (Lisp_Object, Lisp_Object);
static void describe_translation (Lisp_Object, Lisp_Object);
static void describe_map (Lisp_Object, Lisp_Object,
- void (*) (Lisp_Object, Lisp_Object),
+ void (*) (Lisp_Object, Lisp_Object),
bool, Lisp_Object, Lisp_Object*, bool, bool);
static void describe_vector (Lisp_Object, Lisp_Object, Lisp_Object,
- void (*) (Lisp_Object, Lisp_Object), bool,
- Lisp_Object, Lisp_Object, bool, bool);
+ void (*) (Lisp_Object, Lisp_Object), bool,
+ Lisp_Object, Lisp_Object, bool, bool);
static void silly_event_symbol_error (Lisp_Object);
static Lisp_Object get_keyelt (Lisp_Object, bool);
@@ -388,7 +388,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
if (INTEGERP (idx) && XFASTINT (idx) & meta_modifier)
{
/* See if there is a meta-map. If there's none, there is
- no binding for IDX, unless a default binding exists in MAP. */
+ no binding for IDX, unless a default binding exists in MAP. */
Lisp_Object event_meta_binding, event_meta_map;
/* A strange value in which Meta is set would cause
infinite recursion. Protect against that. */
@@ -2347,7 +2347,7 @@ preferred_sequence_p (Lisp_Object seq)
/* where-is - finding a command in a set of keymaps. */
static void where_is_internal_1 (Lisp_Object key, Lisp_Object binding,
- Lisp_Object args, void *data);
+ Lisp_Object args, void *data);
/* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
Returns the first non-nil binding found in any of those maps.
@@ -3503,9 +3503,9 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
insert1 (Fkey_description (kludge, prefix));
/* Find all consecutive characters or rows that have the same
- definition. But, VECTOR is a char-table, we had better put a
- boundary between normal characters (-#x3FFF7F) and 8-bit
- characters (#x3FFF80-). */
+ definition. But, VECTOR is a char-table, we had better put a
+ boundary between normal characters (-#x3FFF7F) and 8-bit
+ characters (#x3FFF80-). */
if (CHAR_TABLE_P (vector))
{
while (i + 1 < stop
diff --git a/src/lisp.h b/src/lisp.h
index 1a586ca..49410c8 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -108,7 +108,7 @@ enum { EMACS_INT_WIDTH = LLONG_WIDTH };
of bool vectors. This should not vary across implementations. */
enum { BOOL_VECTOR_BITS_PER_CHAR =
#define BOOL_VECTOR_BITS_PER_CHAR 8
- BOOL_VECTOR_BITS_PER_CHAR
+ BOOL_VECTOR_BITS_PER_CHAR
};
/* An unsigned integer type representing a fixed-length bit sequence,
@@ -792,9 +792,9 @@ struct vectorlike_header
/* The only field contains various pieces of information:
- The MSB (ARRAY_MARK_FLAG) holds the gcmarkbit.
- The next bit (PSEUDOVECTOR_FLAG) indicates whether this is a plain
- vector (0) or a pseudovector (1).
+ vector (0) or a pseudovector (1).
- If PSEUDOVECTOR_FLAG is 0, the rest holds the size (number
- of slots) of the vector.
+ of slots) of the vector.
- If PSEUDOVECTOR_FLAG is 1, the rest is subdivided into three fields:
- a) pseudovector subtype held in PVEC_TYPE_MASK field;
- b) number of Lisp_Objects slots at the beginning of the object
@@ -3299,7 +3299,7 @@ enum Arith_Comparison {
ARITH_GRTR_OR_EQUAL
};
extern Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2,
- enum Arith_Comparison comparison);
+ enum Arith_Comparison comparison);
/* Convert the integer I to an Emacs representation, either the integer
itself, or a cons of two or three integers, or if all else fails a float.
@@ -3333,9 +3333,9 @@ enum Set_Internal_Bind {
SET_INTERNAL_THREAD_SWITCH
};
extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object,
- enum Set_Internal_Bind);
+ enum Set_Internal_Bind);
extern void set_default_internal (Lisp_Object, Lisp_Object,
- enum Set_Internal_Bind bindflag);
+ enum Set_Internal_Bind bindflag);
extern void syms_of_data (void);
extern void swap_in_global_binding (struct Lisp_Symbol *);
@@ -3346,7 +3346,7 @@ extern void keys_of_cmds (void);
/* Defined in coding.c. */
extern Lisp_Object detect_coding_system (const unsigned char *, ptrdiff_t,
- ptrdiff_t, bool, bool, Lisp_Object);
+ ptrdiff_t, bool, bool, Lisp_Object);
extern void init_coding (void);
extern void init_coding_once (void);
extern void syms_of_coding (void);
@@ -3375,7 +3375,7 @@ extern void sweep_weak_hash_tables (void);
EMACS_UINT hash_string (char const *, ptrdiff_t);
EMACS_UINT sxhash (Lisp_Object, int);
Lisp_Object make_hash_table (struct hash_table_test, Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object);
+ Lisp_Object, Lisp_Object);
ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *);
ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
EMACS_UINT);
@@ -3715,11 +3715,11 @@ extern void r_alloc_inhibit_buffer_relocation (int);
/* Defined in chartab.c. */
extern Lisp_Object copy_char_table (Lisp_Object);
extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
- int *, int *);
+ int *, int *);
extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object);
extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
- Lisp_Object),
- Lisp_Object, Lisp_Object, Lisp_Object);
+ Lisp_Object),
+ Lisp_Object, Lisp_Object, Lisp_Object);
extern void map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
Lisp_Object, Lisp_Object,
Lisp_Object, struct charset *,
@@ -3736,7 +3736,7 @@ extern void write_string (const char *);
extern void print_error_message (Lisp_Object, Lisp_Object, const char *,
Lisp_Object);
extern Lisp_Object internal_with_output_to_temp_buffer
- (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
+ (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
#define FLOAT_TO_STRING_BUFSIZE 350
extern int float_to_string (char *, double);
extern void init_print_once (void);
@@ -3768,10 +3768,10 @@ LOADHIST_ATTACH (Lisp_Object x)
Vcurrent_load_list = Fcons (x, Vcurrent_load_list);
}
extern int openp (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object *, Lisp_Object, bool);
+ Lisp_Object *, Lisp_Object, bool);
extern Lisp_Object string_to_number (char const *, int, bool);
extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object),
- Lisp_Object);
+ Lisp_Object);
extern void dir_warning (const char *, Lisp_Object);
extern void init_obarray (void);
extern void init_lread (void);
@@ -3907,7 +3907,7 @@ extern void adjust_overlays_for_insert (ptrdiff_t, ptrdiff_t);
extern void adjust_overlays_for_delete (ptrdiff_t, ptrdiff_t);
extern void fix_start_end_in_overlays (ptrdiff_t, ptrdiff_t);
extern void report_overlay_modification (Lisp_Object, Lisp_Object, bool,
- Lisp_Object, Lisp_Object, Lisp_Object);
+ Lisp_Object, Lisp_Object, Lisp_Object);
extern bool overlay_touches_p (ptrdiff_t);
extern Lisp_Object other_buffer_safely (Lisp_Object);
extern Lisp_Object get_truename_buffer (Lisp_Object);
@@ -3927,7 +3927,7 @@ extern void unchain_marker (struct Lisp_Marker *marker);
extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,
- ptrdiff_t, ptrdiff_t);
+ ptrdiff_t, ptrdiff_t);
extern Lisp_Object build_marker (struct buffer *, ptrdiff_t, ptrdiff_t);
extern void syms_of_marker (void);
@@ -3955,7 +3955,7 @@ extern Lisp_Object make_temp_name (Lisp_Object, bool);
extern void shrink_regexp_cache (void);
extern void restore_search_regs (void);
extern void update_search_regs (ptrdiff_t oldstart,
- ptrdiff_t oldend, ptrdiff_t newend);
+ ptrdiff_t oldend, ptrdiff_t newend);
extern void record_unwind_save_match_data (void);
struct re_registers;
extern struct re_pattern_buffer *compile_pattern (Lisp_Object,
@@ -3979,7 +3979,7 @@ fast_string_match_ignore_case (Lisp_Object regexp, Lisp_Object string)
extern ptrdiff_t fast_c_string_match_ignore_case (Lisp_Object, const char *,
ptrdiff_t);
extern ptrdiff_t fast_looking_at (Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t, ptrdiff_t, Lisp_Object);
+ ptrdiff_t, ptrdiff_t, Lisp_Object);
extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool);
extern ptrdiff_t scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
@@ -4184,7 +4184,7 @@ extern void record_first_change (void);
extern void record_change (ptrdiff_t, ptrdiff_t);
extern void record_property_change (ptrdiff_t, ptrdiff_t,
Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
extern void syms_of_undo (void);
/* Defined in textprop.c. */
@@ -4254,8 +4254,8 @@ extern void syms_of_ccl (void);
/* Defined in dired.c. */
extern void syms_of_dired (void);
extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object,
- bool, Lisp_Object);
+ Lisp_Object, Lisp_Object,
+ bool, Lisp_Object);
/* Defined in term.c. */
extern int *char_ins_del_vector;
diff --git a/src/lread.c b/src/lread.c
index 35348f1..fbc6da7 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -122,11 +122,11 @@ static bool new_backquote_flag;
static Lisp_Object Vloads_in_progress;
static int read_emacs_mule_char (int, int (*) (int, Lisp_Object),
- Lisp_Object);
+ Lisp_Object);
static void readevalloop (Lisp_Object, FILE *, Lisp_Object, bool,
- Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object);
+ Lisp_Object, Lisp_Object,
+ Lisp_Object, Lisp_Object);
\f
/* Functions that read one byte from the current source READCHARFUN
or unreads one byte. If the integer argument C is -1, it returns
@@ -549,7 +549,7 @@ read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object rea
static Lisp_Object read_internal_start (Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
static Lisp_Object read0 (Lisp_Object);
static Lisp_Object read1 (Lisp_Object, int *, bool);
@@ -557,9 +557,9 @@ static Lisp_Object read_list (bool, Lisp_Object);
static Lisp_Object read_vector (Lisp_Object, bool);
static Lisp_Object substitute_object_recurse (Lisp_Object, Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
static void substitute_object_in_subtree (Lisp_Object,
- Lisp_Object);
+ Lisp_Object);
static void substitute_in_interval (INTERVAL, Lisp_Object);
\f
@@ -781,16 +781,16 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun)
{
ch = READCHAR;
if (ch != '!')
- {
- UNREAD (ch);
- UNREAD ('#');
- return 0;
- }
+ {
+ UNREAD (ch);
+ UNREAD ('#');
+ return 0;
+ }
while (ch != '\n' && ch != EOF)
- ch = READCHAR;
+ ch = READCHAR;
if (ch == '\n') ch = READCHAR;
/* It is OK to leave the position after a #! line, since
- that is what read1 does. */
+ that is what read1 does. */
}
if (ch != ';')
@@ -1194,9 +1194,9 @@ Return t if the file exists and loads successfully. */)
/* Get the name for load-history. */
hist_file_name = (! NILP (Vpurify_flag)
- ? concat2 (Ffile_name_directory (file),
- Ffile_name_nondirectory (found))
- : found) ;
+ ? concat2 (Ffile_name_directory (file),
+ Ffile_name_nondirectory (found))
+ : found) ;
version = -1;
@@ -1232,35 +1232,35 @@ Return t if the file exists and loads successfully. */)
efound = ENCODE_FILE (found);
fmode = "r" FOPEN_BINARY;
- /* openp already checked for newness, no point doing it again.
- FIXME would be nice to get a message when openp
- ignores suffix order due to load_prefer_newer. */
- if (!load_prefer_newer && is_elc)
- {
- result = stat (SSDATA (efound), &s1);
- if (result == 0)
- {
- SSET (efound, SBYTES (efound) - 1, 0);
- result = stat (SSDATA (efound), &s2);
- SSET (efound, SBYTES (efound) - 1, 'c');
- }
-
- if (result == 0
- && timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0)
- {
- /* Make the progress messages mention that source is newer. */
- newer = 1;
-
- /* If we won't print another message, mention this anyway. */
- if (!NILP (nomessage) && !force_load_messages)
- {
- Lisp_Object msg_file;
- msg_file = Fsubstring (found, make_number (0), make_number (-1));
- message_with_string ("Source file `%s' newer than byte-compiled file",
- msg_file, 1);
- }
- }
- } /* !load_prefer_newer */
+ /* openp already checked for newness, no point doing it again.
+ FIXME would be nice to get a message when openp
+ ignores suffix order due to load_prefer_newer. */
+ if (!load_prefer_newer && is_elc)
+ {
+ result = stat (SSDATA (efound), &s1);
+ if (result == 0)
+ {
+ SSET (efound, SBYTES (efound) - 1, 0);
+ result = stat (SSDATA (efound), &s2);
+ SSET (efound, SBYTES (efound) - 1, 'c');
+ }
+
+ if (result == 0
+ && timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0)
+ {
+ /* Make the progress messages mention that source is newer. */
+ newer = 1;
+
+ /* If we won't print another message, mention this anyway. */
+ if (!NILP (nomessage) && !force_load_messages)
+ {
+ Lisp_Object msg_file;
+ msg_file = Fsubstring (found, make_number (0), make_number (-1));
+ message_with_string ("Source file `%s' newer than byte-compiled file",
+ msg_file, 1);
+ }
+ }
+ } /* !load_prefer_newer */
}
}
else
@@ -1509,9 +1509,9 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
/* Check that the file exists and is not a directory. */
/* We used to only check for handlers on non-absolute file names:
- if (absolute)
- handler = Qnil;
- else
+ if (absolute)
+ handler = Qnil;
+ else
handler = Ffind_file_name_handler (filename, Qfile_exists_p);
It's not clear why that was the case and it breaks things like
(load "/bar.el") where the file is actually "/bar.el.gz". */
@@ -1530,7 +1530,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
handler = Ffind_file_name_handler (string, Qfile_exists_p);
if ((!NILP (handler) || (!NILP (predicate) && !EQ (predicate, Qt)))
&& !NATNUMP (predicate))
- {
+ {
bool exists;
if (NILP (predicate) || EQ (predicate, Qt))
exists = !NILP (Ffile_readable_p (string));
@@ -1551,11 +1551,11 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
if (exists)
{
- /* We succeeded; return this descriptor and filename. */
- if (storeptr)
- *storeptr = string;
+ /* We succeeded; return this descriptor and filename. */
+ if (storeptr)
+ *storeptr = string;
SAFE_FREE ();
- return -2;
+ return -2;
}
}
else
@@ -1606,39 +1606,39 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
if (fd >= 0)
{
- if (newer && !NATNUMP (predicate))
- {
- struct timespec mtime = get_stat_mtime (&st);
+ if (newer && !NATNUMP (predicate))
+ {
+ struct timespec mtime = get_stat_mtime (&st);
if (timespec_cmp (mtime, save_mtime) <= 0)
emacs_close (fd);
else
- {
+ {
if (0 <= save_fd)
emacs_close (save_fd);
- save_fd = fd;
- save_mtime = mtime;
- save_string = string;
- }
- }
- else
- {
- /* We succeeded; return this descriptor and filename. */
- if (storeptr)
- *storeptr = string;
+ save_fd = fd;
+ save_mtime = mtime;
+ save_string = string;
+ }
+ }
+ else
+ {
+ /* We succeeded; return this descriptor and filename. */
+ if (storeptr)
+ *storeptr = string;
SAFE_FREE ();
- return fd;
- }
+ return fd;
+ }
}
- /* No more suffixes. Return the newest. */
+ /* No more suffixes. Return the newest. */
if (0 <= save_fd && ! CONSP (XCDR (tail)))
- {
- if (storeptr)
- *storeptr = save_string;
+ {
+ if (storeptr)
+ *storeptr = save_string;
SAFE_FREE ();
- return save_fd;
- }
+ return save_fd;
+ }
}
}
if (absolute)
@@ -1752,8 +1752,8 @@ readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand)
Lisp_Object subforms = XCDR (val);
for (val = Qnil; CONSP (subforms); subforms = XCDR (subforms))
- val = readevalloop_eager_expand_eval (XCAR (subforms),
- macroexpand);
+ val = readevalloop_eager_expand_eval (XCAR (subforms),
+ macroexpand);
}
else
val = eval_sub (call2 (macroexpand, val, Qt));
@@ -1901,7 +1901,7 @@ readevalloop (Lisp_Object readcharfun,
val = call1 (readfun, readcharfun);
/* If READCHARFUN has set point to ZV, we should
- stop reading, even if the form read sets point
+ stop reading, even if the form read sets point
to a different value when evaluated. */
if (BUFFERP (readcharfun))
{
@@ -1924,9 +1924,9 @@ readevalloop (Lisp_Object readcharfun,
/* Now eval what we just read. */
if (!NILP (macroexpand))
- val = readevalloop_eager_expand_eval (val, macroexpand);
+ val = readevalloop_eager_expand_eval (val, macroexpand);
else
- val = eval_sub (val);
+ val = eval_sub (val);
if (printflag)
{
@@ -2393,7 +2393,7 @@ read_escape (Lisp_Object readcharfun, bool stringp)
want. */
if (c >= '0' && c <= '9') i = (i << 4) + (c - '0');
else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10;
- else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10;
+ else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10;
else
error ("Non-hex digit used for Unicode escape");
}
@@ -2405,44 +2405,44 @@ read_escape (Lisp_Object readcharfun, bool stringp)
case 'N':
/* Named character. */
{
- c = READCHAR;
- if (c != '{')
- invalid_syntax ("Expected opening brace after \\N");
- char name[UNICODE_CHARACTER_NAME_LENGTH_BOUND + 1];
- bool whitespace = false;
- ptrdiff_t length = 0;
- while (true)
- {
- c = READCHAR;
- if (c < 0)
- end_of_file_error ();
- if (c == '}')
- break;
- if (! (0 < c && c < 0x80))
- {
- AUTO_STRING (format,
- "Invalid character U+%04X in character name");
- xsignal1 (Qinvalid_read_syntax,
- CALLN (Fformat, format, make_natnum (c)));
- }
- /* Treat multiple adjacent whitespace characters as a
- single space character. This makes it easier to use
- character names in e.g. multi-line strings. */
- if (c_isspace (c))
- {
- if (whitespace)
- continue;
- c = ' ';
- whitespace = true;
- }
- else
- whitespace = false;
- name[length++] = c;
- if (length >= sizeof name)
- invalid_syntax ("Character name too long");
- }
- if (length == 0)
- invalid_syntax ("Empty character name");
+ c = READCHAR;
+ if (c != '{')
+ invalid_syntax ("Expected opening brace after \\N");
+ char name[UNICODE_CHARACTER_NAME_LENGTH_BOUND + 1];
+ bool whitespace = false;
+ ptrdiff_t length = 0;
+ while (true)
+ {
+ c = READCHAR;
+ if (c < 0)
+ end_of_file_error ();
+ if (c == '}')
+ break;
+ if (! (0 < c && c < 0x80))
+ {
+ AUTO_STRING (format,
+ "Invalid character U+%04X in character name");
+ xsignal1 (Qinvalid_read_syntax,
+ CALLN (Fformat, format, make_natnum (c)));
+ }
+ /* Treat multiple adjacent whitespace characters as a
+ single space character. This makes it easier to use
+ character names in e.g. multi-line strings. */
+ if (c_isspace (c))
+ {
+ if (whitespace)
+ continue;
+ c = ' ';
+ whitespace = true;
+ }
+ else
+ whitespace = false;
+ name[length++] = c;
+ if (length >= sizeof name)
+ invalid_syntax ("Character name too long");
+ }
+ if (length == 0)
+ invalid_syntax ("Empty character name");
name[length] = '\0';
/* character_name_to_code can invoke read1, recursively.
@@ -2814,9 +2814,9 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
}
if (nskip > 0)
/* We can't use UNREAD here, because in the code below we side-step
- READCHAR. Instead, assume the first char after #@NNN occupies
- a single byte, which is the case normally since it's just
- a space. */
+ READCHAR. Instead, assume the first char after #@NNN occupies
+ a single byte, which is the case normally since it's just
+ a space. */
nskip--;
else
UNREAD (c);
@@ -2929,7 +2929,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
if (! NILP (Vread_circle))
{
/* #n=object returns object, but associates it with
- n for #n#. */
+ n for #n#. */
if (c == '=')
{
/* Make a placeholder for #n# to use temporarily. */
@@ -3024,7 +3024,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
int next_char = READCHAR;
UNREAD (next_char);
/* Transition from old-style to new-style:
- It used to be impossible to have a new-style , other than within
+ It used to be impossible to have a new-style , other than within
a new-style `. This is sufficient when ` and , are used in the
normal way, but ` and , can also appear in args to macros that
will not interpret them in the usual way, in which case , may be
@@ -4255,11 +4255,11 @@ load_path_check (Lisp_Object lpath)
Lisp_Object dirfile;
dirfile = Fcar (path_tail);
if (STRINGP (dirfile))
- {
- dirfile = Fdirectory_file_name (dirfile);
- if (! file_accessible_directory_p (dirfile))
- dir_warning ("Lisp directory", XCAR (path_tail));
- }
+ {
+ dirfile = Fdirectory_file_name (dirfile);
+ if (! file_accessible_directory_p (dirfile))
+ dir_warning ("Lisp directory", XCAR (path_tail));
+ }
}
}
@@ -4328,98 +4328,98 @@ load_path_default (void)
lpath = decode_env_path (0, normal, 0);
#endif
if (!NILP (Vinstallation_directory))
- {
- Lisp_Object tem, tem1;
-
- /* Add to the path the lisp subdir of the installation
- dir, if it is accessible. Note: in out-of-tree builds,
- this directory is empty save for Makefile. */
- tem = Fexpand_file_name (build_string ("lisp"),
- Vinstallation_directory);
- tem1 = Ffile_accessible_directory_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, lpath)))
- {
- /* We are running uninstalled. The default load-path
- points to the eventual installed lisp directories.
- We should not use those now, even if they exist,
- so start over from a clean slate. */
- lpath = list1 (tem);
- }
- }
- else
- /* That dir doesn't exist, so add the build-time
- Lisp dirs instead. */
- {
- Lisp_Object dump_path =
- decode_env_path (0, PATH_DUMPLOADSEARCH, 0);
- lpath = nconc2 (lpath, dump_path);
- }
-
- /* Add site-lisp under the installation dir, if it exists. */
- if (!no_site_lisp)
- {
- tem = Fexpand_file_name (build_string ("site-lisp"),
- Vinstallation_directory);
- tem1 = Ffile_accessible_directory_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, lpath)))
- lpath = Fcons (tem, lpath);
- }
- }
-
- /* If Emacs was not built in the source directory,
- and it is run from where it was built, add to load-path
- the lisp and site-lisp dirs under that directory. */
-
- if (NILP (Fequal (Vinstallation_directory, Vsource_directory)))
- {
- Lisp_Object tem2;
-
- tem = Fexpand_file_name (build_string ("src/Makefile"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
-
- /* Don't be fooled if they moved the entire source tree
- AFTER dumping Emacs. If the build directory is indeed
- different from the source dir, src/Makefile.in and
- src/Makefile will not be found together. */
- tem = Fexpand_file_name (build_string ("src/Makefile.in"),
- Vinstallation_directory);
- tem2 = Ffile_exists_p (tem);
- if (!NILP (tem1) && NILP (tem2))
- {
- tem = Fexpand_file_name (build_string ("lisp"),
- Vsource_directory);
-
- if (NILP (Fmember (tem, lpath)))
- lpath = Fcons (tem, lpath);
-
- if (!no_site_lisp)
- {
- tem = Fexpand_file_name (build_string ("site-lisp"),
- Vsource_directory);
- tem1 = Ffile_accessible_directory_p (tem);
- if (!NILP (tem1))
- {
- if (NILP (Fmember (tem, lpath)))
- lpath = Fcons (tem, lpath);
- }
- }
- }
- } /* Vinstallation_directory != Vsource_directory */
-
- } /* if Vinstallation_directory */
+ {
+ Lisp_Object tem, tem1;
+
+ /* Add to the path the lisp subdir of the installation
+ dir, if it is accessible. Note: in out-of-tree builds,
+ this directory is empty save for Makefile. */
+ tem = Fexpand_file_name (build_string ("lisp"),
+ Vinstallation_directory);
+ tem1 = Ffile_accessible_directory_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, lpath)))
+ {
+ /* We are running uninstalled. The default load-path
+ points to the eventual installed lisp directories.
+ We should not use those now, even if they exist,
+ so start over from a clean slate. */
+ lpath = list1 (tem);
+ }
+ }
+ else
+ /* That dir doesn't exist, so add the build-time
+ Lisp dirs instead. */
+ {
+ Lisp_Object dump_path =
+ decode_env_path (0, PATH_DUMPLOADSEARCH, 0);
+ lpath = nconc2 (lpath, dump_path);
+ }
+
+ /* Add site-lisp under the installation dir, if it exists. */
+ if (!no_site_lisp)
+ {
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vinstallation_directory);
+ tem1 = Ffile_accessible_directory_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, lpath)))
+ lpath = Fcons (tem, lpath);
+ }
+ }
+
+ /* If Emacs was not built in the source directory,
+ and it is run from where it was built, add to load-path
+ the lisp and site-lisp dirs under that directory. */
+
+ if (NILP (Fequal (Vinstallation_directory, Vsource_directory)))
+ {
+ Lisp_Object tem2;
+
+ tem = Fexpand_file_name (build_string ("src/Makefile"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+
+ /* Don't be fooled if they moved the entire source tree
+ AFTER dumping Emacs. If the build directory is indeed
+ different from the source dir, src/Makefile.in and
+ src/Makefile will not be found together. */
+ tem = Fexpand_file_name (build_string ("src/Makefile.in"),
+ Vinstallation_directory);
+ tem2 = Ffile_exists_p (tem);
+ if (!NILP (tem1) && NILP (tem2))
+ {
+ tem = Fexpand_file_name (build_string ("lisp"),
+ Vsource_directory);
+
+ if (NILP (Fmember (tem, lpath)))
+ lpath = Fcons (tem, lpath);
+
+ if (!no_site_lisp)
+ {
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vsource_directory);
+ tem1 = Ffile_accessible_directory_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, lpath)))
+ lpath = Fcons (tem, lpath);
+ }
+ }
+ }
+ } /* Vinstallation_directory != Vsource_directory */
+
+ } /* if Vinstallation_directory */
}
else /* !initialized */
{
/* NORMAL refers to PATH_DUMPLOADSEARCH, ie the lisp dir in the
- source directory. We used to add ../lisp (ie the lisp dir in
- the build directory) at the front here, but that should not
- be necessary, since in out of tree builds lisp/ is empty, save
- for Makefile. */
+ source directory. We used to add ../lisp (ie the lisp dir in
+ the build directory) at the front here, but that should not
+ be necessary, since in out of tree builds lisp/ is empty, save
+ for Makefile. */
lpath = decode_env_path (0, normal, 0);
}
#endif /* !CANNOT_DUMP */
@@ -4447,53 +4447,53 @@ init_lread (void)
load_path_check (Vload_path);
/* If no nils in the environment variable, use as-is.
- Otherwise, replace any nils with the default. */
+ Otherwise, replace any nils with the default. */
if (! NILP (Fmemq (Qnil, Vload_path)))
- {
- Lisp_Object elem, elpath = Vload_path;
- Lisp_Object default_lpath = load_path_default ();
-
- /* Check defaults, before adding site-lisp. */
- load_path_check (default_lpath);
-
- /* Add the site-lisp directories to the front of the default. */
- if (!no_site_lisp && PATH_SITELOADSEARCH[0] != '\0')
- {
- Lisp_Object sitelisp;
- sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);
- if (! NILP (sitelisp))
- default_lpath = nconc2 (sitelisp, default_lpath);
- }
-
- Vload_path = Qnil;
-
- /* Replace nils from EMACSLOADPATH by default. */
- while (CONSP (elpath))
- {
- elem = XCAR (elpath);
- elpath = XCDR (elpath);
- Vload_path = CALLN (Fappend, Vload_path,
+ {
+ Lisp_Object elem, elpath = Vload_path;
+ Lisp_Object default_lpath = load_path_default ();
+
+ /* Check defaults, before adding site-lisp. */
+ load_path_check (default_lpath);
+
+ /* Add the site-lisp directories to the front of the default. */
+ if (!no_site_lisp && PATH_SITELOADSEARCH[0] != '\0')
+ {
+ Lisp_Object sitelisp;
+ sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);
+ if (! NILP (sitelisp))
+ default_lpath = nconc2 (sitelisp, default_lpath);
+ }
+
+ Vload_path = Qnil;
+
+ /* Replace nils from EMACSLOADPATH by default. */
+ while (CONSP (elpath))
+ {
+ elem = XCAR (elpath);
+ elpath = XCDR (elpath);
+ Vload_path = CALLN (Fappend, Vload_path,
NILP (elem) ? default_lpath : list1 (elem));
- }
- } /* Fmemq (Qnil, Vload_path) */
+ }
+ } /* Fmemq (Qnil, Vload_path) */
}
else
{
Vload_path = load_path_default ();
/* Check before adding site-lisp directories.
- The install should have created them, but they are not
- required, so no need to warn if they are absent.
- Or we might be running before installation. */
+ The install should have created them, but they are not
+ required, so no need to warn if they are absent.
+ Or we might be running before installation. */
load_path_check (Vload_path);
/* Add the site-lisp directories at the front. */
if (initialized && !no_site_lisp && PATH_SITELOADSEARCH[0] != '\0')
- {
- Lisp_Object sitelisp;
- sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);
- if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path);
- }
+ {
+ Lisp_Object sitelisp;
+ sitelisp = decode_env_path (0, PATH_SITELOADSEARCH, 0);
+ if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path);
+ }
}
Vvalues = Qnil;
@@ -4798,7 +4798,7 @@ variables, this must be set in the first line of a file. */);
DEFSYM (Qold_style_backquotes, "old-style-backquotes");
DEFVAR_BOOL ("load-prefer-newer", load_prefer_newer,
- doc: /* Non-nil means `load' prefers the newest version of a file.
+ doc: /* Non-nil means `load' prefers the newest version of a file.
This applies when a filename suffix is not explicitly specified and
`load' is trying various possible suffixes (see `load-suffixes' and
`load-file-rep-suffixes'). Normally, it stops at the first file
diff --git a/src/macros.c b/src/macros.c
index 0c703ba..3e43040 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -348,7 +348,7 @@ void
syms_of_macros (void)
{
DEFVAR_LISP ("kbd-macro-termination-hook", Vkbd_macro_termination_hook,
- doc: /* Normal hook run whenever a keyboard macro terminates.
+ doc: /* Normal hook run whenever a keyboard macro terminates.
This is run whether the macro ends normally or prematurely due to an error. */);
Vkbd_macro_termination_hook = Qnil;
DEFSYM (Qkbd_macro_termination_hook, "kbd-macro-termination-hook");
diff --git a/src/marker.c b/src/marker.c
index 05e5bb8..cd35391 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -118,7 +118,7 @@ clear_charpos_cache (struct buffer *b)
if (changed) \
{ \
if (best_above - best_below == best_above_byte - best_below_byte) \
- { \
+ { \
ptrdiff_t value = best_below_byte + (charpos - best_below); \
\
byte_char_debug_check (b, charpos, value); \
diff --git a/src/menu.c b/src/menu.c
index 8070967..fc4a9cb 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -258,7 +258,7 @@ struct skp
};
static void single_menu_item (Lisp_Object, Lisp_Object, Lisp_Object,
- void *);
+ void *);
/* This is a recursive subroutine of keymap_panes.
It handles one keymap, KEYMAP.
@@ -857,24 +857,24 @@ update_submenu_strings (widget_value *first_wv)
for (wv = first_wv; wv; wv = wv->next)
{
if (STRINGP (wv->lname))
- {
- wv->name = SSDATA (wv->lname);
-
- /* Ignore the @ that means "separate pane".
- This is a kludge, but this isn't worth more time. */
- if (wv->value == (char *)1)
- {
- if (wv->name[0] == '@')
+ {
+ wv->name = SSDATA (wv->lname);
+
+ /* Ignore the @ that means "separate pane".
+ This is a kludge, but this isn't worth more time. */
+ if (wv->value == (char *)1)
+ {
+ if (wv->name[0] == '@')
wv->name++;
- wv->value = 0;
- }
- }
+ wv->value = 0;
+ }
+ }
if (STRINGP (wv->lkey))
- wv->key = SSDATA (wv->lkey);
+ wv->key = SSDATA (wv->lkey);
if (wv->contents)
- update_submenu_strings (wv->contents);
+ update_submenu_strings (wv->contents);
}
}
@@ -986,48 +986,48 @@ find_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data
while (i < menu_items_used)
{
if (EQ (AREF (menu_items, i), Qnil))
- {
- subprefix_stack[submenu_depth++] = prefix;
- prefix = entry;
- i++;
- }
+ {
+ subprefix_stack[submenu_depth++] = prefix;
+ prefix = entry;
+ i++;
+ }
else if (EQ (AREF (menu_items, i), Qlambda))
- {
- prefix = subprefix_stack[--submenu_depth];
- i++;
- }
+ {
+ prefix = subprefix_stack[--submenu_depth];
+ i++;
+ }
else if (EQ (AREF (menu_items, i), Qt))
- {
- prefix
- = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
- i += MENU_ITEMS_PANE_LENGTH;
- }
+ {
+ prefix
+ = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
+ i += MENU_ITEMS_PANE_LENGTH;
+ }
/* Ignore a nil in the item list.
- It's meaningful only for dialog boxes. */
+ It's meaningful only for dialog boxes. */
else if (EQ (AREF (menu_items, i), Qquote))
- i += 1;
+ i += 1;
else
- {
- entry
- = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
- if (aref_addr (menu_items, i) == client_data)
- {
- if (keymaps)
- {
- int j;
-
- entry = list1 (entry);
- if (!NILP (prefix))
- entry = Fcons (prefix, entry);
- for (j = submenu_depth - 1; j >= 0; j--)
- if (!NILP (subprefix_stack[j]))
- entry = Fcons (subprefix_stack[j], entry);
- }
+ {
+ entry
+ = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
+ if (aref_addr (menu_items, i) == client_data)
+ {
+ if (keymaps)
+ {
+ int j;
+
+ entry = list1 (entry);
+ if (!NILP (prefix))
+ entry = Fcons (prefix, entry);
+ for (j = submenu_depth - 1; j >= 0; j--)
+ if (!NILP (subprefix_stack[j]))
+ entry = Fcons (subprefix_stack[j], entry);
+ }
SAFE_FREE ();
- return entry;
- }
- i += MENU_ITEMS_ITEM_LENGTH;
- }
+ return entry;
+ }
+ i += MENU_ITEMS_ITEM_LENGTH;
+ }
}
SAFE_FREE ();
return Qnil;
diff --git a/src/menu.h b/src/menu.h
index 4c50efb..3a40e49 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -40,7 +40,7 @@ extern void list_of_panes (Lisp_Object);
extern void free_menubar_widget_value_tree (widget_value *);
extern void update_submenu_strings (widget_value *);
extern void find_and_call_menu_selection (struct frame *, int,
- Lisp_Object, void *);
+ Lisp_Object, void *);
extern widget_value *make_widget_value (const char *, char *, bool, Lisp_Object);
extern widget_value *digest_single_submenu (int, int, bool);
#endif
diff --git a/src/minibuf.c b/src/minibuf.c
index 7c5af34..611a4c3 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -804,7 +804,7 @@ get_minibuffer (EMACS_INT depth)
if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode"))))
call0 (intern ("minibuffer-inactive-mode"));
else
- Fkill_all_local_variables ();
+ Fkill_all_local_variables ();
unbind_to (count, Qnil);
}
@@ -1738,23 +1738,23 @@ the values STRING, PREDICATE and `lambda'. */)
struct Lisp_Hash_Table *h = XHASH_TABLE (collection);
i = hash_lookup (h, string, NULL);
if (i >= 0)
- {
- tem = HASH_KEY (h, i);
- goto found_matching_key;
- }
+ {
+ tem = HASH_KEY (h, i);
+ goto found_matching_key;
+ }
else
for (i = 0; i < HASH_TABLE_SIZE (h); ++i)
- {
- if (NILP (HASH_HASH (h, i))) continue;
- tem = HASH_KEY (h, i);
- Lisp_Object strkey = (SYMBOLP (tem) ? Fsymbol_name (tem) : tem);
- if (!STRINGP (strkey)) continue;
- if (EQ (Fcompare_strings (string, Qnil, Qnil,
- strkey, Qnil, Qnil,
- completion_ignore_case ? Qt : Qnil),
- Qt))
- goto found_matching_key;
- }
+ {
+ if (NILP (HASH_HASH (h, i))) continue;
+ tem = HASH_KEY (h, i);
+ Lisp_Object strkey = (SYMBOLP (tem) ? Fsymbol_name (tem) : tem);
+ if (!STRINGP (strkey)) continue;
+ if (EQ (Fcompare_strings (string, Qnil, Qnil,
+ strkey, Qnil, Qnil,
+ completion_ignore_case ? Qt : Qnil),
+ Qt))
+ goto found_matching_key;
+ }
return Qnil;
found_matching_key: ;
}
@@ -1769,9 +1769,9 @@ the values STRING, PREDICATE and `lambda'. */)
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
regexps = XCDR (regexps))
{
- /* We can test against STRING, because if we got here, then
- the element is equivalent to it. */
- if (NILP (Fstring_match (XCAR (regexps), string, Qnil)))
+ /* We can test against STRING, because if we got here, then
+ the element is equivalent to it. */
+ if (NILP (Fstring_match (XCAR (regexps), string, Qnil)))
return unbind_to (count, Qnil);
}
unbind_to (count, Qnil);
diff --git a/src/msdos.c b/src/msdos.c
index 74109ae..3219695 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -2480,7 +2480,7 @@ dos_rawgetc (void)
}
}
/* If the private table didn't translate it, use the general
- one. */
+ one. */
if (code == -1)
{
if (sc >= (sizeof (ibmpc_translate_map) / sizeof (short)))
@@ -2492,19 +2492,19 @@ dos_rawgetc (void)
if (c == 0)
{
- /* We only look at the keyboard Ctrl/Shift/Alt keys when
- Emacs is ready to read a key. Therefore, if they press
- `Alt-x' when Emacs is busy, by the time we get to
- `dos_get_modifiers', they might have already released the
- Alt key, and Emacs gets just `x', which is BAD.
- However, for keys with the `Map' property set, the ASCII
- code returns zero only if Alt is pressed. So, when we DON'T
- have to support international_keyboard, we don't have to
- distinguish between the left and right Alt keys, and we
- can set the META modifier for any keys with the `Map'
- property if they return zero ASCII code (c = 0). */
- if ( (code & Alt)
- || ( (code & 0xf000) == Map && !international_keyboard))
+ /* We only look at the keyboard Ctrl/Shift/Alt keys when
+ Emacs is ready to read a key. Therefore, if they press
+ `Alt-x' when Emacs is busy, by the time we get to
+ `dos_get_modifiers', they might have already released the
+ Alt key, and Emacs gets just `x', which is BAD.
+ However, for keys with the `Map' property set, the ASCII
+ code returns zero only if Alt is pressed. So, when we DON'T
+ have to support international_keyboard, we don't have to
+ distinguish between the left and right Alt keys, and we
+ can set the META modifier for any keys with the `Map'
+ property if they return zero ASCII code (c = 0). */
+ if ( (code & Alt)
+ || ( (code & 0xf000) == Map && !international_keyboard))
modifiers |= meta_modifier;
if (code & Ctrl)
modifiers |= ctrl_modifier;
@@ -2637,7 +2637,7 @@ dos_rawgetc (void)
mouse_check_moved ();
/* If the mouse moved from the spot of its last sighting, we
- might need to update mouse highlight. */
+ might need to update mouse highlight. */
if (mouse_last_x != mouse_prev_x || mouse_last_y != mouse_prev_y)
{
if (hlinfo->mouse_face_hidden)
@@ -3914,9 +3914,9 @@ readlinkat (int fd, char const *name, char *buffer, size_t buffer_size)
char *
careadlinkat (int fd, char const *filename,
- char *buffer, size_t buffer_size,
- struct allocator const *alloc,
- ssize_t (*preadlinkat) (int, char const *, char *, size_t))
+ char *buffer, size_t buffer_size,
+ struct allocator const *alloc,
+ ssize_t (*preadlinkat) (int, char const *, char *, size_t))
{
if (!buffer)
{
diff --git a/src/nsgui.h b/src/nsgui.h
index 8dac1bd..58060e5 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -75,7 +75,7 @@ typedef unichar XChar2b;
/* XXX: xfaces requires these structures, but the question is are we
- forced to use them? */
+ forced to use them? */
typedef struct _XGCValues
{
unsigned long foreground;
diff --git a/src/nsterm.h b/src/nsterm.h
index 35c6e1a..6d9cc0e 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -130,21 +130,21 @@ nsterm.m : 6754: [ 362] | | | | +--- fs_before_fs: -1
nsterm.m : 6755: [ 363] | | | | +--- next_maximized: FULLSCREEN_MAXIMIZED
nsterm.m : 6756: [ 364] | | | | +--- ns_userRect: (X:0 Y:0)/(W:0 H:0)
nsterm.m : 6757: [ 365] | | | | +---
- [sender frame]: (X:0 Y:626)/(W:595 H:551)
+ [sender frame]: (X:0 Y:626)/(W:595 H:551)
nsterm.m : 6781: [ 366] | | | | +---
- ns_userRect (2): (X:0 Y:626)/(W:595 H:551)
+ ns_userRect (2): (X:0 Y:626)/(W:595 H:551)
nsterm.m : 6821: [ 367] | | | | +--- FULLSCREEN_MAXIMIZED
nsterm.m : 7232: [ 368] | | | | |
- [EmacsView setFSValue:FULLSCREEN_MAXIMIZED]
+ [EmacsView setFSValue:FULLSCREEN_MAXIMIZED]
nsterm.m : 6848: [ 369] | | | | +---
- Final ns_userRect: (X:0 Y:626)/(W:595 H:551)
+ Final ns_userRect: (X:0 Y:626)/(W:595 H:551)
nsterm.m : 6849: [ 370] | | | | +--- Final maximized_width: 1600
nsterm.m : 6850: [ 371] | | | | +--- Final maximized_height: 1177
nsterm.m : 6851: [ 372] | | | | +--- Final next_maximized: -1
nsterm.m : 6322: [ 373] | | | | |
- [EmacsView windowWillResize:toSize: (W:1600 H:1177)]
+ [EmacsView windowWillResize:toSize: (W:1600 H:1177)]
nsterm.m : 6323: [ 374] | | | | | +---
- [sender frame]: (X:0 Y:626)/(W:595 H:551)
+ [sender frame]: (X:0 Y:626)/(W:595 H:551)
nsterm.m : 6324: [ 375] | | | | | +--- fs_state: FULLSCREEN_MAXIMIZED
nsterm.m : 7027: [ 376] | | | | | | [EmacsView isFullscreen]
nsterm.m : 6387: [ 377] | | | | | +--- cols: 223 rows: 79
@@ -199,13 +199,13 @@ char const * nstrace_fullscreen_type_name (int);
do \
{ \
if (nstrace_enabled) \
- { \
- fprintf (stderr, "%-10s:%5d: [%5d]%.*s", \
- __FILE__, __LINE__, nstrace_num++, \
- 2*nstrace_depth, " | | | | | | | | | | | | | | | .."); \
- fprintf (stderr, __VA_ARGS__); \
- fprintf (stderr, "\n"); \
- } \
+ { \
+ fprintf (stderr, "%-10s:%5d: [%5d]%.*s", \
+ __FILE__, __LINE__, nstrace_num++, \
+ 2*nstrace_depth, " | | | | | | | | | | | | | | | .."); \
+ fprintf (stderr, __VA_ARGS__); \
+ fprintf (stderr, "\n"); \
+ } \
} \
while(0)
@@ -236,31 +236,31 @@ char const * nstrace_fullscreen_type_name (int);
#define NSTRACE_SIZE(str,size) \
NSTRACE_MSG (str ": " NSTRACE_FMT_SIZE, \
- NSTRACE_ARG_SIZE (size));
+ NSTRACE_ARG_SIZE (size));
#define NSTRACE_POINT(str,point) \
NSTRACE_MSG (str ": " NSTRACE_FMT_POINT, \
- NSTRACE_ARG_POINT (point));
+ NSTRACE_ARG_POINT (point));
#define NSTRACE_RECT(str,rect) \
NSTRACE_MSG (str ": " NSTRACE_FMT_RECT, \
- NSTRACE_ARG_RECT (rect));
+ NSTRACE_ARG_RECT (rect));
#define NSTRACE_FSTYPE(str,fs_type) \
NSTRACE_MSG (str ": " NSTRACE_FMT_FSTYPE, \
- NSTRACE_ARG_FSTYPE (fs_type));
+ NSTRACE_ARG_FSTYPE (fs_type));
/* Return value macros.
NSTRACE_RETURN(fmt, ...) - Print a return value, support printf-style
- format string and arguments.
+ format string and arguments.
NSTRACE_RETURN_what(obj) - Print a return value of kind WHAT.
NSTRACE_FMT_RETURN - A string literal representing a returned
- value. Useful when creating a format string
- to printf-like constructs like NSTRACE(). */
+ value. Useful when creating a format string
+ to printf-like constructs like NSTRACE(). */
#define NSTRACE_FMT_RETURN "->>"
@@ -280,13 +280,13 @@ char const * nstrace_fullscreen_type_name (int);
/* Function enter macros.
NSTRACE (fmt, ...) -- Enable trace output in current block
- (typically a function). Accepts printf-style
- arguments.
+ (typically a function). Accepts printf-style
+ arguments.
NSTRACE_WHEN (cond, fmt, ...) -- Enable trace output when COND is true.
NSTRACE_UNLESS (cond, fmt, ...) -- Enable trace output unless COND is
- true. */
+ true. */
@@ -363,7 +363,7 @@ char const * nstrace_fullscreen_type_name (int);
========================================================================== */
@interface NSColor (EmacsColor)
+ (NSColor *)colorForEmacsRed:(CGFloat)red green:(CGFloat)green
- blue:(CGFloat)blue alpha:(CGFloat)alpha;
+ blue:(CGFloat)blue alpha:(CGFloat)alpha;
- (NSColor *)colorUsingDefaultColorSpace;
@end
@@ -522,7 +522,7 @@ char const * nstrace_fullscreen_type_name (int);
- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f;
- (void) clear;
- (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
- keymaps: (bool)keymaps;
+ keymaps: (bool)keymaps;
@end
@@ -551,10 +551,10 @@ char const * nstrace_fullscreen_type_name (int);
- (void) clearAll;
- (BOOL) changed;
- (void) addDisplayItemWithImage: (EmacsImage *)img
- idx: (int)idx
- tag: (int)tag
- helpText: (const char *)help
- enabled: (BOOL)enabled;
+ idx: (int)idx
+ tag: (int)tag
+ helpText: (const char *)help
+ enabled: (BOOL)enabled;
/* delegate methods */
- (NSToolbarItem *)toolbar: (NSToolbar *)toolbar
@@ -631,7 +631,7 @@ char const * nstrace_fullscreen_type_name (int);
- (BOOL)panel: (id)sender isValidFilename: (NSString *)filename;
- (BOOL)panel: (id)sender shouldShowFilename: (NSString *)filename;
- (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename
- confirmed: (BOOL)okFlag;
+ confirmed: (BOOL)okFlag;
@end
@@ -651,14 +651,14 @@ char const * nstrace_fullscreen_type_name (int);
+ allocInitFromFile: (Lisp_Object)file;
- (void)dealloc;
- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h
- fg: (unsigned long)fg bg: (unsigned long)bg;
+ fg: (unsigned long)fg bg: (unsigned long)bg;
- setXBMColor: (NSColor *)color;
- initForXPMWithDepth: (int)depth width: (int)width height: (int)height;
- (void)setPixmapData;
- (unsigned long)getPixelAtX: (int)x Y: (int)y;
- (void)setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r
- green: (unsigned char)g blue: (unsigned char)b
- alpha:(unsigned char)a;
+ green: (unsigned char)g blue: (unsigned char)b
+ alpha:(unsigned char)a;
- (void)setAlphaAtX: (int)x Y: (int)y to: (unsigned char)a;
- (NSColor *)stippleMask;
@end
@@ -697,7 +697,7 @@ char const * nstrace_fullscreen_type_name (int);
- setPosition: (int) position portion: (int) portion whole: (int) whole;
- (int) checkSamePosition: (int)position portion: (int)portion
- whole: (int)whole;
+ whole: (int)whole;
- (void) sendScrollEventAtLoc: (float)loc fromEvent: (NSEvent *)e;
- repeatScroll: (NSTimer *)sender;
- condemn;
@@ -1093,7 +1093,7 @@ extern void ns_term_shutdown (int sig);
/* In nsfont, called from fontset.c */
extern void nsfont_make_fontset_for_font (Lisp_Object name,
- Lisp_Object font_object);
+ Lisp_Object font_object);
/* In nsfont, for debugging */
struct glyph_string;
@@ -1101,7 +1101,7 @@ void ns_dump_glyphstring (struct glyph_string *s) EXTERNALLY_VISIBLE;
/* Implemented in nsterm, published in or needed from nsfns. */
extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern,
- int size, int maxnames);
+ int size, int maxnames);
extern void ns_clear_frame (struct frame *f);
extern const char *ns_xlfd_to_fontname (const char *xlfd);
@@ -1112,15 +1112,15 @@ extern Lisp_Object ns_string_from_pasteboard (id pb);
extern void ns_string_to_pasteboard (id pb, Lisp_Object str);
#endif
extern Lisp_Object ns_get_local_selection (Lisp_Object selection_name,
- Lisp_Object target_type);
+ Lisp_Object target_type);
extern void nxatoms_of_nsselect (void);
extern void ns_set_doc_edited (void);
extern bool
ns_defined_color (struct frame *f,
- const char *name,
- XColor *color_def, bool alloc,
- bool makeIndex);
+ const char *name,
+ XColor *color_def, bool alloc,
+ bool makeIndex);
extern void
ns_query_color (void *col, XColor *color_def, int setPixel);
@@ -1146,10 +1146,10 @@ extern void ns_init_locale (void);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
extern Lisp_Object find_and_return_menu_selection (struct frame *f,
- bool keymaps,
- void *client_data);
+ bool keymaps,
+ void *client_data);
extern Lisp_Object ns_popup_dialog (struct frame *, Lisp_Object header,
- Lisp_Object contents);
+ Lisp_Object contents);
#define NSAPP_DATA2_RUNASSCRIPT 10
extern void ns_run_ascript (void);
@@ -1168,7 +1168,7 @@ extern void syms_of_nsselect (void);
/* From nsimage.m, needed in image.c */
struct image;
extern void *ns_image_from_XBM (char *bits, int width, int height,
- unsigned long fg, unsigned long bg);
+ unsigned long fg, unsigned long bg);
extern void *ns_image_for_XPM (int width, int height, int depth);
extern void *ns_image_from_file (Lisp_Object file);
extern bool ns_load_image (struct frame *f, struct image *img,
@@ -1189,7 +1189,7 @@ extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timespec const *timeout,
sigset_t const *sigmask);
extern unsigned long ns_get_rgb_color (struct frame *f,
- float r, float g, float b, float a);
+ float r, float g, float b, float a);
struct input_event;
extern void ns_init_events (struct input_event *);
@@ -1222,7 +1222,7 @@ extern char gnustep_base_version[]; /* version tracking */
/* Little utility macros */
#define IN_BOUND(min, x, max) (((x) < (min)) \
- ? (min) : (((x)>(max)) ? (max) : (x)))
+ ? (min) : (((x)>(max)) ? (max) : (x)))
#define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX))
/* macOS 10.12 deprecates a bunch of constants. */
diff --git a/src/print.c b/src/print.c
index 6c350fc..456f8ee 100644
--- a/src/print.c
+++ b/src/print.c
@@ -111,9 +111,9 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
{ \
ptrdiff_t marker_pos; \
if (! XMARKER (printcharfun)->buffer) \
- error ("Marker does not point anywhere"); \
+ error ("Marker does not point anywhere"); \
if (XMARKER (printcharfun)->buffer != current_buffer) \
- set_buffer_internal (XMARKER (printcharfun)->buffer); \
+ set_buffer_internal (XMARKER (printcharfun)->buffer); \
marker_pos = marker_position (printcharfun); \
if (marker_pos < BEGV || marker_pos > ZV) \
signal_error ("Marker is outside the accessible " \
@@ -131,10 +131,10 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
Lisp_Object string; \
if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_multibyte) \
- specbind (Qprint_escape_multibyte, Qt); \
+ specbind (Qprint_escape_multibyte, Qt); \
if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_nonascii) \
- specbind (Qprint_escape_nonascii, Qt); \
+ specbind (Qprint_escape_nonascii, Qt); \
if (print_buffer != 0) \
{ \
string = make_string_from_bytes (print_buffer, \
@@ -2040,7 +2040,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
printcharfun);
}
printchar ('>', printcharfun);
- break;
+ break;
#ifdef HAVE_MODULES
case Lisp_Misc_User_Ptr:
@@ -2055,12 +2055,12 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
}
#endif
- case Lisp_Misc_Finalizer:
- print_c_string ("#<finalizer", printcharfun);
- if (NILP (XFINALIZER (obj)->function))
- print_c_string (" used", printcharfun);
+ case Lisp_Misc_Finalizer:
+ print_c_string ("#<finalizer", printcharfun);
+ if (NILP (XFINALIZER (obj)->function))
+ print_c_string (" used", printcharfun);
printchar ('>', printcharfun);
- break;
+ break;
/* Remaining cases shouldn't happen in normal usage, but let's
print them anyway for the benefit of the debugger. */
diff --git a/src/process.c b/src/process.c
index c5a46f9..0c42462 100644
--- a/src/process.c
+++ b/src/process.c
@@ -138,7 +138,7 @@ static struct rlimit nofile_limit;
#ifdef WINDOWSNT
extern int sys_select (int, fd_set *, fd_set *, fd_set *,
- const struct timespec *, const sigset_t *);
+ const struct timespec *, const sigset_t *);
#endif
/* Work around GCC 4.3.0 bug with strict overflow checking; see
@@ -980,10 +980,10 @@ get_process (register Lisp_Object name)
if (BUFFERP (obj))
{
if (NILP (BVAR (XBUFFER (obj), name)))
- error ("Attempt to get process for a dead buffer");
+ error ("Attempt to get process for a dead buffer");
proc = Fget_buffer_process (obj);
if (NILP (proc))
- error ("Buffer %s has no process", SDATA (BVAR (XBUFFER (obj), name)));
+ error ("Buffer %s has no process", SDATA (BVAR (XBUFFER (obj), name)));
}
else
{
@@ -2493,20 +2493,20 @@ conv_sockaddr_to_lisp (struct sockaddr *sa, ptrdiff_t len)
case AF_LOCAL:
{
struct sockaddr_un *sockun = (struct sockaddr_un *) sa;
- ptrdiff_t name_length = len - offsetof (struct sockaddr_un, sun_path);
- /* If the first byte is NUL, the name is a Linux abstract
- socket name, and the name can contain embedded NULs. If
- it's not, we have a NUL-terminated string. Be careful not
- to walk past the end of the object looking for the name
- terminator, however. */
- if (name_length > 0 && sockun->sun_path[0] != '\0')
- {
- const char *terminator
+ ptrdiff_t name_length = len - offsetof (struct sockaddr_un, sun_path);
+ /* If the first byte is NUL, the name is a Linux abstract
+ socket name, and the name can contain embedded NULs. If
+ it's not, we have a NUL-terminated string. Be careful not
+ to walk past the end of the object looking for the name
+ terminator, however. */
+ if (name_length > 0 && sockun->sun_path[0] != '\0')
+ {
+ const char *terminator
= memchr (sockun->sun_path, '\0', name_length);
- if (terminator)
- name_length = terminator - (const char *) sockun->sun_path;
- }
+ if (terminator)
+ name_length = terminator - (const char *) sockun->sun_path;
+ }
return make_unibyte_string (sockun->sun_path, name_length);
}
@@ -3294,7 +3294,7 @@ finish_after_tls_connection (Lisp_Object proc)
static void
connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
- Lisp_Object use_external_socket_p)
+ Lisp_Object use_external_socket_p)
{
ptrdiff_t count = SPECPDL_INDEX ();
int s = -1, outch, inch;
@@ -3404,7 +3404,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
report_file_error ("Cannot set reuse option on server socket", Qnil);
}
- /* If passed a socket descriptor, it should be already bound. */
+ /* If passed a socket descriptor, it should be already bound. */
if (socket_to_use < 0 && bind (s, sa, addrlen) != 0)
report_file_error ("Cannot bind server socket", Qnil);
@@ -3763,13 +3763,13 @@ The following network options can be specified for this connection:
:oobinline BOOL -- Place out-of-band data in receive data stream.
:priority INT -- Set protocol defined priority for sent packets.
:reuseaddr BOOL -- Allow reusing a recently used local address
- (this is allowed by default for a server process).
+ (this is allowed by default for a server process).
:bindtodevice NAME -- bind to interface NAME. Using this may require
- special privileges on some systems.
+ special privileges on some systems.
:use-external-socket BOOL -- Use any pre-allocated sockets that have
- been passed to Emacs. If Emacs wasn't
- passed a socket, this option is silently
- ignored.
+ been passed to Emacs. If Emacs wasn't
+ passed a socket, this option is silently
+ ignored.
Consult the relevant system programmer's manual pages for more
@@ -4338,10 +4338,10 @@ network_interface_info (Lisp_Object ifname)
int fnum;
/* If flags is smaller than int (i.e. short) it may have the high bit set
- due to IFF_MULTICAST. In that case, sign extending it into
- an int is wrong. */
+ due to IFF_MULTICAST. In that case, sign extending it into
+ an int is wrong. */
if (flags < 0 && sizeof (rq.ifr_flags) < sizeof (flags))
- flags = (unsigned short) rq.ifr_flags;
+ flags = (unsigned short) rq.ifr_flags;
any = 1;
for (fp = ifflag_table; flags != 0 && fp->flag_sym; fp++)
@@ -4386,23 +4386,23 @@ network_interface_info (Lisp_Object ifname)
struct ifaddrs *it;
for (it = ifap; it != NULL; it = it->ifa_next)
- {
- struct sockaddr_dl *sdl = (struct sockaddr_dl*) it->ifa_addr;
- unsigned char linkaddr[6];
- int n;
+ {
+ struct sockaddr_dl *sdl = (struct sockaddr_dl*) it->ifa_addr;
+ unsigned char linkaddr[6];
+ int n;
- if (it->ifa_addr->sa_family != AF_LINK
- || strcmp (it->ifa_name, SSDATA (ifname)) != 0
- || sdl->sdl_alen != 6)
- continue;
+ if (it->ifa_addr->sa_family != AF_LINK
+ || strcmp (it->ifa_name, SSDATA (ifname)) != 0
+ || sdl->sdl_alen != 6)
+ continue;
- memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
- for (n = 0; n < 6; n++)
- p->contents[n] = make_number (linkaddr[n]);
+ memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
+ for (n = 0; n < 6; n++)
+ p->contents[n] = make_number (linkaddr[n]);
- elt = Fcons (make_number (it->ifa_addr->sa_family), hwaddr);
- break;
- }
+ elt = Fcons (make_number (it->ifa_addr->sa_family), hwaddr);
+ break;
+ }
}
#ifdef HAVE_FREEIFADDRS
freeifaddrs (ifap);
@@ -5132,10 +5132,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
&& requeued_events_pending_p ())
break;
- /* This is so a breakpoint can be put here. */
- if (!timespec_valid_p (timer_delay))
- wait_reading_process_output_1 ();
- }
+ /* This is so a breakpoint can be put here. */
+ if (!timespec_valid_p (timer_delay))
+ wait_reading_process_output_1 ();
+ }
/* Cause C-g and alarm signals to take immediate action,
and cause input available signals to zero out timeout.
@@ -5155,10 +5155,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
fd_set Atemp;
fd_set Ctemp;
- if (kbd_on_hold_p ())
- FD_ZERO (&Atemp);
- else
- compute_input_wait_mask (&Atemp);
+ if (kbd_on_hold_p ())
+ FD_ZERO (&Atemp);
+ else
+ compute_input_wait_mask (&Atemp);
compute_write_mask (&Ctemp);
timeout = make_timespec (0, 0);
@@ -5226,7 +5226,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
break;
FD_SET (wait_proc->infd, &Available);
check_delay = 0;
- check_write = 0;
+ check_write = 0;
}
else if (!NILP (wait_for_cell))
{
@@ -5355,11 +5355,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
NULL, &timeout, NULL);
#ifdef HAVE_GNUTLS
- /* GnuTLS buffers data internally. In lowat mode it leaves
- some data in the TCP buffers so that select works, but
- with custom pull/push functions we need to check if some
- data is available in the buffers manually. */
- if (nfds == 0)
+ /* GnuTLS buffers data internally. In lowat mode it leaves
+ some data in the TCP buffers so that select works, but
+ with custom pull/push functions we need to check if some
+ data is available in the buffers manually. */
+ if (nfds == 0)
{
fd_set tls_available;
int set = 0;
@@ -5423,11 +5423,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (nfds == 0)
{
- /* Exit the main loop if we've passed the requested timeout,
- or aren't skipping processes and got some output and
- haven't lowered our timeout due to timers or SIGIO and
- have waited a long amount of time due to repeated
- timers. */
+ /* Exit the main loop if we've passed the requested timeout,
+ or aren't skipping processes and got some output and
+ haven't lowered our timeout due to timers or SIGIO and
+ have waited a long amount of time due to repeated
+ timers. */
struct timespec huge_timespec
= make_timespec (TYPE_MAXIMUM (time_t), 2 * TIMESPEC_RESOLUTION);
struct timespec cmp_time = huge_timespec;
@@ -5537,14 +5537,14 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
continue;
for (channel = 0; channel <= max_desc; ++channel)
- {
- struct fd_callback_data *d = &fd_callback_info[channel];
- if (d->func
+ {
+ struct fd_callback_data *d = &fd_callback_info[channel];
+ if (d->func
&& ((d->flags & FOR_READ
&& FD_ISSET (channel, &Available))
|| ((d->flags & FOR_WRITE)
&& FD_ISSET (channel, &Writeok))))
- d->func (channel, d->data);
+ d->func (channel, d->data);
}
for (channel = 0; channel <= max_desc; channel++)
@@ -6109,7 +6109,7 @@ Otherwise it discards the output. */)
static void
write_queue_push (struct Lisp_Process *p, Lisp_Object input_obj,
- const char *buf, ptrdiff_t len, bool front)
+ const char *buf, ptrdiff_t len, bool front)
{
ptrdiff_t offset;
Lisp_Object entry, obj;
@@ -7460,7 +7460,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
{
wait = TIMEOUT;
end_time = timespec_add (current_timespec (),
- make_timespec (time_limit, nsecs));
+ make_timespec (time_limit, nsecs));
}
else
wait = INFINITY;
@@ -7863,7 +7863,7 @@ integer or floating point values.
cminflt -- cumulative number of minor page faults (number)
cmajflt -- cumulative number of major page faults (number)
utime -- user time used by the process, in (current-time) format,
- which is a list of integers (HIGH LOW USEC PSEC)
+ which is a list of integers (HIGH LOW USEC PSEC)
stime -- system time used by the process (current-time)
time -- sum of utime and stime (current-time)
cutime -- user time used by the process and its children (current-time)
@@ -7878,7 +7878,7 @@ integer or floating point values.
etime -- elapsed time the process is running, in (HIGH LOW USEC PSEC) format
pcpu -- percents of CPU time used by the process (floating-point number)
pmem -- percents of total physical memory used by process's resident set
- (floating-point number)
+ (floating-point number)
args -- command line which invoked the process (string). */)
( Lisp_Object pid)
{
diff --git a/src/ralloc.c b/src/ralloc.c
index 2faa42e..5471d04 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -599,13 +599,13 @@ resize_bloc (bloc_ptr bloc, size_t size)
{
b->size = 0;
b->data = b->new_data;
- }
+ }
else
{
if (b->new_data != b->data)
memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
- }
+ }
}
if (!bloc->variable)
{
@@ -628,7 +628,7 @@ resize_bloc (bloc_ptr bloc, size_t size)
{
b->size = 0;
b->data = b->new_data;
- }
+ }
else
{
if (b->new_data != b->data)
@@ -968,7 +968,7 @@ r_re_alloc (void **ptr, size_t size)
/* Wouldn't it be useful to actually resize the bloc here? */
/* I think so too, but not if it's too expensive... */
if ((bloc->size - MEM_ROUNDUP (size) >= page_size)
- && r_alloc_freeze_level == 0)
+ && r_alloc_freeze_level == 0)
{
resize_bloc (bloc, MEM_ROUNDUP (size));
/* Never mind if this fails, just do nothing... */
@@ -987,14 +987,14 @@ r_re_alloc (void **ptr, size_t size)
*ptr = new_bloc->data;
bloc->variable = NULL;
}
- else
+ else
return NULL;
}
else
{
if (! resize_bloc (bloc, MEM_ROUNDUP (size)))
return NULL;
- }
+ }
}
return *ptr;
}
diff --git a/src/regex.c b/src/regex.c
index f1686cf..56e4353 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -339,8 +339,8 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
# define ISPUNCT(c) (IS_REAL_ASCII (c) \
? ((c) > ' ' && (c) < 0177 \
&& !(((c) >= 'a' && (c) <= 'z') \
- || ((c) >= 'A' && (c) <= 'Z') \
- || ((c) >= '0' && (c) <= '9'))) \
+ || ((c) >= 'A' && (c) <= 'Z') \
+ || ((c) >= '0' && (c) <= '9'))) \
: SYNTAX (c) != Sword)
# define ISSPACE(c) (SYNTAX (c) == Swhitespace)
@@ -1746,9 +1746,9 @@ struct range_table_work_area
do { \
if (((work_area).used + (n)) * sizeof (int) > (work_area).allocated) \
{ \
- extend_range_table_work_area (&work_area); \
- if ((work_area).table == 0) \
- return (REG_ESPACE); \
+ extend_range_table_work_area (&work_area); \
+ if ((work_area).table == 0) \
+ return (REG_ESPACE); \
} \
} while (0)
@@ -1962,23 +1962,23 @@ re_wctype_parse (const unsigned char **strp, unsigned limit)
names used in Emacs sources as of 2016-07-27:
$ find \( -name \*.c -o -name \*.el \) -exec grep -h '\[:[a-z]*:]' {} + |
- sed 's/]/]\n/g' |grep -o '\[:[a-z]*:]' |sort |uniq -c |sort -nr
- 213 [:alnum:]
- 104 [:alpha:]
- 62 [:space:]
- 39 [:digit:]
- 36 [:blank:]
- 26 [:word:]
- 26 [:upper:]
- 21 [:lower:]
- 10 [:xdigit:]
- 10 [:punct:]
- 10 [:ascii:]
- 4 [:nonascii:]
- 4 [:graph:]
- 2 [:print:]
- 2 [:cntrl:]
- 1 [:ff:]
+ sed 's/]/]\n/g' |grep -o '\[:[a-z]*:]' |sort |uniq -c |sort -nr
+ 213 [:alnum:]
+ 104 [:alpha:]
+ 62 [:space:]
+ 39 [:digit:]
+ 36 [:blank:]
+ 26 [:word:]
+ 26 [:upper:]
+ 21 [:lower:]
+ 10 [:xdigit:]
+ 10 [:punct:]
+ 10 [:ascii:]
+ 4 [:nonascii:]
+ 4 [:graph:]
+ 2 [:print:]
+ 2 [:cntrl:]
+ 1 [:ff:]
If you update this list, consider also updating chain of or’ed conditions
in execute_charset function.
@@ -3476,15 +3476,15 @@ regex_compile (const_re_char *pattern, size_t size,
case '_':
if (syntax & RE_NO_GNU_OPS)
goto normal_char;
- laststart = b;
- PATFETCH (c);
- if (c == '<')
- BUF_PUSH (symbeg);
- else if (c == '>')
- BUF_PUSH (symend);
- else
- FREE_STACK_RETURN (REG_BADPAT);
- break;
+ laststart = b;
+ PATFETCH (c);
+ if (c == '<')
+ BUF_PUSH (symbeg);
+ else if (c == '>')
+ BUF_PUSH (symend);
+ else
+ FREE_STACK_RETURN (REG_BADPAT);
+ break;
case 'b':
if (syntax & RE_NO_GNU_OPS)
@@ -4836,7 +4836,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const_re_char *p1,
return ((re_opcode_t) *p1 == syntaxspec && p1[1] == Sword);
case symend:
return ((re_opcode_t) *p1 == syntaxspec
- && (p1[1] == Ssymbol || p1[1] == Sword));
+ && (p1[1] == Ssymbol || p1[1] == Sword));
case notsyntaxspec:
return ((re_opcode_t) *p1 == syntaxspec && p1[1] == p2[1]);
@@ -4844,7 +4844,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const_re_char *p1,
return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == Sword);
case symbeg:
return ((re_opcode_t) *p1 == notsyntaxspec
- && (p1[1] == Ssymbol || p1[1] == Sword));
+ && (p1[1] == Ssymbol || p1[1] == Sword));
case syntaxspec:
return ((re_opcode_t) *p1 == notsyntaxspec && p1[1] == p2[1]);
@@ -6088,7 +6088,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
/* ... and S2 is Sword or Ssymbol. */
if (s2 == Sword || s2 == Ssymbol)
- goto fail;
+ goto fail;
}
}
break;
diff --git a/src/regex.h b/src/regex.h
index 4219943..1adf96b 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -66,10 +66,10 @@ typedef unsigned long reg_syntax_t;
/* If this bit is set, then ^ and $ are always anchors (outside bracket
expressions, of course).
If this bit is not set, then it depends:
- ^ is an anchor if it is at the beginning of a regular
- expression or after an open-group or an alternation operator;
- $ is an anchor if it is at the end of a regular expression, or
- before a close-group or an alternation operator.
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
POSIX draft 11.2 says that * etc. in leading positions is undefined.
@@ -349,8 +349,8 @@ struct re_pattern_buffer
{
/* [[[begin pattern_buffer]]] */
/* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are
- sometimes used as array indexes. */
+ `unsigned char *' because its elements are
+ sometimes used as array indexes. */
unsigned char *buffer;
/* Number of bytes to which `buffer' points. */
@@ -360,51 +360,51 @@ struct re_pattern_buffer
size_t used;
#ifndef emacs
- /* Syntax setting with which the pattern was compiled. */
+ /* Syntax setting with which the pattern was compiled. */
reg_syntax_t syntax;
#endif
- /* Pointer to a fastmap, if any, otherwise zero. re_search uses
- the fastmap, if there is one, to skip over impossible
- starting points for matches. */
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses
+ the fastmap, if there is one, to skip over impossible
+ starting points for matches. */
char *fastmap;
- /* Either a translate table to apply to all characters before
- comparing them, or zero for no translation. The translation
- is applied to a pattern when it is compiled and to a string
- when it is matched. */
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation
+ is applied to a pattern when it is compiled and to a string
+ when it is matched. */
RE_TRANSLATE_TYPE translate;
/* Number of subexpressions found by the compiler. */
size_t re_nsub;
- /* Zero if this pattern cannot match the empty string, one else.
- Well, in truth it's used only in `re_search_2', to see
- whether or not we should use the fastmap, so we don't set
- this absolutely perfectly; see `re_compile_fastmap'. */
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see
+ whether or not we should use the fastmap, so we don't set
+ this absolutely perfectly; see `re_compile_fastmap'. */
unsigned can_be_null : 1;
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
- If REGS_REALLOCATE, reallocate space if necessary.
- If REGS_FIXED, use what's there. */
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
#define REGS_UNALLOCATED 0
#define REGS_REALLOCATE 1
#define REGS_FIXED 2
unsigned regs_allocated : 2;
- /* Set to zero when `regex_compile' compiles a pattern; set to one
- by `re_compile_fastmap' if it updates the fastmap. */
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
unsigned fastmap_accurate : 1;
- /* If set, `re_match_2' does not return information about
- subexpressions. */
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
unsigned no_sub : 1;
- /* If set, a beginning-of-line anchor doesn't match at the
- beginning of the string. */
+ /* If set, a beginning-of-line anchor doesn't match at the
+ beginning of the string. */
unsigned not_bol : 1;
- /* Similarly for an end-of-line anchor. */
+ /* Similarly for an end-of-line anchor. */
unsigned not_eol : 1;
/* If true, the compilation of the pattern had to look up the syntax table,
diff --git a/src/region-cache.c b/src/region-cache.c
index 4584956..e95c7ca 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -178,14 +178,14 @@ find_cache_boundary (struct region_cache *c, ptrdiff_t pos)
while (low + 1 < high)
{
/* mid is always a valid index, because low < high and ">> 1"
- rounds down. */
+ rounds down. */
ptrdiff_t mid = (low >> 1) + (high >> 1) + (low & high & 1);
ptrdiff_t boundary = BOUNDARY_POS (c, mid);
if (pos < boundary)
- high = mid;
+ high = mid;
else
- low = mid;
+ low = mid;
}
/* Some testing. */
@@ -220,13 +220,13 @@ move_cache_gap (struct region_cache *c, ptrdiff_t pos, ptrdiff_t min_size)
while (gap_start < pos)
{
/* Copy one boundary from after to before the gap, and
- convert its position to start-relative. */
+ convert its position to start-relative. */
c->boundaries[gap_start].pos
- = (buffer_end
- + c->boundaries[gap_start + gap_len].pos
- - buffer_beg);
+ = (buffer_end
+ + c->boundaries[gap_start + gap_len].pos
+ - buffer_beg);
c->boundaries[gap_start].value
- = c->boundaries[gap_start + gap_len].value;
+ = c->boundaries[gap_start + gap_len].value;
gap_start++;
}
@@ -244,14 +244,14 @@ move_cache_gap (struct region_cache *c, ptrdiff_t pos, ptrdiff_t min_size)
sizeof *c->boundaries);
/* Some systems don't provide a version of the copy routine that
- can be trusted to shift memory upward into an overlapping
- region. memmove isn't widely available. */
+ can be trusted to shift memory upward into an overlapping
+ region. memmove isn't widely available. */
min_size = nboundaries - c->cache_len - gap_len;
for (i = c->cache_len - 1; i >= gap_start; i--)
- {
- c->boundaries[i + min_size].pos = c->boundaries[i + gap_len].pos;
- c->boundaries[i + min_size].value = c->boundaries[i + gap_len].value;
- }
+ {
+ c->boundaries[i + min_size].pos = c->boundaries[i + gap_len].pos;
+ c->boundaries[i + min_size].value = c->boundaries[i + gap_len].value;
+ }
gap_len = min_size;
}
@@ -262,11 +262,11 @@ move_cache_gap (struct region_cache *c, ptrdiff_t pos, ptrdiff_t min_size)
gap_start--;
/* Copy one region from before to after the gap, and
- convert its position to end-relative. */
+ convert its position to end-relative. */
c->boundaries[gap_start + gap_len].pos
- = c->boundaries[gap_start].pos + buffer_beg - buffer_end;
+ = c->boundaries[gap_start].pos + buffer_beg - buffer_end;
c->boundaries[gap_start + gap_len].value
- = c->boundaries[gap_start].value;
+ = c->boundaries[gap_start].value;
}
/* Assign these back into the cache. */
@@ -395,25 +395,25 @@ set_cache_region (struct region_cache *c,
start..end from the left, and no unnecessary boundaries. */
if (BOUNDARY_POS (c, start_ix) == start)
{
- /* Is this boundary necessary? If no, remove it; if yes, set
- its value. */
- if (start_ix > 0
- && BOUNDARY_VALUE (c, start_ix - 1) == value)
- {
- delete_cache_boundaries (c, start_ix, start_ix + 1);
- start_ix--;
- }
- else
- SET_BOUNDARY_VALUE (c, start_ix, value);
+ /* Is this boundary necessary? If no, remove it; if yes, set
+ its value. */
+ if (start_ix > 0
+ && BOUNDARY_VALUE (c, start_ix - 1) == value)
+ {
+ delete_cache_boundaries (c, start_ix, start_ix + 1);
+ start_ix--;
+ }
+ else
+ SET_BOUNDARY_VALUE (c, start_ix, value);
}
else
{
- /* Do we need to add a new boundary here? */
- if (BOUNDARY_VALUE (c, start_ix) != value)
- {
- insert_cache_boundary (c, start_ix + 1, start, value);
- start_ix++;
- }
+ /* Do we need to add a new boundary here? */
+ if (BOUNDARY_VALUE (c, start_ix) != value)
+ {
+ insert_cache_boundary (c, start_ix + 1, start, value);
+ start_ix++;
+ }
}
/* This is equivalent to letting end_ix float (like a buffer
@@ -427,17 +427,17 @@ set_cache_region (struct region_cache *c,
/* There is no text after start..end; nothing to do. */
;
else if (end_ix >= c->cache_len
- || end < BOUNDARY_POS (c, end_ix))
+ || end < BOUNDARY_POS (c, end_ix))
{
- /* There is no boundary at end, but we may need one. */
- if (value_at_end != value)
- insert_cache_boundary (c, end_ix, end, value_at_end);
+ /* There is no boundary at end, but we may need one. */
+ if (value_at_end != value)
+ insert_cache_boundary (c, end_ix, end, value_at_end);
}
else
{
- /* There is a boundary at end; should it be there? */
- if (value == BOUNDARY_VALUE (c, end_ix))
- delete_cache_boundaries (c, end_ix, end_ix + 1);
+ /* There is a boundary at end; should it be there? */
+ if (value == BOUNDARY_VALUE (c, end_ix))
+ delete_cache_boundaries (c, end_ix, end_ix + 1);
}
}
}
@@ -459,9 +459,9 @@ invalidate_region_cache (struct buffer *buf, struct region_cache *c,
ptrdiff_t head, ptrdiff_t tail)
{
/* Let chead = c->beg_unchanged, and
- ctail = c->end_unchanged.
+ ctail = c->end_unchanged.
If z-tail < beg+chead by a large amount, or
- z-ctail < beg+head by a large amount,
+ z-ctail < beg+head by a large amount,
then cutting back chead and ctail to head and tail would lose a
lot of information that we could preserve by revalidating the
@@ -472,7 +472,7 @@ invalidate_region_cache (struct buffer *buf, struct region_cache *c,
if (((BUF_BEG (buf) + c->beg_unchanged) - (BUF_Z (buf) - tail)
> PRESERVE_THRESHOLD)
|| ((BUF_BEG (buf) + head) - (BUF_Z (buf) - c->end_unchanged)
- > PRESERVE_THRESHOLD))
+ > PRESERVE_THRESHOLD))
revalidate_region_cache (buf, c);
@@ -565,29 +565,29 @@ revalidate_region_cache (struct buffer *buf, struct region_cache *c)
== c->buffer_end - c->end_unchanged)
{
/* Move the gap so that all the boundaries in the unchanged head
- are expressed beg-relative, and all the boundaries in the
- unchanged tail are expressed end-relative. That done, we can
- plug in the new buffer beg and end, and all the positions
- will be accurate.
+ are expressed beg-relative, and all the boundaries in the
+ unchanged tail are expressed end-relative. That done, we can
+ plug in the new buffer beg and end, and all the positions
+ will be accurate.
- The boundary which has jurisdiction over the modified region
- should be left before the gap. */
+ The boundary which has jurisdiction over the modified region
+ should be left before the gap. */
move_cache_gap (c,
- (find_cache_boundary (c, (c->buffer_beg
- + c->beg_unchanged))
- + 1),
- 0);
+ (find_cache_boundary (c, (c->buffer_beg
+ + c->beg_unchanged))
+ + 1),
+ 0);
c->buffer_beg = BUF_BEG (buf);
c->buffer_end = BUF_Z (buf);
/* Now that the cache's basis has been changed, the modified
- region actually takes up some space in the cache, so we can
- invalidate it. */
+ region actually takes up some space in the cache, so we can
+ invalidate it. */
set_cache_region (c,
- c->buffer_beg + c->beg_unchanged,
- c->buffer_end - c->end_unchanged,
- 0);
+ c->buffer_beg + c->beg_unchanged,
+ c->buffer_end - c->end_unchanged,
+ 0);
}
/* Otherwise, there is a non-empty region in the cache which
@@ -597,56 +597,56 @@ revalidate_region_cache (struct buffer *buf, struct region_cache *c)
ptrdiff_t modified_ix;
/* These positions are correct, relative to both the cache basis
- and the buffer basis. */
+ and the buffer basis. */
set_cache_region (c,
- c->buffer_beg + c->beg_unchanged,
- c->buffer_end - c->end_unchanged,
- 0);
+ c->buffer_beg + c->beg_unchanged,
+ c->buffer_end - c->end_unchanged,
+ 0);
/* Now the cache contains only boundaries that are in the
- unchanged head and tail; we've disposed of any boundaries
- whose positions we can't be sure of given the information
- we've saved.
+ unchanged head and tail; we've disposed of any boundaries
+ whose positions we can't be sure of given the information
+ we've saved.
- If we put the cache gap between the unchanged head and the
- unchanged tail, we can adjust all the boundary positions at
- once, simply by setting buffer_beg and buffer_end.
+ If we put the cache gap between the unchanged head and the
+ unchanged tail, we can adjust all the boundary positions at
+ once, simply by setting buffer_beg and buffer_end.
- The boundary which has jurisdiction over the modified region
- should be left before the gap. */
+ The boundary which has jurisdiction over the modified region
+ should be left before the gap. */
modified_ix =
- find_cache_boundary (c, (c->buffer_beg + c->beg_unchanged)) + 1;
+ find_cache_boundary (c, (c->buffer_beg + c->beg_unchanged)) + 1;
move_cache_gap (c, modified_ix, 0);
c->buffer_beg = BUF_BEG (buf);
c->buffer_end = BUF_Z (buf);
/* Now, we may have shrunk the buffer when we changed the basis,
- and brought the boundaries we created for the start and end
- of the modified region together, giving them the same
- position. If that's the case, we should collapse them into
- one boundary. Or we may even delete them both, if the values
- before and after them are the same. */
+ and brought the boundaries we created for the start and end
+ of the modified region together, giving them the same
+ position. If that's the case, we should collapse them into
+ one boundary. Or we may even delete them both, if the values
+ before and after them are the same. */
if (modified_ix < c->cache_len
- && (BOUNDARY_POS (c, modified_ix - 1)
- == BOUNDARY_POS (c, modified_ix)))
- {
- int value_after = BOUNDARY_VALUE (c, modified_ix);
-
- /* Should we remove both of the boundaries? Yes, if the
- latter boundary is now establishing the same value that
- the former boundary's predecessor does. */
- if (modified_ix - 1 > 0
- && value_after == BOUNDARY_VALUE (c, modified_ix - 2))
- delete_cache_boundaries (c, modified_ix - 1, modified_ix + 1);
- else
- {
- /* We do need a boundary here; collapse the two
- boundaries into one. */
- SET_BOUNDARY_VALUE (c, modified_ix - 1, value_after);
- delete_cache_boundaries (c, modified_ix, modified_ix + 1);
- }
- }
+ && (BOUNDARY_POS (c, modified_ix - 1)
+ == BOUNDARY_POS (c, modified_ix)))
+ {
+ int value_after = BOUNDARY_VALUE (c, modified_ix);
+
+ /* Should we remove both of the boundaries? Yes, if the
+ latter boundary is now establishing the same value that
+ the former boundary's predecessor does. */
+ if (modified_ix - 1 > 0
+ && value_after == BOUNDARY_VALUE (c, modified_ix - 2))
+ delete_cache_boundaries (c, modified_ix - 1, modified_ix + 1);
+ else
+ {
+ /* We do need a boundary here; collapse the two
+ boundaries into one. */
+ SET_BOUNDARY_VALUE (c, modified_ix - 1, value_after);
+ delete_cache_boundaries (c, modified_ix, modified_ix + 1);
+ }
+ }
}
/* Now the entire cache is valid. */
@@ -691,20 +691,20 @@ region_cache_forward (struct buffer *buf, struct region_cache *c,
/* Beyond the end of the buffer is unknown, by definition. */
if (pos >= BUF_Z (buf))
{
- if (next) *next = BUF_Z (buf);
- i_value = 0;
+ if (next) *next = BUF_Z (buf);
+ i_value = 0;
}
else if (next)
{
- /* Scan forward from i to find the next differing position. */
- for (j = i + 1; j < c->cache_len; j++)
- if (BOUNDARY_VALUE (c, j) != i_value)
- break;
-
- if (j < c->cache_len)
- *next = BOUNDARY_POS (c, j);
- else
- *next = BUF_Z (buf);
+ /* Scan forward from i to find the next differing position. */
+ for (j = i + 1; j < c->cache_len; j++)
+ if (BOUNDARY_VALUE (c, j) != i_value)
+ break;
+
+ if (j < c->cache_len)
+ *next = BOUNDARY_POS (c, j);
+ else
+ *next = BUF_Z (buf);
}
return i_value;
@@ -736,15 +736,15 @@ region_cache_backward (struct buffer *buf, struct region_cache *c,
if (next)
{
- /* Scan backward from i to find the next differing position. */
- for (j = i - 1; j >= 0; j--)
- if (BOUNDARY_VALUE (c, j) != i_value)
- break;
-
- if (j >= 0)
- *next = BOUNDARY_POS (c, j + 1);
- else
- *next = BUF_BEG (buf);
+ /* Scan backward from i to find the next differing position. */
+ for (j = i - 1; j >= 0; j--)
+ if (BOUNDARY_VALUE (c, j) != i_value)
+ break;
+
+ if (j >= 0)
+ *next = BOUNDARY_POS (c, j + 1);
+ else
+ *next = BUF_BEG (buf);
}
return i_value;
@@ -764,22 +764,22 @@ pp_cache (struct region_cache *c)
ptrdiff_t end_u = c->buffer_end - c->end_unchanged;
fprintf (stderr,
- "basis: %"pD"d..%"pD"d modified: %"pD"d..%"pD"d\n",
- c->buffer_beg, c->buffer_end,
- beg_u, end_u);
+ "basis: %"pD"d..%"pD"d modified: %"pD"d..%"pD"d\n",
+ c->buffer_beg, c->buffer_end,
+ beg_u, end_u);
for (i = 0; i < c->cache_len; i++)
{
ptrdiff_t pos = BOUNDARY_POS (c, i);
putc (((pos < beg_u) ? 'v'
- : (pos == beg_u) ? '-'
- : ' '),
- stderr);
+ : (pos == beg_u) ? '-'
+ : ' '),
+ stderr);
putc (((pos > end_u) ? '^'
- : (pos == end_u) ? '-'
- : ' '),
- stderr);
+ : (pos == end_u) ? '-'
+ : ' '),
+ stderr);
fprintf (stderr, "%"pD"d : %d\n", pos, BOUNDARY_VALUE (c, i));
}
}
diff --git a/src/region-cache.h b/src/region-cache.h
index 270531e..455a659 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -74,8 +74,8 @@ void free_region_cache (struct region_cache *);
buffer positions) is "known," for the purposes of CACHE (e.g. "has
no newlines", in the case of the line cache). */
extern void know_region_cache (struct buffer *BUF,
- struct region_cache *CACHE,
- ptrdiff_t START, ptrdiff_t END);
+ struct region_cache *CACHE,
+ ptrdiff_t START, ptrdiff_t END);
/* Indicate that a section of BUF has changed, to invalidate CACHE.
HEAD is the number of chars unchanged at the beginning of the buffer.
@@ -86,8 +86,8 @@ extern void know_region_cache (struct buffer *BUF,
buffer positions in the presence of insertions and deletions; the
args to pass are the same before and after such an operation.) */
extern void invalidate_region_cache (struct buffer *BUF,
- struct region_cache *CACHE,
- ptrdiff_t HEAD, ptrdiff_t TAIL);
+ struct region_cache *CACHE,
+ ptrdiff_t HEAD, ptrdiff_t TAIL);
/* The scanning functions.
diff --git a/src/scroll.c b/src/scroll.c
index b886108..9550887 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -57,13 +57,13 @@ struct matrix_elt
};
static void do_direct_scrolling (struct frame *,
- struct glyph_matrix *,
- struct matrix_elt *,
- int, int);
+ struct glyph_matrix *,
+ struct matrix_elt *,
+ int, int);
static void do_scrolling (struct frame *,
- struct glyph_matrix *,
- struct matrix_elt *,
- int, int);
+ struct glyph_matrix *,
+ struct matrix_elt *,
+ int, int);
\f
/* Determine, in matrix[i,j], the cost of updating the first j old
@@ -238,8 +238,8 @@ calculate_scrolling (struct frame *frame,
static void
do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
- struct matrix_elt *matrix, int window_size,
- int unchanged_at_top)
+ struct matrix_elt *matrix, int window_size,
+ int unchanged_at_top)
{
struct matrix_elt *p;
int i, j, k;
@@ -820,7 +820,7 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
draw_cost, old_hash, new_hash,
free_at_end);
do_scrolling (frame,
- frame->current_matrix, matrix, window_size,
+ frame->current_matrix, matrix, window_size,
unchanged_at_top);
}
@@ -837,8 +837,8 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
int
scrolling_max_lines_saved (int start, int end,
- unsigned *oldhash, unsigned *newhash,
- int *cost)
+ unsigned *oldhash, unsigned *newhash,
+ int *cost)
{
enum { LOG2_NLINES = 9 };
enum { NLINES = 1 << LOG2_NLINES };
@@ -892,7 +892,7 @@ scrolling_max_lines_saved (int start, int end,
static void
line_ins_del (struct frame *frame, int ov1, int pf1, int ovn, int pfn,
- int *ov, int *mf)
+ int *ov, int *mf)
{
int i;
int frame_total_lines = FRAME_TOTAL_LINES (frame);
diff --git a/src/search.c b/src/search.c
index e499109..6c64e24 100644
--- a/src/search.c
+++ b/src/search.c
@@ -85,13 +85,13 @@ static void set_search_regs (ptrdiff_t, ptrdiff_t);
static void save_search_regs (void);
static EMACS_INT simple_search (EMACS_INT, unsigned char *, ptrdiff_t,
ptrdiff_t, Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t, ptrdiff_t);
+ ptrdiff_t, ptrdiff_t);
static EMACS_INT boyer_moore (EMACS_INT, unsigned char *, ptrdiff_t,
- Lisp_Object, Lisp_Object, ptrdiff_t,
- ptrdiff_t, int);
+ Lisp_Object, Lisp_Object, ptrdiff_t,
+ ptrdiff_t, int);
static EMACS_INT search_buffer (Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t, ptrdiff_t, EMACS_INT, int,
- Lisp_Object, Lisp_Object, bool);
+ ptrdiff_t, ptrdiff_t, EMACS_INT, int,
+ Lisp_Object, Lisp_Object, bool);
static _Noreturn void
matcher_overflow (void)
@@ -326,8 +326,8 @@ looking_at_1 (Lisp_Object string, bool posix)
{
search_regs.start[i]
= BYTE_TO_CHAR (search_regs.start[i] + BEGV_BYTE);
- search_regs.end[i]
- = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE);
+ search_regs.end[i]
+ = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE);
}
/* Set last_thing_searched only when match data is changed. */
XSETBUFFER (last_thing_searched, current_buffer);
@@ -689,22 +689,22 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
if (count > 0)
while (start != end)
{
- /* Our innermost scanning loop is very simple; it doesn't know
- about gaps, buffer ends, or the newline cache. ceiling is
- the position of the last character before the next such
- obstacle --- the last character the dumb search loop should
- examine. */
+ /* Our innermost scanning loop is very simple; it doesn't know
+ about gaps, buffer ends, or the newline cache. ceiling is
+ the position of the last character before the next such
+ obstacle --- the last character the dumb search loop should
+ examine. */
ptrdiff_t tem, ceiling_byte = end_byte - 1;
- /* If we're using the newline cache, consult it to see whether
- we can avoid some scanning. */
- if (newline_cache)
- {
- ptrdiff_t next_change;
+ /* If we're using the newline cache, consult it to see whether
+ we can avoid some scanning. */
+ if (newline_cache)
+ {
+ ptrdiff_t next_change;
int result = 1;
- immediate_quit = 0;
- while (start < end && result)
+ immediate_quit = 0;
+ while (start < end && result)
{
ptrdiff_t lim1;
@@ -756,28 +756,28 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
start_byte = end_byte;
break;
}
- immediate_quit = allow_quit;
+ immediate_quit = allow_quit;
- /* START should never be after END. */
- if (start_byte > ceiling_byte)
- start_byte = ceiling_byte;
+ /* START should never be after END. */
+ if (start_byte > ceiling_byte)
+ start_byte = ceiling_byte;
- /* Now the text after start is an unknown region, and
- next_change is the position of the next known region. */
- ceiling_byte = min (CHAR_TO_BYTE (next_change) - 1, ceiling_byte);
- }
+ /* Now the text after start is an unknown region, and
+ next_change is the position of the next known region. */
+ ceiling_byte = min (CHAR_TO_BYTE (next_change) - 1, ceiling_byte);
+ }
else if (start_byte == -1)
start_byte = CHAR_TO_BYTE (start);
- /* The dumb loop can only scan text stored in contiguous
- bytes. BUFFER_CEILING_OF returns the last character
- position that is contiguous, so the ceiling is the
- position after that. */
+ /* The dumb loop can only scan text stored in contiguous
+ bytes. BUFFER_CEILING_OF returns the last character
+ position that is contiguous, so the ceiling is the
+ position after that. */
tem = BUFFER_CEILING_OF (start_byte);
ceiling_byte = min (tem, ceiling_byte);
- {
- /* The termination address of the dumb loop. */
+ {
+ /* The termination address of the dumb loop. */
unsigned char *lim_addr = BYTE_POS_ADDR (ceiling_byte) + 1;
ptrdiff_t lim_byte = ceiling_byte + 1;
@@ -788,13 +788,13 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
for (cursor = base; cursor < 0; cursor = next)
{
- /* The dumb loop. */
+ /* The dumb loop. */
unsigned char *nl = memchr (lim_addr + cursor, '\n', - cursor);
next = nl ? nl - lim_addr : 0;
- /* If we're using the newline cache, cache the fact that
- the region we just traversed is free of newlines. */
- if (newline_cache && cursor != next)
+ /* If we're using the newline cache, cache the fact that
+ the region we just traversed is free of newlines. */
+ if (newline_cache && cursor != next)
{
know_region_cache (cache_buffer, newline_cache,
BYTE_TO_CHAR (lim_byte + cursor),
@@ -803,7 +803,7 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
lim_addr = BYTE_POS_ADDR (ceiling_byte) + 1;
}
- if (! nl)
+ if (! nl)
break;
next++;
@@ -814,26 +814,26 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
*bytepos = lim_byte + next;
return BYTE_TO_CHAR (lim_byte + next);
}
- }
+ }
start_byte = lim_byte;
start = BYTE_TO_CHAR (start_byte);
- }
+ }
}
else
while (start > end)
{
- /* The last character to check before the next obstacle. */
+ /* The last character to check before the next obstacle. */
ptrdiff_t tem, ceiling_byte = end_byte;
- /* Consult the newline cache, if appropriate. */
- if (newline_cache)
- {
- ptrdiff_t next_change;
+ /* Consult the newline cache, if appropriate. */
+ if (newline_cache)
+ {
+ ptrdiff_t next_change;
int result = 1;
- immediate_quit = 0;
- while (start > end && result)
+ immediate_quit = 0;
+ while (start > end && result)
{
ptrdiff_t lim1;
@@ -869,25 +869,25 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
start_byte = end_byte;
break;
}
- immediate_quit = allow_quit;
+ immediate_quit = allow_quit;
- /* Start should never be at or before end. */
- if (start_byte <= ceiling_byte)
- start_byte = ceiling_byte + 1;
+ /* Start should never be at or before end. */
+ if (start_byte <= ceiling_byte)
+ start_byte = ceiling_byte + 1;
- /* Now the text before start is an unknown region, and
- next_change is the position of the next known region. */
- ceiling_byte = max (CHAR_TO_BYTE (next_change), ceiling_byte);
- }
+ /* Now the text before start is an unknown region, and
+ next_change is the position of the next known region. */
+ ceiling_byte = max (CHAR_TO_BYTE (next_change), ceiling_byte);
+ }
else if (start_byte == -1)
start_byte = CHAR_TO_BYTE (start);
- /* Stop scanning before the gap. */
+ /* Stop scanning before the gap. */
tem = BUFFER_FLOOR_OF (start_byte - 1);
ceiling_byte = max (tem, ceiling_byte);
- {
- /* The termination address of the dumb loop. */
+ {
+ /* The termination address of the dumb loop. */
unsigned char *ceiling_addr = BYTE_POS_ADDR (ceiling_byte);
/* Offsets (relative to CEILING_ADDR and CEILING_BYTE) of
@@ -897,13 +897,13 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
ptrdiff_t cursor, prev;
for (cursor = base; 0 < cursor; cursor = prev)
- {
+ {
unsigned char *nl = memrchr (ceiling_addr, '\n', cursor);
prev = nl ? nl - ceiling_addr : -1;
- /* If we're looking for newlines, cache the fact that
- this line's region is free of them. */
- if (newline_cache && cursor != prev + 1)
+ /* If we're looking for newlines, cache the fact that
+ this line's region is free of them. */
+ if (newline_cache && cursor != prev + 1)
{
know_region_cache (cache_buffer, newline_cache,
BYTE_TO_CHAR (ceiling_byte + prev + 1),
@@ -912,7 +912,7 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
ceiling_addr = BYTE_POS_ADDR (ceiling_byte);
}
- if (! nl)
+ if (! nl)
break;
if (++count >= 0)
@@ -922,11 +922,11 @@ find_newline (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
*bytepos = ceiling_byte + prev + 1;
return BYTE_TO_CHAR (ceiling_byte + prev + 1);
}
- }
+ }
start_byte = ceiling_byte;
start = BYTE_TO_CHAR (start_byte);
- }
+ }
}
immediate_quit = 0;
@@ -1269,7 +1269,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
{
immediate_quit = 0;
#ifdef REL_ALLOC
- r_alloc_inhibit_buffer_relocation (0);
+ r_alloc_inhibit_buffer_relocation (0);
#endif
return (n);
}
@@ -1314,7 +1314,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
{
immediate_quit = 0;
#ifdef REL_ALLOC
- r_alloc_inhibit_buffer_relocation (0);
+ r_alloc_inhibit_buffer_relocation (0);
#endif
return (0 - n);
}
@@ -1757,7 +1757,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
ptrdiff_t len_byte,
Lisp_Object trt, Lisp_Object inverse_trt,
ptrdiff_t pos_byte, ptrdiff_t lim_byte,
- int char_base)
+ int char_base)
{
int direction = ((n > 0) ? 1 : -1);
register ptrdiff_t dirlen;
@@ -2770,7 +2770,7 @@ since only regular expressions have distinguished subexpressions. */)
/* Replace the old text with the new in the cleanest possible way. */
replace_range (search_regs.start[sub], search_regs.end[sub],
- newtext, 1, 0, 1, 1);
+ newtext, 1, 0, 1, 1);
/* Update saved data to match adjustment made by replace_range. */
{
ptrdiff_t change = newpoint - sub_end;
@@ -2819,7 +2819,7 @@ match_limit (Lisp_Object num, bool beginningp)
|| search_regs.start[n] < 0)
return Qnil;
return (make_number ((beginningp) ? search_regs.start[n]
- : search_regs.end[n]));
+ : search_regs.end[n]));
}
DEFUN ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0,
@@ -3143,13 +3143,13 @@ update_search_regs (ptrdiff_t oldstart, ptrdiff_t oldend, ptrdiff_t newend)
for (i = 0; i < search_regs.num_regs; i++)
{
if (search_regs.start[i] >= oldend)
- search_regs.start[i] += change;
+ search_regs.start[i] += change;
else if (search_regs.start[i] > oldstart)
- search_regs.start[i] = oldstart;
+ search_regs.start[i] = oldstart;
if (search_regs.end[i] >= oldend)
- search_regs.end[i] += change;
+ search_regs.end[i] += change;
else if (search_regs.end[i] > oldstart)
- search_regs.end[i] = oldstart;
+ search_regs.end[i] = oldstart;
}
}
@@ -3235,25 +3235,25 @@ find_newline1 (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
if (count > 0)
while (start != end)
{
- /* Our innermost scanning loop is very simple; it doesn't know
- about gaps, buffer ends, or the newline cache. ceiling is
- the position of the last character before the next such
- obstacle --- the last character the dumb search loop should
- examine. */
+ /* Our innermost scanning loop is very simple; it doesn't know
+ about gaps, buffer ends, or the newline cache. ceiling is
+ the position of the last character before the next such
+ obstacle --- the last character the dumb search loop should
+ examine. */
ptrdiff_t tem, ceiling_byte = end_byte - 1;
if (start_byte == -1)
start_byte = CHAR_TO_BYTE (start);
- /* The dumb loop can only scan text stored in contiguous
- bytes. BUFFER_CEILING_OF returns the last character
- position that is contiguous, so the ceiling is the
- position after that. */
+ /* The dumb loop can only scan text stored in contiguous
+ bytes. BUFFER_CEILING_OF returns the last character
+ position that is contiguous, so the ceiling is the
+ position after that. */
tem = BUFFER_CEILING_OF (start_byte);
ceiling_byte = min (tem, ceiling_byte);
- {
- /* The termination address of the dumb loop. */
+ {
+ /* The termination address of the dumb loop. */
unsigned char *lim_addr = BYTE_POS_ADDR (ceiling_byte) + 1;
ptrdiff_t lim_byte = ceiling_byte + 1;
@@ -3264,11 +3264,11 @@ find_newline1 (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
for (cursor = base; cursor < 0; cursor = next)
{
- /* The dumb loop. */
+ /* The dumb loop. */
unsigned char *nl = memchr (lim_addr + cursor, '\n', - cursor);
next = nl ? nl - lim_addr : 0;
- if (! nl)
+ if (! nl)
break;
next++;
@@ -3279,11 +3279,11 @@ find_newline1 (ptrdiff_t start, ptrdiff_t start_byte, ptrdiff_t end,
*bytepos = lim_byte + next;
return BYTE_TO_CHAR (lim_byte + next);
}
- }
+ }
start_byte = lim_byte;
start = BYTE_TO_CHAR (start_byte);
- }
+ }
}
immediate_quit = 0;
diff --git a/src/sound.c b/src/sound.c
index f5f5701..0340a35 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -216,7 +216,7 @@ struct sound_device
/* Choose a device-dependent format for outputting sound S. */
void (* choose_format) (struct sound_device *sd,
- struct sound *s);
+ struct sound *s);
/* Return a preferred data size in bytes to be sent to write (below)
each time. 2048 is used if this is NULL. */
@@ -224,7 +224,7 @@ struct sound_device
/* Write NYBTES bytes from BUFFER to device SD. */
void (* write) (struct sound_device *sd, const char *buffer,
- ptrdiff_t nbytes);
+ ptrdiff_t nbytes);
/* A place for devices to store additional data. */
void *data;
@@ -571,13 +571,13 @@ wav_play (struct sound *s, struct sound_device *sd)
char *buffer = SAFE_ALLOCA (blksize);
lseek (s->fd, sizeof *header, SEEK_SET);
while (data_left > 0
- && (nbytes = emacs_read (s->fd, buffer, blksize)) > 0)
- {
- /* Don't play possible garbage at the end of file */
- if (data_left < nbytes) nbytes = data_left;
- data_left -= nbytes;
- sd->write (sd, buffer, nbytes);
- }
+ && (nbytes = emacs_read (s->fd, buffer, blksize)) > 0)
+ {
+ /* Don't play possible garbage at the end of file */
+ if (data_left < nbytes) nbytes = data_left;
+ data_left -= nbytes;
+ sd->write (sd, buffer, nbytes);
+ }
if (nbytes < 0)
sound_perror ("Error reading sound file");
@@ -943,7 +943,7 @@ alsa_configure (struct sound_device *sd)
alsa_sound_perror ("Could not initialize hardware parameter structure", err);
err = snd_pcm_hw_params_set_access (p->handle, p->hwparams,
- SND_PCM_ACCESS_RW_INTERLEAVED);
+ SND_PCM_ACCESS_RW_INTERLEAVED);
if (err < 0)
alsa_sound_perror ("Could not set access type", err);
@@ -978,12 +978,12 @@ alsa_configure (struct sound_device *sd)
err = snd_pcm_sw_params_current (p->handle, p->swparams);
if (err < 0)
alsa_sound_perror ("Unable to determine current swparams for playback",
- err);
+ err);
/* Start the transfer when the buffer is almost full */
err = snd_pcm_sw_params_set_start_threshold (p->handle, p->swparams,
- (buffer_size / p->period_size)
- * p->period_size);
+ (buffer_size / p->period_size)
+ * p->period_size);
if (err < 0)
alsa_sound_perror ("Unable to set start threshold mode for playback", err);
@@ -1011,28 +1011,28 @@ alsa_configure (struct sound_device *sd)
snd_mixer_t *handle;
snd_mixer_elem_t *e;
if (snd_mixer_open (&handle, 0) >= 0)
- {
+ {
char const *file = string_default (sd->file,
DEFAULT_ALSA_SOUND_DEVICE);
- if (snd_mixer_attach (handle, file) >= 0
- && snd_mixer_load (handle) >= 0
- && snd_mixer_selem_register (handle, NULL, NULL) >= 0)
- for (e = snd_mixer_first_elem (handle);
- e;
- e = snd_mixer_elem_next (e))
- {
- if (snd_mixer_selem_has_playback_volume (e))
- {
- long pmin, pmax, vol;
- snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
- vol = pmin + (sd->volume * (pmax - pmin)) / 100;
-
- for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
- snd_mixer_selem_set_playback_volume (e, chn, vol);
- }
- }
- snd_mixer_close (handle);
- }
+ if (snd_mixer_attach (handle, file) >= 0
+ && snd_mixer_load (handle) >= 0
+ && snd_mixer_selem_register (handle, NULL, NULL) >= 0)
+ for (e = snd_mixer_first_elem (handle);
+ e;
+ e = snd_mixer_elem_next (e))
+ {
+ if (snd_mixer_selem_has_playback_volume (e))
+ {
+ long pmin, pmax, vol;
+ snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
+ vol = pmin + (sd->volume * (pmax - pmin)) / 100;
+
+ for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
+ snd_mixer_selem_set_playback_volume (e, chn, vol);
+ }
+ }
+ snd_mixer_close (handle);
+ }
}
}
@@ -1046,14 +1046,14 @@ alsa_close (struct sound_device *sd)
if (p)
{
if (p->hwparams)
- snd_pcm_hw_params_free (p->hwparams);
+ snd_pcm_hw_params_free (p->hwparams);
if (p->swparams)
- snd_pcm_sw_params_free (p->swparams);
+ snd_pcm_sw_params_free (p->swparams);
if (p->handle)
- {
- snd_pcm_drain (p->handle);
- snd_pcm_close (p->handle);
- }
+ {
+ snd_pcm_drain (p->handle);
+ snd_pcm_close (p->handle);
+ }
xfree (p);
}
}
@@ -1069,7 +1069,7 @@ alsa_choose_format (struct sound_device *sd, struct sound *s)
if (h->precision == 8)
sd->format = SND_PCM_FORMAT_U8;
else if (h->precision == 16)
- sd->format = SND_PCM_FORMAT_S16_LE;
+ sd->format = SND_PCM_FORMAT_S16_LE;
else
error ("Unsupported WAV file format");
}
@@ -1080,13 +1080,13 @@ alsa_choose_format (struct sound_device *sd, struct sound *s)
{
case AU_ENCODING_ULAW_8:
sd->format = SND_PCM_FORMAT_MU_LAW;
- break;
+ break;
case AU_ENCODING_ALAW_8:
sd->format = SND_PCM_FORMAT_A_LAW;
- break;
+ break;
case AU_ENCODING_IEEE32:
- sd->format = SND_PCM_FORMAT_FLOAT_BE;
- break;
+ sd->format = SND_PCM_FORMAT_FLOAT_BE;
+ break;
case AU_ENCODING_IEEE64:
sd->format = SND_PCM_FORMAT_FLOAT64_BE;
break;
@@ -1131,33 +1131,33 @@ alsa_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes)
err = snd_pcm_writei (p->handle, buffer + nwritten, frames);
if (err < 0)
- {
- if (err == -EPIPE)
- { /* under-run */
- err = snd_pcm_prepare (p->handle);
- if (err < 0)
- alsa_sound_perror ("Can't recover from underrun, prepare failed",
- err);
- }
- else if (err == -ESTRPIPE)
- {
- while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
- sleep (1); /* wait until the suspend flag is released */
- if (err < 0)
- {
- err = snd_pcm_prepare (p->handle);
- if (err < 0)
- alsa_sound_perror ("Can't recover from suspend, "
- "prepare failed",
- err);
- }
- }
- else
- alsa_sound_perror ("Error writing to sound device", err);
-
- }
+ {
+ if (err == -EPIPE)
+ { /* under-run */
+ err = snd_pcm_prepare (p->handle);
+ if (err < 0)
+ alsa_sound_perror ("Can't recover from underrun, prepare failed",
+ err);
+ }
+ else if (err == -ESTRPIPE)
+ {
+ while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
+ sleep (1); /* wait until the suspend flag is released */
+ if (err < 0)
+ {
+ err = snd_pcm_prepare (p->handle);
+ if (err < 0)
+ alsa_sound_perror ("Can't recover from suspend, "
+ "prepare failed",
+ err);
+ }
+ }
+ else
+ alsa_sound_perror ("Error writing to sound device", err);
+
+ }
else
- nwritten += err * fact;
+ nwritten += err * fact;
}
}
@@ -1288,26 +1288,26 @@ do_play_sound (const char *psz_file, unsigned long ui_volume)
{
mm_result = waveOutGetVolume ((HWAVEOUT) WAVE_MAPPER, &ui_volume_org);
if (mm_result == MMSYSERR_NOERROR)
- {
- b_reset_volume = TRUE;
- mm_result = waveOutSetVolume ((HWAVEOUT) WAVE_MAPPER, ui_volume);
- if (mm_result != MMSYSERR_NOERROR)
- {
+ {
+ b_reset_volume = TRUE;
+ mm_result = waveOutSetVolume ((HWAVEOUT) WAVE_MAPPER, ui_volume);
+ if (mm_result != MMSYSERR_NOERROR)
+ {
SOUND_WARNING (waveOutGetErrorText, mm_result,
"waveOutSetVolume: failed to set the volume level"
" of the WAVE_MAPPER device.\n"
"As a result, the user selected volume level will"
" not be used.");
- }
- }
+ }
+ }
else
- {
- SOUND_WARNING (waveOutGetErrorText, mm_result,
+ {
+ SOUND_WARNING (waveOutGetErrorText, mm_result,
"waveOutGetVolume: failed to obtain the original"
- " volume level of the WAVE_MAPPER device.\n"
- "As a result, the user selected volume level will"
- " not be used.");
- }
+ " volume level of the WAVE_MAPPER device.\n"
+ "As a result, the user selected volume level will"
+ " not be used.");
+ }
}
memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
@@ -1331,11 +1331,11 @@ do_play_sound (const char *psz_file, unsigned long ui_volume)
{
mm_result = waveOutSetVolume ((HWAVEOUT) WAVE_MAPPER, ui_volume_org);
if (mm_result != MMSYSERR_NOERROR)
- {
- SOUND_WARNING (waveOutGetErrorText, mm_result,
+ {
+ SOUND_WARNING (waveOutGetErrorText, mm_result,
"waveOutSetVolume: failed to reset the original"
- " volume level of the WAVE_MAPPER device.");
- }
+ " volume level of the WAVE_MAPPER device.");
+ }
}
return i_result;
}
diff --git a/src/syntax.c b/src/syntax.c
index 7c15e77..aa74f10 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -157,9 +157,9 @@ struct lisp_parse_state
Lisp_Object levelstarts; /* Char numbers of starts-of-expression
of levels (starting from outermost). */
int prev_syntax; /* Syntax of previous position scanned, when
- that position (potentially) holds the first char
- of a 2-char construct, i.e. comment delimiter
- or Sescape, etc. Smax otherwise. */
+ that position (potentially) holds the first char
+ of a 2-char construct, i.e. comment delimiter
+ or Sescape, etc. Smax otherwise. */
};
\f
/* These variables are a cache for finding the start of a defun.
@@ -182,8 +182,8 @@ static Lisp_Object skip_chars (bool, Lisp_Object, Lisp_Object, bool);
static Lisp_Object skip_syntaxes (bool, Lisp_Object, Lisp_Object);
static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, bool);
static void scan_sexps_forward (struct lisp_parse_state *,
- ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT,
- bool, int);
+ ptrdiff_t, ptrdiff_t, ptrdiff_t, EMACS_INT,
+ bool, int);
static void internalize_parse_state (Lisp_Object, struct lisp_parse_state *);
static bool in_classes (int, Lisp_Object);
static void parse_sexp_propertize (ptrdiff_t charpos);
@@ -750,7 +750,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
/* Nasty cases with overlapping 2-char comment markers:
- snmp-mode: -- c -- foo -- c --
- --- c --
+ --- c --
------ c --
- c-mode: *||*
|* *|* *|
@@ -799,9 +799,9 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
continue;
/* Ignore escaped characters, except comment-enders which cannot
- be escaped. */
+ be escaped. */
if ((Vcomment_end_can_be_escaped || code != Sendcomment)
- && char_quoted (from, from_byte))
+ && char_quoted (from, from_byte))
continue;
switch (code)
@@ -865,7 +865,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
would imply that any multiline comment in C would go through
lossage, which seems overkill.
The failure should only happen in the rare cases such as
- { (* } *) */
+ { (* } *) */
comment_lossage = 1;
break;
@@ -919,7 +919,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
}
do
{
- internalize_parse_state (Qnil, &state);
+ internalize_parse_state (Qnil, &state);
scan_sexps_forward (&state,
defun_start, defun_start_byte,
comment_end, TYPE_MINIMUM (EMACS_INT),
@@ -1451,7 +1451,7 @@ scan_words (register ptrdiff_t from, register EMACS_INT count)
break;
}
/* Now CH0 is a character which begins a word and FROM is the
- position of the next character. */
+ position of the next character. */
func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch0);
if (! NILP (Ffboundp (func)))
{
@@ -1501,7 +1501,7 @@ scan_words (register ptrdiff_t from, register EMACS_INT count)
break;
}
/* Now CH1 is a character which ends a word and FROM is the
- position of it. */
+ position of it. */
func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch1);
if (! NILP (Ffboundp (func)))
{
@@ -2305,12 +2305,12 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
*incomment_ptr = nesting;
*charpos_ptr = from;
*bytepos_ptr = from_byte;
- *last_syntax_ptr =
- (code == Sescape || code == Scharquote
- || SYNTAX_FLAGS_COMEND_FIRST (syntax)
- || (nesting > 0
- && SYNTAX_FLAGS_COMSTART_FIRST (syntax)))
- ? syntax : Smax ;
+ *last_syntax_ptr =
+ (code == Sescape || code == Scharquote
+ || SYNTAX_FLAGS_COMEND_FIRST (syntax)
+ || (nesting > 0
+ && SYNTAX_FLAGS_COMSTART_FIRST (syntax)))
+ ? syntax : Smax ;
return 0;
}
c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
@@ -2320,7 +2320,7 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
&& SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style
&& (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ?
(nesting > 0 && --nesting == 0) : nesting < 0)
- && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte)))
+ && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte)))
/* We have encountered a comment end of the same style
as the comment sequence which began this comment
section. */
@@ -2352,8 +2352,8 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
? nesting > 0 : nesting < 0))
{
syntax = Smax; /* So that "|#" (lisp) can not return
- the syntax of "#" in *last_syntax_ptr. */
- if (--nesting <= 0)
+ the syntax of "#" in *last_syntax_ptr. */
+ if (--nesting <= 0)
/* We have encountered a comment end of the same style
as the comment sequence which began this comment section. */
break;
@@ -2375,7 +2375,7 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
/* We have encountered a nested comment of the same style
as the comment sequence which began this comment section. */
{
- syntax = Smax; /* So that "#|#" isn't also a comment ender. */
+ syntax = Smax; /* So that "#|#" isn't also a comment ender. */
INC_BOTH (from, from_byte);
UPDATE_SYNTAX_TABLE_FORWARD (from);
nesting++;
@@ -2384,7 +2384,7 @@ forw_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
*charpos_ptr = from;
*bytepos_ptr = from_byte;
*last_syntax_ptr = Smax; /* Any syntactic power the last byte had is
- used up. */
+ used up. */
return 1;
}
@@ -2728,7 +2728,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag)
found = forw_comment (from, from_byte, stop,
comnested, comstyle, 0,
&out_charpos, &out_bytepos, &dummy,
- &dummy2);
+ &dummy2);
from = out_charpos, from_byte = out_bytepos;
if (!found)
{
@@ -3083,7 +3083,7 @@ the prefix syntax flag (p). */)
opoint_byte = pos_byte;
if (pos <= beg)
- break;
+ break;
DEC_BOTH (pos, pos_byte);
}
@@ -3159,9 +3159,9 @@ do { prev_from = from; \
{
Lisp_Object temhd = Fcar (tem);
if (RANGED_INTEGERP (PTRDIFF_MIN, temhd, PTRDIFF_MAX))
- curlevel->last = XINT (temhd);
+ curlevel->last = XINT (temhd);
if (++curlevel == endlevel)
- curlevel--; /* error ("Nesting too deep for parser"); */
+ curlevel--; /* error ("Nesting too deep for parser"); */
curlevel->prev = -1;
curlevel->last = -1;
tem = Fcdr (tem);
@@ -3205,32 +3205,32 @@ do { prev_from = from; \
state->incomment = comnested ? 1 : -1;
state->comstr_start = prev_from;
INC_FROM;
- prev_from_syntax = Smax; /* the syntax has already been
- "used up". */
+ prev_from_syntax = Smax; /* the syntax has already been
+ "used up". */
code = Scomment;
}
else
- {
- INC_FROM;
- code = prev_from_syntax & 0xff;
- if (code == Scomment_fence)
- {
- /* Record the comment style we have entered so that only
- the comment-end sequence of the same style actually
- terminates the comment section. */
- state->comstyle = ST_COMMENT_STYLE;
- state->incomment = -1;
- state->comstr_start = prev_from;
- code = Scomment;
- }
- else if (code == Scomment)
- {
- state->comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax, 0);
- state->incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
- 1 : -1);
- state->comstr_start = prev_from;
- }
- }
+ {
+ INC_FROM;
+ code = prev_from_syntax & 0xff;
+ if (code == Scomment_fence)
+ {
+ /* Record the comment style we have entered so that only
+ the comment-end sequence of the same style actually
+ terminates the comment section. */
+ state->comstyle = ST_COMMENT_STYLE;
+ state->incomment = -1;
+ state->comstr_start = prev_from;
+ code = Scomment;
+ }
+ else if (code == Scomment)
+ {
+ state->comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax, 0);
+ state->incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
+ 1 : -1);
+ state->comstr_start = prev_from;
+ }
+ }
if (SYNTAX_FLAGS_PREFIX (prev_from_syntax))
continue;
@@ -3254,23 +3254,23 @@ do { prev_from = from; \
{
int symchar = FETCH_CHAR_AS_MULTIBYTE (from_byte);
- if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)
- && (syntax = SYNTAX_WITH_FLAGS (symchar),
- SYNTAX_FLAGS_COMSTART_SECOND (syntax)))
- {
- state->comstyle
- = SYNTAX_FLAGS_COMMENT_STYLE (syntax, prev_from_syntax);
- comnested = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax)
- | SYNTAX_FLAGS_COMMENT_NESTED (syntax));
- state->incomment = comnested ? 1 : -1;
- state->comstr_start = prev_from;
- INC_FROM;
- prev_from_syntax = Smax;
- code = Scomment;
- goto atcomment;
- }
-
- switch (SYNTAX (symchar))
+ if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)
+ && (syntax = SYNTAX_WITH_FLAGS (symchar),
+ SYNTAX_FLAGS_COMSTART_SECOND (syntax)))
+ {
+ state->comstyle
+ = SYNTAX_FLAGS_COMMENT_STYLE (syntax, prev_from_syntax);
+ comnested = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax)
+ | SYNTAX_FLAGS_COMMENT_NESTED (syntax));
+ state->incomment = comnested ? 1 : -1;
+ state->comstr_start = prev_from;
+ INC_FROM;
+ prev_from_syntax = Smax;
+ code = Scomment;
+ goto atcomment;
+ }
+
+ switch (SYNTAX (symchar))
{
case Scharquote:
case Sescape:
@@ -3292,8 +3292,8 @@ do { prev_from = from; \
case Scomment_fence: /* Can't happen because it's handled above. */
case Scomment:
- atcomment:
- if (commentstop || boundary_stop) goto done;
+ atcomment:
+ if (commentstop || boundary_stop) goto done;
startincomment:
/* The (from == BEGV) test was to enter the loop in the middle so
that we find a 2-char comment ender even if we start in the
@@ -3303,7 +3303,7 @@ do { prev_from = from; \
state->incomment, state->comstyle,
from == BEGV ? 0 : prev_from_syntax,
&out_charpos, &out_bytepos, &state->incomment,
- &prev_from_syntax);
+ &prev_from_syntax);
from = out_charpos; from_byte = out_bytepos;
/* Beware! prev_from and friends (except prev_from_syntax)
are invalid now. Luckily, the `done' doesn't use them
@@ -3314,7 +3314,7 @@ do { prev_from = from; \
state->incomment = 0;
state->comstyle = 0; /* reset the comment style */
prev_from_syntax = Smax; /* For the comment closer */
- if (boundary_stop) goto done;
+ if (boundary_stop) goto done;
break;
case Sopen:
@@ -3422,9 +3422,9 @@ do { prev_from = from; \
state->levelstarts = Qnil;
while (curlevel > levelstart)
state->levelstarts = Fcons (make_number ((--curlevel)->last),
- state->levelstarts);
+ state->levelstarts);
state->prev_syntax = (SYNTAX_FLAGS_COMSTARTEND_FIRST (prev_from_syntax)
- || state->quoted) ? prev_from_syntax : Smax;
+ || state->quoted) ? prev_from_syntax : Smax;
immediate_quit = 0;
}
@@ -3460,14 +3460,14 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
tem = Fcar (external);
/* Check whether we are inside string_fence-style string: */
state->instring = (!NILP (tem)
- ? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE)
- : -1);
+ ? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE)
+ : -1);
external = Fcdr (external);
tem = Fcar (external);
state->incomment = (!NILP (tem)
- ? (INTEGERP (tem) ? XINT (tem) : -1)
- : 0);
+ ? (INTEGERP (tem) ? XINT (tem) : -1)
+ : 0);
external = Fcdr (external);
tem = Fcar (external);
@@ -3479,10 +3479,10 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
external = Fcdr (external);
tem = Fcar (external);
state->comstyle = (NILP (tem)
- ? 0
- : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE)
- ? XINT (tem)
- : ST_COMMENT_STYLE));
+ ? 0
+ : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE)
+ ? XINT (tem)
+ : ST_COMMENT_STYLE));
external = Fcdr (external);
tem = Fcar (external);
@@ -3578,15 +3578,15 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment.
? Qsyntax_table
: make_number (state.comstyle))
: Qnil),
- Fcons (((state.incomment
- || (state.instring >= 0))
- ? make_number (state.comstr_start)
- : Qnil),
+ Fcons (((state.incomment
+ || (state.instring >= 0))
+ ? make_number (state.comstr_start)
+ : Qnil),
Fcons (state.levelstarts,
- Fcons (state.prev_syntax == Smax
- ? Qnil
- : make_number (state.prev_syntax),
- Qnil)))))))))));
+ Fcons (state.prev_syntax == Smax
+ ? Qnil
+ : make_number (state.prev_syntax),
+ Qnil)))))))))));
}
\f
void
@@ -3741,7 +3741,7 @@ In both cases, LIMIT bounds the search. */);
Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil);
DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped,
- doc: /* Non-nil means an escaped ender inside a comment doesn't end the comment. */);
+ doc: /* Non-nil means an escaped ender inside a comment doesn't end the comment. */);
Vcomment_end_can_be_escaped = 0;
DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped");
Fmake_variable_buffer_local (Qcomment_end_can_be_escaped);
diff --git a/src/sysdep.c b/src/sysdep.c
index 86d420f..dadfb68 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -245,7 +245,7 @@ emacs_get_current_dir_name (void)
{
buf = malloc (strlen (pwd) + 1);
if (!buf)
- return NULL;
+ return NULL;
strcpy (buf, pwd);
}
else
@@ -253,23 +253,23 @@ emacs_get_current_dir_name (void)
size_t buf_size = 1024;
buf = malloc (buf_size);
if (!buf)
- return NULL;
+ return NULL;
for (;;)
- {
- if (getcwd (buf, buf_size) == buf)
- break;
- if (errno != ERANGE)
- {
- int tmp_errno = errno;
- free (buf);
- errno = tmp_errno;
- return NULL;
- }
- buf_size *= 2;
- buf = realloc (buf, buf_size);
- if (!buf)
- return NULL;
- }
+ {
+ if (getcwd (buf, buf_size) == buf)
+ break;
+ if (errno != ERANGE)
+ {
+ int tmp_errno = errno;
+ free (buf);
+ errno = tmp_errno;
+ return NULL;
+ }
+ buf_size *= 2;
+ buf = realloc (buf, buf_size);
+ if (!buf)
+ return NULL;
+ }
}
return buf;
}
@@ -294,11 +294,11 @@ discard_tty_input (void)
struct tty_display_info *tty;
for (tty = tty_list; tty; tty = tty->next)
{
- if (tty->input) /* Is the device suspended? */
- {
- emacs_get_tty (fileno (tty->input), &buf);
- emacs_set_tty (fileno (tty->input), &buf, 0);
- }
+ if (tty->input) /* Is the device suspended? */
+ {
+ emacs_get_tty (fileno (tty->input), &buf);
+ emacs_set_tty (fileno (tty->input), &buf, 0);
+ }
}
}
#endif /* not MSDOS */
@@ -1057,7 +1057,7 @@ init_sys_modes (struct tty_display_info *tty_out)
else
tty.main.c_iflag &= ~IXON; /* Disable start/stop output control */
tty.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL
- on output */
+ on output */
tty.main.c_oflag &= ~TAB3; /* Disable tab expansion */
#ifdef CS8
if (tty_out->meta_key)
@@ -1072,27 +1072,27 @@ init_sys_modes (struct tty_display_info *tty_out)
{
tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */
/* Set up C-g for both SIGQUIT and SIGINT.
- We don't know which we will get, but we handle both alike
- so which one it really gives us does not matter. */
+ We don't know which we will get, but we handle both alike
+ so which one it really gives us does not matter. */
tty.main.c_cc[VQUIT] = quit_char;
}
else
{
/* We normally don't get interrupt or quit signals from tty
- devices other than our controlling terminal; therefore,
- we must handle C-g as normal input. Unfortunately, this
- means that the interrupt and quit feature must be
- disabled on secondary ttys, or we would not even see the
- keypress.
-
- Note that even though emacsclient could have special code
- to pass SIGINT to Emacs, we should _not_ enable
- interrupt/quit keys for emacsclient frames. This means
- that we can't break out of loops in C code from a
- secondary tty frame, but we can always decide what
- display the C-g came from, which is more important from a
- usability point of view. (Consider the case when two
- people work together using the same Emacs instance.) */
+ devices other than our controlling terminal; therefore,
+ we must handle C-g as normal input. Unfortunately, this
+ means that the interrupt and quit feature must be
+ disabled on secondary ttys, or we would not even see the
+ keypress.
+
+ Note that even though emacsclient could have special code
+ to pass SIGINT to Emacs, we should _not_ enable
+ interrupt/quit keys for emacsclient frames. This means
+ that we can't break out of loops in C code from a
+ secondary tty frame, but we can always decide what
+ display the C-g came from, which is more important from a
+ usability point of view. (Consider the case when two
+ people work together using the same Emacs instance.) */
tty.main.c_cc[VINTR] = CDISABLE;
tty.main.c_cc[VQUIT] = CDISABLE;
}
@@ -1195,7 +1195,7 @@ init_sys_modes (struct tty_display_info *tty_out)
if (interrupt_input)
{
old_fcntl_owner[fileno (tty_out->input)] =
- fcntl (fileno (tty_out->input), F_GETOWN, 0);
+ fcntl (fileno (tty_out->input), F_GETOWN, 0);
fcntl (fileno (tty_out->input), F_SETOWN, getpid ());
init_sigio (fileno (tty_out->input));
#ifdef HAVE_GPM
@@ -1226,12 +1226,12 @@ init_sys_modes (struct tty_display_info *tty_out)
{
Lisp_Object tail, frame;
FOR_EACH_FRAME (tail, frame)
- {
- /* XXX This needs to be revised. */
- if (FRAME_TERMCAP_P (XFRAME (frame))
- && FRAME_TTY (XFRAME (frame)) == tty_out)
- init_frame_faces (XFRAME (frame));
- }
+ {
+ /* XXX This needs to be revised. */
+ if (FRAME_TERMCAP_P (XFRAME (frame))
+ && FRAME_TTY (XFRAME (frame)) == tty_out)
+ init_frame_faces (XFRAME (frame));
+ }
}
if (tty_out->term_initted && no_redraw_on_reenter)
@@ -1244,12 +1244,12 @@ init_sys_modes (struct tty_display_info *tty_out)
Lisp_Object tail, frame;
frame_garbaged = 1;
FOR_EACH_FRAME (tail, frame)
- {
- if ((FRAME_TERMCAP_P (XFRAME (frame))
+ {
+ if ((FRAME_TERMCAP_P (XFRAME (frame))
|| FRAME_MSDOS_P (XFRAME (frame)))
- && FRAME_TTY (XFRAME (frame)) == tty_out)
- FRAME_GARBAGED_P (XFRAME (frame)) = 1;
- }
+ && FRAME_TTY (XFRAME (frame)) == tty_out)
+ FRAME_GARBAGED_P (XFRAME (frame)) = 1;
+ }
}
tty_out->term_initted = 1;
@@ -1425,9 +1425,9 @@ reset_sys_modes (struct tty_display_info *tty_out)
tty_turn_off_insert (tty_out);
for (i = cursorX (tty_out); i < FrameCols (tty_out) - 1; i++)
- {
- fputc (' ', tty_out->output);
- }
+ {
+ fputc (' ', tty_out->output);
+ }
}
cmgoto (tty_out, FrameRows (tty_out) - 1, 0);
@@ -1446,16 +1446,16 @@ reset_sys_modes (struct tty_display_info *tty_out)
{
reset_sigio (fileno (tty_out->input));
fcntl (fileno (tty_out->input), F_SETOWN,
- old_fcntl_owner[fileno (tty_out->input)]);
+ old_fcntl_owner[fileno (tty_out->input)]);
}
#endif /* F_SETOWN */
fcntl (fileno (tty_out->input), F_SETFL,
- fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NONBLOCK);
+ fcntl (fileno (tty_out->input), F_GETFL, 0) & ~O_NONBLOCK);
#endif
if (tty_out->old_tty)
while (emacs_set_tty (fileno (tty_out->input),
- tty_out->old_tty, 0) < 0 && errno == EINTR)
+ tty_out->old_tty, 0) < 0 && errno == EINTR)
;
#ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida */
diff --git a/src/term.c b/src/term.c
index d691a7a..9202abc 100644
--- a/src/term.c
+++ b/src/term.c
@@ -82,8 +82,8 @@ static _Noreturn void vfatal (const char *str, va_list ap)
#define OUTPUT(tty, a) \
emacs_tputs ((tty), a, \
- FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty), \
- cmputc)
+ FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty), \
+ cmputc)
#define OUTPUT1(tty, a) emacs_tputs ((tty), a, 1, cmputc)
#define OUTPUTL(tty, a, lines) emacs_tputs ((tty), a, lines, cmputc)
@@ -144,8 +144,8 @@ tty_ring_bell (struct frame *f)
if (tty->output)
{
OUTPUT (tty, (tty->TS_visible_bell && visible_bell
- ? tty->TS_visible_bell
- : tty->TS_bell));
+ ? tty->TS_visible_bell
+ : tty->TS_bell));
fflush (tty->output);
}
}
@@ -166,11 +166,11 @@ tty_send_additional_strings (struct terminal *terminal, Lisp_Object sym)
{
Lisp_Object string = XCAR (extra_codes);
if (STRINGP (string))
- {
- fwrite (SDATA (string), 1, SBYTES (string), tty->output);
- if (tty->termscript)
- fwrite (SDATA (string), 1, SBYTES (string), tty->termscript);
- }
+ {
+ fwrite (SDATA (string), 1, SBYTES (string), tty->output);
+ if (tty->termscript)
+ fwrite (SDATA (string), 1, SBYTES (string), tty->termscript);
+ }
}
}
@@ -182,16 +182,16 @@ tty_set_terminal_modes (struct terminal *terminal)
if (tty->output)
{
if (tty->TS_termcap_modes)
- OUTPUT (tty, tty->TS_termcap_modes);
+ OUTPUT (tty, tty->TS_termcap_modes);
else
- {
- /* Output enough newlines to scroll all the old screen contents
- off the screen, so it won't be overwritten and lost. */
- int i;
- current_tty = tty;
- for (i = 0; i < FRAME_TOTAL_LINES (XFRAME (selected_frame)); i++)
- cmputc ('\n');
- }
+ {
+ /* Output enough newlines to scroll all the old screen contents
+ off the screen, so it won't be overwritten and lost. */
+ int i;
+ current_tty = tty;
+ for (i = 0; i < FRAME_TOTAL_LINES (XFRAME (selected_frame)); i++)
+ cmputc ('\n');
+ }
OUTPUT_IF (tty, visible_cursor ? tty->TS_cursor_visible : tty->TS_cursor_normal);
OUTPUT_IF (tty, tty->TS_keypad_mode);
@@ -346,7 +346,7 @@ tty_show_cursor (struct tty_display_info *tty)
#else
OUTPUT_IF (tty, tty->TS_cursor_normal);
if (visible_cursor)
- OUTPUT_IF (tty, tty->TS_cursor_visible);
+ OUTPUT_IF (tty, tty->TS_cursor_visible);
#endif
}
}
@@ -490,7 +490,7 @@ tty_clear_end_of_line (struct frame *f, int first_unused_hpos)
/* Do not write in last row last col with Auto-wrap on. */
if (AutoWrap (tty)
- && curY (tty) == FrameRows (tty) - 1
+ && curY (tty) == FrameRows (tty) - 1
&& first_unused_hpos == FrameCols (tty))
first_unused_hpos--;
@@ -912,7 +912,7 @@ tty_insert_glyphs (struct frame *f, struct glyph *start, int len)
/* This is the last glyph. */
coding->mode |= CODING_MODE_LAST_BLOCK;
- conversion_buffer = encode_terminal_code (glyph, 1, coding);
+ conversion_buffer = encode_terminal_code (glyph, 1, coding);
}
if (coding->produced > 0)
@@ -1011,20 +1011,20 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
raw_cursor_to (f, vpos, 0);
tty_background_highlight (tty);
while (--i >= 0)
- OUTPUT (tty, single);
+ OUTPUT (tty, single);
if (tty->TF_teleray)
- curX (tty) = 0;
+ curX (tty) = 0;
}
else
{
tty_set_scroll_region (f, vpos, tty->specified_window);
if (n < 0)
- raw_cursor_to (f, tty->specified_window - 1, 0);
+ raw_cursor_to (f, tty->specified_window - 1, 0);
else
- raw_cursor_to (f, vpos, 0);
+ raw_cursor_to (f, vpos, 0);
tty_background_highlight (tty);
while (--i >= 0)
- OUTPUTL (tty, scroll, tty->specified_window - vpos);
+ OUTPUTL (tty, scroll, tty->specified_window - vpos);
tty_set_scroll_region (f, 0, tty->specified_window);
}
@@ -1163,11 +1163,11 @@ calculate_costs (struct frame *frame)
tty->costs_set = 1;
/* These variables are only used for terminal stuff. They are
- allocated once for the terminal frame of X-windows emacs, but not
- used afterwards.
+ allocated once for the terminal frame of X-windows emacs, but not
+ used afterwards.
- char_ins_del_vector (i.e., char_ins_del_cost) isn't used because
- X turns off char_ins_del_ok. */
+ char_ins_del_vector (i.e., char_ins_del_cost) isn't used because
+ X turns off char_ins_del_ok. */
max_frame_cols = max (max_frame_cols, FRAME_COLS (frame));
if ((min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) - 1) / 2
@@ -1183,23 +1183,23 @@ calculate_costs (struct frame *frame)
if (f && (!tty->TS_ins_line && !tty->TS_del_line))
- do_line_insertion_deletion_costs (frame,
- tty->TS_rev_scroll, tty->TS_ins_multi_lines,
- tty->TS_fwd_scroll, tty->TS_del_multi_lines,
- f, f, 1);
+ do_line_insertion_deletion_costs (frame,
+ tty->TS_rev_scroll, tty->TS_ins_multi_lines,
+ tty->TS_fwd_scroll, tty->TS_del_multi_lines,
+ f, f, 1);
else
- do_line_insertion_deletion_costs (frame,
- tty->TS_ins_line, tty->TS_ins_multi_lines,
- tty->TS_del_line, tty->TS_del_multi_lines,
- 0, 0, 1);
+ do_line_insertion_deletion_costs (frame,
+ tty->TS_ins_line, tty->TS_ins_multi_lines,
+ tty->TS_del_line, tty->TS_del_multi_lines,
+ 0, 0, 1);
calculate_ins_del_char_costs (frame);
/* Don't use TS_repeat if its padding is worse than sending the chars */
if (tty->TS_repeat && per_line_cost (tty->TS_repeat) * baud_rate < 9000)
- tty->RPov = string_cost (tty->TS_repeat);
+ tty->RPov = string_cost (tty->TS_repeat);
else
- tty->RPov = FRAME_COLS (frame) * 2;
+ tty->RPov = FRAME_COLS (frame) * 2;
cmcostinit (FRAME_TTY (frame)); /* set up cursor motion costs */
}
@@ -1934,7 +1934,7 @@ turn_on_face (struct frame *f, int face_id)
ts = tty->standout_mode ? tty->TS_set_background : tty->TS_set_foreground;
if (face_tty_specified_color (fg) && ts)
{
- p = tparam (ts, NULL, 0, fg, 0, 0, 0);
+ p = tparam (ts, NULL, 0, fg, 0, 0, 0);
OUTPUT (tty, p);
xfree (p);
}
@@ -1942,7 +1942,7 @@ turn_on_face (struct frame *f, int face_id)
ts = tty->standout_mode ? tty->TS_set_foreground : tty->TS_set_background;
if (face_tty_specified_color (bg) && ts)
{
- p = tparam (ts, NULL, 0, bg, 0, 0, 0);
+ p = tparam (ts, NULL, 0, bg, 0, 0, 0);
OUTPUT (tty, p);
xfree (p);
}
@@ -2260,14 +2260,14 @@ A suspended tty may be resumed by calling `resume-tty' on it. */)
#ifndef MSDOS
fclose (f);
if (f != t->display_info.tty->output)
- fclose (t->display_info.tty->output);
+ fclose (t->display_info.tty->output);
#endif
t->display_info.tty->input = 0;
t->display_info.tty->output = 0;
if (FRAMEP (t->display_info.tty->top_frame))
- SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0);
+ SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0);
}
@@ -2305,7 +2305,7 @@ frame's terminal). */)
if (!t->display_info.tty->input)
{
if (get_named_terminal (t->display_info.tty->name))
- error ("Cannot resume display while another display is active on the same device");
+ error ("Cannot resume display while another display is active on the same device");
#ifdef MSDOS
t->display_info.tty->output = stdout;
@@ -2325,7 +2325,7 @@ frame's terminal). */)
}
if (!O_IGNORE_CTTY && strcmp (t->display_info.tty->name, DEV_TTY) != 0)
- dissociate_if_controlling_tty (fd);
+ dissociate_if_controlling_tty (fd);
#endif
add_keyboard_wait_descriptor (fd);
@@ -2793,7 +2793,7 @@ mouse_get_xy (int *x, int *y)
if (FRAME_TERMINAL (sf)->mouse_position_hook)
(*FRAME_TERMINAL (sf)->mouse_position_hook) (&sf, -1,
- &lisp_dummy, &part_dummy,
+ &lisp_dummy, &part_dummy,
&lmx, &lmy,
&time_dummy);
if (!NILP (lmx))
@@ -3549,8 +3549,8 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
Lisp_Object pane_name, prefix;
const char *pane_string;
- maxlines = max (maxlines, lines);
- lines = 0;
+ maxlines = max (maxlines, lines);
+ lines = 0;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
pane_string = (NILP (pane_name)
@@ -3627,7 +3627,7 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
goto tty_menu_end;
}
i += MENU_ITEMS_ITEM_LENGTH;
- lines++;
+ lines++;
}
}
@@ -3679,8 +3679,8 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
if (! for_click)
{
/* If position was not given by a mouse click, adjust so upper left
- corner of the menu as a whole ends up at given coordinates. This
- is what x-popup-menu says in its documentation. */
+ corner of the menu as a whole ends up at given coordinates. This
+ is what x-popup-menu says in its documentation. */
x += width / 2;
y += 1.5 * height / (maxlines + 2);
}
@@ -3929,8 +3929,8 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
if (!terminal_type)
maybe_fatal (must_succeed, 0,
- "Unknown terminal type",
- "Unknown terminal type");
+ "Unknown terminal type",
+ "Unknown terminal type");
if (name == NULL)
name = DEV_TTY;
@@ -4025,19 +4025,19 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
{
#ifdef TERMINFO
maybe_fatal (must_succeed, terminal,
- "Cannot open terminfo database file",
- "Cannot open terminfo database file");
+ "Cannot open terminfo database file",
+ "Cannot open terminfo database file");
#else
maybe_fatal (must_succeed, terminal,
- "Cannot open termcap database file",
- "Cannot open termcap database file");
+ "Cannot open termcap database file",
+ "Cannot open termcap database file");
#endif
}
if (status == 0)
{
maybe_fatal (must_succeed, terminal,
- "Terminal type %s is not defined",
- "Terminal type %s is not defined.\n\
+ "Terminal type %s is not defined",
+ "Terminal type %s is not defined.\n\
If that is not the actual type of terminal you have,\n\
use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
'setenv TERM ...') to specify the correct type. It may be necessary\n"
@@ -4046,7 +4046,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
#else
"to do 'unset TERMCAP' (C-shell: 'unsetenv TERMCAP') as well.",
#endif
- terminal_type);
+ terminal_type);
}
area = tty->termcap_strings_buffer;
@@ -4139,7 +4139,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
tty->TN_no_color_video = tgetnum ("NC");
if (tty->TN_no_color_video == -1)
- tty->TN_no_color_video = 0;
+ tty->TN_no_color_video = 0;
}
tty_default_color_capabilities (tty, 1);
@@ -4243,9 +4243,9 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
if (FrameRows (tty) < 3 || FrameCols (tty) < 3)
maybe_fatal (must_succeed, terminal,
- "Screen size %dx%d is too small",
- "Screen size %dx%d is too small",
- FrameCols (tty), FrameRows (tty));
+ "Screen size %dx%d is too small",
+ "Screen size %dx%d is too small",
+ FrameCols (tty), FrameRows (tty));
TabWidth (tty) = tgetnum ("tw");
@@ -4292,9 +4292,9 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
{
char *s = tgetstr ("me", address);
if (s != 0)
- tty->TS_end_standout_mode = s;
+ tty->TS_end_standout_mode = s;
else
- tty->TS_standout_mode = 0;
+ tty->TS_standout_mode = 0;
}
if (tty->TF_teleray)
@@ -4314,8 +4314,8 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
if (Wcm_init (tty) == -1) /* Can't do cursor motion. */
{
maybe_fatal (must_succeed, terminal,
- "Terminal type \"%s\" is not powerful enough to run Emacs",
- "Terminal type \"%s\" is not powerful enough to run Emacs.\n\
+ "Terminal type \"%s\" is not powerful enough to run Emacs",
+ "Terminal type \"%s\" is not powerful enough to run Emacs.\n\
It lacks the ability to position the cursor.\n\
If that is not the actual type of terminal you have,\n\
use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
@@ -4325,13 +4325,13 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
# else /* TERMCAP */
"to do 'unset TERMCAP' (C-shell: 'unsetenv TERMCAP') as well.",
# endif /* TERMINFO */
- terminal_type);
+ terminal_type);
}
if (FrameRows (tty) <= 0 || FrameCols (tty) <= 0)
maybe_fatal (must_succeed, terminal,
- "Could not determine the frame size",
- "Could not determine the frame size");
+ "Could not determine the frame size",
+ "Could not determine the frame size");
tty->delete_in_insert_mode
= tty->TS_delete_mode && tty->TS_insert_mode
@@ -4345,13 +4345,13 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
tty->line_ins_del_ok
= (((tty->TS_ins_line || tty->TS_ins_multi_lines)
- && (tty->TS_del_line || tty->TS_del_multi_lines))
+ && (tty->TS_del_line || tty->TS_del_multi_lines))
|| (tty->scroll_region_ok
- && tty->TS_fwd_scroll && tty->TS_rev_scroll));
+ && tty->TS_fwd_scroll && tty->TS_rev_scroll));
tty->char_ins_del_ok
= ((tty->TS_ins_char || tty->TS_insert_mode
- || tty->TS_pad_inserted_char || tty->TS_ins_multi_chars)
+ || tty->TS_pad_inserted_char || tty->TS_ins_multi_chars)
&& (tty->TS_del_char || tty->TS_del_multi_chars));
init_baud_rate (fileno (tty->input));
@@ -4428,11 +4428,11 @@ delete_tty (struct terminal *terminal)
{
struct tty_display_info *p;
for (p = tty_list; p && p->next != tty; p = p->next)
- ;
+ ;
if (! p)
- /* This should not happen. */
- emacs_abort ();
+ /* This should not happen. */
+ emacs_abort ();
p->next = tty->next;
tty->next = 0;
@@ -4451,7 +4451,7 @@ delete_tty (struct terminal *terminal)
{
delete_keyboard_wait_descriptor (fileno (tty->input));
if (tty->input != stdin)
- fclose (tty->input);
+ fclose (tty->input);
}
if (tty->output && tty->output != stdout && tty->output != tty->input)
fclose (tty->output);
diff --git a/src/termcap.c b/src/termcap.c
index 3ecf19f..a39e397 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -111,7 +111,7 @@ static const char esctab[]
= " \057\026 \047\014 \
\025 \015 \
\005 \013 \
- ";
+ ";
#else
/* Table, indexed by a character in range 0100 to 0140 with 0100 subtracted,
gives meaning of character following \, or a space if no special meaning.
@@ -121,7 +121,7 @@ static const char esctab[]
= " \007\010 \033\014 \
\012 \
\015 \011 \013 \
- ";
+ ";
#endif
/* PTR points to a string value inside a termcap entry.
@@ -583,7 +583,7 @@ compare_contin (char *str1, char *str2)
return 0;
else
return 1;
- }
+ }
else if (c1 != c2)
return 1;
}
@@ -617,7 +617,7 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
end = append_end;
while (*end && *end != '\n') end++;
if (*end)
- break;
+ break;
if (bufp->ateof)
return buf + bufp->full;
if (bufp->ptr == buf)
diff --git a/src/termchar.h b/src/termchar.h
index 35b30fb..f22ad9f 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -43,18 +43,18 @@ struct tty_display_info
struct tty_display_info *next; /* Chain of all tty devices. */
char *name; /* The name of the device file or 0 if
- stdin/stdout. */
+ stdin/stdout. */
char *type; /* The type of the tty. */
/* Input/output */
FILE *input; /* The stream to be used for terminal input.
- NULL if the terminal is suspended. */
+ NULL if the terminal is suspended. */
FILE *output; /* The stream to be used for terminal output.
- NULL if the terminal is suspended. */
+ NULL if the terminal is suspended. */
FILE *termscript; /* If nonzero, send all terminal output
- characters to this stream also. */
+ characters to this stream also. */
struct emacs_tty *old_tty; /* The initial tty mode bits */
@@ -64,7 +64,7 @@ struct tty_display_info
int reference_count; /* Number of frames that are on this display. */
struct terminal *terminal; /* Points back to the generic terminal
- structure. This is sometimes handy. */
+ structure. This is sometimes handy. */
/* Info on cursor positioning. */
struct cm *Wcm;
@@ -99,8 +99,8 @@ struct tty_display_info
const char *TS_clr_frame; /* "cl" */
const char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */
const char *TS_set_scroll_region_1; /* "cS" (4 params: total lines,
- lines above scroll region, lines below it,
- total lines again) */
+ lines above scroll region, lines below it,
+ total lines again) */
const char *TS_del_char; /* "dc" */
const char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */
const char *TS_del_line; /* "dl" */
@@ -128,7 +128,7 @@ struct tty_display_info
const char *TS_cursor_visible; /* "vs" */
const char *TS_cursor_invisible; /* "vi" */
const char *TS_set_window; /* "wi" (4 params, start and end of window,
- each as vpos and hpos) */
+ each as vpos and hpos) */
const char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */
const char *TS_enter_italic_mode; /* "ZH" -- turn on italics mode. */
@@ -165,9 +165,9 @@ struct tty_display_info
int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */
int TF_standout_motion; /* termcap mi flag: can move while in standout mode. */
int TF_underscore; /* termcap ul flag: _ underlines if over-struck on
- non-blank position. Must clear before writing _. */
+ non-blank position. Must clear before writing _. */
int TF_teleray; /* termcap xt flag: many weird consequences.
- For t1061. */
+ For t1061. */
int RPov; /* # chars to start a TS_repeat */
diff --git a/src/termhooks.h b/src/termhooks.h
index 81e06d9..c4368d6 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -118,8 +118,8 @@ enum event_kind
.timestamp gives a timestamp (in
milliseconds) for the event. */
HORIZ_WHEEL_EVENT, /* A wheel event generated by a second
- horizontal wheel that is present on some
- mice. See WHEEL_EVENT. */
+ horizontal wheel that is present on some
+ mice. See WHEEL_EVENT. */
#ifdef HAVE_NTGUI
LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is
generated when HAVE_NTGUI or on Mac OS
@@ -183,8 +183,8 @@ enum event_kind
.timestamp gives a timestamp (in
milliseconds) for the click. */
USER_SIGNAL_EVENT, /* A user signal.
- code is a number identifying it,
- index into lispy_user_signals. */
+ code is a number identifying it,
+ index into lispy_user_signals. */
/* Help events. Member `frame_or_window' of the input_event is the
frame on which the event occurred, and member `arg' contains
@@ -497,11 +497,11 @@ struct terminal
Set *time to the time the mouse was at the returned position. */
void (*mouse_position_hook) (struct frame **f, int,
- Lisp_Object *bar_window,
- enum scroll_bar_part *part,
- Lisp_Object *x,
- Lisp_Object *y,
- Time *);
+ Lisp_Object *bar_window,
+ enum scroll_bar_part *part,
+ Lisp_Object *x,
+ Lisp_Object *y,
+ Time *);
/* When a frame's focus redirection is changed, this hook tells the
window system code to re-decide where to put the highlight. Under
@@ -561,8 +561,8 @@ struct terminal
of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
have a scroll bar, create one for it. */
void (*set_vertical_scroll_bar_hook) (struct window *window,
- int portion, int whole,
- int position);
+ int portion, int whole,
+ int position);
/* Set the horizontal scroll bar for WINDOW to have its upper left
@@ -626,7 +626,7 @@ struct terminal
A value of -1 means a transient read error, while -2 indicates
that the device was closed (hangup), and it should be deleted. */
int (*read_socket_hook) (struct terminal *terminal,
- struct input_event *hold_quit);
+ struct input_event *hold_quit);
/* Called when a frame's display becomes entirely up to date. */
void (*frame_up_to_date_hook) (struct frame *);
diff --git a/src/terminal.c b/src/terminal.c
index 5dd9975..866d453 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -252,9 +252,9 @@ get_named_terminal (const char *name)
for (t = terminal_list; t; t = t->next_terminal)
{
if ((t->type == output_termcap || t->type == output_msdos_raw)
- && !strcmp (t->display_info.tty->name, name)
- && TERMINAL_ACTIVE_P (t))
- return t;
+ && !strcmp (t->display_info.tty->name, name)
+ && TERMINAL_ACTIVE_P (t))
+ return t;
}
return NULL;
}
@@ -329,10 +329,10 @@ delete_terminal (struct terminal *terminal)
{
struct frame *f = XFRAME (frame);
if (FRAME_LIVE_P (f) && f->terminal == terminal)
- {
+ {
/* Pass Qnoelisp rather than Qt. */
- delete_frame (frame, Qnoelisp);
- }
+ delete_frame (frame, Qnoelisp);
+ }
}
for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal)
diff --git a/src/textprop.c b/src/textprop.c
index 7af8c69..8f76871 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1713,18 +1713,18 @@ Return t if any property was actually removed, nil otherwise. */)
len -= LENGTH (i);
i = next_interval (i);
if (!i)
- {
- if (modified)
- {
- if (BUFFERP (object))
- signal_after_change (XINT (start),
- XINT (end) - XINT (start),
- XINT (end) - XINT (start));
- return Qt;
- }
- else
- return Qnil;
- }
+ {
+ if (modified)
+ {
+ if (BUFFERP (object))
+ signal_after_change (XINT (start),
+ XINT (end) - XINT (start),
+ XINT (end) - XINT (start));
+ return Qt;
+ }
+ else
+ return Qnil;
+ }
}
}
\f
diff --git a/src/tparam.c b/src/tparam.c
index d3ae491..3657a6b 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -140,7 +140,7 @@ tparam1 (const char *string, char *outstring, int len,
*op++ = tem % 10 + '0';
argp++;
break;
- case 'p': /* %pN means use param N for next subst. */
+ case 'p': /* %pN means use param N for next subst. */
tem = fixed_argp[(*p++) - '1'];
explicit_param_p = true;
break;
diff --git a/src/undo.c b/src/undo.c
index ed69a62..6c91f1d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -58,7 +58,7 @@ record_point (ptrdiff_t beg)
called before record_first_change, but could be made not to by
ignoring timestamp undo entries */
at_boundary = ! CONSP (BVAR (current_buffer, undo_list))
- || NILP (XCAR (BVAR (current_buffer, undo_list)));
+ || NILP (XCAR (BVAR (current_buffer, undo_list)));
/* If this is the first change since save, then record this.*/
if (MODIFF <= SAVE_MODIFF)
@@ -138,25 +138,25 @@ record_marker_adjustments (ptrdiff_t from, ptrdiff_t to)
eassert (charpos <= Z);
if (from <= charpos && charpos <= to)
- {
- /* insertion_type nil markers will end up at the beginning of
- the re-inserted text after undoing a deletion, and must be
- adjusted to move them to the correct place.
-
- insertion_type t markers will automatically move forward
- upon re-inserting the deleted text, so we have to arrange
- for them to move backward to the correct position. */
- adjustment = (m->insertion_type ? to : from) - charpos;
-
- if (adjustment)
- {
- XSETMISC (marker, m);
- bset_undo_list
- (current_buffer,
- Fcons (Fcons (marker, make_number (adjustment)),
- BVAR (current_buffer, undo_list)));
- }
- }
+ {
+ /* insertion_type nil markers will end up at the beginning of
+ the re-inserted text after undoing a deletion, and must be
+ adjusted to move them to the correct place.
+
+ insertion_type t markers will automatically move forward
+ upon re-inserting the deleted text, so we have to arrange
+ for them to move backward to the correct position. */
+ adjustment = (m->insertion_type ? to : from) - charpos;
+
+ if (adjustment)
+ {
+ XSETMISC (marker, m);
+ bset_undo_list
+ (current_buffer,
+ Fcons (Fcons (marker, make_number (adjustment)),
+ BVAR (current_buffer, undo_list)));
+ }
+ }
}
}
diff --git a/src/unexaix.c b/src/unexaix.c
index c2012f7..53e8fd1 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -226,11 +226,11 @@ make_hdr (int new, int a_out,
if (strcmp (s->s_name, name) == 0) { \
if (s->s_flags != flags) { \
fprintf (stderr, "unexec: %lx flags where %x expected in %s section.\n", \
- (unsigned long)s->s_flags, flags, name); \
+ (unsigned long)s->s_flags, flags, name); \
} \
if (ptr) { \
fprintf (stderr, "unexec: duplicate section header for section %s.\n", \
- name); \
+ name); \
} \
ptr = s; \
}
@@ -498,12 +498,12 @@ adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
read (new, &auxentry, AUXESZ);
nsyms++;
if (naux != 0 /* skip csect auxentry (last entry) */
- && (symentry.n_sclass == C_EXT || symentry.n_sclass == C_HIDEXT))
- {
- auxentry.x_sym.x_fcnary.x_fcn.x_lnnoptr += bias;
- lseek (new, -AUXESZ, SEEK_CUR);
- write (new, &auxentry, AUXESZ);
- }
+ && (symentry.n_sclass == C_EXT || symentry.n_sclass == C_HIDEXT))
+ {
+ auxentry.x_sym.x_fcnary.x_fcn.x_lnnoptr += bias;
+ lseek (new, -AUXESZ, SEEK_CUR);
+ write (new, &auxentry, AUXESZ);
+ }
}
}
emacs_close (new);
@@ -572,7 +572,7 @@ unrelocate_symbols (int new, int a_out,
int orig_int;
lseek (a_out,
- orig_data_scnptr + (ldrel.l_vaddr - f_ohdr.data_start),
+ orig_data_scnptr + (ldrel.l_vaddr - f_ohdr.data_start),
SEEK_SET);
if (read (a_out, (void *) &orig_int, sizeof (orig_int))
@@ -581,7 +581,7 @@ unrelocate_symbols (int new, int a_out,
PERROR (a_name);
}
- p = (int *) (intptr_t) (ldrel.l_vaddr + d_reloc);
+ p = (int *) (intptr_t) (ldrel.l_vaddr + d_reloc);
switch (ldrel.l_symndx) {
case SYMNDX_TEXT:
@@ -594,17 +594,17 @@ unrelocate_symbols (int new, int a_out,
break;
}
- if (orig_int != * p)
- {
- lseek (new,
- data_scnptr + (ldrel.l_vaddr - f_ohdr.data_start),
+ if (orig_int != * p)
+ {
+ lseek (new,
+ data_scnptr + (ldrel.l_vaddr - f_ohdr.data_start),
SEEK_SET);
- if (write (new, (void *) &orig_int, sizeof (orig_int))
- != sizeof (orig_int))
- {
- PERROR (new_name);
- }
- }
+ if (write (new, (void *) &orig_int, sizeof (orig_int))
+ != sizeof (orig_int))
+ {
+ PERROR (new_name);
+ }
+ }
}
}
return 0;
diff --git a/src/unexcoff.c b/src/unexcoff.c
index 6a08380..4540abe 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -230,7 +230,7 @@ make_hdr (int new, int a_out,
}
if (scntemp.s_scnptr > 0L)
{
- if (block_copy_start < scntemp.s_scnptr + scntemp.s_size)
+ if (block_copy_start < scntemp.s_scnptr + scntemp.s_size)
block_copy_start = scntemp.s_scnptr + scntemp.s_size;
}
if (strcmp (scntemp.s_name, ".text") == 0)
diff --git a/src/unexcw.c b/src/unexcw.c
index c0d1bc1..40c1a35 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -70,7 +70,7 @@ read_exe_header (int fd, exe_header_t * exe_header_buffer)
#endif
assert (exe_header_buffer->file_header.f_nscns > 0);
assert (exe_header_buffer->file_header.f_nscns <=
- ARRAYELTS (exe_header_buffer->section_header));
+ ARRAYELTS (exe_header_buffer->section_header));
assert (exe_header_buffer->file_header.f_opthdr > 0);
ret =
@@ -180,18 +180,18 @@ fixup_executable (int fd)
exe_header->file_optional_header.FileAlignment *
exe_header->file_optional_header.FileAlignment;
- /* Make sure the generated bootstrap binary isn't
- * sparse. NT doesn't use a file cache for sparse
- * executables, so if we bootstrap Emacs using a sparse
- * bootstrap-emacs.exe, bootstrap takes about twenty
- * times longer than it would otherwise. */
+ /* Make sure the generated bootstrap binary isn't
+ * sparse. NT doesn't use a file cache for sparse
+ * executables, so if we bootstrap Emacs using a sparse
+ * bootstrap-emacs.exe, bootstrap takes about twenty
+ * times longer than it would otherwise. */
- ret = posix_fallocate (fd,
- ( exe_header->section_header[i].s_scnptr +
- exe_header->section_header[i].s_size ),
- 1);
+ ret = posix_fallocate (fd,
+ ( exe_header->section_header[i].s_scnptr +
+ exe_header->section_header[i].s_size ),
+ 1);
- assert (ret != -1);
+ assert (ret != -1);
ret =
lseek (fd,
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 5584e69..4e6cd3f 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -235,7 +235,7 @@ unexec_write (off_t dest, const void *src, size_t count)
== KERN_SUCCESS)
{
success =
- write (outfd, (const void *) (uintptr_t) data, data_count) == count;
+ write (outfd, (const void *) (uintptr_t) data, data_count) == count;
vm_deallocate (task, data, data_count);
}
return success;
@@ -721,11 +721,11 @@ read_load_commands (void)
/* Load commands are variable-size: so read the command type and
size first and then read the rest. */
if (!unexec_read (&lc, sizeof (struct load_command)))
- unexec_error ("cannot read load command");
+ unexec_error ("cannot read load command");
lca[i] = malloc (lc.cmdsize);
memcpy (lca[i], &lc, sizeof (struct load_command));
if (!unexec_read (lca[i] + 1, lc.cmdsize - sizeof (struct load_command)))
- unexec_error ("cannot read content of load command");
+ unexec_error ("cannot read content of load command");
if (lc.cmd == LC_SEGMENT)
{
struct segment_command *scp = (struct segment_command *) lca[i];
@@ -1049,8 +1049,8 @@ unrelocate (const char *name, off_t reloff, int nrel, vm_address_t base)
name, i, reloc_info.r_type);
}
else
- unexec_error ("unrelocate: %s:%d cannot handle scattered type = %d",
- name, i, sc_reloc_info->r_type);
+ unexec_error ("unrelocate: %s:%d cannot handle scattered type = %d",
+ name, i, sc_reloc_info->r_type);
}
if (nrel > 0)
diff --git a/src/unexw32.c b/src/unexw32.c
index 5422485..63666c8 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -317,10 +317,10 @@ relocate_offset (DWORD_PTR offset,
#define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))
#define PTR_TO_OFFSET(ptr, pfile_data) \
- ((unsigned char *)(ptr) - (pfile_data)->file_base)
+ ((unsigned char *)(ptr) - (pfile_data)->file_base)
#define OFFSET_TO_PTR(offset, pfile_data) \
- ((pfile_data)->file_base + (DWORD_PTR)(offset))
+ ((pfile_data)->file_base + (DWORD_PTR)(offset))
#if 0 /* unused */
#define OFFSET_TO_RVA(offset, section) \
@@ -389,7 +389,7 @@ get_section_info (file_data *p_infile)
else
{
/* Fallback on the old method if compiler doesn't support the
- data_set #pragma (or its equivalent). */
+ data_set #pragma (or its equivalent). */
data_start = my_begdata;
data_size = my_edata - my_begdata;
data_section = rva_to_section (PTR_TO_RVA (my_begdata), nt_header);
@@ -569,8 +569,8 @@ copy_executable_and_dump_data (file_data *p_infile,
dst_save = dst;
/* Update the file-relative offset for this section's raw data (if
- it has any) in case things have been relocated; we will update
- the other offsets below once we know where everything is. */
+ it has any) in case things have been relocated; we will update
+ the other offsets below once we know where everything is. */
if (dst_section->PointerToRawData)
dst_section->PointerToRawData = DST_TO_OFFSET ();
@@ -593,7 +593,7 @@ copy_executable_and_dump_data (file_data *p_infile,
if (section == bss_section)
{
/* Dump contents of bss variables, adjusting the section's raw
- data size as necessary. */
+ data size as necessary. */
dst = dst_save
+ RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start), dst_section);
COPY_PROC_CHUNK ("Dumping bss data...", bss_start,
@@ -609,7 +609,7 @@ copy_executable_and_dump_data (file_data *p_infile,
if (section == bss_section_static)
{
/* Dump contents of static bss variables, adjusting the
- section's raw data size as necessary. */
+ section's raw data size as necessary. */
dst = dst_save
+ RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start_static), dst_section);
COPY_PROC_CHUNK ("Dumping static bss data...", bss_start_static,
diff --git a/src/w16select.c b/src/w16select.c
index 208cfcc..ffc969c 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -104,7 +104,7 @@ identify_winoldap_version (void)
/* Calls Int 2Fh/AX=1700h
Return Values AX == 1700H: Clipboard functions not available
- <> 1700H: AL = Major version number
+ <> 1700H: AL = Major version number
AH = Minor version number */
regs.x.ax = 0x1700;
__dpmi_int (0x2f, ®s);
@@ -280,9 +280,9 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
dosmemget (xbuf_addr, truelen, last_clipboard_text);
/* Calls Int 2Fh/AX=1703h with:
- DX = WinOldAp-Supported Clipboard format
- ES:BX = Pointer to data
- SI:CX = Size of data in bytes
+ DX = WinOldAp-Supported Clipboard format
+ ES:BX = Pointer to data
+ SI:CX = Size of data in bytes
Return Values AX == 0: Error occurred
<> 0: OK. Data copied into the Clipboard. */
regs.x.ax = 0x1703;
@@ -312,8 +312,8 @@ get_clipboard_data_size (unsigned Format)
/* Calls Int 2Fh/AX=1704h with:
DX = WinOldAp-Supported Clipboard format
Return Values DX:AX == Size of the data in bytes, including any
- headers.
- == 0 If data in this format is not in
+ headers.
+ == 0 If data in this format is not in
the clipboard. */
regs.x.ax = 0x1704;
regs.x.dx = Format;
@@ -344,8 +344,8 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
DX = WinOldAp-Supported Clipboard format
ES:BX = Pointer to data buffer to hold data
Return Values AX == 0: Error occurred (or data in this format is not
- in the clipboard)
- <> 0: OK */
+ in the clipboard)
+ <> 0: OK */
regs.x.ax = 0x1705;
regs.x.dx = Format;
regs.x.es = xbuf_addr >> 4;
@@ -410,7 +410,7 @@ close_clipboard (void)
/* Calls Int 2Fh/AX=1708h
Return Values AX == 0: Error occurred
- <> 0: OK */
+ <> 0: OK */
regs.x.ax = 0x1708;
__dpmi_int (0x2f, ®s);
return regs.x.ax;
@@ -423,9 +423,9 @@ clipboard_compact (unsigned Size)
__dpmi_regs regs;
/* Calls Int 2Fh/AX=1709H with:
- SI:CX = Desired memory size in bytes.
+ SI:CX = Desired memory size in bytes.
Return Values DX:AX == Number of bytes of largest block of free memory.
- == 0 if error or no memory */
+ == 0 if error or no memory */
regs.x.ax = 0x1709;
regs.x.si = Size >> 16;
regs.x.cx = Size & 0xffff;
diff --git a/src/w32.c b/src/w32.c
index e96f297..f19c37b 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -177,24 +177,24 @@ typedef struct _REPARSE_DATA_BUFFER {
USHORT ReparseDataLength;
USHORT Reserved;
union {
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct {
- UCHAR DataBuffer[1];
- } GenericReparseBuffer;
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ } SymbolicLinkReparseBuffer;
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
} DUMMYUNIONNAME;
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
@@ -279,12 +279,12 @@ extern int sys_dup (int);
/* Initialization states.
WARNING: If you add any more such variables for additional APIs,
- you MUST add initialization for them to globals_of_w32
- below. This is because these variables might get set
- to non-NULL values during dumping, but the dumped Emacs
- cannot reuse those values, because it could be run on a
- different version of the OS, where API addresses are
- different. */
+ you MUST add initialization for them to globals_of_w32
+ below. This is because these variables might get set
+ to non-NULL values during dumping, but the dumped Emacs
+ cannot reuse those values, because it could be run on a
+ different version of the OS, where API addresses are
+ different. */
static BOOL g_b_init_is_windows_9x;
static BOOL g_b_init_open_process_token;
static BOOL g_b_init_get_token_information;
@@ -514,9 +514,9 @@ is_windows_9x (void)
ZeroMemory (&os_ver, sizeof (OSVERSIONINFO));
os_ver.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (GetVersionEx (&os_ver))
- {
- s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
- }
+ {
+ s_b_ret = (os_ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
+ }
}
return s_b_ret;
}
@@ -536,15 +536,15 @@ w32_get_internal_run_time (void)
FILETIME create, exit, kernel, user;
HANDLE proc = GetCurrentProcess ();
if ((*get_process_times_fn) (proc, &create, &exit, &kernel, &user))
- {
- LARGE_INTEGER user_int, kernel_int, total;
- user_int.LowPart = user.dwLowDateTime;
- user_int.HighPart = user.dwHighDateTime;
- kernel_int.LowPart = kernel.dwLowDateTime;
- kernel_int.HighPart = kernel.dwHighDateTime;
- total.QuadPart = user_int.QuadPart + kernel_int.QuadPart;
+ {
+ LARGE_INTEGER user_int, kernel_int, total;
+ user_int.LowPart = user.dwLowDateTime;
+ user_int.HighPart = user.dwHighDateTime;
+ kernel_int.LowPart = kernel.dwLowDateTime;
+ kernel_int.HighPart = kernel.dwHighDateTime;
+ total.QuadPart = user_int.QuadPart + kernel_int.QuadPart;
return ltime (total.QuadPart);
- }
+ }
}
return Fcurrent_time ();
@@ -568,7 +568,7 @@ open_process_token (HANDLE ProcessHandle,
g_b_init_open_process_token = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Open_Process_Token =
- (OpenProcessToken_Proc) GetProcAddress (hm_advapi32, "OpenProcessToken");
+ (OpenProcessToken_Proc) GetProcAddress (hm_advapi32, "OpenProcessToken");
}
if (s_pfn_Open_Process_Token == NULL)
{
@@ -576,9 +576,9 @@ open_process_token (HANDLE ProcessHandle,
}
return (
s_pfn_Open_Process_Token (
- ProcessHandle,
- DesiredAccess,
- TokenHandle)
+ ProcessHandle,
+ DesiredAccess,
+ TokenHandle)
);
}
@@ -600,7 +600,7 @@ get_token_information (HANDLE TokenHandle,
g_b_init_get_token_information = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Token_Information =
- (GetTokenInformation_Proc) GetProcAddress (hm_advapi32, "GetTokenInformation");
+ (GetTokenInformation_Proc) GetProcAddress (hm_advapi32, "GetTokenInformation");
}
if (s_pfn_Get_Token_Information == NULL)
{
@@ -608,11 +608,11 @@ get_token_information (HANDLE TokenHandle,
}
return (
s_pfn_Get_Token_Information (
- TokenHandle,
- TokenInformationClass,
- TokenInformation,
- TokenInformationLength,
- ReturnLength)
+ TokenHandle,
+ TokenInformationClass,
+ TokenInformation,
+ TokenInformationLength,
+ ReturnLength)
);
}
@@ -636,7 +636,7 @@ lookup_account_sid (LPCTSTR lpSystemName,
g_b_init_lookup_account_sid = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Lookup_Account_Sid =
- (LookupAccountSid_Proc) GetProcAddress (hm_advapi32, LookupAccountSid_Name);
+ (LookupAccountSid_Proc) GetProcAddress (hm_advapi32, LookupAccountSid_Name);
}
if (s_pfn_Lookup_Account_Sid == NULL)
{
@@ -644,13 +644,13 @@ lookup_account_sid (LPCTSTR lpSystemName,
}
return (
s_pfn_Lookup_Account_Sid (
- lpSystemName,
- Sid,
- Name,
- cbName,
- DomainName,
- cbDomainName,
- peUse)
+ lpSystemName,
+ Sid,
+ Name,
+ cbName,
+ DomainName,
+ cbDomainName,
+ peUse)
);
}
@@ -669,8 +669,8 @@ get_sid_sub_authority (PSID pSid, DWORD n)
g_b_init_get_sid_sub_authority = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Sid_Sub_Authority =
- (GetSidSubAuthority_Proc) GetProcAddress (
- hm_advapi32, "GetSidSubAuthority");
+ (GetSidSubAuthority_Proc) GetProcAddress (
+ hm_advapi32, "GetSidSubAuthority");
}
if (s_pfn_Get_Sid_Sub_Authority == NULL)
{
@@ -694,8 +694,8 @@ get_sid_sub_authority_count (PSID pSid)
g_b_init_get_sid_sub_authority_count = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Sid_Sub_Authority_Count =
- (GetSidSubAuthorityCount_Proc) GetProcAddress (
- hm_advapi32, "GetSidSubAuthorityCount");
+ (GetSidSubAuthorityCount_Proc) GetProcAddress (
+ hm_advapi32, "GetSidSubAuthorityCount");
}
if (s_pfn_Get_Sid_Sub_Authority_Count == NULL)
{
@@ -725,8 +725,8 @@ get_security_info (HANDLE handle,
g_b_init_get_security_info = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Security_Info =
- (GetSecurityInfo_Proc) GetProcAddress (
- hm_advapi32, "GetSecurityInfo");
+ (GetSecurityInfo_Proc) GetProcAddress (
+ hm_advapi32, "GetSecurityInfo");
}
if (s_pfn_Get_Security_Info == NULL)
{
@@ -935,8 +935,8 @@ get_security_descriptor_owner (PSECURITY_DESCRIPTOR pSecurityDescriptor,
g_b_init_get_security_descriptor_owner = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Security_Descriptor_Owner =
- (GetSecurityDescriptorOwner_Proc) GetProcAddress (
- hm_advapi32, "GetSecurityDescriptorOwner");
+ (GetSecurityDescriptorOwner_Proc) GetProcAddress (
+ hm_advapi32, "GetSecurityDescriptorOwner");
}
if (s_pfn_Get_Security_Descriptor_Owner == NULL)
{
@@ -964,8 +964,8 @@ get_security_descriptor_group (PSECURITY_DESCRIPTOR pSecurityDescriptor,
g_b_init_get_security_descriptor_group = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Security_Descriptor_Group =
- (GetSecurityDescriptorGroup_Proc) GetProcAddress (
- hm_advapi32, "GetSecurityDescriptorGroup");
+ (GetSecurityDescriptorGroup_Proc) GetProcAddress (
+ hm_advapi32, "GetSecurityDescriptorGroup");
}
if (s_pfn_Get_Security_Descriptor_Group == NULL)
{
@@ -994,8 +994,8 @@ get_security_descriptor_dacl (PSECURITY_DESCRIPTOR pSecurityDescriptor,
g_b_init_get_security_descriptor_dacl = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Security_Descriptor_Dacl =
- (GetSecurityDescriptorDacl_Proc) GetProcAddress (
- hm_advapi32, "GetSecurityDescriptorDacl");
+ (GetSecurityDescriptorDacl_Proc) GetProcAddress (
+ hm_advapi32, "GetSecurityDescriptorDacl");
}
if (s_pfn_Get_Security_Descriptor_Dacl == NULL)
{
@@ -1021,8 +1021,8 @@ is_valid_sid (PSID sid)
g_b_init_is_valid_sid = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Is_Valid_Sid =
- (IsValidSid_Proc) GetProcAddress (
- hm_advapi32, "IsValidSid");
+ (IsValidSid_Proc) GetProcAddress (
+ hm_advapi32, "IsValidSid");
}
if (s_pfn_Is_Valid_Sid == NULL)
{
@@ -1045,8 +1045,8 @@ equal_sid (PSID sid1, PSID sid2)
g_b_init_equal_sid = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Equal_Sid =
- (EqualSid_Proc) GetProcAddress (
- hm_advapi32, "EqualSid");
+ (EqualSid_Proc) GetProcAddress (
+ hm_advapi32, "EqualSid");
}
if (s_pfn_Equal_Sid == NULL)
{
@@ -1069,8 +1069,8 @@ get_length_sid (PSID sid)
g_b_init_get_length_sid = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Get_Length_Sid =
- (GetLengthSid_Proc) GetProcAddress (
- hm_advapi32, "GetLengthSid");
+ (GetLengthSid_Proc) GetProcAddress (
+ hm_advapi32, "GetLengthSid");
}
if (s_pfn_Get_Length_Sid == NULL)
{
@@ -1093,8 +1093,8 @@ copy_sid (DWORD destlen, PSID dest, PSID src)
g_b_init_copy_sid = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Copy_Sid =
- (CopySid_Proc) GetProcAddress (
- hm_advapi32, "CopySid");
+ (CopySid_Proc) GetProcAddress (
+ hm_advapi32, "CopySid");
}
if (s_pfn_Copy_Sid == NULL)
{
@@ -1889,7 +1889,7 @@ getloadavg (double loadavg[], int nelem)
first_idx = last_idx;
while (first_idx != last_idx
&& (difftime (now, samples[first_idx].sample_time)
- >= 15.0*60 + 2*DBL_EPSILON*now))
+ >= 15.0*60 + 2*DBL_EPSILON*now))
first_idx = buf_next (first_idx);
}
@@ -2273,7 +2273,7 @@ parse_root (const char * name, const char ** pPath)
name += 2;
do
- {
+ {
if (IS_DIRECTORY_SEP (*name) && --slashes == 0)
break;
name++;
@@ -2567,7 +2567,7 @@ w32_get_resource (const char *key, LPDWORD lpdwtype)
&& (lpvalue = xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
- RegCloseKey (hrootkey);
+ RegCloseKey (hrootkey);
return (lpvalue);
}
@@ -2584,7 +2584,7 @@ w32_get_resource (const char *key, LPDWORD lpdwtype)
&& (lpvalue = xmalloc (cbData)) != NULL
&& RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS)
{
- RegCloseKey (hrootkey);
+ RegCloseKey (hrootkey);
return (lpvalue);
}
@@ -2720,17 +2720,17 @@ init_environment (char ** argv)
/* Get default locale info and use it for LANG. */
if (GetLocaleInfo (LOCALE_USER_DEFAULT,
- LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP,
- locale_name, sizeof (locale_name)))
+ LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP,
+ locale_name, sizeof (locale_name)))
{
for (i = 0; i < N_ENV_VARS; i++)
- {
- if (strcmp (env_vars[i].name, "LANG") == 0)
- {
- env_vars[i].def_value = locale_name;
- break;
- }
- }
+ {
+ if (strcmp (env_vars[i].name, "LANG") == 0)
+ {
+ env_vars[i].def_value = locale_name;
+ break;
+ }
+ }
}
#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */
@@ -2832,13 +2832,13 @@ init_environment (char ** argv)
}
if (strcmp (env_vars[i].name, "HOME") == 0 && !appdata)
Vdelayed_warnings_list
- = Fcons
- (listn (CONSTYPE_HEAP, 2,
- intern ("initialization"), build_string
- ("Use of `C:\\.emacs' without defining `HOME'\n"
- "in the environment is deprecated, "
- "see `Windows HOME' in the Emacs manual.")),
- Vdelayed_warnings_list);
+ = Fcons
+ (listn (CONSTYPE_HEAP, 2,
+ intern ("initialization"), build_string
+ ("Use of `C:\\.emacs' without defining `HOME'\n"
+ "in the environment is deprecated, "
+ "see `Windows HOME' in the Emacs manual.")),
+ Vdelayed_warnings_list);
}
if (lpval)
@@ -2884,9 +2884,9 @@ init_environment (char ** argv)
for (envp = environ; *envp; envp++)
if (_strnicmp (*envp, path, path_len) == 0)
- memcpy (*envp, path, path_len);
+ memcpy (*envp, path, path_len);
else if (_strnicmp (*envp, comspec, comspec_len) == 0)
- memcpy (*envp, comspec, comspec_len);
+ memcpy (*envp, comspec, comspec_len);
/* Make the same modification to `process-environment' which has
already been initialized in set_initial_environment. */
@@ -2894,11 +2894,11 @@ init_environment (char ** argv)
{
Lisp_Object entry = XCAR (env);
if (_strnicmp (SDATA (entry), path, path_len) == 0)
- for (int i = 0; i < path_len; i++)
- SSET (entry, i, path[i]);
+ for (int i = 0; i < path_len; i++)
+ SSET (entry, i, path[i]);
else if (_strnicmp (SDATA (entry), comspec, comspec_len) == 0)
- for (int i = 0; i < comspec_len; i++)
- SSET (entry, i, comspec[i]);
+ for (int i = 0; i < comspec_len; i++)
+ SSET (entry, i, comspec[i]);
}
}
@@ -3333,7 +3333,7 @@ map_w32_filename (const char * name, const char ** pPath)
*str++ = *name++; /* skip past UNC header */
while ((c = *name++))
- {
+ {
switch ( c )
{
case ':':
@@ -3346,7 +3346,7 @@ map_w32_filename (const char * name, const char ** pPath)
break;
case '.':
if ( dots )
- {
+ {
/* Convert path components of the form .xxx to _xxx,
but leave . and .. as they are. This allows .emacs
to be read as _emacs, for example. */
@@ -3366,13 +3366,13 @@ map_w32_filename (const char * name, const char ** pPath)
}
}
else if ( !extn )
- {
+ {
*str++ = '.';
extn = 1; /* we've got an extension */
left = 3; /* 3 chars in extension */
}
else
- {
+ {
/* any embedded dots after the first are converted to _ */
*str++ = '_';
}
@@ -3384,7 +3384,7 @@ map_w32_filename (const char * name, const char ** pPath)
/* FALLTHRU */
default:
if ( left && 'A' <= c && c <= 'Z' )
- {
+ {
*str++ = tolower (c); /* map to lower case (looks nicer) */
left--;
dots = 0; /* started a path component */
@@ -3506,9 +3506,9 @@ sys_readdir (DIR *dirp)
if (wnet_enum_handle != INVALID_HANDLE_VALUE)
{
if (!read_unc_volume (wnet_enum_handle,
- dir_find_data_w.cFileName,
- dir_find_data_a.cFileName,
- MAX_PATH))
+ dir_find_data_w.cFileName,
+ dir_find_data_a.cFileName,
+ MAX_PATH))
return NULL;
}
/* If we aren't dir_finding, do a find-first, otherwise do a find-next. */
@@ -3824,10 +3824,10 @@ logon_network_drive (const char *path)
for (p = share + 2; *p && p < share + MAX_UTF8_PATH; p++)
{
if (IS_DIRECTORY_SEP (*p) && ++n_slashes > 3)
- {
- *p = '\0';
- break;
- }
+ {
+ *p = '\0';
+ break;
+ }
}
if (w32_unicode_filenames)
@@ -4262,11 +4262,11 @@ sys_link (const char * old, const char * new)
int wlen;
/* Confusingly, the "alternate" stream name field does not apply
- when restoring a hard link, and instead contains the actual
- stream data for the link (ie. the name of the link to create).
- The WIN32_STREAM_ID structure before the cStreamName field is
- the stream header, which is then immediately followed by the
- stream data. */
+ when restoring a hard link, and instead contains the actual
+ stream data for the link (ie. the name of the link to create).
+ The WIN32_STREAM_ID structure before the cStreamName field is
+ the stream header, which is then immediately followed by the
+ stream data. */
struct {
WIN32_STREAM_ID wid;
@@ -5022,10 +5022,10 @@ stat_worker (const char * path, struct stat * buf, int follow_symlinks)
. retrieves attributes for the target of a symlink, if needed
. gets attributes of root directories and symlinks pointing to
- root directories, thus avoiding the need for special-casing
- these and detecting them by examining the file-name format
+ root directories, thus avoiding the need for special-casing
+ these and detecting them by examining the file-name format
. retrieves more accurate attributes (e.g., non-zero size for
- some directories, esp. directories that are junction points)
+ some directories, esp. directories that are junction points)
. correctly resolves "c:/..", "/.." and similar file names
. avoids run-time penalties for 99% of use cases
@@ -6296,9 +6296,9 @@ acl_set_file (const char *fname, acl_type_t type, acl_t acl)
/* According to KB-245153, setting the owner will succeed if either:
(1) the caller is the user who will be the new owner, and has the
- SE_TAKE_OWNERSHIP privilege, or
+ SE_TAKE_OWNERSHIP privilege, or
(2) the caller has the SE_RESTORE privilege, in which case she can
- set any valid user or group as the owner
+ set any valid user or group as the owner
We request below both SE_TAKE_OWNERSHIP and SE_RESTORE
privileges, and disregard any failures in obtaining them. If
@@ -6391,9 +6391,9 @@ acl_set_file (const char *fname, acl_type_t type, acl_t acl)
support FD-relative symlinks. */
char *
careadlinkat (int fd, char const *filename,
- char *buffer, size_t buffer_size,
- struct allocator const *alloc,
- ssize_t (*preadlinkat) (int, char const *, char *, size_t))
+ char *buffer, size_t buffer_size,
+ struct allocator const *alloc,
+ ssize_t (*preadlinkat) (int, char const *, char *, size_t))
{
char linkname[MAX_UTF8_PATH];
ssize_t link_size;
@@ -6606,7 +6606,7 @@ open_thread_token (HANDLE ThreadHandle,
g_b_init_open_thread_token = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Open_Thread_Token =
- (OpenThreadToken_Proc) GetProcAddress (hm_advapi32, "OpenThreadToken");
+ (OpenThreadToken_Proc) GetProcAddress (hm_advapi32, "OpenThreadToken");
}
if (s_pfn_Open_Thread_Token == NULL)
{
@@ -6615,10 +6615,10 @@ open_thread_token (HANDLE ThreadHandle,
}
return (
s_pfn_Open_Thread_Token (
- ThreadHandle,
- DesiredAccess,
+ ThreadHandle,
+ DesiredAccess,
OpenAsSelf,
- TokenHandle)
+ TokenHandle)
);
}
@@ -6636,7 +6636,7 @@ impersonate_self (SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
g_b_init_impersonate_self = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Impersonate_Self =
- (ImpersonateSelf_Proc) GetProcAddress (hm_advapi32, "ImpersonateSelf");
+ (ImpersonateSelf_Proc) GetProcAddress (hm_advapi32, "ImpersonateSelf");
}
if (s_pfn_Impersonate_Self == NULL)
{
@@ -6659,7 +6659,7 @@ revert_to_self (void)
g_b_init_revert_to_self = 1;
hm_advapi32 = LoadLibrary ("Advapi32.dll");
s_pfn_Revert_To_Self =
- (RevertToSelf_Proc) GetProcAddress (hm_advapi32, "RevertToSelf");
+ (RevertToSelf_Proc) GetProcAddress (hm_advapi32, "RevertToSelf");
}
if (s_pfn_Revert_To_Self == NULL)
{
@@ -7340,7 +7340,7 @@ init_winsock (int load_now)
#define LOAD_PROC(fn) \
if ((pfn_##fn = (void *) GetProcAddress (winsock_lib, #fn)) == NULL) \
- goto fail;
+ goto fail;
LOAD_PROC (WSAStartup);
LOAD_PROC (WSASetLastError);
@@ -7385,7 +7385,7 @@ init_winsock (int load_now)
/* specify version 1.1 of winsock */
if (pfn_WSAStartup (0x101, &winsockData) == 0)
- {
+ {
if (winsockData.wVersion != 0x101)
goto fail;
@@ -8189,7 +8189,7 @@ sys_close (int fd)
fd_info[fd].cp = NULL;
if (CHILD_ACTIVE (cp))
- {
+ {
/* if last descriptor to active child_process then cleanup */
int i;
for (i = 0; i < MAXDESC; i++)
@@ -8558,7 +8558,7 @@ sys_read (int fd, char * buffer, unsigned int count)
child_process *cp = fd_info[fd].cp;
if ((fd_info[fd].flags & FILE_READ) == 0)
- {
+ {
errno = EBADF;
return -1;
}
@@ -8581,7 +8581,7 @@ sys_read (int fd, char * buffer, unsigned int count)
reap_subprocess has been called; in this case the pipe is
already broken, so calling _read on it is okay. */
if (cp)
- {
+ {
int current_status = cp->status;
switch (current_status)
@@ -8709,13 +8709,13 @@ sys_read (int fd, char * buffer, unsigned int count)
/* Do the equivalent of a non-blocking read. */
pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting);
if (waiting == 0 && nchars == 0)
- {
+ {
errno = EWOULDBLOCK;
return -1;
}
if (waiting)
- {
+ {
/* always use binary mode for sockets */
int res = pfn_recv (SOCK_HANDLE (fd), buffer, count, 0);
if (res == SOCKET_ERROR)
@@ -8905,7 +8905,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
nchars = pfn_send (SOCK_HANDLE (fd), buffer, count, 0);
if (nchars == SOCKET_ERROR)
- {
+ {
set_errno ();
DebPrint (("sys_write.send failed with error %d on socket %ld\n",
pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
@@ -9287,8 +9287,8 @@ w32_delayed_load (Lisp_Object library_id)
Lisp_Object dlls = Fassq (library_id, Vdynamic_library_alist);
if (CONSP (dlls))
- for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls))
- {
+ for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls))
+ {
Lisp_Object dll = XCAR (dlls);
char name[MAX_UTF8_PATH];
DWORD res = -1;
@@ -9548,7 +9548,7 @@ init_ntproc (int dumping)
}
/*
- shutdown_handler ensures that buffers' autosave files are
+ shutdown_handler ensures that buffers' autosave files are
up to date when the user logs off, or the system shuts down.
*/
static BOOL WINAPI
@@ -9587,7 +9587,7 @@ maybe_load_unicows_dll (void)
(MultiByteToWideChar_Proc)GetProcAddress (ret, "MultiByteToWideChar");
pWideCharToMultiByte =
(WideCharToMultiByte_Proc)GetProcAddress (ret, "WideCharToMultiByte");
- multiByteToWideCharFlags = MB_ERR_INVALID_CHARS;
+ multiByteToWideCharFlags = MB_ERR_INVALID_CHARS;
return ret;
}
else
@@ -9619,9 +9619,9 @@ maybe_load_unicows_dll (void)
pWideCharToMultiByte = WideCharToMultiByte;
/* On NT 4.0, though, MB_ERR_INVALID_CHARS is not supported. */
if (w32_major_version < 5)
- multiByteToWideCharFlags = 0;
+ multiByteToWideCharFlags = 0;
else
- multiByteToWideCharFlags = MB_ERR_INVALID_CHARS;
+ multiByteToWideCharFlags = MB_ERR_INVALID_CHARS;
return LoadLibrary ("Gdi32.dll");
}
}
@@ -9959,7 +9959,7 @@ emacs_gnutls_push (gnutls_transport_ptr_t p, const void* buf, size_t sz)
/* Negative bytes written means we got an error in errno.
Translate the WSAEWOULDBLOCK alias EWOULDBLOCK to EAGAIN. */
emacs_gnutls_transport_set_errno (process->gnutls_state,
- errno == EWOULDBLOCK ? EAGAIN : errno);
+ errno == EWOULDBLOCK ? EAGAIN : errno);
return -1;
}
diff --git a/src/w32.h b/src/w32.h
index c73ff30..e8dfed6 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -232,11 +232,11 @@ extern int w32_init_random (void *, ptrdiff_t);
/* GnuTLS pull (read from remote) interface. */
extern ssize_t emacs_gnutls_pull (gnutls_transport_ptr_t p,
- void* buf, size_t sz);
+ void* buf, size_t sz);
/* GnuTLS push (write to remote) interface. */
extern ssize_t emacs_gnutls_push (gnutls_transport_ptr_t p,
- const void* buf, size_t sz);
+ const void* buf, size_t sz);
#endif /* HAVE_GNUTLS */
/* Definine a function that will be loaded from a DLL. */
diff --git a/src/w32console.c b/src/w32console.c
index c71afb6..ebfdea7 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -151,9 +151,9 @@ w32con_clear_end_of_line (struct frame *f, int end)
{
int i;
for (i = 0; i < 256; i++)
- {
+ {
memcpy (&glyph_base[i], &space_glyph, sizeof (struct glyph));
- }
+ }
ceol_initialized = TRUE;
}
w32con_write_glyphs (f, glyph_base, end - cursor_coords.X); /* fencepost ? */
@@ -202,26 +202,26 @@ w32con_ins_del_lines (struct frame *f, int vpos, int n)
if (n > 0)
{
if (scroll.Bottom < dest.Y)
- {
+ {
for (i = scroll.Bottom; i < dest.Y; i++)
- {
+ {
w32con_move_cursor (f, i, 0);
w32con_clear_end_of_line (f, FRAME_COLS (f));
- }
- }
+ }
+ }
}
else
{
nb = dest.Y + (scroll.Bottom - scroll.Top) + 1;
if (nb < scroll.Top)
- {
+ {
for (i = nb; i < scroll.Top; i++)
- {
+ {
w32con_move_cursor (f, i, 0);
w32con_clear_end_of_line (f, FRAME_COLS (f));
- }
- }
+ }
+ }
}
cursor_coords.X = 0;
@@ -290,7 +290,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start,
static void
w32con_write_glyphs (struct frame *f, register struct glyph *string,
- register int len)
+ register int len)
{
DWORD r;
WORD char_attr;
@@ -720,7 +720,7 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
GetConsoleScreenBufferInfo (cur_screen, &info);
/* Shrink the window first, so the buffer dimensions can be
- reduced if necessary. */
+ reduced if necessary. */
new_win_dims.Top = 0;
new_win_dims.Left = 0;
new_win_dims.Bottom = min (new_size.Y, info.dwSize.Y) - 1;
@@ -825,7 +825,7 @@ void
syms_of_ntterm (void)
{
DEFVAR_BOOL ("w32-use-full-screen-buffer",
- w32_use_full_screen_buffer,
+ w32_use_full_screen_buffer,
doc: /* Non-nil means make terminal frames use the full screen buffer dimensions.
This is desirable when running Emacs over telnet.
A value of nil means use the current console window dimensions; this
diff --git a/src/w32fns.c b/src/w32fns.c
index 8c8272b..c084b76 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2173,7 +2173,7 @@ funhook (int code, WPARAM w, LPARAM l)
if (kbdhook.winsdown == 0 && kbdhook.winseen)
{
if (!kbdhook.suppress_lone)
- {
+ {
/* The Windows key was pressed, then released,
without any other key pressed simultaneously.
Normally, this opens the Start menu, but the user
@@ -2334,7 +2334,7 @@ setup_w32_kbdhook (void)
if (get_console != NULL)
kbdhook.console = get_console ();
else
- {
+ {
GUID guid;
wchar_t *oldTitle = malloc (1024 * sizeof(wchar_t));
wchar_t newTitle[64];
@@ -2347,7 +2347,7 @@ setup_w32_kbdhook (void)
GetConsoleTitleW (oldTitle, 1024);
SetConsoleTitleW (newTitle);
for (i = 0; i < 25; i++)
- {
+ {
Sleep (40);
kbdhook.console = FindWindowW (NULL, newTitle);
if (kbdhook.console != NULL)
@@ -4800,7 +4800,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_WTSSESSION_CHANGE:
if (wParam == WTS_SESSION_LOCK)
- reset_w32_kbdhook_state ();
+ reset_w32_kbdhook_state ();
goto dflt;
case WM_CLOSE:
@@ -8100,9 +8100,9 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
vkname = SSDATA (SYMBOL_NAME (c));
/* [s-], [M-], [h-]: Register all keys for this modifier */
if (w32_kbdhook_active && vkname[0] == 0)
- vk_code = VK_ANY;
+ vk_code = VK_ANY;
else
- vk_code = lookup_vk_code (vkname);
+ vk_code = lookup_vk_code (vkname);
}
else if (INTEGERP (c))
{
@@ -8130,27 +8130,27 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
{
/* Register Alt-x combinations. */
if (lisp_modifiers & alt_modifier)
- {
- hook_w32_key (hook, VK_MENU, vk_code);
- res = Qt;
- }
+ {
+ hook_w32_key (hook, VK_MENU, vk_code);
+ res = Qt;
+ }
/* Register Win-x combinations based on modifier mappings. */
if (((lisp_modifiers & hyper_modifier)
&& EQ (Vw32_lwindow_modifier, Qhyper))
|| ((lisp_modifiers & super_modifier)
&& EQ (Vw32_lwindow_modifier, Qsuper)))
- {
- hook_w32_key (hook, VK_LWIN, vk_code);
- res = Qt;
- }
+ {
+ hook_w32_key (hook, VK_LWIN, vk_code);
+ res = Qt;
+ }
if (((lisp_modifiers & hyper_modifier)
&& EQ (Vw32_rwindow_modifier, Qhyper))
|| ((lisp_modifiers & super_modifier)
&& EQ (Vw32_rwindow_modifier, Qsuper)))
- {
- hook_w32_key (hook, VK_RWIN, vk_code);
- res = Qt;
- }
+ {
+ hook_w32_key (hook, VK_RWIN, vk_code);
+ res = Qt;
+ }
return res;
}
else
@@ -9592,38 +9592,38 @@ function will do nothing and return nil.
The following parameters are supported:
:icon ICON -- Display ICON in the system tray. If ICON is a string,
- it should specify a file name from which to load the
- icon; the specified file should be a .ico Windows icon
- file. If ICON is not a string, or if this parameter
- is not specified, the standard Emacs icon will be used.
+ it should specify a file name from which to load the
+ icon; the specified file should be a .ico Windows icon
+ file. If ICON is not a string, or if this parameter
+ is not specified, the standard Emacs icon will be used.
:tip TIP -- Use TIP as the tooltip for the notification. If TIP
- is a string, this is the text of a tooltip that will
- be shown when the mouse pointer hovers over the tray
- icon added by the notification. If TIP is not a
- string, or if this parameter is not specified, the
- default tooltip text is \"Emacs notification\". The
- tooltip text can be up to 127 characters long (63
- on Windows versions before W2K). Longer strings
- will be truncated.
+ is a string, this is the text of a tooltip that will
+ be shown when the mouse pointer hovers over the tray
+ icon added by the notification. If TIP is not a
+ string, or if this parameter is not specified, the
+ default tooltip text is \"Emacs notification\". The
+ tooltip text can be up to 127 characters long (63
+ on Windows versions before W2K). Longer strings
+ will be truncated.
:level LEVEL -- Notification severity level, one of `info',
- `warning', or `error'. If given, the value
- determines the icon displayed to the left of the
- notification title, but only if the `:title'
- parameter (see below) is also specified and is a
- string.
+ `warning', or `error'. If given, the value
+ determines the icon displayed to the left of the
+ notification title, but only if the `:title'
+ parameter (see below) is also specified and is a
+ string.
:title TITLE -- The title of the notification. If TITLE is a string,
- it is displayed in a larger font immediately above
- the body text. The title text can be up to 63
- characters long; longer text will be truncated.
+ it is displayed in a larger font immediately above
+ the body text. The title text can be up to 63
+ characters long; longer text will be truncated.
:body BODY -- The body of the notification. If BODY is a string,
- it specifies the text of the notification message.
- Use embedded newlines to control how the text is
- broken into lines. The body text can be up to 255
- characters long, and will be truncated if it's longer.
+ it specifies the text of the notification message.
+ Use embedded newlines to control how the text is
+ broken into lines. The body text can be up to 255
+ characters long, and will be truncated if it's longer.
Note that versions of Windows before W2K support only `:icon' and `:tip'.
You can pass the other parameters, but they will be ignored on those
diff --git a/src/w32font.c b/src/w32font.c
index e966024..a97cd68 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -60,7 +60,7 @@ static Lisp_Object lispy_antialias_type (BYTE);
static Lisp_Object font_supported_scripts (FONTSIGNATURE *);
static int w32font_full_name (LOGFONT *, Lisp_Object, int, char *, int);
static void compute_metrics (HDC, struct w32font_info *, unsigned int,
- struct w32_metric_cache *);
+ struct w32_metric_cache *);
static Lisp_Object w32_registry (LONG, DWORD);
@@ -219,7 +219,7 @@ get_char_width_32_w (HDC hdc, UINT uFirstChar, UINT uLastChar, LPINT lpBuffer)
#define get_outline_metrics_w(h,d,o) GetOutlineTextMetricsW(h,d,o)
#define get_text_metrics_w(h,t) GetTextMetricsW(h,t)
#define get_glyph_outline_w(h,uc,f,gm,b,v,m) \
- GetGlyphOutlineW(h,uc,f,gm,b,v,m)
+ GetGlyphOutlineW(h,uc,f,gm,b,v,m)
#define get_char_width_32_w(h,fc,lc,b) GetCharWidth32W(h,fc,lc,b)
#endif /* Cygwin */
@@ -294,8 +294,8 @@ w32font_list_family (struct frame *f)
dc = get_frame_dc (f);
EnumFontFamiliesEx (dc, &font_match_pattern,
- (FONTENUMPROC) add_font_name_to_list,
- (LPARAM) &list, 0);
+ (FONTENUMPROC) add_font_name_to_list,
+ (LPARAM) &list, 0);
release_frame_dc (f, dc);
return list;
@@ -309,7 +309,7 @@ w32font_open (struct frame *f, Lisp_Object font_entity, int pixel_size)
{
Lisp_Object font_object
= font_make_object (VECSIZE (struct w32font_info),
- font_entity, pixel_size);
+ font_entity, pixel_size);
struct w32font_info *w32_font
= (struct w32font_info *) XFONT_OBJECT (font_object);
@@ -533,19 +533,19 @@ w32font_text_extents (struct font *font, unsigned *code,
for (i = 0; i < nglyphs; i++)
{
if (code[i] < 0x10000)
- wcode[i] = code[i];
+ wcode[i] = code[i];
else
- {
- DWORD surrogate = code[i] - 0x10000;
-
- /* High surrogate: U+D800 - U+DBFF. */
- wcode[i++] = 0xD800 + ((surrogate >> 10) & 0x03FF);
- /* Low surrogate: U+DC00 - U+DFFF. */
- wcode[i] = 0xDC00 + (surrogate & 0x03FF);
- /* An extra glyph. wcode is already double the size of code to
- cope with this. */
- nglyphs++;
- }
+ {
+ DWORD surrogate = code[i] - 0x10000;
+
+ /* High surrogate: U+D800 - U+DBFF. */
+ wcode[i++] = 0xD800 + ((surrogate >> 10) & 0x03FF);
+ /* Low surrogate: U+DC00 - U+DFFF. */
+ wcode[i] = 0xDC00 + (surrogate & 0x03FF);
+ /* An extra glyph. wcode is already double the size of code to
+ cope with this. */
+ nglyphs++;
+ }
}
if (dc == NULL)
@@ -572,7 +572,7 @@ w32font_text_extents (struct font *font, unsigned *code,
RECT rect;
rect.top = 0; rect.bottom = font->height; rect.left = 0; rect.right = 1;
DrawTextW (dc, wcode, nglyphs, &rect,
- DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE);
+ DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE);
total_width = rect.right;
}
@@ -625,12 +625,12 @@ w32font_draw (struct glyph_string *s, int from, int to,
}
if (s->num_clips > 1)
- {
- HRGN clip2 = CreateRectRgnIndirect (s->clip + 1);
+ {
+ HRGN clip2 = CreateRectRgnIndirect (s->clip + 1);
- CombineRgn (new_clip, new_clip, clip2, RGN_OR);
- DeleteObject (clip2);
- }
+ CombineRgn (new_clip, new_clip, clip2, RGN_OR);
+ DeleteObject (clip2);
+ }
SelectClipRgn (s->hdc, new_clip);
DeleteObject (new_clip);
@@ -722,7 +722,7 @@ w32font_done_face (struct frame *f, struct face *face); */
for actual drawing.
static int
w32font_get_bitmap (struct font *font, unsigned code,
- struct font_bitmap *bitmap, int bits_per_pixel);
+ struct font_bitmap *bitmap, int bits_per_pixel);
*/
/* w32 implementation of free_bitmap for font backend.
Optional.
@@ -737,7 +737,7 @@ w32font_free_bitmap (struct font *font, struct font_bitmap *bitmap);
the operations was successful. Otherwise return -1.
static int
w32font_anchor_point (struct font *font, unsigned code,
- int index, int *x, int *y);
+ int index, int *x, int *y);
*/
/* w32 implementation of otf_capability for font backend.
Optional.
@@ -764,9 +764,9 @@ w32font_otf_capability (struct font *font);
short, return -1.
static int
w32font_otf_drive (struct font *font, Lisp_Object features,
- Lisp_Object gstring_in, int from, int to,
- Lisp_Object gstring_out, int idx,
- bool alternate_subst);
+ Lisp_Object gstring_in, int from, int to,
+ Lisp_Object gstring_out, int idx,
+ bool alternate_subst);
*/
/* Internal implementation of w32font_list.
@@ -807,7 +807,7 @@ w32font_list_internal (struct frame *f, Lisp_Object font_spec,
if (match_data.pattern.lfFaceName[0] == '\0')
{
/* EnumFontFamiliesEx does not take other fields into account if
- font name is blank, so need to use two passes. */
+ font name is blank, so need to use two passes. */
list_all_matching_fonts (&match_data);
}
else
@@ -815,8 +815,8 @@ w32font_list_internal (struct frame *f, Lisp_Object font_spec,
dc = get_frame_dc (f);
EnumFontFamiliesEx (dc, &match_data.pattern,
- (FONTENUMPROC) add_font_entity_to_list,
- (LPARAM) &match_data, 0);
+ (FONTENUMPROC) add_font_entity_to_list,
+ (LPARAM) &match_data, 0);
release_frame_dc (f, dc);
}
@@ -847,8 +847,8 @@ w32font_match_internal (struct frame *f, Lisp_Object font_spec,
dc = get_frame_dc (f);
EnumFontFamiliesEx (dc, &match_data.pattern,
- (FONTENUMPROC) add_one_font_entity_to_list,
- (LPARAM) &match_data, 0);
+ (FONTENUMPROC) add_one_font_entity_to_list,
+ (LPARAM) &match_data, 0);
release_frame_dc (f, dc);
return NILP (match_data.list) ? Qnil : XCAR (match_data.list);
@@ -902,10 +902,10 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
{
metrics = (OUTLINETEXTMETRICW *) alloca (len);
if (get_outline_metrics_w (dc, len, metrics))
- memcpy (&w32_font->metrics, &metrics->otmTextMetrics,
+ memcpy (&w32_font->metrics, &metrics->otmTextMetrics,
sizeof (TEXTMETRICW));
else
- metrics = NULL;
+ metrics = NULL;
}
if (!metrics)
@@ -927,14 +927,14 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
len = 96;
name = alloca (len);
while (name && w32font_full_name (&logfont, font_entity, pixel_size,
- name, len) < 0)
+ name, len) < 0)
{
- len += 32;
- name = alloca (len);
+ len += 32;
+ name = alloca (len);
}
if (name)
font->props[FONT_FULLNAME_INDEX]
- = DECODE_SYSTEM (build_string (name));
+ = DECODE_SYSTEM (build_string (name));
else
font->props[FONT_FULLNAME_INDEX]
= DECODE_SYSTEM (build_string (logfont.lfFaceName));
@@ -1065,7 +1065,7 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
if (requested_font->lfQuality != DEFAULT_QUALITY)
{
font_put_extra (entity, QCantialias,
- lispy_antialias_type (requested_font->lfQuality));
+ lispy_antialias_type (requested_font->lfQuality));
}
ASET (entity, FONT_FAMILY_INDEX,
intern_font_name (lf->lfFaceName));
@@ -1080,8 +1080,8 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
if (font_type & RASTER_FONTTYPE)
ASET (entity, FONT_SIZE_INDEX,
- make_number (physical_font->ntmTm.tmHeight
- + physical_font->ntmTm.tmExternalLeading));
+ make_number (physical_font->ntmTm.tmHeight
+ + physical_font->ntmTm.tmExternalLeading));
else
ASET (entity, FONT_SIZE_INDEX, make_number (0));
@@ -1091,7 +1091,7 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
{
tem = font_supported_scripts (&physical_font->ntmFontSig);
if (!NILP (tem))
- font_put_extra (entity, QCscript, tem);
+ font_put_extra (entity, QCscript, tem);
}
/* This information is not fully available when opening fonts, so
@@ -1148,7 +1148,7 @@ logfonts_match (LOGFONT *font, LOGFONT *pattern)
/* Have some flexibility with weights. */
if (pattern->lfWeight
&& ((font->lfWeight < (pattern->lfWeight - 150))
- || font->lfWeight > (pattern->lfWeight + 150)))
+ || font->lfWeight > (pattern->lfWeight + 150)))
return 0;
/* Charset and face should be OK. Italic has to be checked
@@ -1185,8 +1185,8 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
{
BYTE family = w32_generic_family (val);
if (family != FF_DONTCARE
- && family != (font->ntmTm.tmPitchAndFamily & 0xF0))
- return 0;
+ && family != (font->ntmTm.tmPitchAndFamily & 0xF0))
+ return 0;
}
/* Check spacing */
@@ -1208,22 +1208,22 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
Lisp_Object extra_entry;
extra_entry = XCAR (extra);
if (CONSP (extra_entry))
- {
- Lisp_Object key = XCAR (extra_entry);
-
- val = XCDR (extra_entry);
- if (EQ (key, QCscript) && SYMBOLP (val))
- {
- /* Only truetype fonts will have information about what
- scripts they support. This probably means the user
- will have to force Emacs to use raster, PostScript
- or ATM fonts for non-ASCII text. */
- if (type & TRUETYPE_FONTTYPE)
- {
- Lisp_Object support
- = font_supported_scripts (&font->ntmFontSig);
- if (! memq_no_quit (val, support))
- return 0;
+ {
+ Lisp_Object key = XCAR (extra_entry);
+
+ val = XCDR (extra_entry);
+ if (EQ (key, QCscript) && SYMBOLP (val))
+ {
+ /* Only truetype fonts will have information about what
+ scripts they support. This probably means the user
+ will have to force Emacs to use raster, PostScript
+ or ATM fonts for non-ASCII text. */
+ if (type & TRUETYPE_FONTTYPE)
+ {
+ Lisp_Object support
+ = font_supported_scripts (&font->ntmFontSig);
+ if (! memq_no_quit (val, support))
+ return 0;
/* Avoid using non-Japanese fonts for Japanese, even
if they claim they are capable, due to known
@@ -1233,89 +1233,89 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
&& (font->ntmTm.tmCharSet != SHIFTJIS_CHARSET
|| !(font->ntmFontSig.fsCsb[0] & CSB_JAPANESE)))
return 0;
- }
- else
- {
- /* Return specific matches, but play it safe. Fonts
- that cover more than their charset would suggest
- are likely to be truetype or opentype fonts,
- covered above. */
- if (EQ (val, Qlatin))
- {
- /* Although every charset but symbol, thai and
- arabic contains the basic ASCII set of latin
- characters, Emacs expects much more. */
- if (font->ntmTm.tmCharSet != ANSI_CHARSET)
- return 0;
- }
- else if (EQ (val, Qsymbol))
- {
- if (font->ntmTm.tmCharSet != SYMBOL_CHARSET)
- return 0;
- }
- else if (EQ (val, Qcyrillic))
- {
- if (font->ntmTm.tmCharSet != RUSSIAN_CHARSET)
- return 0;
- }
- else if (EQ (val, Qgreek))
- {
- if (font->ntmTm.tmCharSet != GREEK_CHARSET)
- return 0;
- }
- else if (EQ (val, Qarabic))
- {
- if (font->ntmTm.tmCharSet != ARABIC_CHARSET)
- return 0;
- }
- else if (EQ (val, Qhebrew))
- {
- if (font->ntmTm.tmCharSet != HEBREW_CHARSET)
- return 0;
- }
- else if (EQ (val, Qthai))
- {
- if (font->ntmTm.tmCharSet != THAI_CHARSET)
- return 0;
- }
- else if (EQ (val, Qkana))
- {
- if (font->ntmTm.tmCharSet != SHIFTJIS_CHARSET)
- return 0;
- }
- else if (EQ (val, Qbopomofo))
- {
- if (font->ntmTm.tmCharSet != CHINESEBIG5_CHARSET)
- return 0;
- }
- else if (EQ (val, Qhangul))
- {
- if (font->ntmTm.tmCharSet != HANGUL_CHARSET
- && font->ntmTm.tmCharSet != JOHAB_CHARSET)
- return 0;
- }
- else if (EQ (val, Qhan))
- {
- if (font->ntmTm.tmCharSet != CHINESEBIG5_CHARSET
- && font->ntmTm.tmCharSet != GB2312_CHARSET
- && font->ntmTm.tmCharSet != HANGUL_CHARSET
- && font->ntmTm.tmCharSet != JOHAB_CHARSET
- && font->ntmTm.tmCharSet != SHIFTJIS_CHARSET)
- return 0;
- }
- else
- /* Other scripts unlikely to be handled by non-truetype
+ }
+ else
+ {
+ /* Return specific matches, but play it safe. Fonts
+ that cover more than their charset would suggest
+ are likely to be truetype or opentype fonts,
+ covered above. */
+ if (EQ (val, Qlatin))
+ {
+ /* Although every charset but symbol, thai and
+ arabic contains the basic ASCII set of latin
+ characters, Emacs expects much more. */
+ if (font->ntmTm.tmCharSet != ANSI_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qsymbol))
+ {
+ if (font->ntmTm.tmCharSet != SYMBOL_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qcyrillic))
+ {
+ if (font->ntmTm.tmCharSet != RUSSIAN_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qgreek))
+ {
+ if (font->ntmTm.tmCharSet != GREEK_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qarabic))
+ {
+ if (font->ntmTm.tmCharSet != ARABIC_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qhebrew))
+ {
+ if (font->ntmTm.tmCharSet != HEBREW_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qthai))
+ {
+ if (font->ntmTm.tmCharSet != THAI_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qkana))
+ {
+ if (font->ntmTm.tmCharSet != SHIFTJIS_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qbopomofo))
+ {
+ if (font->ntmTm.tmCharSet != CHINESEBIG5_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qhangul))
+ {
+ if (font->ntmTm.tmCharSet != HANGUL_CHARSET
+ && font->ntmTm.tmCharSet != JOHAB_CHARSET)
+ return 0;
+ }
+ else if (EQ (val, Qhan))
+ {
+ if (font->ntmTm.tmCharSet != CHINESEBIG5_CHARSET
+ && font->ntmTm.tmCharSet != GB2312_CHARSET
+ && font->ntmTm.tmCharSet != HANGUL_CHARSET
+ && font->ntmTm.tmCharSet != JOHAB_CHARSET
+ && font->ntmTm.tmCharSet != SHIFTJIS_CHARSET)
+ return 0;
+ }
+ else
+ /* Other scripts unlikely to be handled by non-truetype
fonts. */
- return 0;
- }
- }
+ return 0;
+ }
+ }
else if (EQ (key, QClang) && SYMBOLP (val))
{
/* Just handle the CJK languages here, as the lang
parameter is used to select a font with appropriate
glyphs in the cjk unified ideographs block. Other fonts
- support for a language can be solely determined by
- its character coverage. */
+ support for a language can be solely determined by
+ its character coverage. */
if (EQ (val, Qja))
{
if (!(font->ntmFontSig.fsCsb[0] & CSB_JAPANESE))
@@ -1329,19 +1329,19 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
else if (EQ (val, Qzh))
{
if (!(font->ntmFontSig.fsCsb[0] & CSB_CHINESE))
- return 0;
+ return 0;
}
else
/* Any other language, we don't recognize it. Only the above
- currently appear in fontset.el, so it isn't worth
- creating a mapping table of codepages/scripts to languages
- or opening the font to see if there are any language tags
- in it that the Windows API does not expose. Fontset
+ currently appear in fontset.el, so it isn't worth
+ creating a mapping table of codepages/scripts to languages
+ or opening the font to see if there are any language tags
+ in it that the Windows API does not expose. Fontset
spec should have a fallback, as some backends do
not recognize language at all. */
return 0;
}
- else if (EQ (key, QCotf) && CONSP (val))
+ else if (EQ (key, QCotf) && CONSP (val))
{
/* OTF features only supported by the uniscribe backend. */
if (EQ (backend, Quniscribe))
@@ -1352,7 +1352,7 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
else
return 0;
}
- }
+ }
}
return 1;
}
@@ -1596,9 +1596,9 @@ x_to_w32_charset (char * lpcs)
{
/* At startup, we want iso8859-1 fonts to come up properly. */
if (xstrcasecmp (charset, "iso8859-1") == 0)
- return ANSI_CHARSET;
+ return ANSI_CHARSET;
else
- return DEFAULT_CHARSET;
+ return DEFAULT_CHARSET;
}
w32_charset = Fcar (Fcdr (this_entry));
@@ -1685,9 +1685,9 @@ w32_to_x_charset (int fncharset, char *matching)
{
case ANSI_CHARSET:
/* Handle startup case of w32-charset-info-alist not
- being set up yet. */
+ being set up yet. */
if (NILP (Vw32_charset_info_alist))
- return (char *)"iso8859-1";
+ return (char *)"iso8859-1";
charset_type = Qw32_charset_ansi;
break;
case DEFAULT_CHARSET:
@@ -1761,35 +1761,35 @@ w32_to_x_charset (int fncharset, char *matching)
range. Only return charsets for codepages which are installed.
Format of each entry is
- (CHARSET_NAME . (WINDOWS_CHARSET . CODEPAGE)).
+ (CHARSET_NAME . (WINDOWS_CHARSET . CODEPAGE)).
*/
for (rest = Vw32_charset_info_alist; CONSP (rest); rest = XCDR (rest))
{
- char * x_charset;
- Lisp_Object w32_charset;
- Lisp_Object codepage;
-
- Lisp_Object this_entry = XCAR (rest);
-
- /* Skip invalid entries in alist. */
- if (!CONSP (this_entry) || !STRINGP (XCAR (this_entry))
- || !CONSP (XCDR (this_entry))
- || !SYMBOLP (XCAR (XCDR (this_entry))))
- continue;
-
- x_charset = SSDATA (XCAR (this_entry));
- w32_charset = XCAR (XCDR (this_entry));
- codepage = XCDR (XCDR (this_entry));
-
- /* Look for Same charset and a valid codepage (or non-int
- which means ignore). */
- if (EQ (w32_charset, charset_type)
- && (!INTEGERP (codepage) || XINT (codepage) == CP_DEFAULT
- || IsValidCodePage (XINT (codepage))))
- {
- /* If we don't have a match already, then this is the
- best. */
- if (!best_match)
+ char * x_charset;
+ Lisp_Object w32_charset;
+ Lisp_Object codepage;
+
+ Lisp_Object this_entry = XCAR (rest);
+
+ /* Skip invalid entries in alist. */
+ if (!CONSP (this_entry) || !STRINGP (XCAR (this_entry))
+ || !CONSP (XCDR (this_entry))
+ || !SYMBOLP (XCAR (XCDR (this_entry))))
+ continue;
+
+ x_charset = SSDATA (XCAR (this_entry));
+ w32_charset = XCAR (XCDR (this_entry));
+ codepage = XCDR (XCDR (this_entry));
+
+ /* Look for Same charset and a valid codepage (or non-int
+ which means ignore). */
+ if (EQ (w32_charset, charset_type)
+ && (!INTEGERP (codepage) || XINT (codepage) == CP_DEFAULT
+ || IsValidCodePage (XINT (codepage))))
+ {
+ /* If we don't have a match already, then this is the
+ best. */
+ if (!best_match)
{
best_match = x_charset;
if (matching && !strnicmp (x_charset, matching, match_len))
@@ -1818,24 +1818,24 @@ w32_to_x_charset (int fncharset, char *matching)
&& strnicmp (x_charset, "iso", 3) == 0
&& strchr (x_charset, '-')))
best_match = x_charset;
- /* If both are ISO8859 codepages, choose the one with the
- lowest number in the encoding field. */
- else if (strnicmp (best_match, "iso8859-", 8) == 0
- && strnicmp (x_charset, "iso8859-", 8) == 0)
- {
- int best_enc = atoi (best_match + 8);
- int this_enc = atoi (x_charset + 8);
- if (this_enc > 0 && this_enc < best_enc)
- best_match = x_charset;
- }
- }
+ /* If both are ISO8859 codepages, choose the one with the
+ lowest number in the encoding field. */
+ else if (strnicmp (best_match, "iso8859-", 8) == 0
+ && strnicmp (x_charset, "iso8859-", 8) == 0)
+ {
+ int best_enc = atoi (best_match + 8);
+ int this_enc = atoi (x_charset + 8);
+ if (this_enc > 0 && this_enc < best_enc)
+ best_match = x_charset;
+ }
+ }
}
/* If no match, encode the numeric value. */
if (!best_match)
{
- sprintf (buf, "*-#%d", fncharset);
- return buf;
+ sprintf (buf, "*-#%d", fncharset);
+ return buf;
}
strncpy (buf, best_match, 31);
@@ -1976,9 +1976,9 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
{
logfont->lfPitchAndFamily = w32_generic_family (tmp) | DEFAULT_PITCH;
if ((logfont->lfPitchAndFamily & 0xF0) != FF_DONTCARE)
- ; /* Font name was generic, don't fill in font name. */
- /* Font families are interned, but allow for strings also in case of
- user input. */
+ ; /* Font name was generic, don't fill in font name. */
+ /* Font families are interned, but allow for strings also in case of
+ user input. */
else if (SYMBOLP (tmp))
{
strncpy (logfont->lfFaceName,
@@ -1993,7 +1993,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
/* Override generic family. */
BYTE family = w32_generic_family (tmp);
if (family != FF_DONTCARE)
- logfont->lfPitchAndFamily = family | DEFAULT_PITCH;
+ logfont->lfPitchAndFamily = family | DEFAULT_PITCH;
}
/* Set pitch based on the spacing property. */
@@ -2015,45 +2015,45 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
{
tmp = XCAR (extra);
if (CONSP (tmp))
- {
- Lisp_Object key, val;
- key = XCAR (tmp), val = XCDR (tmp);
- /* Only use QCscript if charset is not provided, or is Unicode
- and a single script is specified. This is rather crude,
- and is only used to narrow down the fonts returned where
- there is a definite match. Some scripts, such as latin, han,
- cjk-misc match multiple lfCharSet values, so we can't pre-filter
- them. */
+ {
+ Lisp_Object key, val;
+ key = XCAR (tmp), val = XCDR (tmp);
+ /* Only use QCscript if charset is not provided, or is Unicode
+ and a single script is specified. This is rather crude,
+ and is only used to narrow down the fonts returned where
+ there is a definite match. Some scripts, such as latin, han,
+ cjk-misc match multiple lfCharSet values, so we can't pre-filter
+ them. */
if (EQ (key, QCscript)
- && logfont->lfCharSet == DEFAULT_CHARSET
- && SYMBOLP (val))
- {
- if (EQ (val, Qgreek))
- logfont->lfCharSet = GREEK_CHARSET;
- else if (EQ (val, Qhangul))
- logfont->lfCharSet = HANGUL_CHARSET;
- else if (EQ (val, Qkana) || EQ (val, Qkanbun))
- logfont->lfCharSet = SHIFTJIS_CHARSET;
- else if (EQ (val, Qbopomofo))
- logfont->lfCharSet = CHINESEBIG5_CHARSET;
- /* GB 18030 supports tibetan, yi, mongolian,
- fonts that support it should show up if we ask for
- GB2312 fonts. */
- else if (EQ (val, Qtibetan) || EQ (val, Qyi)
- || EQ (val, Qmongolian))
- logfont->lfCharSet = GB2312_CHARSET;
- else if (EQ (val, Qhebrew))
- logfont->lfCharSet = HEBREW_CHARSET;
- else if (EQ (val, Qarabic))
- logfont->lfCharSet = ARABIC_CHARSET;
- else if (EQ (val, Qthai))
- logfont->lfCharSet = THAI_CHARSET;
- }
- else if (EQ (key, QCantialias) && SYMBOLP (val))
- {
- logfont->lfQuality = w32_antialias_type (val);
- }
- }
+ && logfont->lfCharSet == DEFAULT_CHARSET
+ && SYMBOLP (val))
+ {
+ if (EQ (val, Qgreek))
+ logfont->lfCharSet = GREEK_CHARSET;
+ else if (EQ (val, Qhangul))
+ logfont->lfCharSet = HANGUL_CHARSET;
+ else if (EQ (val, Qkana) || EQ (val, Qkanbun))
+ logfont->lfCharSet = SHIFTJIS_CHARSET;
+ else if (EQ (val, Qbopomofo))
+ logfont->lfCharSet = CHINESEBIG5_CHARSET;
+ /* GB 18030 supports tibetan, yi, mongolian,
+ fonts that support it should show up if we ask for
+ GB2312 fonts. */
+ else if (EQ (val, Qtibetan) || EQ (val, Qyi)
+ || EQ (val, Qmongolian))
+ logfont->lfCharSet = GB2312_CHARSET;
+ else if (EQ (val, Qhebrew))
+ logfont->lfCharSet = HEBREW_CHARSET;
+ else if (EQ (val, Qarabic))
+ logfont->lfCharSet = ARABIC_CHARSET;
+ else if (EQ (val, Qthai))
+ logfont->lfCharSet = THAI_CHARSET;
+ }
+ else if (EQ (key, QCantialias) && SYMBOLP (val))
+ {
+ logfont->lfQuality = w32_antialias_type (val);
+ }
+ }
}
}
@@ -2076,9 +2076,9 @@ list_all_matching_fonts (struct font_callback_data *match_data)
Lisp_Object family = CAR (families);
families = CDR (families);
if (NILP (family))
- continue;
+ continue;
else if (SYMBOLP (family))
- name = SSDATA (ENCODE_SYSTEM (SYMBOL_NAME (family)));
+ name = SSDATA (ENCODE_SYSTEM (SYMBOL_NAME (family)));
else
continue;
@@ -2086,8 +2086,8 @@ list_all_matching_fonts (struct font_callback_data *match_data)
match_data->pattern.lfFaceName[LF_FACESIZE - 1] = '\0';
EnumFontFamiliesEx (dc, &match_data->pattern,
- (FONTENUMPROC) add_font_entity_to_list,
- (LPARAM) match_data, 0);
+ (FONTENUMPROC) add_font_entity_to_list,
+ (LPARAM) match_data, 0);
}
release_frame_dc (f, dc);
@@ -2353,15 +2353,15 @@ w32font_full_name (LOGFONT * font, Lisp_Object font_obj,
if (height > 0)
{
if (outline)
- {
- double pointsize = height * 72.0 / one_w32_display_info.resy;
- /* Round to nearest half point. floor is used, since round is not
+ {
+ double pointsize = height * 72.0 / one_w32_display_info.resy;
+ /* Round to nearest half point. floor is used, since round is not
supported in MS library. */
- pointsize = floor (pointsize * 2 + 0.5) / 2;
- p += sprintf (p, "-%1.1f", pointsize);
- }
+ pointsize = floor (pointsize * 2 + 0.5) / 2;
+ p += sprintf (p, "-%1.1f", pointsize);
+ }
else
- p += sprintf (p, ":pixelsize=%d", height);
+ p += sprintf (p, ":pixelsize=%d", height);
}
if (SYMBOLP (weight) && ! NILP (weight))
@@ -2701,8 +2701,8 @@ syms_of_w32font (void)
/* W32 font encodings. */
DEFVAR_LISP ("w32-charset-info-alist",
- Vw32_charset_info_alist,
- doc: /* Alist linking Emacs character sets to Windows fonts and codepages.
+ Vw32_charset_info_alist,
+ doc: /* Alist linking Emacs character sets to Windows fonts and codepages.
Each entry should be of the form:
(CHARSET_NAME . (WINDOWS_CHARSET . CODEPAGE))
diff --git a/src/w32font.h b/src/w32font.h
index 0e2d0f7..3bccc29 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -65,19 +65,19 @@ struct w32font_info
Lisp_Object w32font_get_cache (struct frame *fe);
Lisp_Object w32font_list_internal (struct frame *f,
- Lisp_Object font_spec,
- bool opentype_only);
+ Lisp_Object font_spec,
+ bool opentype_only);
Lisp_Object w32font_match_internal (struct frame *f,
- Lisp_Object font_spec,
- bool opentype_only);
+ Lisp_Object font_spec,
+ bool opentype_only);
int w32font_open_internal (struct frame *f, Lisp_Object font_entity,
- int pixel_size, Lisp_Object font_object);
+ int pixel_size, Lisp_Object font_object);
void w32font_close (struct font *font);
int w32font_has_char (Lisp_Object entity, int c);
void w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
struct font_metrics *metrics);
int w32font_draw (struct glyph_string *s, int from, int to,
- int x, int y, bool with_background);
+ int x, int y, bool with_background);
int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec);
diff --git a/src/w32heap.c b/src/w32heap.c
index 26a0441..6410967 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -65,13 +65,13 @@
DDK. */
typedef PVOID (WINAPI * RtlCreateHeap_Proc) (
- /* _In_ */ ULONG Flags,
- /* _In_opt_ */ PVOID HeapBase,
- /* _In_opt_ */ SIZE_T ReserveSize,
- /* _In_opt_ */ SIZE_T CommitSize,
- /* _In_opt_ */ PVOID Lock,
- /* _In_opt_ */ PVOID Parameters
- );
+ /* _In_ */ ULONG Flags,
+ /* _In_opt_ */ PVOID HeapBase,
+ /* _In_opt_ */ SIZE_T ReserveSize,
+ /* _In_opt_ */ SIZE_T CommitSize,
+ /* _In_opt_ */ PVOID Lock,
+ /* _In_opt_ */ PVOID Parameters
+ );
typedef LONG NTSTATUS;
@@ -151,7 +151,7 @@ static DWORD_PTR committed = 0;
----------------------------------------------
^ ^ ^
dumped_data dumped_data bc_limit
- + committed
+ + committed
*/
@@ -231,15 +231,15 @@ init_heap (void)
unsigned long enable_lfh = 2;
/* After dumping, use a new private heap. We explicitly enable
- the low fragmentation heap (LFH) here, for the sake of pre
- Vista versions. Note: this will harmlessly fail on Vista and
- later, where the low-fragmentation heap is enabled by
- default. It will also fail on pre-Vista versions when Emacs
- is run under a debugger; set _NO_DEBUG_HEAP=1 in the
- environment before starting GDB to get low fragmentation heap
- on XP and older systems, for the price of losing "certain
- heap debug options"; for the details see
- http://msdn.microsoft.com/en-us/library/windows/desktop/aa366705%28v=vs.85%29.aspx. */
+ the low fragmentation heap (LFH) here, for the sake of pre
+ Vista versions. Note: this will harmlessly fail on Vista and
+ later, where the low-fragmentation heap is enabled by
+ default. It will also fail on pre-Vista versions when Emacs
+ is run under a debugger; set _NO_DEBUG_HEAP=1 in the
+ environment before starting GDB to get low fragmentation heap
+ on XP and older systems, for the price of losing "certain
+ heap debug options"; for the details see
+ http://msdn.microsoft.com/en-us/library/windows/desktop/aa366705%28v=vs.85%29.aspx. */
data_region_end = data_region_base;
/* Create the private heap. */
@@ -260,23 +260,23 @@ init_heap (void)
#endif
if (os_subtype == OS_9X)
- {
- the_malloc_fn = malloc_after_dump_9x;
- the_realloc_fn = realloc_after_dump_9x;
- the_free_fn = free_after_dump_9x;
- }
+ {
+ the_malloc_fn = malloc_after_dump_9x;
+ the_realloc_fn = realloc_after_dump_9x;
+ the_free_fn = free_after_dump_9x;
+ }
else
- {
- the_malloc_fn = malloc_after_dump;
- the_realloc_fn = realloc_after_dump;
- the_free_fn = free_after_dump;
- }
+ {
+ the_malloc_fn = malloc_after_dump;
+ the_realloc_fn = realloc_after_dump;
+ the_free_fn = free_after_dump;
+ }
}
else
{
/* Find the RtlCreateHeap function. Headers for this function
- are provided with the w32 DDK, but the function is available
- in ntdll.dll since XP. */
+ are provided with the w32 DDK, but the function is available
+ in ntdll.dll since XP. */
HMODULE hm_ntdll = LoadLibrary ("ntdll.dll");
RtlCreateHeap_Proc s_pfn_Rtl_Create_Heap
= (RtlCreateHeap_Proc) GetProcAddress (hm_ntdll, "RtlCreateHeap");
@@ -291,7 +291,7 @@ init_heap (void)
params.InitialCommit = committed = 0x1000;
params.InitialReserve = sizeof(dumped_data);
/* Use our own routine to commit memory from the dumped_data
- array. */
+ array. */
params.CommitRoutine = &dumped_data_commit;
/* Create the private heap. */
@@ -303,16 +303,16 @@ init_heap (void)
heap = s_pfn_Rtl_Create_Heap (0, data_region_base, 0, 0, NULL, ¶ms);
if (os_subtype == OS_9X)
- {
- fprintf (stderr, "Cannot dump Emacs on Windows 9X; exiting.\n");
- exit (-1);
- }
+ {
+ fprintf (stderr, "Cannot dump Emacs on Windows 9X; exiting.\n");
+ exit (-1);
+ }
else
- {
- the_malloc_fn = malloc_before_dump;
- the_realloc_fn = realloc_before_dump;
- the_free_fn = free_before_dump;
- }
+ {
+ the_malloc_fn = malloc_before_dump;
+ the_realloc_fn = realloc_before_dump;
+ the_free_fn = free_before_dump;
+ }
}
/* Update system version information to match current system. */
@@ -428,7 +428,7 @@ realloc_after_dump (void *ptr, size_t size)
else
{
/* If the block lies in the dumped data, do not free it. Only
- allocate a new one. */
+ allocate a new one. */
p = HeapAlloc (heap, 0, size);
if (!p)
errno = ENOMEM;
@@ -462,9 +462,9 @@ realloc_before_dump (void *ptr, size_t size)
else
{
/* In this case, either the new block is too large for the heap,
- or the old block was already too large. In both cases,
- malloc_before_dump() and free_before_dump() will take care of
- reallocation. */
+ or the old block was already too large. In both cases,
+ malloc_before_dump() and free_before_dump() will take care of
+ reallocation. */
p = malloc_before_dump (size);
/* If SIZE is below MaxBlockSize, malloc_before_dump will try to
allocate it in the fixed heap. If that fails, we could have
@@ -553,22 +553,22 @@ realloc_after_dump_9x (void *ptr, size_t size)
void *pa;
p = realloc_after_dump (po, size + 8);
if (p == NULL)
- return p;
+ return p;
pa = (void*)(((intptr_t)p + 8) & ~7);
if (ptr != NULL &&
- (char*)pa - (char*)p != (char*)ptr - (char*)po)
- {
- /* Handle the case where alignment in pre-realloc and
- post-realloc blocks does not match. */
- MoveMemory (pa, (void*)((char*)p + ((char*)ptr - (char*)po)), size);
- }
+ (char*)pa - (char*)p != (char*)ptr - (char*)po)
+ {
+ /* Handle the case where alignment in pre-realloc and
+ post-realloc blocks does not match. */
+ MoveMemory (pa, (void*)((char*)p + ((char*)ptr - (char*)po)), size);
+ }
*((void**)pa-1) = p;
return pa;
}
else
{
/* Non-freeable pointers have no alignment-enforcing header
- (since dumping is not allowed on Windows 9X). */
+ (since dumping is not allowed on Windows 9X). */
void* p = malloc_after_dump_9x (size);
if (p != NULL)
CopyMemory (p, ptr, size);
@@ -687,7 +687,7 @@ mmap_free (void **var)
if (*var)
{
if (VirtualFree (*var, 0, MEM_RELEASE) == 0)
- DebPrint (("mmap_free: error %ld\n", GetLastError ()));
+ DebPrint (("mmap_free: error %ld\n", GetLastError ()));
*var = NULL;
}
}
@@ -717,7 +717,7 @@ mmap_realloc (void **var, size_t nbytes)
{
memset (&m2, 0, sizeof (m2));
if (VirtualQuery ((char *)*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0)
- DebPrint (("mmap_realloc: VirtualQuery error = %ld\n",
+ DebPrint (("mmap_realloc: VirtualQuery error = %ld\n",
GetLastError ()));
/* If there is enough room in the current reserved area, then
commit more pages as needed. */
@@ -764,18 +764,18 @@ mmap_realloc (void **var, size_t nbytes)
{
/* If we are shrinking a lot... */
if ((memInfo.RegionSize / 2) > nbytes)
- {
- /* Let's give some memory back to the system and release
+ {
+ /* Let's give some memory back to the system and release
some pages. */
- old_ptr = *var;
+ old_ptr = *var;
if (mmap_alloc (var, nbytes))
- {
- CopyMemory (*var, old_ptr, nbytes);
- mmap_free (&old_ptr);
- return *var;
- }
- else
+ {
+ CopyMemory (*var, old_ptr, nbytes);
+ mmap_free (&old_ptr);
+ return *var;
+ }
+ else
{
/* In case we fail to shrink, try to go on with the old block.
But that means there is a lot of memory pressure.
@@ -783,13 +783,13 @@ mmap_realloc (void **var, size_t nbytes)
*var = old_ptr;
return *var;
}
- }
+ }
/* We still can decommit pages. */
if (VirtualFree ((char *)*var + nbytes + get_page_size(),
memInfo.RegionSize - nbytes - get_page_size(),
MEM_DECOMMIT) == 0)
- DebPrint (("mmap_realloc: VirtualFree error %ld\n", GetLastError ()));
+ DebPrint (("mmap_realloc: VirtualFree error %ld\n", GetLastError ()));
return *var;
}
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 2269d31..1e249ad 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -149,12 +149,12 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
switch (event->wVirtualKeyCode)
{
case VK_LWIN:
- if (!w32_kbdhook_active)
- mod_key_state &= ~LEFT_WIN_PRESSED;
+ if (!w32_kbdhook_active)
+ mod_key_state &= ~LEFT_WIN_PRESSED;
break;
case VK_RWIN:
- if (!w32_kbdhook_active)
- mod_key_state &= ~RIGHT_WIN_PRESSED;
+ if (!w32_kbdhook_active)
+ mod_key_state &= ~RIGHT_WIN_PRESSED;
break;
case VK_APPS:
mod_key_state &= ~APPS_PRESSED;
@@ -189,7 +189,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
}
}
if (!w32_kbdhook_active)
- mod_key_state |= LEFT_WIN_PRESSED;
+ mod_key_state |= LEFT_WIN_PRESSED;
if (!NILP (Vw32_lwindow_modifier))
return 0;
break;
@@ -206,7 +206,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
}
}
if (!w32_kbdhook_active)
- mod_key_state |= RIGHT_WIN_PRESSED;
+ mod_key_state |= RIGHT_WIN_PRESSED;
if (!NILP (Vw32_rwindow_modifier))
return 0;
break;
@@ -275,9 +275,9 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
if (w32_kbdhook_active)
{
if (check_w32_winkey_state (VK_LWIN))
- event->dwControlKeyState |= LEFT_WIN_PRESSED;
+ event->dwControlKeyState |= LEFT_WIN_PRESSED;
if (check_w32_winkey_state (VK_RWIN))
- event->dwControlKeyState |= RIGHT_WIN_PRESSED;
+ event->dwControlKeyState |= RIGHT_WIN_PRESSED;
}
/* Distinguish numeric keypad keys from extended keys. */
@@ -295,8 +295,8 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
to process them correctly. */
}
/* Handle key chords including any modifiers other than shift
- directly, in order to preserve as much modifier information as
- possible. */
+ directly, in order to preserve as much modifier information as
+ possible. */
else if (event->dwControlKeyState
& ( RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED
| RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED
@@ -316,8 +316,8 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
event->uChar.AsciiChar += ('a' - 'A');
}
/* Try to handle unrecognized keystrokes by determining the
- base character (ie. translating the base key plus shift
- modifier). */
+ base character (ie. translating the base key plus shift
+ modifier). */
else if (event->uChar.AsciiChar == 0)
w32_kbd_patch_key (event, -1);
}
@@ -349,14 +349,14 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
console codepage are supported by this fallback. */
wchar_t code;
char dbcs[2];
- int cpId;
+ int cpId;
/* Get the current console input codepage to interpret this
key with. Note that the system defaults for the OEM
codepage could have been changed by calling SetConsoleCP
or w32-set-console-codepage, so using GetLocaleInfo to
get LOCALE_IDEFAULTCODEPAGE is not TRT here. */
- cpId = GetConsoleCP ();
+ cpId = GetConsoleCP ();
dbcs[0] = dbcs_lead;
dbcs[1] = event->uChar.AsciiChar;
@@ -747,7 +747,7 @@ handle_file_notifications (struct input_event *hold_quit)
int
w32_console_read_socket (struct terminal *terminal,
- struct input_event *hold_quit)
+ struct input_event *hold_quit)
{
int nev, add;
int isdead;
@@ -760,17 +760,17 @@ w32_console_read_socket (struct terminal *terminal,
nev = fill_queue (0);
if (nev <= 0)
- {
+ {
/* If nev == -1, there was some kind of error
If nev == 0 then no events were available
so return. */
if (nfnotify)
nev = 0;
break;
- }
+ }
while (nev > 0)
- {
+ {
struct input_event inev;
/* Having a separate variable with this value makes
debugging easier, as otherwise the compiler might
@@ -783,8 +783,8 @@ w32_console_read_socket (struct terminal *terminal,
inev.arg = Qnil;
switch (evtype)
- {
- case KEY_EVENT:
+ {
+ case KEY_EVENT:
add = key_event (&queue_ptr->Event.KeyEvent, &inev, &isdead);
if (add == -1) /* 95.7.25 by himi */
{
@@ -795,26 +795,26 @@ w32_console_read_socket (struct terminal *terminal,
kbd_buffer_store_event_hold (&inev, hold_quit);
break;
- case MOUSE_EVENT:
+ case MOUSE_EVENT:
add = do_mouse_event (&queue_ptr->Event.MouseEvent, &inev);
if (add)
kbd_buffer_store_event_hold (&inev, hold_quit);
break;
- case WINDOW_BUFFER_SIZE_EVENT:
+ case WINDOW_BUFFER_SIZE_EVENT:
if (w32_use_full_screen_buffer)
resize_event (&queue_ptr->Event.WindowBufferSizeEvent);
break;
- case MENU_EVENT:
- case FOCUS_EVENT:
+ case MENU_EVENT:
+ case FOCUS_EVENT:
/* Internal event types, ignored. */
break;
- }
+ }
queue_ptr++;
nev--;
- }
+ }
}
/* We don't get told about changes in the window size (only the buffer
diff --git a/src/w32menu.c b/src/w32menu.c
index 7c66360..0ad2984 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -395,7 +395,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
{
free_menubar_widget_value_tree (first_wv);
discard_menu_items ();
- unbind_to (specpdl_count, Qnil);
+ unbind_to (specpdl_count, Qnil);
return;
}
@@ -670,9 +670,9 @@ w32_menu_show (struct frame *f, int x, int y, int menuflags,
def = AREF (menu_items, i + MENU_ITEMS_ITEM_DEFINITION);
type = AREF (menu_items, i + MENU_ITEMS_ITEM_TYPE);
selected = AREF (menu_items, i + MENU_ITEMS_ITEM_SELECTED);
- help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
+ help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
- if (STRINGP (item_name))
+ if (STRINGP (item_name))
{
if (unicode_append_menu)
item_name = ENCODE_UTF_8 (item_name);
@@ -683,7 +683,7 @@ w32_menu_show (struct frame *f, int x, int y, int menuflags,
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
- {
+ {
descrip = ENCODE_SYSTEM (descrip);
ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip);
}
@@ -697,7 +697,7 @@ w32_menu_show (struct frame *f, int x, int y, int menuflags,
if (!NILP (descrip))
wv->key = SSDATA (descrip);
/* Use the contents index as call_data, since we are
- restricted to 16-bits. */
+ restricted to 16-bits. */
wv->call_data = !NILP (def) ? (void *) (UINT_PTR) i : 0;
if (NILP (type))
@@ -909,7 +909,7 @@ w32_dialog_show (struct frame *f, Lisp_Object title,
item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY);
- help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
+ help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
if (NILP (item_name))
{
@@ -956,8 +956,8 @@ w32_dialog_show (struct frame *f, Lisp_Object title,
wv = make_widget_value (dialog_name, NULL, false, Qnil);
/* Frame title: 'Q' = Question, 'I' = Information.
- Can also have 'E' = Error if, one day, we want
- a popup for errors. */
+ Can also have 'E' = Error if, one day, we want
+ a popup for errors. */
if (NILP (header))
dialog_name[0] = 'Q';
else
@@ -1256,56 +1256,56 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
key binding. */
nlen = orig_len = strlen (out_string);
if (unicode_append_menu)
- {
- /* With UTF-8, & cannot be part of a multibyte character. */
- for (p = out_string; *p; p++)
- {
- if (*p == '&')
- nlen++;
- }
- }
+ {
+ /* With UTF-8, & cannot be part of a multibyte character. */
+ for (p = out_string; *p; p++)
+ {
+ if (*p == '&')
+ nlen++;
+ }
+ }
#ifndef NTGUI_UNICODE
else
- {
- /* If encoded with the system codepage, use multibyte string
- functions in case of multibyte characters that contain '&'. */
- for (p = out_string; *p; p = _mbsinc (p))
- {
- if (_mbsnextc (p) == '&')
- nlen++;
- }
- }
+ {
+ /* If encoded with the system codepage, use multibyte string
+ functions in case of multibyte characters that contain '&'. */
+ for (p = out_string; *p; p = _mbsinc (p))
+ {
+ if (_mbsnextc (p) == '&')
+ nlen++;
+ }
+ }
#endif /* !NTGUI_UNICODE */
if (nlen > orig_len)
- {
- p = out_string;
- out_string = SAFE_ALLOCA (nlen + 1);
- q = out_string;
- while (*p)
- {
- if (unicode_append_menu)
- {
- if (*p == '&')
- *q++ = *p;
- *q++ = *p++;
- }
+ {
+ p = out_string;
+ out_string = SAFE_ALLOCA (nlen + 1);
+ q = out_string;
+ while (*p)
+ {
+ if (unicode_append_menu)
+ {
+ if (*p == '&')
+ *q++ = *p;
+ *q++ = *p++;
+ }
#ifndef NTGUI_UNICODE
- else
- {
- if (_mbsnextc (p) == '&')
- {
- _mbsncpy (q, p, 1);
- q = _mbsinc (q);
- }
- _mbsncpy (q, p, 1);
- p = _mbsinc (p);
- q = _mbsinc (q);
- }
+ else
+ {
+ if (_mbsnextc (p) == '&')
+ {
+ _mbsncpy (q, p, 1);
+ q = _mbsinc (q);
+ }
+ _mbsncpy (q, p, 1);
+ p = _mbsinc (p);
+ q = _mbsinc (q);
+ }
#endif /* !NTGUI_UNICODE */
- }
- *q = '\0';
- }
+ }
+ *q = '\0';
+ }
if (item != NULL)
fuFlags = MF_POPUP;
@@ -1315,8 +1315,8 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
we can't deallocate the memory otherwise. */
if (get_menu_item_info)
{
- out_string = (char *) local_alloc (strlen (wv->name) + 1);
- strcpy (out_string, wv->name);
+ out_string = (char *) local_alloc (strlen (wv->name) + 1);
+ strcpy (out_string, wv->name);
#ifdef MENU_DEBUG
DebPrint ("Menu: allocating %ld for owner-draw", out_string);
#endif
diff --git a/src/w32notify.c b/src/w32notify.c
index 32a03f7..93ad8f9 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -151,7 +151,7 @@ send_notifications (struct notifications_set *ns)
PostThreadMessage (dwMainThreadId, WM_EMACS_FILENOTIFY, 0, 0);
else if (FRAME_W32_P (f))
PostMessage (FRAME_W32_WINDOW (f),
- WM_EMACS_FILENOTIFY, 0, 0);
+ WM_EMACS_FILENOTIFY, 0, 0);
/* When we are running in batch mode, there's no one to send a
message, so we just signal the data is available and hope
sys_select will be called soon and will read the data. */
@@ -212,8 +212,8 @@ watch_completion (DWORD status, DWORD bytes_ret, OVERLAPPED *io_info)
{
/* We've been called because the main thread told us to issue
CancelIo on the directory we watch, and watch_end did so.
- We must exit, without issuing another call to
- ReadDirectoryChangesW. */
+ We must exit, without issuing another call to
+ ReadDirectoryChangesW. */
return;
}
@@ -258,9 +258,9 @@ watch_completion (DWORD status, DWORD bytes_ret, OVERLAPPED *io_info)
{
DebPrint (("ReadDirectoryChangesW error: %lu\n", GetLastError ()));
/* If this call fails, it means that the directory is not
- watchable any more. We need to terminate the worker thread.
- Still, we will wait until the current notifications have been
- sent to the main thread. */
+ watchable any more. We need to terminate the worker thread.
+ Still, we will wait until the current notifications have been
+ sent to the main thread. */
terminate = TRUE;
}
@@ -450,7 +450,7 @@ remove_watch (struct notification *dirwatch)
{
if (!(status == FALSE && err == ERROR_INVALID_HANDLE))
{
- DebPrint(("Forcing thread termination.\n"));
+ DebPrint(("Forcing thread termination.\n"));
TerminateThread (dirwatch->thr, 0);
if (dirwatch->dir)
CloseHandle (dirwatch->dir);
diff --git a/src/w32proc.c b/src/w32proc.c
index 6f3a6e0..0748703 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1004,7 +1004,7 @@ new_child (void)
{
cp->char_consumed = CreateEvent (NULL, FALSE, FALSE, NULL);
if (cp->char_consumed)
- {
+ {
/* The 0x00010000 flag is STACK_SIZE_PARAM_IS_A_RESERVATION.
It means that the 64K stack we are requesting in the 2nd
argument is how much memory should be reserved for the
@@ -1051,15 +1051,15 @@ delete_child (child_process *cp)
DWORD rc;
if (GetExitCodeThread (cp->thrd, &rc) && rc == STILL_ACTIVE)
- {
+ {
/* let the thread exit cleanly if possible */
cp->status = STATUS_READ_ERROR;
SetEvent (cp->char_consumed);
#if 0
- /* We used to forcibly terminate the thread here, but it
- is normally unnecessary, and in abnormal cases, the worst that
- will happen is we have an extra idle thread hanging around
- waiting for the zombie process. */
+ /* We used to forcibly terminate the thread here, but it
+ is normally unnecessary, and in abnormal cases, the worst that
+ will happen is we have an extra idle thread hanging around
+ waiting for the zombie process. */
if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
{
DebPrint (("delete_child.WaitForSingleObject (thread) failed "
@@ -1160,7 +1160,7 @@ reader_thread (void *arg)
/* The name char_avail is a misnomer - it really just means the
read-ahead has completed, whether successfully or not. */
if (!SetEvent (cp->char_avail))
- {
+ {
DebPrint (("reader_thread.SetEvent(0x%x) failed with %lu for fd %ld (PID %d)\n",
(DWORD_PTR)cp->char_avail, GetLastError (),
cp->fd, cp->pid));
@@ -1181,11 +1181,11 @@ reader_thread (void *arg)
/* Wait until our input is acknowledged before reading again */
if (WaitForSingleObject (cp->char_consumed, INFINITE) != WAIT_OBJECT_0)
- {
+ {
DebPrint (("reader_thread.WaitForSingleObject failed with "
"%lu for fd %ld\n", GetLastError (), cp->fd));
break;
- }
+ }
/* delete_child sets status to STATUS_READ_ERROR when it wants
us to exit. */
if (cp->status == STATUS_READ_ERROR)
@@ -1596,53 +1596,53 @@ w32_executable_type (char * filename,
}
else if (nt_header->Signature == IMAGE_NT_SIGNATURE)
{
- IMAGE_DATA_DIRECTORY *data_dir = NULL;
- if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
- {
- /* Ensure we are using the 32 bit structure. */
- IMAGE_OPTIONAL_HEADER32 *opt
- = (IMAGE_OPTIONAL_HEADER32*) &(nt_header->OptionalHeader);
- data_dir = opt->DataDirectory;
- *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI);
- }
- /* MingW 3.12 has the required 64 bit structs, but in case older
- versions don't, only check 64 bit exes if we know how. */
+ IMAGE_DATA_DIRECTORY *data_dir = NULL;
+ if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
+ {
+ /* Ensure we are using the 32 bit structure. */
+ IMAGE_OPTIONAL_HEADER32 *opt
+ = (IMAGE_OPTIONAL_HEADER32*) &(nt_header->OptionalHeader);
+ data_dir = opt->DataDirectory;
+ *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI);
+ }
+ /* MingW 3.12 has the required 64 bit structs, but in case older
+ versions don't, only check 64 bit exes if we know how. */
#ifdef IMAGE_NT_OPTIONAL_HDR64_MAGIC
- else if (nt_header->OptionalHeader.Magic
- == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
- {
- IMAGE_OPTIONAL_HEADER64 *opt
- = (IMAGE_OPTIONAL_HEADER64*) &(nt_header->OptionalHeader);
- data_dir = opt->DataDirectory;
- *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI);
- }
+ else if (nt_header->OptionalHeader.Magic
+ == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
+ {
+ IMAGE_OPTIONAL_HEADER64 *opt
+ = (IMAGE_OPTIONAL_HEADER64*) &(nt_header->OptionalHeader);
+ data_dir = opt->DataDirectory;
+ *is_gui_app = (opt->Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI);
+ }
#endif
- if (data_dir)
- {
- /* Look for Cygwin DLL in the DLL import list. */
- IMAGE_DATA_DIRECTORY import_dir =
- data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT];
- IMAGE_IMPORT_DESCRIPTOR * imports =
+ if (data_dir)
+ {
+ /* Look for Cygwin DLL in the DLL import list. */
+ IMAGE_DATA_DIRECTORY import_dir =
+ data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT];
+ IMAGE_IMPORT_DESCRIPTOR * imports =
RVA_TO_PTR (import_dir.VirtualAddress,
rva_to_section (import_dir.VirtualAddress,
nt_header),
executable);
- for ( ; imports->Name; imports++)
- {
+ for ( ; imports->Name; imports++)
+ {
IMAGE_SECTION_HEADER * section =
rva_to_section (imports->Name, nt_header);
- char * dllname = RVA_TO_PTR (imports->Name, section,
- executable);
-
- /* The exact name of the Cygwin DLL has changed with
- various releases, but hopefully this will be
- reasonably future-proof. */
- if (strncmp (dllname, "cygwin", 6) == 0)
- {
- *is_cygnus_app = TRUE;
- break;
- }
+ char * dllname = RVA_TO_PTR (imports->Name, section,
+ executable);
+
+ /* The exact name of the Cygwin DLL has changed with
+ various releases, but hopefully this will be
+ reasonably future-proof. */
+ if (strncmp (dllname, "cygwin", 6) == 0)
+ {
+ *is_cygnus_app = TRUE;
+ break;
+ }
else if (strncmp (dllname, "msys-", 5) == 0)
{
/* This catches both MSYS 1.x and MSYS2
@@ -1653,8 +1653,8 @@ w32_executable_type (char * filename,
*is_msys_app = TRUE;
break;
}
- }
- }
+ }
+ }
}
}
@@ -1671,7 +1671,7 @@ compare_env (const void *strp1, const void *strp2)
while (*str1 && *str2 && *str1 != '=' && *str2 != '=')
{
/* Sort order in command.com/cmd.exe is based on uppercasing
- names, so do the same here. */
+ names, so do the same here. */
if (toupper (*str1) > toupper (*str2))
return 1;
else if (toupper (*str1) < toupper (*str2))
@@ -2344,9 +2344,9 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
if (active == nh + nc)
{
/* There are messages in the lisp thread's queue; we must
- drain the queue now to ensure they are processed promptly,
- because if we don't do so, we will not be woken again until
- further messages arrive.
+ drain the queue now to ensure they are processed promptly,
+ because if we don't do so, we will not be woken again until
+ further messages arrive.
NB. If ever we allow window message procedures to callback
into lisp, we will need to ensure messages are dispatched
@@ -2413,9 +2413,9 @@ sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
else
{
/* Must be a socket or pipe - read ahead should have
- completed, either succeeding or failing. If this handle
- was waiting for an async 'connect', reset the connect
- flag, so it could read from now on. */
+ completed, either succeeding or failing. If this handle
+ was waiting for an async 'connect', reset the connect
+ flag, so it could read from now on. */
if (wfds && (fd_info[fdindex[active]].flags & FILE_CONNECT) != 0)
{
cp = fd_info[fdindex[active]].cp;
@@ -2534,7 +2534,7 @@ sys_kill (pid_t pid, int sig)
}
proc_hand = OpenProcess (PROCESS_QUERY_INFORMATION, 0, pid);
if (proc_hand == NULL)
- {
+ {
DWORD err = GetLastError ();
switch (err)
@@ -2566,7 +2566,7 @@ sys_kill (pid_t pid, int sig)
proc_hand = OpenProcess (desiredAccess, 0, pid);
if (proc_hand == NULL)
- {
+ {
errno = EPERM;
return -1;
}
@@ -2601,59 +2601,59 @@ sys_kill (pid_t pid, int sig)
foreground_window = GetForegroundWindow ();
if (foreground_window)
{
- /* NT 5.0, and apparently also Windows 98, will not allow
+ /* NT 5.0, and apparently also Windows 98, will not allow
a Window to be set to foreground directly without the
user's involvement. The workaround is to attach
ourselves to the thread that owns the foreground
window, since that is the only thread that can set the
foreground window. */
- DWORD foreground_thread, child_thread;
- foreground_thread =
+ DWORD foreground_thread, child_thread;
+ foreground_thread =
GetWindowThreadProcessId (foreground_window, NULL);
if (foreground_thread == GetCurrentThreadId ()
- || !AttachThreadInput (GetCurrentThreadId (),
- foreground_thread, TRUE))
- foreground_thread = 0;
+ || !AttachThreadInput (GetCurrentThreadId (),
+ foreground_thread, TRUE))
+ foreground_thread = 0;
- child_thread = GetWindowThreadProcessId (cp->hwnd, NULL);
+ child_thread = GetWindowThreadProcessId (cp->hwnd, NULL);
if (child_thread == GetCurrentThreadId ()
- || !AttachThreadInput (GetCurrentThreadId (),
- child_thread, TRUE))
- child_thread = 0;
-
- /* Set the foreground window to the child. */
- if (SetForegroundWindow (cp->hwnd))
- {
- /* Generate keystrokes as if user had typed Ctrl-Break or
- Ctrl-C. */
- keybd_event (VK_CONTROL, control_scan_code, 0, 0);
- keybd_event (vk_break_code, break_scan_code,
+ || !AttachThreadInput (GetCurrentThreadId (),
+ child_thread, TRUE))
+ child_thread = 0;
+
+ /* Set the foreground window to the child. */
+ if (SetForegroundWindow (cp->hwnd))
+ {
+ /* Generate keystrokes as if user had typed Ctrl-Break or
+ Ctrl-C. */
+ keybd_event (VK_CONTROL, control_scan_code, 0, 0);
+ keybd_event (vk_break_code, break_scan_code,
(vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY), 0);
- keybd_event (vk_break_code, break_scan_code,
- (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY)
- | KEYEVENTF_KEYUP, 0);
- keybd_event (VK_CONTROL, control_scan_code,
- KEYEVENTF_KEYUP, 0);
-
- /* Sleep for a bit to give time for Emacs frame to respond
- to focus change events (if Emacs was active app). */
- Sleep (100);
-
- SetForegroundWindow (foreground_window);
- }
- /* Detach from the foreground and child threads now that
- the foreground switching is over. */
- if (foreground_thread)
- AttachThreadInput (GetCurrentThreadId (),
- foreground_thread, FALSE);
- if (child_thread)
- AttachThreadInput (GetCurrentThreadId (),
- child_thread, FALSE);
- }
- }
+ keybd_event (vk_break_code, break_scan_code,
+ (vk_break_code == 'C' ? 0 : KEYEVENTF_EXTENDEDKEY)
+ | KEYEVENTF_KEYUP, 0);
+ keybd_event (VK_CONTROL, control_scan_code,
+ KEYEVENTF_KEYUP, 0);
+
+ /* Sleep for a bit to give time for Emacs frame to respond
+ to focus change events (if Emacs was active app). */
+ Sleep (100);
+
+ SetForegroundWindow (foreground_window);
+ }
+ /* Detach from the foreground and child threads now that
+ the foreground switching is over. */
+ if (foreground_thread)
+ AttachThreadInput (GetCurrentThreadId (),
+ foreground_thread, FALSE);
+ if (child_thread)
+ AttachThreadInput (GetCurrentThreadId (),
+ child_thread, FALSE);
+ }
+ }
/* Ctrl-Break is NT equivalent of SIGINT. */
else if (!GenerateConsoleCtrlEvent (CTRL_BREAK_EVENT, pid))
- {
+ {
DebPrint (("sys_kill.GenerateConsoleCtrlEvent return %d "
"for pid %lu\n", GetLastError (), pid));
errno = EINVAL;
@@ -2747,12 +2747,12 @@ sys_kill (pid_t pid, int sig)
so it doesn't work very well for shells which is why it's not
used in every case. */
else if (!TerminateProcess (proc_hand, 0xff))
- {
+ {
DebPrint (("sys_kill.TerminateProcess returned %d "
"for pid %lu\n", GetLastError (), pid));
errno = EINVAL;
rc = -1;
- }
+ }
}
if (need_to_free)
@@ -3040,7 +3040,7 @@ The value is one of the following:
`msys' -- an MSYS 1.x or MSYS2 program
`w32-native' -- a native Windows application
`unknown' -- a file that doesn't exist, or cannot be open, or whose
- name is not encodable in the current ANSI codepage.
+ name is not encodable in the current ANSI codepage.
Note that for .bat and .cmd batch files the function returns the type
of their command interpreter, as specified by the \"COMSPEC\"
@@ -3586,8 +3586,8 @@ w32_compare_strings (const char *s1, const char *s2, char *locname,
if (os_subtype == OS_9X)
{
pCompareStringW =
- (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"),
- "CompareStringW");
+ (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"),
+ "CompareStringW");
if (!pCompareStringW)
{
errno = EINVAL;
diff --git a/src/w32reg.c b/src/w32reg.c
index 25d6bb8..33b090d 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -65,7 +65,7 @@ w32_get_rdb_resource (const char *rdb, const char *resource)
{
/* Comparison is case-insensitive because registry searches are too. */
if ((strnicmp (value, resource, len) == 0) && (value[len] == ':'))
- return xstrdup (&value[len + 1]);
+ return xstrdup (&value[len + 1]);
value = strchr (value, '\0') + 1;
}
@@ -148,9 +148,9 @@ x_get_string_resource (XrmDatabase rdb, const char *name, const char *class)
char *resource;
if ((resource = w32_get_rdb_resource (rdb, name)))
- return resource;
+ return resource;
if ((resource = w32_get_rdb_resource (rdb, class)))
- return resource;
+ return resource;
}
if (inhibit_x_resources)
diff --git a/src/w32term.c b/src/w32term.c
index 2347544..5e7595c 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -171,7 +171,7 @@ int w32_message_fd = -1;
#endif /* CYGWIN */
static void w32_handle_tool_bar_click (struct frame *,
- struct input_event *);
+ struct input_event *);
static void w32_define_cursor (Window, Cursor);
void x_lower_frame (struct frame *);
@@ -186,16 +186,16 @@ static void x_clear_frame (struct frame *);
static void frame_highlight (struct frame *);
static void frame_unhighlight (struct frame *);
static void x_new_focus_frame (struct w32_display_info *,
- struct frame *);
+ struct frame *);
static void x_focus_changed (int, int, struct w32_display_info *,
- struct frame *, struct input_event *);
+ struct frame *, struct input_event *);
static void w32_detect_focus_change (struct w32_display_info *,
- W32Msg *, struct input_event *);
+ W32Msg *, struct input_event *);
static void w32_frame_rehighlight (struct frame *);
static void x_frame_rehighlight (struct w32_display_info *);
static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
- enum text_cursor_kinds);
+ enum text_cursor_kinds);
static void w32_clip_to_row (struct window *, struct glyph_row *,
enum glyph_row_area, HDC);
static BOOL my_show_window (struct frame *, HWND, int);
@@ -302,7 +302,7 @@ w32_restore_glyph_string_clip (struct glyph_string *s)
HRGN clip1 = CreateRectRgnIndirect (r);
HRGN clip2 = CreateRectRgnIndirect (r + 1);
if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR)
- SelectClipRgn (s->hdc, clip1);
+ SelectClipRgn (s->hdc, clip1);
DeleteObject (clip1);
DeleteObject (clip2);
}
@@ -311,10 +311,10 @@ w32_restore_glyph_string_clip (struct glyph_string *s)
/*
Draw a wavy line under S. The wave fills wave_height pixels from y0.
- x0 wave_length = 2
- --
- y0 * * * * *
- |* * * * * * * * *
+ x0 wave_length = 2
+ --
+ y0 * * * * *
+ |* * * * * * * * *
wave_height = 3 | * * * *
*/
@@ -384,7 +384,7 @@ w32_draw_underwave (struct glyph_string *s, COLORREF color)
/* Draw a hollow rectangle at the specified position. */
static void
w32_draw_rectangle (HDC hdc, XGCValues *gc, int x, int y,
- int width, int height)
+ int width, int height)
{
HBRUSH hb, oldhb;
HPEN hp, oldhp;
@@ -582,7 +582,7 @@ x_update_window_begin (struct window *w)
{
int i;
- for (i = 0; i < w->desired_matrix->nrows; ++i)
+ for (i = 0; i < w->desired_matrix->nrows; ++i)
if (MATRIX_ROW_ENABLED_P (w->desired_matrix, i))
break;
@@ -904,7 +904,7 @@ w32_destroy_fringe_bitmap (int which)
static void x_set_glyph_string_clipping (struct glyph_string *);
static void x_set_glyph_string_gc (struct glyph_string *);
static void x_draw_glyph_string_background (struct glyph_string *,
- bool);
+ bool);
static void x_draw_glyph_string_foreground (struct glyph_string *);
static void x_draw_composite_glyph_string_foreground (struct glyph_string *);
static void x_draw_glyph_string_box (struct glyph_string *);
@@ -914,19 +914,19 @@ static void x_set_mode_line_face_gc (struct glyph_string *);
static void x_set_mouse_face_gc (struct glyph_string *);
static int w32_alloc_lighter_color (struct frame *, COLORREF *, double, int);
static void w32_setup_relief_color (struct frame *, struct relief *,
- double, int, COLORREF);
+ double, int, COLORREF);
static void x_setup_relief_colors (struct glyph_string *);
static void x_draw_image_glyph_string (struct glyph_string *);
static void x_draw_image_relief (struct glyph_string *);
static void x_draw_image_foreground (struct glyph_string *);
static void w32_draw_image_foreground_1 (struct glyph_string *, HBITMAP);
static void x_clear_glyph_string_rect (struct glyph_string *, int,
- int, int, int);
+ int, int, int);
static void w32_draw_relief_rect (struct frame *, int, int, int, int,
- int, int, int, int, int, int,
- RECT *);
+ int, int, int, int, int, int,
+ RECT *);
static void w32_draw_box_rect (struct glyph_string *, int, int, int, int,
- int, bool, bool, RECT *);
+ int, bool, bool, RECT *);
/* Set S->gc to a suitable GC for drawing glyph string S in cursor
@@ -1102,7 +1102,7 @@ x_set_glyph_string_clipping (struct glyph_string *s)
HRGN clip1 = CreateRectRgnIndirect (r);
HRGN clip2 = CreateRectRgnIndirect (r + 1);
if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR)
- SelectClipRgn (s->hdc, clip1);
+ SelectClipRgn (s->hdc, clip1);
DeleteObject (clip1);
DeleteObject (clip2);
}
@@ -1174,13 +1174,13 @@ x_clear_glyph_string_rect (struct glyph_string *s,
real_x = max (real_x, s->gc->clip_rectangle.left);
real_y = max (real_y, s->gc->clip_rectangle.top);
real_w = min (real_w, s->gc->clip_rectangle.right
- - s->gc->clip_rectangle.left);
+ - s->gc->clip_rectangle.left);
real_h = min (real_h, s->gc->clip_rectangle.bottom
- - s->gc->clip_rectangle.top);
+ - s->gc->clip_rectangle.top);
}
#endif
w32_fill_area (s->f, s->hdc, s->gc->background, real_x, real_y,
- real_w, real_h);
+ real_w, real_h);
}
@@ -1213,7 +1213,7 @@ x_draw_glyph_string_background (struct glyph_string *s, bool force_p)
}
else
#endif
- if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+ if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
/* When xdisp.c ignores FONT_HEIGHT, we cannot trust
font dimensions, since the actual glyphs might be
much smaller. So in that case we always clear the
@@ -1256,13 +1256,13 @@ x_draw_glyph_string_foreground (struct glyph_string *s)
if (s->font_not_found_p)
{
for (i = 0; i < s->nchars; ++i)
- {
- struct glyph *g = s->first_glyph + i;
+ {
+ struct glyph *g = s->first_glyph + i;
- w32_draw_rectangle (s->hdc, s->gc, x, s->y, g->pixel_width - 1,
- s->height - 1);
- x += g->pixel_width;
- }
+ w32_draw_rectangle (s->hdc, s->gc, x, s->y, g->pixel_width - 1,
+ s->height - 1);
+ x += g->pixel_width;
+ }
}
else
{
@@ -1319,8 +1319,8 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s)
if (s->font_not_found_p)
{
if (s->cmp_from == 0)
- w32_draw_rectangle (s->hdc, s->gc, x, s->y, s->width - 1,
- s->height - 1);
+ w32_draw_rectangle (s->hdc, s->gc, x, s->y, s->width - 1,
+ s->height - 1);
}
else if (! s->first_glyph->u.cmp.automatic)
{
@@ -1506,12 +1506,12 @@ w32_alloc_lighter_color (struct frame *f, COLORREF *color,
/* Change RGB values by specified FACTOR. Avoid overflow! */
eassert (factor >= 0);
new = PALETTERGB (min (0xff, factor * GetRValue (*color)),
- min (0xff, factor * GetGValue (*color)),
- min (0xff, factor * GetBValue (*color)));
+ min (0xff, factor * GetGValue (*color)),
+ min (0xff, factor * GetBValue (*color)));
/* Calculate brightness of COLOR. */
bright = (2 * GetRValue (*color) + 3 * GetGValue (*color)
- + GetBValue (*color)) / 6;
+ + GetBValue (*color)) / 6;
/* We only boost colors that are darker than
HIGHLIGHT_COLOR_DARK_BOOST_LIMIT. */
@@ -1525,19 +1525,19 @@ w32_alloc_lighter_color (struct frame *f, COLORREF *color,
int min_delta = delta * dimness * factor / 2;
if (factor < 1)
- new = PALETTERGB (max (0, min (0xff, min_delta - GetRValue (*color))),
- max (0, min (0xff, min_delta - GetGValue (*color))),
- max (0, min (0xff, min_delta - GetBValue (*color))));
+ new = PALETTERGB (max (0, min (0xff, min_delta - GetRValue (*color))),
+ max (0, min (0xff, min_delta - GetGValue (*color))),
+ max (0, min (0xff, min_delta - GetBValue (*color))));
else
- new = PALETTERGB (max (0, min (0xff, min_delta + GetRValue (*color))),
- max (0, min (0xff, min_delta + GetGValue (*color))),
- max (0, min (0xff, min_delta + GetBValue (*color))));
+ new = PALETTERGB (max (0, min (0xff, min_delta + GetRValue (*color))),
+ max (0, min (0xff, min_delta + GetGValue (*color))),
+ max (0, min (0xff, min_delta + GetBValue (*color))));
}
if (new == *color)
new = PALETTERGB (max (0, min (0xff, delta + GetRValue (*color))),
- max (0, min (0xff, delta + GetGValue (*color))),
- max (0, min (0xff, delta + GetBValue (*color))));
+ max (0, min (0xff, delta + GetGValue (*color))),
+ max (0, min (0xff, delta + GetBValue (*color))));
/* TODO: Map to palette and retry with delta if same? */
/* TODO: Free colors (if using palette)? */
@@ -1638,9 +1638,9 @@ x_setup_relief_colors (struct glyph_string *s)
{
di->relief_background = color;
w32_setup_relief_color (s->f, &di->white_relief, 1.2, 0x8000,
- WHITE_PIX_DEFAULT (s->f));
+ WHITE_PIX_DEFAULT (s->f));
w32_setup_relief_color (s->f, &di->black_relief, 0.6, 0x4000,
- BLACK_PIX_DEFAULT (s->f));
+ BLACK_PIX_DEFAULT (s->f));
}
}
@@ -1720,7 +1720,7 @@ w32_draw_relief_rect (struct frame *f,
static void
w32_draw_box_rect (struct glyph_string *s,
int left_x, int top_y, int right_x, int bottom_y, int width,
- bool left_p, bool right_p, RECT *clip_rect)
+ bool left_p, bool right_p, RECT *clip_rect)
{
w32_set_clip_rectangle (s->hdc, clip_rect);
@@ -1732,18 +1732,18 @@ w32_draw_box_rect (struct glyph_string *s,
if (left_p)
{
w32_fill_area (s->f, s->hdc, s->face->box_color,
- left_x, top_y, width, bottom_y - top_y + 1);
+ left_x, top_y, width, bottom_y - top_y + 1);
}
/* Bottom. */
w32_fill_area (s->f, s->hdc, s->face->box_color,
- left_x, bottom_y - width + 1, right_x - left_x + 1, width);
+ left_x, bottom_y - width + 1, right_x - left_x + 1, width);
/* Right. */
if (right_p)
{
w32_fill_area (s->f, s->hdc, s->face->box_color,
- right_x - width + 1, top_y, width, bottom_y - top_y + 1);
+ right_x - width + 1, top_y, width, bottom_y - top_y + 1);
}
w32_set_clip_rectangle (s->hdc, NULL);
@@ -1791,12 +1791,12 @@ x_draw_glyph_string_box (struct glyph_string *s)
if (s->face->box == FACE_SIMPLE_BOX)
w32_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width,
- left_p, right_p, &clip_rect);
+ left_p, right_p, &clip_rect);
else
{
x_setup_relief_colors (s);
w32_draw_relief_rect (s->f, left_x, top_y, right_x, bottom_y,
- width, raised_p, 1, 1, left_p, right_p, &clip_rect);
+ width, raised_p, 1, 1, left_p, right_p, &clip_rect);
}
}
@@ -1858,8 +1858,8 @@ x_draw_image_foreground (struct glyph_string *s)
SetTextColor (s->hdc, s->gc->foreground);
SetBkColor (s->hdc, s->gc->background);
- BitBlt (s->hdc, x, y, s->slice.width, s->slice.height,
- compat_hdc, s->slice.x, s->slice.y, SRCCOPY);
+ BitBlt (s->hdc, x, y, s->slice.width, s->slice.height,
+ compat_hdc, s->slice.x, s->slice.y, SRCCOPY);
/* When the image has a mask, we can expect that at
least part of a mouse highlight or a block cursor will
@@ -2017,8 +2017,8 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap)
SetTextColor (hdc, s->gc->foreground);
SetBkColor (hdc, s->gc->background);
- BitBlt (hdc, x, y, s->slice.width, s->slice.height,
- compat_hdc, s->slice.x, s->slice.y, SRCCOPY);
+ BitBlt (hdc, x, y, s->slice.width, s->slice.height,
+ compat_hdc, s->slice.x, s->slice.y, SRCCOPY);
/* When the image has a mask, we can expect that at
least part of a mouse highlight or a block cursor will
@@ -2072,7 +2072,7 @@ x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
/* Draw image glyph string S.
- s->y
+ s->y
s->x +-------------------------
| s->face->box
|
@@ -2174,20 +2174,20 @@ x_draw_image_glyph_string (struct glyph_string *s)
w32_draw_image_foreground_1 (s, pixmap);
x_set_glyph_string_clipping (s);
{
- HDC compat_hdc = CreateCompatibleDC (s->hdc);
- HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground);
- HBRUSH orig_brush = SelectObject (s->hdc, fg_brush);
- HGDIOBJ orig_obj = SelectObject (compat_hdc, pixmap);
-
- SetTextColor (s->hdc, s->gc->foreground);
- SetBkColor (s->hdc, s->gc->background);
- BitBlt (s->hdc, s->x, s->y, s->background_width, s->height,
- compat_hdc, 0, 0, SRCCOPY);
-
- SelectObject (s->hdc, orig_brush);
- DeleteObject (fg_brush);
- SelectObject (compat_hdc, orig_obj);
- DeleteDC (compat_hdc);
+ HDC compat_hdc = CreateCompatibleDC (s->hdc);
+ HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground);
+ HBRUSH orig_brush = SelectObject (s->hdc, fg_brush);
+ HGDIOBJ orig_obj = SelectObject (compat_hdc, pixmap);
+
+ SetTextColor (s->hdc, s->gc->foreground);
+ SetBkColor (s->hdc, s->gc->background);
+ BitBlt (s->hdc, s->x, s->y, s->background_width, s->height,
+ compat_hdc, 0, 0, SRCCOPY);
+
+ SelectObject (s->hdc, orig_brush);
+ DeleteObject (fg_brush);
+ SelectObject (compat_hdc, orig_obj);
+ DeleteDC (compat_hdc);
}
DeleteObject (pixmap);
pixmap = 0;
@@ -2252,7 +2252,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
int y = s->y;
int w = background_width - width, h = s->height;
RECT r;
- HDC hdc = s->hdc;
+ HDC hdc = s->hdc;
if (!s->row->reversed_p)
x += width;
@@ -2280,10 +2280,10 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
}
else
#endif
- {
- w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h);
- }
- }
+ {
+ w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h);
+ }
+ }
}
else if (!s->background_filled_p)
{
@@ -2291,7 +2291,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
/* Don't draw into left margin, fringe or scrollbar area
- except for header line and mode line. */
+ except for header line and mode line. */
if (x < left_x && !s->row->mode_line_p)
{
background_width -= left_x - x;
@@ -2321,17 +2321,17 @@ x_draw_glyph_string (struct glyph_string *s)
struct glyph_string *next;
for (width = 0, next = s->next;
next && width < s->right_overhang;
- width += next->width, next = next->next)
- if (next->first_glyph->type != IMAGE_GLYPH)
- {
- x_set_glyph_string_gc (next);
- x_set_glyph_string_clipping (next);
+ width += next->width, next = next->next)
+ if (next->first_glyph->type != IMAGE_GLYPH)
+ {
+ x_set_glyph_string_gc (next);
+ x_set_glyph_string_clipping (next);
if (next->first_glyph->type == STRETCH_GLYPH)
x_draw_stretch_glyph_string (next);
else
x_draw_glyph_string_background (next, true);
- next->num_clips = 0;
- }
+ next->num_clips = 0;
+ }
}
/* Set up S->gc, set clipping and draw S. */
@@ -2352,9 +2352,9 @@ x_draw_glyph_string (struct glyph_string *s)
relief_drawn_p = 1;
}
else if (!s->clip_head /* draw_glyphs didn't specify a clip mask. */
- && !s->clip_tail
- && ((s->prev && s->prev->hl != s->hl && s->left_overhang)
- || (s->next && s->next->hl != s->hl && s->right_overhang)))
+ && !s->clip_tail
+ && ((s->prev && s->prev->hl != s->hl && s->left_overhang)
+ || (s->next && s->next->hl != s->hl && s->right_overhang)))
/* We must clip just this glyph. left_overhang part has already
drawn when s->prev was drawn, and right_overhang part will be
drawn later when s->next is drawn. */
@@ -2376,7 +2376,7 @@ x_draw_glyph_string (struct glyph_string *s)
if (s->for_overlaps)
s->background_filled_p = true;
else
- x_draw_glyph_string_background (s, false);
+ x_draw_glyph_string_background (s, false);
x_draw_glyph_string_foreground (s);
break;
@@ -2405,128 +2405,128 @@ x_draw_glyph_string (struct glyph_string *s)
{
/* Draw underline. */
if (s->face->underline_p)
- {
- if (s->face->underline_type == FACE_UNDER_WAVE)
- {
- COLORREF color;
-
- if (s->face->underline_defaulted_p)
- color = s->gc->foreground;
- else
- color = s->face->underline_color;
-
- w32_draw_underwave (s, color);
- }
- else if (s->face->underline_type == FACE_UNDER_LINE)
- {
- unsigned long thickness, position;
- int y;
-
- if (s->prev && s->prev->face->underline_p
+ {
+ if (s->face->underline_type == FACE_UNDER_WAVE)
+ {
+ COLORREF color;
+
+ if (s->face->underline_defaulted_p)
+ color = s->gc->foreground;
+ else
+ color = s->face->underline_color;
+
+ w32_draw_underwave (s, color);
+ }
+ else if (s->face->underline_type == FACE_UNDER_LINE)
+ {
+ unsigned long thickness, position;
+ int y;
+
+ if (s->prev && s->prev->face->underline_p
&& s->prev->face->underline_type == FACE_UNDER_LINE)
- {
- /* We use the same underline style as the previous one. */
- thickness = s->prev->underline_thickness;
- position = s->prev->underline_position;
- }
- else
- {
- /* Get the underline thickness. Default is 1 pixel. */
- if (s->font && s->font->underline_thickness > 0)
- thickness = s->font->underline_thickness;
- else
- thickness = 1;
- if (x_underline_at_descent_line)
- position = (s->height - thickness) - (s->ybase - s->y);
- else
- {
- /* Get the underline position. This is the recommended
- vertical offset in pixels from the baseline to the top of
- the underline. This is a signed value according to the
- specs, and its default is
-
- ROUND ((maximum_descent) / 2), with
- ROUND (x) = floor (x + 0.5) */
-
- if (x_use_underline_position_properties
- && s->font && s->font->underline_position >= 0)
- position = s->font->underline_position;
- else if (s->font)
- position = (s->font->descent + 1) / 2;
- }
- position = max (position, underline_minimum_offset);
- }
- /* Check the sanity of thickness and position. We should
- avoid drawing underline out of the current line area. */
- if (s->y + s->height <= s->ybase + position)
- position = (s->height - 1) - (s->ybase - s->y);
- if (s->y + s->height < s->ybase + position + thickness)
- thickness = (s->y + s->height) - (s->ybase + position);
- s->underline_thickness = thickness;
- s->underline_position =position;
- y = s->ybase + position;
- if (s->face->underline_defaulted_p)
- {
- w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
- y, s->width, 1);
- }
- else
- {
- w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
- y, s->width, 1);
- }
- }
- }
+ {
+ /* We use the same underline style as the previous one. */
+ thickness = s->prev->underline_thickness;
+ position = s->prev->underline_position;
+ }
+ else
+ {
+ /* Get the underline thickness. Default is 1 pixel. */
+ if (s->font && s->font->underline_thickness > 0)
+ thickness = s->font->underline_thickness;
+ else
+ thickness = 1;
+ if (x_underline_at_descent_line)
+ position = (s->height - thickness) - (s->ybase - s->y);
+ else
+ {
+ /* Get the underline position. This is the recommended
+ vertical offset in pixels from the baseline to the top of
+ the underline. This is a signed value according to the
+ specs, and its default is
+
+ ROUND ((maximum_descent) / 2), with
+ ROUND (x) = floor (x + 0.5) */
+
+ if (x_use_underline_position_properties
+ && s->font && s->font->underline_position >= 0)
+ position = s->font->underline_position;
+ else if (s->font)
+ position = (s->font->descent + 1) / 2;
+ }
+ position = max (position, underline_minimum_offset);
+ }
+ /* Check the sanity of thickness and position. We should
+ avoid drawing underline out of the current line area. */
+ if (s->y + s->height <= s->ybase + position)
+ position = (s->height - 1) - (s->ybase - s->y);
+ if (s->y + s->height < s->ybase + position + thickness)
+ thickness = (s->y + s->height) - (s->ybase + position);
+ s->underline_thickness = thickness;
+ s->underline_position =position;
+ y = s->ybase + position;
+ if (s->face->underline_defaulted_p)
+ {
+ w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
+ y, s->width, 1);
+ }
+ else
+ {
+ w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
+ y, s->width, 1);
+ }
+ }
+ }
/* Draw overline. */
if (s->face->overline_p)
- {
- unsigned long dy = 0, h = 1;
-
- if (s->face->overline_color_defaulted_p)
- {
- w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
- s->y + dy, s->width, h);
- }
- else
- {
- w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
- s->y + dy, s->width, h);
- }
- }
+ {
+ unsigned long dy = 0, h = 1;
+
+ if (s->face->overline_color_defaulted_p)
+ {
+ w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
+ s->y + dy, s->width, h);
+ }
+ else
+ {
+ w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x,
+ s->y + dy, s->width, h);
+ }
+ }
/* Draw strike-through. */
if (s->face->strike_through_p
- && !FONT_TEXTMETRIC (s->font).tmStruckOut)
- {
- unsigned long h = 1;
- unsigned long dy = (s->height - h) / 2;
-
- if (s->face->strike_through_color_defaulted_p)
- {
- w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, s->y + dy,
- s->width, h);
- }
- else
- {
- w32_fill_area (s->f, s->hdc, s->face->strike_through_color, s->x,
- s->y + dy, s->width, h);
- }
- }
+ && !FONT_TEXTMETRIC (s->font).tmStruckOut)
+ {
+ unsigned long h = 1;
+ unsigned long dy = (s->height - h) / 2;
+
+ if (s->face->strike_through_color_defaulted_p)
+ {
+ w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, s->y + dy,
+ s->width, h);
+ }
+ else
+ {
+ w32_fill_area (s->f, s->hdc, s->face->strike_through_color, s->x,
+ s->y + dy, s->width, h);
+ }
+ }
/* Draw relief if not yet drawn. */
if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
- x_draw_glyph_string_box (s);
+ x_draw_glyph_string_box (s);
if (s->prev)
- {
- struct glyph_string *prev;
-
- for (prev = s->prev; prev; prev = prev->prev)
- if (prev->hl != s->hl
- && prev->x + prev->width + prev->right_overhang > s->x)
- {
- /* As prev was drawn while clipped to its own area, we
- must draw the right_overhang part using s->hl now. */
+ {
+ struct glyph_string *prev;
+
+ for (prev = s->prev; prev; prev = prev->prev)
+ if (prev->hl != s->hl
+ && prev->x + prev->width + prev->right_overhang > s->x)
+ {
+ /* As prev was drawn while clipped to its own area, we
+ must draw the right_overhang part using s->hl now. */
enum draw_glyphs_face save = prev->hl;
prev->hl = s->hl;
@@ -2536,7 +2536,7 @@ x_draw_glyph_string (struct glyph_string *s)
x_draw_glyph_string_foreground (prev);
else
x_draw_composite_glyph_string_foreground (prev);
- w32_set_clip_rectangle (prev->hdc, NULL);
+ w32_set_clip_rectangle (prev->hdc, NULL);
prev->hl = save;
prev->num_clips = 0;
}
@@ -2561,7 +2561,7 @@ x_draw_glyph_string (struct glyph_string *s)
x_draw_glyph_string_foreground (next);
else
x_draw_composite_glyph_string_foreground (next);
- w32_set_clip_rectangle (next->hdc, NULL);
+ w32_set_clip_rectangle (next->hdc, NULL);
next->hl = save;
next->num_clips = 0;
next->clip_head = s->next;
@@ -2585,7 +2585,7 @@ w32_shift_glyphs_for_insert (struct frame *f, int x, int y,
hdc = get_frame_dc (f);
BitBlt (hdc, x + shift_by, y, width, height,
- hdc, x, y, SRCCOPY);
+ hdc, x, y, SRCCOPY);
release_frame_dc (f, hdc);
}
@@ -2808,26 +2808,26 @@ x_focus_changed (int type, int state, struct w32_display_info *dpyinfo,
if (type == WM_SETFOCUS)
{
if (dpyinfo->w32_focus_event_frame != frame)
- {
- x_new_focus_frame (dpyinfo, frame);
- dpyinfo->w32_focus_event_frame = frame;
-
- /* Don't stop displaying the initial startup message
- for a switch-frame event we don't need. */
- if (NILP (Vterminal_frame)
- && CONSP (Vframe_list)
- && !NILP (XCDR (Vframe_list)))
- {
- bufp->arg = Qt;
- }
- else
- {
- bufp->arg = Qnil;
- }
-
- bufp->kind = FOCUS_IN_EVENT;
- XSETFRAME (bufp->frame_or_window, frame);
- }
+ {
+ x_new_focus_frame (dpyinfo, frame);
+ dpyinfo->w32_focus_event_frame = frame;
+
+ /* Don't stop displaying the initial startup message
+ for a switch-frame event we don't need. */
+ if (NILP (Vterminal_frame)
+ && CONSP (Vframe_list)
+ && !NILP (XCDR (Vframe_list)))
+ {
+ bufp->arg = Qt;
+ }
+ else
+ {
+ bufp->arg = Qnil;
+ }
+
+ bufp->kind = FOCUS_IN_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
+ }
frame->output_data.x->focus_state |= state;
@@ -2838,12 +2838,12 @@ x_focus_changed (int type, int state, struct w32_display_info *dpyinfo,
frame->output_data.x->focus_state &= ~state;
if (dpyinfo->w32_focus_event_frame == frame)
- {
- dpyinfo->w32_focus_event_frame = 0;
- x_new_focus_frame (dpyinfo, 0);
+ {
+ dpyinfo->w32_focus_event_frame = 0;
+ x_new_focus_frame (dpyinfo, 0);
- bufp->kind = FOCUS_OUT_EVENT;
- XSETFRAME (bufp->frame_or_window, frame);
+ bufp->kind = FOCUS_OUT_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
}
/* TODO: IME focus? */
@@ -3064,7 +3064,7 @@ construct_mouse_wheel (struct input_event *result, W32Msg *msg, struct frame *f)
int delta;
result->kind = msg->msg.message == WM_MOUSEHWHEEL ? HORIZ_WHEEL_EVENT
- : WHEEL_EVENT;
+ : WHEEL_EVENT;
result->code = 0;
result->timestamp = msg->msg.time;
@@ -3076,7 +3076,7 @@ construct_mouse_wheel (struct input_event *result, W32Msg *msg, struct frame *f)
/* The up and down modifiers indicate if the wheel was rotated up or
down based on WHEEL_DELTA value. */
result->modifiers = (msg->dwModifiers
- | ((delta < 0 ) ? down_modifier : up_modifier));
+ | ((delta < 0 ) ? down_modifier : up_modifier));
/* With multiple monitors, we can legitimately get negative
coordinates, so cast to short to interpret them correctly. */
@@ -3440,7 +3440,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
if (! f1)
{
struct scroll_bar *bar
- = x_window_to_scroll_bar (WindowFromPoint (pt), 2);
+ = x_window_to_scroll_bar (WindowFromPoint (pt), 2);
if (bar)
f1 = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
@@ -3554,7 +3554,7 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar,
avoid strange effects like scrolling backwards when just clicking
on the handle (without moving it). */
double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height)
- + VERTICAL_SCROLL_BAR_MIN_HANDLE;
+ + VERTICAL_SCROLL_BAR_MIN_HANDLE;
int sb_page, sb_pos;
BOOL draggingp = bar->dragging ? TRUE : FALSE;
SCROLLINFO si;
@@ -3583,8 +3583,8 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar,
if (whole)
{
/* Position scroll bar at rock bottom if the bottom of the
- buffer is visible. This avoids shrinking the thumb away
- to nothing if it is held at the bottom of the buffer. */
+ buffer is visible. This avoids shrinking the thumb away
+ to nothing if it is held at the bottom of the buffer. */
if (position + portion >= whole && !draggingp)
{
sb_page = range * (whole - position) / whole;
@@ -3859,17 +3859,17 @@ w32_set_vertical_scroll_bar (struct window *w,
&& bar->top == top
&& bar->width == width
&& bar->height == height)
- {
- /* Redraw after clear_frame. */
- if (!my_show_window (f, hwnd, SW_NORMAL))
- InvalidateRect (hwnd, NULL, FALSE);
- }
+ {
+ /* Redraw after clear_frame. */
+ if (!my_show_window (f, hwnd, SW_NORMAL))
+ InvalidateRect (hwnd, NULL, FALSE);
+ }
else
- {
- HDC hdc;
+ {
+ HDC hdc;
SCROLLINFO si;
- block_input ();
+ block_input ();
if (width && height)
{
hdc = get_frame_dc (f);
@@ -3878,10 +3878,10 @@ w32_set_vertical_scroll_bar (struct window *w,
w32_clear_area (f, hdc, left, top, width, height);
release_frame_dc (f, hdc);
}
- /* Make sure scroll bar is "visible" before moving, to ensure the
- area of the parent window now exposed will be refreshed. */
- my_show_window (f, hwnd, SW_HIDE);
- MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
+ /* Make sure scroll bar is "visible" before moving, to ensure the
+ area of the parent window now exposed will be refreshed. */
+ my_show_window (f, hwnd, SW_HIDE);
+ MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
si.cbSize = sizeof (si);
si.fMask = SIF_RANGE;
@@ -3891,17 +3891,17 @@ w32_set_vertical_scroll_bar (struct window *w,
SetScrollInfo (hwnd, SB_CTL, &si, FALSE);
- my_show_window (f, hwnd, SW_NORMAL);
- /* InvalidateRect (w, NULL, FALSE); */
+ my_show_window (f, hwnd, SW_NORMAL);
+ /* InvalidateRect (w, NULL, FALSE); */
- /* Remember new settings. */
- bar->left = left;
- bar->top = top;
- bar->width = width;
- bar->height = height;
+ /* Remember new settings. */
+ bar->left = left;
+ bar->top = top;
+ bar->width = width;
+ bar->height = height;
- unblock_input ();
- }
+ unblock_input ();
+ }
}
w32_set_scroll_bar_thumb (bar, portion, position, whole);
XSETVECTOR (barobj, bar);
@@ -3957,17 +3957,17 @@ w32_set_horizontal_scroll_bar (struct window *w,
/* If already correctly positioned, do nothing. */
if (bar->left == left && bar->top == top
&& bar->width == width && bar->height == height)
- {
- /* Redraw after clear_frame. */
- if (!my_show_window (f, hwnd, SW_NORMAL))
- InvalidateRect (hwnd, NULL, FALSE);
- }
+ {
+ /* Redraw after clear_frame. */
+ if (!my_show_window (f, hwnd, SW_NORMAL))
+ InvalidateRect (hwnd, NULL, FALSE);
+ }
else
- {
- HDC hdc;
+ {
+ HDC hdc;
SCROLLINFO si;
- block_input ();
+ block_input ();
if (width && height)
{
hdc = get_frame_dc (f);
@@ -3976,10 +3976,10 @@ w32_set_horizontal_scroll_bar (struct window *w,
w32_clear_area (f, hdc, clear_left, top, clear_width, height);
release_frame_dc (f, hdc);
}
- /* Make sure scroll bar is "visible" before moving, to ensure the
- area of the parent window now exposed will be refreshed. */
- my_show_window (f, hwnd, SW_HIDE);
- MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
+ /* Make sure scroll bar is "visible" before moving, to ensure the
+ area of the parent window now exposed will be refreshed. */
+ my_show_window (f, hwnd, SW_HIDE);
+ MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
/* +++ SetScrollInfo +++ */
si.cbSize = sizeof (si);
@@ -3990,17 +3990,17 @@ w32_set_horizontal_scroll_bar (struct window *w,
si.nPos = min (position, si.nMax);
SetScrollInfo (hwnd, SB_CTL, &si, FALSE);
- my_show_window (f, hwnd, SW_NORMAL);
- /* InvalidateRect (w, NULL, FALSE); */
+ my_show_window (f, hwnd, SW_NORMAL);
+ /* InvalidateRect (w, NULL, FALSE); */
- /* Remember new settings. */
- bar->left = left;
- bar->top = top;
- bar->width = width;
- bar->height = height;
+ /* Remember new settings. */
+ bar->left = left;
+ bar->top = top;
+ bar->width = width;
+ bar->height = height;
- unblock_input ();
- }
+ unblock_input ();
+ }
}
w32_set_horizontal_scroll_bar_thumb (bar, portion, position, whole);
@@ -4503,22 +4503,22 @@ x_scroll_bar_clear (struct frame *f)
if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
|| FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))
for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
- bar = XSCROLL_BAR (bar)->next)
+ bar = XSCROLL_BAR (bar)->next)
{
- HWND window = SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar));
- HDC hdc = GetDC (window);
- RECT rect;
+ HWND window = SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar));
+ HDC hdc = GetDC (window);
+ RECT rect;
- /* Hide scroll bar until ready to repaint. x_scroll_bar_move
- arranges to refresh the scroll bar if hidden. */
- my_show_window (f, window, SW_HIDE);
+ /* Hide scroll bar until ready to repaint. x_scroll_bar_move
+ arranges to refresh the scroll bar if hidden. */
+ my_show_window (f, window, SW_HIDE);
- GetClientRect (window, &rect);
- select_palette (f, hdc);
- w32_clear_rect (f, hdc, &rect);
- deselect_palette (f, hdc);
+ GetClientRect (window, &rect);
+ select_palette (f, hdc);
+ w32_clear_rect (f, hdc, &rect);
+ deselect_palette (f, hdc);
- ReleaseDC (window, hdc);
+ ReleaseDC (window, hdc);
}
}
@@ -4691,7 +4691,7 @@ w32_read_socket (struct terminal *terminal,
}
break;
- case WM_UNICHAR:
+ case WM_UNICHAR:
case WM_SYSCHAR:
case WM_CHAR:
f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
@@ -4713,65 +4713,65 @@ w32_read_socket (struct terminal *terminal,
XSETFRAME (inev.frame_or_window, f);
inev.timestamp = msg.msg.time;
- if (msg.msg.message == WM_UNICHAR)
- {
- inev.code = msg.msg.wParam;
- }
- else if (msg.msg.wParam < 256)
- {
- wchar_t code;
- char dbcs[2];
- dbcs[0] = 0;
- dbcs[1] = (char) msg.msg.wParam;
-
- if (dbcs_lead)
- {
- dbcs[0] = dbcs_lead;
- dbcs_lead = 0;
- if (!MultiByteToWideChar (w32_keyboard_codepage, 0,
+ if (msg.msg.message == WM_UNICHAR)
+ {
+ inev.code = msg.msg.wParam;
+ }
+ else if (msg.msg.wParam < 256)
+ {
+ wchar_t code;
+ char dbcs[2];
+ dbcs[0] = 0;
+ dbcs[1] = (char) msg.msg.wParam;
+
+ if (dbcs_lead)
+ {
+ dbcs[0] = dbcs_lead;
+ dbcs_lead = 0;
+ if (!MultiByteToWideChar (w32_keyboard_codepage, 0,
dbcs, 2, &code, 1))
- {
- /* Garbage */
- DebPrint (("Invalid DBCS sequence: %d %d\n",
- dbcs[0], dbcs[1]));
- inev.kind = NO_EVENT;
- break;
- }
- }
- else if (IsDBCSLeadByteEx (w32_keyboard_codepage,
+ {
+ /* Garbage */
+ DebPrint (("Invalid DBCS sequence: %d %d\n",
+ dbcs[0], dbcs[1]));
+ inev.kind = NO_EVENT;
+ break;
+ }
+ }
+ else if (IsDBCSLeadByteEx (w32_keyboard_codepage,
(BYTE) msg.msg.wParam))
- {
- dbcs_lead = (char) msg.msg.wParam;
- inev.kind = NO_EVENT;
- break;
- }
- else
- {
- if (!MultiByteToWideChar (w32_keyboard_codepage, 0,
+ {
+ dbcs_lead = (char) msg.msg.wParam;
+ inev.kind = NO_EVENT;
+ break;
+ }
+ else
+ {
+ if (!MultiByteToWideChar (w32_keyboard_codepage, 0,
&dbcs[1], 1, &code, 1))
- {
- /* What to do with garbage? */
- DebPrint (("Invalid character: %d\n", dbcs[1]));
- inev.kind = NO_EVENT;
- break;
- }
- }
- inev.code = code;
- }
- else
- {
- /* Windows shouldn't generate WM_CHAR events above 0xFF
- in non-Unicode message handlers. */
- DebPrint (("Non-byte WM_CHAR: %d\n", msg.msg.wParam));
- inev.kind = NO_EVENT;
- break;
- }
- inev.kind = inev.code < 128 ? ASCII_KEYSTROKE_EVENT
- : MULTIBYTE_CHAR_KEYSTROKE_EVENT;
+ {
+ /* What to do with garbage? */
+ DebPrint (("Invalid character: %d\n", dbcs[1]));
+ inev.kind = NO_EVENT;
+ break;
+ }
+ }
+ inev.code = code;
+ }
+ else
+ {
+ /* Windows shouldn't generate WM_CHAR events above 0xFF
+ in non-Unicode message handlers. */
+ DebPrint (("Non-byte WM_CHAR: %d\n", msg.msg.wParam));
+ inev.kind = NO_EVENT;
+ break;
+ }
+ inev.kind = inev.code < 128 ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT;
}
break;
- case WM_APPCOMMAND:
+ case WM_APPCOMMAND:
f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
if (f && !FRAME_ICONIFIED_P (f))
@@ -4805,7 +4805,7 @@ w32_read_socket (struct terminal *terminal,
last_mousemove_y = y;
}
- previous_help_echo_string = help_echo_string;
+ previous_help_echo_string = help_echo_string;
help_echo_string = Qnil;
f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
@@ -4850,25 +4850,25 @@ w32_read_socket (struct terminal *terminal,
help_echo_string = previous_help_echo_string;
}
else
- {
- /* If we move outside the frame, then we're
- certainly no longer on any text in the frame. */
- clear_mouse_face (hlinfo);
- }
-
- /* If the contents of the global variable help_echo_string
- has changed, generate a HELP_EVENT. */
+ {
+ /* If we move outside the frame, then we're
+ certainly no longer on any text in the frame. */
+ clear_mouse_face (hlinfo);
+ }
+
+ /* If the contents of the global variable help_echo_string
+ has changed, generate a HELP_EVENT. */
#if 0 /* The below is an invalid comparison when CHECK_LISP_OBJECT_TYPE.
But it was originally changed to this to fix a bug, so I have
not removed it completely in case the bug is still there. */
- if (help_echo_string != previous_help_echo_string ||
+ if (help_echo_string != previous_help_echo_string ||
(!NILP (help_echo_string) && !STRINGP (help_echo_string) && f->mouse_moved))
#else /* This is what xterm.c does. */
if (!NILP (help_echo_string)
|| !NILP (previous_help_echo_string))
do_help = 1;
#endif
- break;
+ break;
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
@@ -4879,8 +4879,8 @@ w32_read_socket (struct terminal *terminal,
case WM_XBUTTONDOWN:
case WM_XBUTTONUP:
{
- /* If we decide we want to generate an event to be seen
- by the rest of Emacs, we put it here. */
+ /* If we decide we want to generate an event to be seen
+ by the rest of Emacs, we put it here. */
bool tool_bar_p = 0;
int button;
int up;
@@ -4890,26 +4890,26 @@ w32_read_socket (struct terminal *terminal,
if (f)
{
- construct_mouse_click (&inev, &msg, f);
+ construct_mouse_click (&inev, &msg, f);
- /* Is this in the tool-bar? */
- if (WINDOWP (f->tool_bar_window)
- && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
- {
- Lisp_Object window;
+ /* Is this in the tool-bar? */
+ if (WINDOWP (f->tool_bar_window)
+ && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
+ {
+ Lisp_Object window;
int x = XFASTINT (inev.x);
int y = XFASTINT (inev.y);
- window = window_from_coordinates (f, x, y, 0, 1);
+ window = window_from_coordinates (f, x, y, 0, 1);
- if (EQ (window, f->tool_bar_window))
- {
- w32_handle_tool_bar_click (f, &inev);
- tool_bar_p = 1;
- }
- }
+ if (EQ (window, f->tool_bar_window))
+ {
+ w32_handle_tool_bar_click (f, &inev);
+ tool_bar_p = 1;
+ }
+ }
- if (tool_bar_p
+ if (tool_bar_p
|| (dpyinfo->w32_focus_frame
&& f != dpyinfo->w32_focus_frame))
inev.kind = NO_EVENT;
@@ -4926,11 +4926,11 @@ w32_read_socket (struct terminal *terminal,
{
dpyinfo->grabbed |= (1 << button);
dpyinfo->last_mouse_frame = f;
- /* Ignore any mouse motion that happened
- before this event; any subsequent mouse-movement
- Emacs events should reflect only motion after
- the ButtonPress. */
- if (f != 0)
+ /* Ignore any mouse motion that happened
+ before this event; any subsequent mouse-movement
+ Emacs events should reflect only motion after
+ the ButtonPress. */
+ if (f != 0)
{
f->mouse_moved = false;
if (!tool_bar_p)
@@ -4941,7 +4941,7 @@ w32_read_socket (struct terminal *terminal,
}
case WM_MOUSEWHEEL:
- case WM_MOUSEHWHEEL:
+ case WM_MOUSEHWHEEL:
{
f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
: x_window_to_frame (dpyinfo, msg.msg.hwnd));
@@ -5241,23 +5241,23 @@ w32_read_socket (struct terminal *terminal,
w32_detect_focus_change (dpyinfo, &msg, &inev);
f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd);
- if (f)
- {
- if (f == hlinfo->mouse_face_mouse_frame)
- {
- /* If we move outside the frame, then we're
- certainly no longer on any text in the frame. */
- clear_mouse_face (hlinfo);
- hlinfo->mouse_face_mouse_frame = 0;
- }
-
- /* Generate a nil HELP_EVENT to cancel a help-echo.
- Do it only if there's something to cancel.
- Otherwise, the startup message is cleared when
- the mouse leaves the frame. */
- if (any_help_event_p)
+ if (f)
+ {
+ if (f == hlinfo->mouse_face_mouse_frame)
+ {
+ /* If we move outside the frame, then we're
+ certainly no longer on any text in the frame. */
+ clear_mouse_face (hlinfo);
+ hlinfo->mouse_face_mouse_frame = 0;
+ }
+
+ /* Generate a nil HELP_EVENT to cancel a help-echo.
+ Do it only if there's something to cancel.
+ Otherwise, the startup message is cleared when
+ the mouse leaves the frame. */
+ if (any_help_event_p)
do_help = -1;
- }
+ }
dpyinfo->grabbed = 0;
check_visibility = 1;
@@ -5802,7 +5802,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object icon)
return 1;
PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,
- (LPARAM) main_icon);
+ (LPARAM) main_icon);
/* If there is a small icon that goes with it, set that too. */
if (small_icon)
@@ -5955,37 +5955,37 @@ x_calc_absolute_position (struct frame *f)
list = Fw32_display_monitor_attributes_list (Qnil);
while (CONSP (list))
- {
- Lisp_Object attributes = CAR(list);
- Lisp_Object geometry;
- Lisp_Object monitor_left, monitor_top;
-
- list = CDR(list);
-
- geometry = Fassoc (Qgeometry, attributes);
- if (!NILP (geometry))
- {
- monitor_left = Fnth (make_number (1), geometry);
- monitor_top = Fnth (make_number (2), geometry);
-
- display_left = min (display_left, XINT (monitor_left));
- display_top = min (display_top, XINT (monitor_top));
- }
- }
+ {
+ Lisp_Object attributes = CAR(list);
+ Lisp_Object geometry;
+ Lisp_Object monitor_left, monitor_top;
+
+ list = CDR(list);
+
+ geometry = Fassoc (Qgeometry, attributes);
+ if (!NILP (geometry))
+ {
+ monitor_left = Fnth (make_number (1), geometry);
+ monitor_top = Fnth (make_number (2), geometry);
+
+ display_left = min (display_left, XINT (monitor_left));
+ display_top = min (display_top, XINT (monitor_top));
+ }
+ }
}
/* Treat negative positions as relative to the rightmost bottommost
position that fits on the screen. */
if (flags & XNegative)
f->left_pos = (x_display_pixel_width (FRAME_DISPLAY_INFO (f))
- + display_left
+ + display_left
- FRAME_PIXEL_WIDTH (f)
+ f->left_pos
- (left_right_borders_width - 1));
if (flags & YNegative)
f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
- + display_top
+ + display_top
- FRAME_PIXEL_HEIGHT (f)
+ f->top_pos
- (top_bottom_borders_height - 1));
@@ -6048,11 +6048,11 @@ w32fullscreen_hook (struct frame *f)
f->want_fullscreen &= ~FULLSCREEN_WAIT;
if (FRAME_PREV_FSMODE (f) == FULLSCREEN_NONE)
- GetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f));
+ GetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f));
if (FRAME_PREV_FSMODE (f) == FULLSCREEN_BOTH)
- {
- SetWindowLong (hwnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW);
+ {
+ SetWindowLong (hwnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW);
SetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f));
}
else if (FRAME_PREV_FSMODE (f) == FULLSCREEN_HEIGHT
@@ -6073,28 +6073,28 @@ w32fullscreen_hook (struct frame *f)
ShowWindow (hwnd, SW_MAXIMIZE);
}
else if (f->want_fullscreen == FULLSCREEN_BOTH)
- {
+ {
int menu_bar_height = GetSystemMetrics (SM_CYMENU);
w32_fullscreen_rect (hwnd, f->want_fullscreen,
FRAME_NORMAL_PLACEMENT (f).rcNormalPosition, &rect);
- SetWindowLong (hwnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW);
- SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top,
- SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
+ SetWindowLong (hwnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW);
+ SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top,
+ SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
change_frame_size
(f, FRAME_PIXEL_TO_TEXT_WIDTH (f, rect.right - rect.left),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, (rect.bottom - rect.top
- menu_bar_height)),
0, 1, 0, 1);
- }
+ }
else
- {
+ {
ShowWindow (hwnd, SW_SHOWNORMAL);
w32_fullscreen_rect (hwnd, f->want_fullscreen,
FRAME_NORMAL_PLACEMENT (f).rcNormalPosition, &rect);
- SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top, 0);
+ SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top, 0);
if (f->want_fullscreen == FULLSCREEN_WIDTH)
{
@@ -6118,7 +6118,7 @@ w32fullscreen_hook (struct frame *f)
- title_height - menu_bar_height)),
0, 1, 0, 1);
}
- }
+ }
f->want_fullscreen = FULLSCREEN_NONE;
unblock_input ();
@@ -6453,7 +6453,7 @@ x_make_frame_visible (struct frame *f)
set for minimized windows that are still visible, so use that to
determine the appropriate flag to pass ShowWindow. */
my_show_window (f, FRAME_W32_WINDOW (f),
- FRAME_ICONIFIED_P (f) ? SW_RESTORE : SW_SHOWNORMAL);
+ FRAME_ICONIFIED_P (f) ? SW_RESTORE : SW_SHOWNORMAL);
}
/* Synchronize to ensure Emacs knows the frame is visible
@@ -6475,7 +6475,7 @@ x_make_frame_visible (struct frame *f)
input_signal_count < count && !FRAME_VISIBLE_P (f);)
{
/* Force processing of queued events. */
- /* TODO: x_sync equivalent? */
+ /* TODO: x_sync equivalent? */
/* Machines that do polling rather than SIGIO have been observed
to go into a busy-wait here. So we'll fake an alarm signal
@@ -6749,26 +6749,26 @@ w32_make_rdb (char *xrm_option)
if (ch == '\n')
{
- *current++ = '\0';
- in_option = 1;
- before_value = 0;
+ *current++ = '\0';
+ in_option = 1;
+ before_value = 0;
}
else if (ch != ' ')
{
- *current++ = ch;
- if (in_option && (ch == ':'))
- {
- in_option = 0;
- before_value = 1;
- }
- else if (before_value)
- {
- before_value = 0;
- }
+ *current++ = ch;
+ if (in_option && (ch == ':'))
+ {
+ in_option = 0;
+ before_value = 1;
+ }
+ else if (before_value)
+ {
+ before_value = 0;
+ }
}
else if (!(in_option || before_value))
{
- *current++ = ch;
+ *current++ = ch;
}
} while (ch);
@@ -7051,8 +7051,8 @@ w32_initialize (void)
PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE);
hWindowsThread = CreateThread (NULL, 0,
- w32_msg_worker,
- 0, 0, &dwWindowsThreadId);
+ w32_msg_worker,
+ 0, 0, &dwWindowsThreadId);
GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
}
diff --git a/src/w32term.h b/src/w32term.h
index e29e993..a3e8021 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -73,7 +73,7 @@ struct w32_palette_entry {
extern void w32_regenerate_palette (struct frame *f);
extern void w32_fullscreen_rect (HWND hwnd, int fsmode, RECT normal,
- RECT *rect);
+ RECT *rect);
\f
/* For each display (currently only one on w32), we have a structure that
@@ -235,13 +235,13 @@ struct w32_display_info *x_display_info_for_name (Lisp_Object);
extern struct w32_display_info *w32_term_init (Lisp_Object,
char *, char *);
extern int w32_defined_color (struct frame *f, const char *color,
- XColor *color_def, bool alloc_p);
+ XColor *color_def, bool alloc_p);
extern int x_display_pixel_height (struct w32_display_info *);
extern int x_display_pixel_width (struct w32_display_info *);
extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *f,
- Lisp_Object value,
- Lisp_Object oldval);
+ Lisp_Object value,
+ Lisp_Object oldval);
extern void x_set_internal_border_width (struct frame *f,
Lisp_Object value,
Lisp_Object oldval);
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 960ee06..992bf61 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -92,8 +92,8 @@ uniscribe_list_family (struct frame *f)
dc = get_frame_dc (f);
EnumFontFamiliesEx (dc, &font_match_pattern,
- (FONTENUMPROC) add_opentype_font_name_to_list,
- (LPARAM) &list, 0);
+ (FONTENUMPROC) add_opentype_font_name_to_list,
+ (LPARAM) &list, 0);
release_frame_dc (f, dc);
return list;
@@ -228,7 +228,7 @@ uniscribe_shape (Lisp_Object lgstring)
{
/* lgstring can be bigger than the number of characters in it, in
the case where more glyphs are required to display those characters.
- If that is the case, note the real number of characters. */
+ If that is the case, note the real number of characters. */
if (NILP (LGSTRING_GLYPH (lgstring, i)))
nchars = i;
else
@@ -271,7 +271,7 @@ uniscribe_shape (Lisp_Object lgstring)
items[i].a.fLogicalOrder = 1;
/* Context may be NULL here, in which case the cache should be
- used without needing to select the font. */
+ used without needing to select the font. */
result = ScriptShape (context, &(uniscribe_font->cache),
chars + items[i].iCharPos, nchars_in_run,
max_glyphs - done_glyphs, &(items[i].a),
@@ -325,7 +325,7 @@ uniscribe_shape (Lisp_Object lgstring)
glyphs, nglyphs, attributes, &(items[i].a),
advances, offsets, &overall_metrics);
}
- if (SUCCEEDED (result))
+ if (SUCCEEDED (result))
{
int j, from, to, adj_offset = 0;
@@ -540,52 +540,52 @@ uniscribe_encode_char (struct font *font, int c)
if (SUCCEEDED (ScriptItemize (ch, len, 2, NULL, NULL, items, &nitems)))
{
HRESULT result;
- /* Surrogates seem to need 2 here, even though only one glyph is
+ /* Surrogates seem to need 2 here, even though only one glyph is
returned. Indic characters can also produce 2 or more glyphs for
a single code point, but they need to use uniscribe_shape
above for correct display. */
- WORD glyphs[2], clusters[2];
- SCRIPT_VISATTR attrs[2];
- int nglyphs;
+ WORD glyphs[2], clusters[2];
+ SCRIPT_VISATTR attrs[2];
+ int nglyphs;
/* Force ScriptShape to generate glyphs in the logical
order. */
items[0].a.fLogicalOrder = 1;
- result = ScriptShape (context, &(uniscribe_font->cache),
- ch, len, 2, &(items[0].a),
- glyphs, clusters, attrs, &nglyphs);
-
- if (result == E_PENDING)
- {
- /* Use selected frame until API is updated to pass
- the frame. */
- f = XFRAME (selected_frame);
- context = get_frame_dc (f);
- old_font = SelectObject (context, FONT_HANDLE (font));
- result = ScriptShape (context, &(uniscribe_font->cache),
- ch, len, 2, &(items[0].a),
- glyphs, clusters, attrs, &nglyphs);
- }
-
- if (SUCCEEDED (result) && nglyphs == 1)
- {
+ result = ScriptShape (context, &(uniscribe_font->cache),
+ ch, len, 2, &(items[0].a),
+ glyphs, clusters, attrs, &nglyphs);
+
+ if (result == E_PENDING)
+ {
+ /* Use selected frame until API is updated to pass
+ the frame. */
+ f = XFRAME (selected_frame);
+ context = get_frame_dc (f);
+ old_font = SelectObject (context, FONT_HANDLE (font));
+ result = ScriptShape (context, &(uniscribe_font->cache),
+ ch, len, 2, &(items[0].a),
+ glyphs, clusters, attrs, &nglyphs);
+ }
+
+ if (SUCCEEDED (result) && nglyphs == 1)
+ {
/* Some fonts return .notdef glyphs instead of failing.
- (TrueType spec reserves glyph code 0 for .notdef) */
+ (TrueType spec reserves glyph code 0 for .notdef) */
if (glyphs[0])
code = glyphs[0];
- }
- else if (SUCCEEDED (result) || result == E_OUTOFMEMORY)
- {
- /* This character produces zero or more than one glyph
- when shaped. But we still need the return from here
- to be valid for the shaping engine to be invoked
- later. */
- result = ScriptGetCMap (context, &(uniscribe_font->cache),
- ch, len, 0, glyphs);
- if (SUCCEEDED (result) && glyphs[0])
- code = glyphs[0];
- }
+ }
+ else if (SUCCEEDED (result) || result == E_OUTOFMEMORY)
+ {
+ /* This character produces zero or more than one glyph
+ when shaped. But we still need the return from here
+ to be valid for the shaping engine to be invoked
+ later. */
+ result = ScriptGetCMap (context, &(uniscribe_font->cache),
+ ch, len, 0, glyphs);
+ if (SUCCEEDED (result) && glyphs[0])
+ code = glyphs[0];
+ }
}
}
if (context)
@@ -603,18 +603,18 @@ uniscribe_encode_char (struct font *font, int c)
void uniscribe_free_entity (Lisp_Object font_entity);
int uniscribe_has_char (Lisp_Object entity, int c);
void uniscribe_text_extents (struct font *font, unsigned *code,
- int nglyphs, struct font_metrics *metrics);
+ int nglyphs, struct font_metrics *metrics);
int uniscribe_draw (struct glyph_string *s, int from, int to,
- int x, int y, int with_background);
+ int x, int y, int with_background);
Unused:
int uniscribe_prepare_face (struct frame *f, struct face *face);
void uniscribe_done_face (struct frame *f, struct face *face);
int uniscribe_get_bitmap (struct font *font, unsigned code,
- struct font_bitmap *bitmap, int bits_per_pixel);
+ struct font_bitmap *bitmap, int bits_per_pixel);
void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap);
int uniscribe_anchor_point (struct font *font, unsigned code,
- int index, int *x, int *y);
+ int index, int *x, int *y);
int uniscribe_start_for_frame (struct frame *f);
int uniscribe_end_for_frame (struct frame *f);
diff --git a/src/w32xfns.c b/src/w32xfns.c
index b5b22c9..c912e83 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -228,45 +228,45 @@ get_next_msg (W32Msg * lpmsg, BOOL bWait)
nQueue--;
/* Consolidate WM_PAINT messages to optimize redrawing. */
if (lpmsg->msg.message == WM_PAINT && nQueue)
- {
- int_msg * lpCur = lpHead;
- int_msg * lpPrev = NULL;
- int_msg * lpNext = NULL;
-
- while (lpCur && nQueue)
- {
- lpNext = lpCur->lpNext;
- if (lpCur->w32msg.msg.message == WM_PAINT)
- {
- /* Remove this message from the queue. */
- if (lpPrev)
- lpPrev->lpNext = lpNext;
- else
- lpHead = lpNext;
-
- if (lpCur == lpTail)
- lpTail = lpPrev;
-
- /* Adjust clip rectangle to cover both. */
- if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect),
- &(lpCur->w32msg.rect)))
- {
- SetRectEmpty (&(lpmsg->rect));
- }
-
- myfree (lpCur);
-
- nQueue--;
-
- lpCur = lpNext;
- }
- else
- {
- lpPrev = lpCur;
- lpCur = lpNext;
- }
- }
- }
+ {
+ int_msg * lpCur = lpHead;
+ int_msg * lpPrev = NULL;
+ int_msg * lpNext = NULL;
+
+ while (lpCur && nQueue)
+ {
+ lpNext = lpCur->lpNext;
+ if (lpCur->w32msg.msg.message == WM_PAINT)
+ {
+ /* Remove this message from the queue. */
+ if (lpPrev)
+ lpPrev->lpNext = lpNext;
+ else
+ lpHead = lpNext;
+
+ if (lpCur == lpTail)
+ lpTail = lpPrev;
+
+ /* Adjust clip rectangle to cover both. */
+ if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect),
+ &(lpCur->w32msg.rect)))
+ {
+ SetRectEmpty (&(lpmsg->rect));
+ }
+
+ myfree (lpCur);
+
+ nQueue--;
+
+ lpCur = lpNext;
+ }
+ else
+ {
+ lpPrev = lpCur;
+ lpCur = lpNext;
+ }
+ }
+ }
bRet = TRUE;
}
diff --git a/src/widget.c b/src/widget.c
index 97b4196..46ba22e 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -364,9 +364,9 @@ EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
static void
resize_cb (Widget widget,
- XtPointer closure,
- XEvent* event,
- Boolean* continue_to_dispatch)
+ XtPointer closure,
+ XEvent* event,
+ Boolean* continue_to_dispatch)
{
EmacsFrameResize (widget);
}
diff --git a/src/window.c b/src/window.c
index 6cfba08..7116000 100644
--- a/src/window.c
+++ b/src/window.c
@@ -50,7 +50,7 @@ static void window_scroll_pixel_based (Lisp_Object, int, bool, bool);
static void window_scroll_line_based (Lisp_Object, int, bool, bool);
static void foreach_window (struct frame *,
bool (* fn) (struct window *, void *),
- void *);
+ void *);
static bool foreach_window_1 (struct window *,
bool (* fn) (struct window *, void *),
void *);
@@ -1639,10 +1639,10 @@ if it isn't already recorded. */)
}
/* In case W->start is out of the range, use something
- reasonable. This situation occurred when loading a file with
- `-l' containing a call to `rmail' with subsequent other
- commands. At the end, W->start happened to be BEG, while
- rmail had already narrowed the buffer. */
+ reasonable. This situation occurred when loading a file with
+ `-l' containing a call to `rmail' with subsequent other
+ commands. At the end, W->start happened to be BEG, while
+ rmail had already narrowed the buffer. */
CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
itdata = bidi_shelve_cache ();
@@ -2321,9 +2321,9 @@ window_list (void)
ALL_FRAMES t means search all frames,
nil means search just current frame,
`visible' means search just visible frames on the
- current terminal,
+ current terminal,
0 means search visible and iconified frames on the
- current terminal,
+ current terminal,
a window means search the frame that window belongs to,
a frame means consider windows on that frame, only. */
@@ -2338,11 +2338,11 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow,
if (!BUFFERP (w->contents))
candidate_p = false;
else if (MINI_WINDOW_P (w)
- && (EQ (minibuf, Qlambda)
+ && (EQ (minibuf, Qlambda)
|| (WINDOWP (minibuf) && !EQ (minibuf, window))))
{
/* If MINIBUF is `lambda' don't consider any mini-windows.
- If it is a window, consider only that one. */
+ If it is a window, consider only that one. */
candidate_p = false;
}
else if (EQ (all_frames, Qt))
@@ -2667,9 +2667,9 @@ be listed first but no error is signaled. */)
/* Look at all windows, performing an operation specified by TYPE
with argument OBJ.
If FRAMES is Qt, look at all frames;
- Qnil, look at just the selected frame;
+ Qnil, look at just the selected frame;
Qvisible, look at visible frames;
- a frame, just look at windows on that frame.
+ a frame, just look at windows on that frame.
If MINI, perform the operation on minibuffer windows too. */
enum window_loop
@@ -3552,21 +3552,21 @@ temp_output_buffer_show (register Lisp_Object buf)
/* Run temp-buffer-show-hook, with the chosen window selected
and its buffer current. */
{
- ptrdiff_t count = SPECPDL_INDEX ();
- Lisp_Object prev_window, prev_buffer;
- prev_window = selected_window;
- XSETBUFFER (prev_buffer, old);
-
- /* Select the window that was chosen, for running the hook.
- Note: Both Fselect_window and select_window_norecord may
- set-buffer to the buffer displayed in the window,
- so we need to save the current buffer. --stef */
- record_unwind_protect (restore_buffer, prev_buffer);
- record_unwind_protect (select_window_norecord, prev_window);
- Fselect_window (window, Qt);
- Fset_buffer (w->contents);
- run_hook (Qtemp_buffer_show_hook);
- unbind_to (count, Qnil);
+ ptrdiff_t count = SPECPDL_INDEX ();
+ Lisp_Object prev_window, prev_buffer;
+ prev_window = selected_window;
+ XSETBUFFER (prev_buffer, old);
+
+ /* Select the window that was chosen, for running the hook.
+ Note: Both Fselect_window and select_window_norecord may
+ set-buffer to the buffer displayed in the window,
+ so we need to save the current buffer. --stef */
+ record_unwind_protect (restore_buffer, prev_buffer);
+ record_unwind_protect (select_window_norecord, prev_window);
+ Fselect_window (window, Qt);
+ Fset_buffer (w->contents);
+ run_hook (Qtemp_buffer_show_hook);
+ unbind_to (count, Qnil);
}
}
}
@@ -4954,7 +4954,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
dy) * n;
/* Note that move_it_vertically always moves the iterator to the
- start of a line. So, if the last line doesn't have a newline,
+ start of a line. So, if the last line doesn't have a newline,
we would end up at the start of the line ending at ZV. */
if (dy <= 0)
{
@@ -5080,7 +5080,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
if (IT_CHARPOS (it) == PT
&& it.current_y >= this_scroll_margin
&& it.current_y <= last_y - WINDOW_HEADER_LINE_HEIGHT (w)
- && (NILP (Vscroll_preserve_screen_position)
+ && (NILP (Vscroll_preserve_screen_position)
|| EQ (Vscroll_preserve_screen_position, Qt)))
/* We found PT at a legitimate height. Leave it alone. */
;
@@ -5168,7 +5168,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
}
if (charpos == PT && !partial_p
- && (NILP (Vscroll_preserve_screen_position)
+ && (NILP (Vscroll_preserve_screen_position)
|| EQ (Vscroll_preserve_screen_position, Qt)))
/* We found PT before we found the display margin, so PT is ok. */
;
@@ -5488,7 +5488,7 @@ specifies the window. This takes precedence over
if (EQ (window, selected_window))
/* That didn't get us anywhere; look for a window on another
- visible frame. */
+ visible frame. */
do
window = Fnext_window (window, Qnil, Qt);
while (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (window))))
@@ -7494,8 +7494,8 @@ pixelwise even if this option is nil. */);
window_resize_pixelwise = false;
DEFVAR_BOOL ("fast-but-imprecise-scrolling",
- Vfast_but_imprecise_scrolling,
- doc: /* When non-nil, accelerate scrolling operations.
+ Vfast_but_imprecise_scrolling,
+ doc: /* When non-nil, accelerate scrolling operations.
This comes into play when scrolling rapidly over previously
unfontified buffer regions. Only those portions of the buffer which
are actually going to be displayed get fontified.
diff --git a/src/window.h b/src/window.h
index 717f972..01d7daa 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1031,7 +1031,7 @@ extern Lisp_Object minibuf_selected_window;
extern Lisp_Object make_window (void);
extern Lisp_Object window_from_coordinates (struct frame *, int, int,
- enum window_part *, bool);
+ enum window_part *, bool);
extern void resize_frame_windows (struct frame *, int, bool, bool);
extern void restore_window_configuration (Lisp_Object);
extern void delete_all_child_windows (Lisp_Object);
@@ -1045,7 +1045,7 @@ void run_window_size_change_functions (Lisp_Object);
to run hooks. See make_frame for a case where it's not allowed. */
void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
- bool run_hooks_p, bool keep_margins_p);
+ bool run_hooks_p, bool keep_margins_p);
/* This is the window where the echo area message was displayed. It
is always a minibuffer window, but it may not be the same window
diff --git a/src/xdisp.c b/src/xdisp.c
index 5de5eca..7882c03 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -50,10 +50,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+----------------------------------+ |
Don't use this path when called |
asynchronously! |
- |
- expose_window (asynchronous) |
- |
- X expose events -----+
+ |
+ expose_window (asynchronous) |
+ |
+ X expose events -----+
What does redisplay do? Obviously, it has to figure out somehow what
has been changed since the last time the display has been updated,
@@ -844,7 +844,7 @@ static void display_menu_bar (struct window *);
static ptrdiff_t display_count_lines (ptrdiff_t, ptrdiff_t, ptrdiff_t,
ptrdiff_t *);
static int display_string (const char *, Lisp_Object, Lisp_Object,
- ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int);
+ ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int);
static void compute_line_metrics (struct it *);
static void run_redisplay_end_trigger_hook (struct it *);
static bool get_overlay_strings (struct it *, ptrdiff_t);
@@ -872,8 +872,8 @@ static ptrdiff_t next_overlay_change (ptrdiff_t);
static int handle_display_spec (struct it *, Lisp_Object, Lisp_Object,
Lisp_Object, struct text_pos *, ptrdiff_t, bool);
static int handle_single_display_spec (struct it *, Lisp_Object,
- Lisp_Object, Lisp_Object,
- struct text_pos *, ptrdiff_t, int, bool);
+ Lisp_Object, Lisp_Object,
+ struct text_pos *, ptrdiff_t, int, bool);
static int underlying_face_id (struct it *);
#define face_before_it_pos(IT) face_before_or_after_it_pos (IT, true)
@@ -884,13 +884,13 @@ static int underlying_face_id (struct it *);
static void update_tool_bar (struct frame *, bool);
static void x_draw_bottom_divider (struct window *w);
static void notice_overwritten_cursor (struct window *,
- enum glyph_row_area,
- int, int, int, int);
+ enum glyph_row_area,
+ int, int, int, int);
static int normal_char_height (struct font *, int);
static void normal_char_ascent_descent (struct font *, int, int *, int *);
static void append_stretch_glyph (struct it *, Lisp_Object,
- int, int, int);
+ int, int, int);
static Lisp_Object get_it_property (struct it *, Lisp_Object);
static Lisp_Object calc_line_height_property (struct it *, Lisp_Object,
@@ -1645,10 +1645,10 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
window_hscroll_limited (w, WINDOW_XFRAME (w))
* WINDOW_FRAME_COLUMN_WIDTH (w);
/* For lines in an R2L paragraph, we need to mirror the X pixel
- coordinate wrt the text area. For the reasons, see the
- commentary in buffer_posn_from_coords and the explanation of
- the geometry used by the move_it_* functions at the end of
- the large commentary near the beginning of this file. */
+ coordinate wrt the text area. For the reasons, see the
+ commentary in buffer_posn_from_coords and the explanation of
+ the geometry used by the move_it_* functions at the end of
+ the large commentary near the beginning of this file. */
if (r2l)
*x = window_box_width (w, TEXT_AREA) - *x - 1;
}
@@ -3491,7 +3491,7 @@ compute_stop_pos (struct it *it)
it->stop_charpos = pos;
/* Set up variables for computing the stop position from text
- property changes. */
+ property changes. */
XSETBUFFER (object, current_buffer);
limit = make_number (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT);
}
@@ -4415,10 +4415,10 @@ handle_invisible_prop (struct it *it)
if (invis != 0)
tem = next_stop;
- /* If there are adjacent invisible texts, don't lose the
- second one's ellipsis. */
- if (invis == 2)
- display_ellipsis_p = true;
+ /* If there are adjacent invisible texts, don't lose the
+ second one's ellipsis. */
+ if (invis == 2)
+ display_ellipsis_p = true;
}
while (invis != 0);
@@ -4506,19 +4506,19 @@ handle_invisible_prop (struct it *it)
}
if (display_ellipsis_p)
- {
- /* Make sure that the glyphs of the ellipsis will get
- correct `charpos' values. If we would not update
- it->position here, the glyphs would belong to the
- last visible character _before_ the invisible
- text, which confuses `set_cursor_from_row'.
-
- We use the last invisible position instead of the
- first because this way the cursor is always drawn on
- the first "." of the ellipsis, whenever PT is inside
- the invisible text. Otherwise the cursor would be
- placed _after_ the ellipsis when the point is after the
- first invisible character. */
+ {
+ /* Make sure that the glyphs of the ellipsis will get
+ correct `charpos' values. If we would not update
+ it->position here, the glyphs would belong to the
+ last visible character _before_ the invisible
+ text, which confuses `set_cursor_from_row'.
+
+ We use the last invisible position instead of the
+ first because this way the cursor is always drawn on
+ the first "." of the ellipsis, whenever PT is inside
+ the invisible text. Otherwise the cursor would be
+ placed _after_ the ellipsis when the point is after the
+ first invisible character. */
if (!STRINGP (it->object))
{
it->position.charpos = newpos - 1;
@@ -4556,13 +4556,13 @@ handle_invisible_prop (struct it *it)
}
}
else if (display_ellipsis_p)
- {
+ {
it->ellipsis_p = true;
/* Let the ellipsis display before
considering any properties of the following char.
Fixes jasonr@gnu.org 01 Oct 07 bug. */
handled = HANDLED_RETURN;
- }
+ }
}
}
@@ -5151,8 +5151,8 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|| ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
&& valid_image_p (value))
#endif /* not HAVE_WINDOW_SYSTEM */
- || (CONSP (value) && EQ (XCAR (value), Qspace))
- || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
+ || (CONSP (value) && EQ (XCAR (value), Qspace))
+ || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
&& valid_xwidget_spec_p (value)));
if (valid_p && display_replaced == 0)
@@ -5230,12 +5230,12 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
}
else if (valid_xwidget_spec_p (value))
{
- it->what = IT_XWIDGET;
- it->method = GET_FROM_XWIDGET;
- it->position = start_pos;
+ it->what = IT_XWIDGET;
+ it->method = GET_FROM_XWIDGET;
+ it->position = start_pos;
it->object = NILP (object) ? it->w->contents : object;
*position = start_pos;
- it->xwidget = lookup_xwidget (value);
+ it->xwidget = lookup_xwidget (value);
}
#ifdef HAVE_WINDOW_SYSTEM
else
@@ -5600,7 +5600,7 @@ next_overlay_string (struct it *it)
load_overlay_strings (it, it->overlay_strings_charpos);
/* Initialize IT to deliver display elements from the overlay
- string. */
+ string. */
it->string = it->overlay_strings[i];
it->multibyte_p = STRING_MULTIBYTE (it->string);
SET_TEXT_POS (it->current.string_pos, 0, 0);
@@ -5883,13 +5883,13 @@ get_overlay_strings_1 (struct it *it, ptrdiff_t charpos, bool compute_stop_p)
eassert (!compute_stop_p || it->sp == 0);
/* When called from handle_stop, there might be an empty display
- string loaded. In that case, don't bother saving it. But
- don't use this optimization with the bidi iterator, since we
- need the corresponding pop_it call to resync the bidi
- iterator's position with IT's position, after we are done
- with the overlay strings. (The corresponding call to pop_it
- in case of an empty display string is in
- next_overlay_string.) */
+ string loaded. In that case, don't bother saving it. But
+ don't use this optimization with the bidi iterator, since we
+ need the corresponding pop_it call to resync the bidi
+ iterator's position with IT's position, after we are done
+ with the overlay strings. (The corresponding call to pop_it
+ in case of an empty display string is in
+ next_overlay_string.) */
if (!(!it->bidi_p
&& STRINGP (it->string) && !SCHARS (it->string)))
push_it (it, NULL);
@@ -7485,7 +7485,7 @@ set_iterator_to_next (struct it *it, bool reseat_p)
++it->current.dpvec_index;
/* Restore face of the iterator to what they were before the
- display vector entry (these entries may contain faces). */
+ display vector entry (these entries may contain faces). */
it->face_id = it->saved_face_id;
if (it->dpvec + it->current.dpvec_index >= it->dpend)
@@ -7684,7 +7684,7 @@ set_iterator_to_next (struct it *it, bool reseat_p)
/* The position etc with which we have to proceed are on
the stack. The position may be at the end of a string,
- if the `display' property takes up the whole string. */
+ if the `display' property takes up the whole string. */
eassert (it->sp > 0);
pop_it (it);
if (it->method == GET_FROM_STRING)
@@ -8670,9 +8670,9 @@ move_it_in_display_line_to (struct it *it,
}
/* Stop when ZV reached.
- We used to stop here when TO_CHARPOS reached as well, but that is
- too soon if this glyph does not fit on this line. So we handle it
- explicitly below. */
+ We used to stop here when TO_CHARPOS reached as well, but that is
+ too soon if this glyph does not fit on this line. So we handle it
+ explicitly below. */
if (!get_next_display_element (it))
{
result = MOVE_POS_MATCH_OR_ZV;
@@ -9783,7 +9783,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos)
/* Start at the beginning of the screen line containing IT's
position. This may actually move vertically backwards,
- in case of overlays, so adjust dvpos accordingly. */
+ in case of overlays, so adjust dvpos accordingly. */
dvpos += it->vpos;
move_it_vertically_backward (it, 0);
dvpos -= it->vpos;
@@ -9994,7 +9994,7 @@ include the height of both, if present, in the return value. */)
MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
/* Don't return more than X-LIMIT. */
if (x > max_x)
- x = max_x;
+ x = max_x;
}
/* Subtract height of header-line which was counted automatically by
@@ -10117,7 +10117,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
oldbuf = current_buffer;
/* Ensure the Messages buffer exists, and switch to it.
- If we created it, set the major-mode. */
+ If we created it, set the major-mode. */
bool newbuffer = NILP (Fget_buffer (Vmessages_buffer_name));
Fset_buffer (Fget_buffer_create (Vmessages_buffer_name));
if (newbuffer
@@ -10203,7 +10203,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
prev_bol_byte = PT_BYTE;
dups = message_log_check_duplicate (prev_bol_byte,
- this_bol_byte);
+ this_bol_byte);
if (dups)
{
del_range_both (prev_bol, prev_bol_byte,
@@ -10252,7 +10252,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
TEMP_SET_PT_BOTH (Z, Z_BYTE);
else
/* We can't do Fgoto_char (oldpoint) because it will run some
- Lisp code. */
+ Lisp code. */
TEMP_SET_PT_BOTH (marker_position (oldpoint),
marker_byte_position (oldpoint));
@@ -11351,7 +11351,7 @@ clear_garbaged_frames (void)
fset_redisplay (f);
f->garbaged = false;
f->resized_p = false;
- }
+ }
}
frame_garbaged = false;
@@ -11414,7 +11414,7 @@ echo_area_display (bool update_frame_p)
if (window_height_changed_p
/* Don't do this if Emacs is shutting down. Redisplay
- needs to run hooks. */
+ needs to run hooks. */
&& !NILP (Vrun_hooks))
{
/* Must update other windows. Likewise as in other
@@ -12002,11 +12002,11 @@ update_menu_bar (struct frame *f, bool save_match_data, bool hooks_run)
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
|| defined (HAVE_NS) || defined (USE_GTK)
if (FRAME_WINDOW_P (f))
- {
+ {
#if defined (HAVE_NS)
- /* All frames on Mac OS share the same menubar. So only
- the selected frame should be allowed to set it. */
- if (f == SELECTED_FRAME ())
+ /* All frames on Mac OS share the same menubar. So only
+ the selected frame should be allowed to set it. */
+ if (f == SELECTED_FRAME ())
#endif
set_frame_menubar (f, false, false);
}
@@ -12086,7 +12086,7 @@ update_tool_bar (struct frame *f, bool save_match_data)
struct buffer *prev = current_buffer;
ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object frame, new_tool_bar;
- int new_n_tool_bar;
+ int new_n_tool_bar;
/* Set current_buffer to the buffer of the selected
window of the frame, so that we get the right local
@@ -12117,23 +12117,23 @@ update_tool_bar (struct frame *f, bool save_match_data)
fast_set_selected_frame (frame);
/* Build desired tool-bar items from keymaps. */
- new_tool_bar
+ new_tool_bar
= tool_bar_items (Fcopy_sequence (f->tool_bar_items),
&new_n_tool_bar);
/* Redisplay the tool-bar if we changed it. */
if (new_n_tool_bar != f->n_tool_bar_items
|| NILP (Fequal (new_tool_bar, f->tool_bar_items)))
- {
- /* Redisplay that happens asynchronously due to an expose event
- may access f->tool_bar_items. Make sure we update both
- variables within BLOCK_INPUT so no such event interrupts. */
- block_input ();
- fset_tool_bar_items (f, new_tool_bar);
- f->n_tool_bar_items = new_n_tool_bar;
- w->update_mode_line = true;
- unblock_input ();
- }
+ {
+ /* Redisplay that happens asynchronously due to an expose event
+ may access f->tool_bar_items. Make sure we update both
+ variables within BLOCK_INPUT so no such event interrupts. */
+ block_input ();
+ fset_tool_bar_items (f, new_tool_bar);
+ f->n_tool_bar_items = new_n_tool_bar;
+ w->update_mode_line = true;
+ unblock_input ();
+ }
unbind_to (count, Qnil);
set_buffer_internal_1 (prev);
@@ -12289,8 +12289,8 @@ build_desired_tool_bar_string (struct frame *f)
make_number (i * TOOL_BAR_ITEM_NSLOTS));
/* Let the last image hide all remaining spaces in the tool bar
- string. The string can be longer than needed when we reuse a
- previous string. */
+ string. The string can be longer than needed when we reuse a
+ previous string. */
if (i + 1 == f->n_tool_bar_items)
end = SCHARS (f->desired_tool_bar_string);
else
@@ -12529,7 +12529,7 @@ redisplay_tool_bar (struct frame *f)
can turn off tool-bars by specifying tool-bar-lines zero. */
if (!WINDOWP (f->tool_bar_window)
|| (w = XWINDOW (f->tool_bar_window),
- WINDOW_TOTAL_LINES (w) == 0))
+ WINDOW_TOTAL_LINES (w) == 0))
return false;
/* Set up an iterator for the tool-bar window. */
@@ -13451,7 +13451,7 @@ check_point_in_composition (struct buffer *prev_buf, ptrdiff_t prev_pt,
&& composition_valid_p (start, end, prop)
&& start < prev_pt && end > prev_pt)
/* The last point was within the composition. Return true iff
- point moved out of the composition. */
+ point moved out of the composition. */
return (pt <= start || pt >= end);
}
@@ -13746,7 +13746,7 @@ redisplay_internal (void)
}
/* Resized active mini-window to fit the size of what it is
- showing if its contents might have changed. */
+ showing if its contents might have changed. */
must_finish = true;
/* If window configuration was changed, frames may have been
@@ -13853,15 +13853,15 @@ redisplay_internal (void)
display_line (&it);
/* If line contains point, is not continued,
- and ends at same distance from eob as before, we win. */
+ and ends at same distance from eob as before, we win. */
if (w->cursor.vpos >= 0
- /* Line is not continued, otherwise this_line_start_pos
- would have been set to 0 in display_line. */
+ /* Line is not continued, otherwise this_line_start_pos
+ would have been set to 0 in display_line. */
&& CHARPOS (this_line_start_pos)
/* Line ends as before. */
&& CHARPOS (this_line_end_pos) == CHARPOS (tlendpos)
- /* Line has same height as before. Otherwise other lines
- would have to be shifted up or down. */
+ /* Line has same height as before. Otherwise other lines
+ would have to be shifted up or down. */
&& this_line_pixel_height == line_height_before)
{
/* If this is not the window's last line, we must adjust
@@ -14064,12 +14064,12 @@ redisplay_internal (void)
if (!f->already_hscrolled_p)
{
f->already_hscrolled_p = true;
- if (hscroll_retries <= MAX_HSCROLL_RETRIES
- && hscroll_windows (f->root_window))
- {
- hscroll_retries++;
- goto retry_frame;
- }
+ if (hscroll_retries <= MAX_HSCROLL_RETRIES
+ && hscroll_windows (f->root_window))
+ {
+ hscroll_retries++;
+ goto retry_frame;
+ }
}
/* If the frame's redisplay flag was not set before
@@ -14084,23 +14084,23 @@ redisplay_internal (void)
use them in update_frame will segfault.
Therefore, we must redisplay this frame. */
if (!f_redisplay_flag && f->redisplay)
- goto retry_frame;
+ goto retry_frame;
- /* In some case (e.g., window resize), we notice
- only during window updating that the window
- content changed unpredictably (e.g., a GTK
- scrollbar moved) and that our previous estimation
- of the frame content was garbage. We have to
- start over. These cases should be rare, so going
- all the way back to the top of redisplay should
- be good enough.
+ /* In some case (e.g., window resize), we notice
+ only during window updating that the window
+ content changed unpredictably (e.g., a GTK
+ scrollbar moved) and that our previous estimation
+ of the frame content was garbage. We have to
+ start over. These cases should be rare, so going
+ all the way back to the top of redisplay should
+ be good enough.
- Why FRAME_WINDOW_P? See
- https://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00957.html
+ Why FRAME_WINDOW_P? See
+ https://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00957.html
- */
- if (FRAME_GARBAGED_P (f) && FRAME_WINDOW_P (f))
- goto retry;
+ */
+ if (FRAME_GARBAGED_P (f) && FRAME_WINDOW_P (f))
+ goto retry;
/* Prevent various kinds of signals during display
update. stdio is not robust about handling
@@ -14126,14 +14126,14 @@ redisplay_internal (void)
FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
- if (f->updated_p)
- {
+ if (f->updated_p)
+ {
f->redisplay = false;
f->garbaged = false;
- mark_window_display_accurate (f->root_window, true);
- if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
- FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
- }
+ mark_window_display_accurate (f->root_window, true);
+ if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
+ FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
+ }
}
}
}
@@ -14184,12 +14184,12 @@ redisplay_internal (void)
if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
{
- if (hscroll_retries <= MAX_HSCROLL_RETRIES
- && hscroll_windows (selected_window))
- {
- hscroll_retries++;
- goto retry;
- }
+ if (hscroll_retries <= MAX_HSCROLL_RETRIES
+ && hscroll_windows (selected_window))
+ {
+ hscroll_retries++;
+ goto retry;
+ }
XWINDOW (selected_window)->must_be_updated_p = true;
pending = update_frame (sf, false, false);
@@ -14209,12 +14209,12 @@ redisplay_internal (void)
XWINDOW (mini_window)->must_be_updated_p = true;
pending |= update_frame (mini_frame, false, false);
mini_frame->cursor_type_changed = false;
- if (!pending && hscroll_retries <= MAX_HSCROLL_RETRIES
- && hscroll_windows (mini_window))
- {
- hscroll_retries++;
- goto retry;
- }
+ if (!pending && hscroll_retries <= MAX_HSCROLL_RETRIES
+ && hscroll_windows (mini_window))
+ {
+ hscroll_retries++;
+ goto retry;
+ }
}
}
@@ -14506,11 +14506,11 @@ unblock_buffer_flips (void)
Lisp_Object tail, frame;
block_input ();
FOR_EACH_FRAME (tail, frame)
- {
- struct frame *f = XFRAME (frame);
- if (FRAME_TERMINAL (f)->buffer_flipping_unblocked_hook)
- (*FRAME_TERMINAL (f)->buffer_flipping_unblocked_hook) (f);
- }
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_TERMINAL (f)->buffer_flipping_unblocked_hook)
+ (*FRAME_TERMINAL (f)->buffer_flipping_unblocked_hook) (f);
+ }
unblock_input ();
}
}
@@ -15528,7 +15528,7 @@ try_scrolling (Lisp_Object window, bool just_this_one_p,
int y_offset = 0;
/* See if point is inside the scroll margin at the top of the
- window. */
+ window. */
if (this_scroll_margin)
{
int y_start;
@@ -15689,10 +15689,10 @@ compute_window_start_on_continuation_line (struct window *w)
reseat_at_previous_visible_line_start (&it);
/* If the line start is "too far" away from the window start,
- say it takes too much time to compute a new window start.
- Also, give up if the line start is after point, as in that
- case point will not be visible with any window start we
- compute. */
+ say it takes too much time to compute a new window start.
+ Also, give up if the line start is after point, as in that
+ case point will not be visible with any window start we
+ compute. */
if (IT_CHARPOS (it) <= PT
|| (CHARPOS (start_pos) - IT_CHARPOS (it)
/* PXW: Do we need upper bounds here? */
@@ -16464,14 +16464,14 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
if (! disptab_matches_widthtab
(disptab, XVECTOR (BVAR (current_buffer, width_table))))
- {
+ {
struct buffer *buf = current_buffer;
if (buf->base_buffer)
buf = buf->base_buffer;
- invalidate_region_cache (buf, buf->width_run_cache, BEG, Z);
- recompute_width_table (current_buffer, disptab);
- }
+ invalidate_region_cache (buf, buf->width_run_cache, BEG, Z);
+ recompute_width_table (current_buffer, disptab);
+ }
}
/* If window-start is screwed up, choose a new one. */
@@ -16810,7 +16810,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
#endif
/* Try to redisplay starting at same place as before.
- If point has not moved off frame, accept the results. */
+ If point has not moved off frame, accept the results. */
if (!current_matrix_up_to_date_p
/* Don't use try_window_reusing_current_matrix in this case
because a window scroll function can have changed the
@@ -17261,14 +17261,14 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
#endif
}
else
- redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0;
+ redisplay_menu_p = FRAME_MENU_BAR_LINES (f) > 0;
if (redisplay_menu_p)
- display_menu_bar (w);
+ display_menu_bar (w);
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
- {
+ {
#if defined (USE_GTK) || defined (HAVE_NS)
if (FRAME_EXTERNAL_TOOL_BAR (f))
redisplay_tool_bar (f);
@@ -17279,7 +17279,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
&& redisplay_tool_bar (f))
ignore_mouse_drag_p = true;
#endif
- }
+ }
x_consider_frame_title (w->frame);
#endif
}
@@ -17328,7 +17328,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
/* Note that we actually used the scroll bar attached to this
window, so it shouldn't be deleted at the end of redisplay. */
if (FRAME_TERMINAL (f)->redeem_scroll_bar_hook)
- (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w);
+ (*FRAME_TERMINAL (f)->redeem_scroll_bar_hook) (w);
}
/* Restore current_buffer and value of point in it. The window
@@ -17525,7 +17525,7 @@ try_window_reusing_current_matrix (struct window *w)
/* Display up to a row that can be reused. The variable
last_text_row is set to the last row displayed that displays
text. Note that it.vpos == 0 if or if not there is a
- header-line; it's not the same as the MATRIX_ROW_VPOS! */
+ header-line; it's not the same as the MATRIX_ROW_VPOS! */
start_display (&it, w, new_start);
w->cursor.vpos = -1;
last_text_row = last_reused_text_row = NULL;
@@ -17708,9 +17708,9 @@ try_window_reusing_current_matrix (struct window *w)
return false;
/* We can reuse fully visible rows beginning with
- first_reusable_row to the end of the window. Set
- first_row_to_display to the first row that cannot be reused.
- Set pt_row to the row containing point, if there is any. */
+ first_reusable_row to the end of the window. Set
+ first_row_to_display to the first row that cannot be reused.
+ Set pt_row to the row containing point, if there is any. */
pt_row = NULL;
for (first_row_to_display = first_reusable_row;
MATRIX_ROW_BOTTOM_Y (first_row_to_display) < yb;
@@ -17736,8 +17736,8 @@ try_window_reusing_current_matrix (struct window *w)
+ WINDOW_HEADER_LINE_HEIGHT (w));
/* Display lines beginning with first_row_to_display in the
- desired matrix. Set last_text_row to the last row displayed
- that displays text. */
+ desired matrix. Set last_text_row to the last row displayed
+ that displays text. */
it.glyph_row = MATRIX_ROW (w->desired_matrix, it.vpos);
if (pt_row == NULL)
w->cursor.vpos = -1;
@@ -17880,10 +17880,10 @@ try_window_reusing_current_matrix (struct window *w)
static struct glyph_row *find_last_unchanged_at_beg_row (struct window *);
static struct glyph_row *find_first_unchanged_at_end_row (struct window *,
- ptrdiff_t *, ptrdiff_t *);
+ ptrdiff_t *, ptrdiff_t *);
static struct glyph_row *
find_last_row_displaying_text (struct glyph_matrix *, struct it *,
- struct glyph_row *);
+ struct glyph_row *);
/* Return the last row in MATRIX displaying text. If row START is
@@ -17943,7 +17943,7 @@ find_last_unchanged_at_beg_row (struct window *w)
except in some case. */
MATRIX_ROW_END_CHARPOS (row) <= first_changed_pos
/* When row ends in ZV and we write at ZV it is not
- unchanged. */
+ unchanged. */
&& !row->ends_at_zv_p
/* When first_changed_pos is the end of a continued line,
row is not unchanged because it may be no longer
@@ -18181,13 +18181,13 @@ row_containing_pos (struct window *w, ptrdiff_t charpos,
Value is
>= 1 if successful, i.e. display has been updated
- specifically:
- 1 means the changes were in front of a newline that precedes
- the window start, and the whole current matrix was reused
- 2 means the changes were after the last position displayed
- in the window, and the whole current matrix was reused
- 3 means portions of the current matrix were reused, while
- some of the screen lines were redrawn
+ specifically:
+ 1 means the changes were in front of a newline that precedes
+ the window start, and the whole current matrix was reused
+ 2 means the changes were after the last position displayed
+ in the window, and the whole current matrix was reused
+ 3 means portions of the current matrix were reused, while
+ some of the screen lines were redrawn
-1 if redisplay with same window start is known not to succeed
0 if otherwise unsuccessful
@@ -18627,7 +18627,7 @@ try_window_id (struct window *w)
scroll. */
if (first_unchanged_at_end_row
/* No lines reused because we displayed everything up to the
- bottom of the window. */
+ bottom of the window. */
&& it.current_y < it.last_visible_y)
{
dvpos = (it.vpos
@@ -18753,7 +18753,7 @@ try_window_id (struct window *w)
ins_del_lines (f, end - dvpos, -dvpos);
/* Insert dvpos empty lines in front of
- last_unchanged_at_beg_row. */
+ last_unchanged_at_beg_row. */
ins_del_lines (f, from, dvpos);
}
else if (dvpos < 0)
@@ -18769,7 +18769,7 @@ try_window_id (struct window *w)
ins_del_lines (f, from + dvpos, dvpos);
/* On a dumb terminal insert dvpos empty lines at the
- end. */
+ end. */
if (!FRAME_SCROLL_REGION_OK (f))
ins_del_lines (f, end + dvpos, -dvpos);
}
@@ -19617,8 +19617,8 @@ compute_line_metrics (struct it *it)
|| MATRIX_ROW_OVERLAPS_PRED_P (row));
/* If first line's physical ascent is larger than its logical
- ascent, use the physical ascent, and make the row taller.
- This makes accented characters fully visible. */
+ ascent, use the physical ascent, and make the row taller.
+ This makes accented characters fully visible. */
if (row == MATRIX_FIRST_TEXT_ROW (it->w->desired_matrix)
&& row->phys_ascent > row->ascent)
{
@@ -23661,10 +23661,10 @@ decode_mode_spec (struct window *w, register int c, int field_width,
case 'c':
/* %c and %l are ignored in `frame-title-format'.
- (In redisplay_internal, the frame title is drawn _before_ the
- windows are updated, so the stuff which depends on actual
- window contents (such as %l) may fail to render properly, or
- even crash emacs.) */
+ (In redisplay_internal, the frame title is drawn _before_ the
+ windows are updated, so the stuff which depends on actual
+ window contents (such as %l) may fail to render properly, or
+ even crash emacs.) */
if (mode_line_target == MODE_LINE_TITLE)
return "";
else
@@ -23816,7 +23816,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
pint2str (decode_mode_spec_buf, width, topline + nlines);
return decode_mode_spec_buf;
no_value:
- {
+ {
char *p = decode_mode_spec_buf;
int pad = width - 2;
while (pad-- > 0)
@@ -24579,9 +24579,9 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
}
if (FRAME_WINDOW_P (it->f) && valid_xwidget_spec_p (prop))
{
- /* TODO: Don't return dummy size. */
- return OK_PIXELS (100);
- }
+ /* TODO: Don't return dummy size. */
+ return OK_PIXELS (100);
+ }
#endif
if (EQ (car, Qplus) || EQ (car, Qminus))
{
@@ -25457,7 +25457,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, bool backward_p)
INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \
START = fill_stretch_glyph_string (s, START, END); \
append_glyph_string (&HEAD, &TAIL, s); \
- s->x = (X); \
+ s->x = (X); \
} \
while (false)
@@ -25478,7 +25478,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, bool backward_p)
fill_image_glyph_string (s); \
append_glyph_string (&HEAD, &TAIL, s); \
++START; \
- s->x = (X); \
+ s->x = (X); \
} \
while (false)
@@ -25494,7 +25494,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, bool backward_p)
fill_xwidget_glyph_string (s); \
append_glyph_string (&(HEAD), &(TAIL), s); \
++(START); \
- s->x = (X); \
+ s->x = (X); \
} \
while (false)
#endif
@@ -25653,10 +25653,10 @@ compute_overhangs_and_x (struct glyph_string *s, int x, bool backward_p)
break;
#define BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
- case XWIDGET_GLYPH: \
- BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL, \
- HL, X, LAST_X); \
- break;
+ case XWIDGET_GLYPH: \
+ BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL, \
+ HL, X, LAST_X); \
+ break;
#define BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X) \
case GLYPHLESS_GLYPH: \
@@ -26302,7 +26302,7 @@ produce_image_glyph (struct it *it)
glyph->right_box_line_p = it->end_of_box_run_p;
}
glyph->overlaps_vertically_p = false;
- glyph->padding_p = false;
+ glyph->padding_p = false;
glyph->glyph_not_available_p = false;
glyph->face_id = it->face_id;
glyph->u.img_id = img->id;
@@ -26404,11 +26404,11 @@ produce_xwidget_glyph (struct it *it)
glyph->left_box_line_p = it->start_of_box_run_p;
glyph->right_box_line_p = it->end_of_box_run_p;
}
- glyph->overlaps_vertically_p = 0;
- glyph->padding_p = 0;
+ glyph->overlaps_vertically_p = 0;
+ glyph->padding_p = 0;
glyph->glyph_not_available_p = 0;
glyph->face_id = it->face_id;
- glyph->u.xwidget = it->xwidget;
+ glyph->u.xwidget = it->xwidget;
glyph->font_type = FONT_TYPE_UNKNOWN;
if (it->bidi_p)
{
@@ -26652,7 +26652,7 @@ produce_stretch_glyph (struct it *it)
`:ascent ASCENT' is present and valid, use that. Otherwise,
derive the ascent from the font in use. */
if (prop = Fplist_get (plist, QCascent),
- NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)
+ NUMVAL (prop) > 0 && NUMVAL (prop) <= 100)
ascent = height * NUMVAL (prop) / 100.0;
else if (!NILP (prop)
&& calc_pixel_width_or_height (&tem, it, prop, font, false, 0))
@@ -27941,7 +27941,7 @@ x_insert_glyphs (struct window *w, struct glyph_row *updated_row,
frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, w->output_cursor.y);
FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width,
- line_height, shift_by_width);
+ line_height, shift_by_width);
/* Write the glyphs. */
hpos = start - row->glyphs[updated_area];
@@ -28024,7 +28024,7 @@ x_clear_end_of_line (struct window *w, struct glyph_row *updated_row,
{
block_input ();
FRAME_RIF (f)->clear_frame_area (f, from_x, from_y,
- to_x - from_x, to_y - from_y);
+ to_x - from_x, to_y - from_y);
unblock_input ();
}
}
@@ -28207,7 +28207,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
if (!w->cursor_off_p)
{
if (glyph != NULL && glyph->type == XWIDGET_GLYPH)
- return NO_CURSOR;
+ return NO_CURSOR;
if (glyph != NULL && glyph->type == IMAGE_GLYPH)
{
if (cursor_type == FILLED_BOX_CURSOR)
@@ -28643,8 +28643,8 @@ display_and_set_cursor (struct window *w, bool on,
}
FRAME_RIF (f)->draw_window_cursor (w, glyph_row, x, y,
- new_cursor_type, new_cursor_width,
- on, active_cursor);
+ new_cursor_type, new_cursor_width,
+ on, active_cursor);
}
@@ -30924,7 +30924,7 @@ x_draw_vertical_border (struct window *w)
y1 -= 1;
if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
- x1 -= 1;
+ x1 -= 1;
FRAME_RIF (f)->draw_vertical_window_border (w, x1, y0, y1);
}
@@ -30938,7 +30938,7 @@ x_draw_vertical_border (struct window *w)
y1 -= 1;
if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
- x0 -= 1;
+ x0 -= 1;
FRAME_RIF (f)->draw_vertical_window_border (w, x0, y0, y1);
}
@@ -31322,7 +31322,7 @@ syms_of_xdisp (void)
DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)");
DEFVAR_BOOL("inhibit-message", inhibit_message,
- doc: /* Non-nil means calls to `message' are not displayed.
+ doc: /* Non-nil means calls to `message' are not displayed.
They are still logged to the *Messages* buffer. */);
inhibit_message = 0;
@@ -31769,7 +31769,7 @@ fontified regions the property `fontified'. */);
Fmake_variable_buffer_local (Qfontification_functions);
DEFVAR_BOOL ("unibyte-display-via-language-environment",
- unibyte_display_via_language_environment,
+ unibyte_display_via_language_environment,
doc: /* Non-nil means display unibyte text according to language environment.
Specifically, this means that raw bytes in the range 160-255 decimal
are displayed by converting them to the equivalent multibyte characters
diff --git a/src/xfaces.c b/src/xfaces.c
index accb98b..0b2e145 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1076,7 +1076,7 @@ COLOR must be a valid color name. */)
static unsigned long
load_color2 (struct frame *f, struct face *face, Lisp_Object name,
- enum lface_attribute_index target_index, XColor *color)
+ enum lface_attribute_index target_index, XColor *color)
{
eassert (STRINGP (name));
eassert (target_index == LFACE_FOREGROUND_INDEX
@@ -1201,9 +1201,9 @@ load_face_colors (struct frame *f, struct face *face,
&& color_distance (&xbg, &xfg) < NEAR_SAME_COLOR_THRESHOLD)
{
if (EQ (attrs[LFACE_INVERSE_INDEX], Qt))
- face->background = load_color (f, face, dfg, LFACE_BACKGROUND_INDEX);
+ face->background = load_color (f, face, dfg, LFACE_BACKGROUND_INDEX);
else
- face->foreground = load_color (f, face, dfg, LFACE_FOREGROUND_INDEX);
+ face->foreground = load_color (f, face, dfg, LFACE_FOREGROUND_INDEX);
}
}
@@ -1959,7 +1959,7 @@ lface_fully_specified_p (Lisp_Object attrs[LFACE_VECTOR_SIZE])
for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
- && i != LFACE_DISTANT_FOREGROUND_INDEX)
+ && i != LFACE_DISTANT_FOREGROUND_INDEX)
if ((UNSPECIFIEDP (attrs[i]) || IGNORE_DEFFACE_P (attrs[i])))
break;
@@ -2769,54 +2769,54 @@ FRAME 0 means change the face on all frames, and change the default
if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value))
valid_p = true;
else if (NILP (value) || EQ (value, Qt))
- valid_p = true;
+ valid_p = true;
else if (STRINGP (value) && SCHARS (value) > 0)
- valid_p = true;
+ valid_p = true;
else if (CONSP (value))
- {
- Lisp_Object key, val, list;
-
- list = value;
- /* FIXME? This errs on the side of acceptance. Eg it accepts:
- (defface foo '((t :underline 'foo) "doc")
- Maybe this is intentional, maybe it isn't.
- Non-nil symbols other than t are not documented as being valid.
- Eg compare with inverse-video, which explicitly rejects them.
- */
- valid_p = true;
-
- while (!NILP (CAR_SAFE(list)))
- {
- key = CAR_SAFE (list);
- list = CDR_SAFE (list);
- val = CAR_SAFE (list);
- list = CDR_SAFE (list);
-
- if (NILP (key) || NILP (val))
- {
- valid_p = false;
- break;
- }
-
- else if (EQ (key, QCcolor)
- && !(EQ (val, Qforeground_color)
- || (STRINGP (val) && SCHARS (val) > 0)))
- {
- valid_p = false;
- break;
- }
-
- else if (EQ (key, QCstyle)
- && !(EQ (val, Qline) || EQ (val, Qwave)))
- {
- valid_p = false;
- break;
- }
- }
- }
+ {
+ Lisp_Object key, val, list;
+
+ list = value;
+ /* FIXME? This errs on the side of acceptance. Eg it accepts:
+ (defface foo '((t :underline 'foo) "doc")
+ Maybe this is intentional, maybe it isn't.
+ Non-nil symbols other than t are not documented as being valid.
+ Eg compare with inverse-video, which explicitly rejects them.
+ */
+ valid_p = true;
+
+ while (!NILP (CAR_SAFE(list)))
+ {
+ key = CAR_SAFE (list);
+ list = CDR_SAFE (list);
+ val = CAR_SAFE (list);
+ list = CDR_SAFE (list);
+
+ if (NILP (key) || NILP (val))
+ {
+ valid_p = false;
+ break;
+ }
+
+ else if (EQ (key, QCcolor)
+ && !(EQ (val, Qforeground_color)
+ || (STRINGP (val) && SCHARS (val) > 0)))
+ {
+ valid_p = false;
+ break;
+ }
+
+ else if (EQ (key, QCstyle)
+ && !(EQ (val, Qline) || EQ (val, Qwave)))
+ {
+ valid_p = false;
+ break;
+ }
+ }
+ }
if (!valid_p)
- signal_error ("Invalid face underline", value);
+ signal_error ("Invalid face underline", value);
old_value = LFACE_UNDERLINE (lface);
ASET (lface, LFACE_UNDERLINE_INDEX, value);
@@ -3029,26 +3029,26 @@ FRAME 0 means change the face on all frames, and change the default
else
f1 = XFRAME (frame);
- /* FIXME:
- If frame is t, and selected frame is a tty frame, the font
- can't be realized. An improvement would be to loop over frames
- for a non-tty frame and use that. See discussion in Bug#18573.
- For a daemon, frame may be an initial frame (Bug#18869). */
- if (FRAME_WINDOW_P (f1))
- {
- if (! FONT_OBJECT_P (value))
- {
- Lisp_Object *attrs = XVECTOR (lface)->contents;
- Lisp_Object font_object;
-
- font_object = font_load_for_lface (f1, attrs, value);
- if (NILP (font_object))
- signal_error ("Font not available", value);
- value = font_object;
- }
- set_lface_from_font (f1, lface, value, true);
+ /* FIXME:
+ If frame is t, and selected frame is a tty frame, the font
+ can't be realized. An improvement would be to loop over frames
+ for a non-tty frame and use that. See discussion in Bug#18573.
+ For a daemon, frame may be an initial frame (Bug#18869). */
+ if (FRAME_WINDOW_P (f1))
+ {
+ if (! FONT_OBJECT_P (value))
+ {
+ Lisp_Object *attrs = XVECTOR (lface)->contents;
+ Lisp_Object font_object;
+
+ font_object = font_load_for_lface (f1, attrs, value);
+ if (NILP (font_object))
+ signal_error ("Font not available", value);
+ value = font_object;
+ }
+ set_lface_from_font (f1, lface, value, true);
f1->face_change = 1;
- }
+ }
}
else
ASET (lface, LFACE_FONT_INDEX, value);
@@ -5593,48 +5593,48 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
else if (CONSP (underline))
{
/* `(:color COLOR :style STYLE)'.
- STYLE being one of `line' or `wave'. */
+ STYLE being one of `line' or `wave'. */
face->underline_p = true;
face->underline_color = 0;
face->underline_defaulted_p = true;
face->underline_type = FACE_UNDER_LINE;
/* FIXME? This is also not robust about checking the precise form.
- See comments in Finternal_set_lisp_face_attribute. */
+ See comments in Finternal_set_lisp_face_attribute. */
while (CONSP (underline))
- {
- Lisp_Object keyword, value;
-
- keyword = XCAR (underline);
- underline = XCDR (underline);
-
- if (!CONSP (underline))
- break;
- value = XCAR (underline);
- underline = XCDR (underline);
-
- if (EQ (keyword, QCcolor))
- {
- if (EQ (value, Qforeground_color))
- {
- face->underline_defaulted_p = true;
- face->underline_color = 0;
- }
- else if (STRINGP (value))
- {
- face->underline_defaulted_p = false;
- face->underline_color = load_color (f, face, value,
- LFACE_UNDERLINE_INDEX);
- }
- }
- else if (EQ (keyword, QCstyle))
- {
- if (EQ (value, Qline))
- face->underline_type = FACE_UNDER_LINE;
- else if (EQ (value, Qwave))
- face->underline_type = FACE_UNDER_WAVE;
- }
- }
+ {
+ Lisp_Object keyword, value;
+
+ keyword = XCAR (underline);
+ underline = XCDR (underline);
+
+ if (!CONSP (underline))
+ break;
+ value = XCAR (underline);
+ underline = XCDR (underline);
+
+ if (EQ (keyword, QCcolor))
+ {
+ if (EQ (value, Qforeground_color))
+ {
+ face->underline_defaulted_p = true;
+ face->underline_color = 0;
+ }
+ else if (STRINGP (value))
+ {
+ face->underline_defaulted_p = false;
+ face->underline_color = load_color (f, face, value,
+ LFACE_UNDERLINE_INDEX);
+ }
+ }
+ else if (EQ (keyword, QCstyle))
+ {
+ if (EQ (value, Qline))
+ face->underline_type = FACE_UNDER_LINE;
+ else if (EQ (value, Qwave))
+ face->underline_type = FACE_UNDER_WAVE;
+ }
+ }
}
overline = attrs[LFACE_OVERLINE_INDEX];
diff --git a/src/xfns.c b/src/xfns.c
index 3438c8e..42d64ff 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -146,7 +146,7 @@ check_x_display_info (Lisp_Object object)
struct terminal *t = decode_live_terminal (object);
if (t->type != output_x_window)
- error ("Terminal %d is not an X display", t->id);
+ error ("Terminal %d is not an X display", t->id);
dpyinfo = t->display_info.x;
}
@@ -172,15 +172,15 @@ check_x_display_info (Lisp_Object object)
not Emacs's own window. */
void
x_real_pos_and_offsets (struct frame *f,
- int *left_offset_x,
- int *right_offset_x,
- int *top_offset_y,
- int *bottom_offset_y,
- int *x_pixels_diff,
- int *y_pixels_diff,
- int *xptr,
- int *yptr,
- int *outer_border)
+ int *left_offset_x,
+ int *right_offset_x,
+ int *top_offset_y,
+ int *bottom_offset_y,
+ int *x_pixels_diff,
+ int *y_pixels_diff,
+ int *xptr,
+ int *yptr,
+ int *outer_border)
{
int win_x = 0, win_y = 0, outer_x = 0, outer_y = 0;
int real_x = 0, real_y = 0;
@@ -275,7 +275,7 @@ x_real_pos_and_offsets (struct frame *f,
#endif
if (had_errors || wm_window == rootw)
- break;
+ break;
win = wm_window;
}
@@ -297,28 +297,28 @@ x_real_pos_and_offsets (struct frame *f,
#ifdef USE_XCB
/* Fire off the requests that don't have data dependencies.
- Once we've done this, we must collect the results for each
- one before returning, even if other errors are detected,
- making the other responses moot. */
+ Once we've done this, we must collect the results for each
+ one before returning, even if other errors are detected,
+ making the other responses moot. */
geom_cookie = xcb_get_geometry (xcb_conn, win);
trans_cookie =
- xcb_translate_coordinates (xcb_conn,
- /* From-window, to-window. */
- FRAME_DISPLAY_INFO (f)->root_window,
- FRAME_X_WINDOW (f),
+ xcb_translate_coordinates (xcb_conn,
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_X_WINDOW (f),
- /* From-position. */
- 0, 0);
+ /* From-position. */
+ 0, 0);
if (FRAME_X_WINDOW (f) != FRAME_OUTER_WINDOW (f))
- outer_trans_cookie =
- xcb_translate_coordinates (xcb_conn,
- /* From-window, to-window. */
- FRAME_DISPLAY_INFO (f)->root_window,
- FRAME_OUTER_WINDOW (f),
-
- /* From-position. */
- 0, 0);
+ outer_trans_cookie =
+ xcb_translate_coordinates (xcb_conn,
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_OUTER_WINDOW (f),
+
+ /* From-position. */
+ 0, 0);
if (right_offset_x || bottom_offset_y)
outer_geom_cookie = xcb_get_geometry (xcb_conn,
FRAME_OUTER_WINDOW (f));
@@ -352,20 +352,20 @@ x_real_pos_and_offsets (struct frame *f,
#endif
/* Translate real coordinates to coordinates relative to our
- window. For our window, the upper left corner is 0, 0.
- Since the upper left corner of the WM window is outside
- our window, win_x and win_y will be negative:
-
- ------------------ ---> x
- | title |
- | ----------------- v y
- | | our window
-
- Since we don't care about the child window corresponding to
- the actual coordinates, we can send zero to get the offsets
- and compute the resulting coordinates below. This reduces
- the data dependencies between calls and lets us pipeline the
- requests better in the XCB case. */
+ window. For our window, the upper left corner is 0, 0.
+ Since the upper left corner of the WM window is outside
+ our window, win_x and win_y will be negative:
+
+ ------------------ ---> x
+ | title |
+ | ----------------- v y
+ | | our window
+
+ Since we don't care about the child window corresponding to
+ the actual coordinates, we can send zero to get the offsets
+ and compute the resulting coordinates below. This reduces
+ the data dependencies between calls and lets us pipeline the
+ requests better in the XCB case. */
#ifdef USE_XCB
trans = xcb_translate_coordinates_reply (xcb_conn, trans_cookie, NULL);
if (trans)
@@ -381,10 +381,10 @@ x_real_pos_and_offsets (struct frame *f,
/* From-window, to-window. */
FRAME_DISPLAY_INFO (f)->root_window,
- FRAME_X_WINDOW (f),
+ FRAME_X_WINDOW (f),
/* From-position, to-position. */
- 0, 0, &win_x, &win_y,
+ 0, 0, &win_x, &win_y,
/* Child of win. */
&child);
@@ -395,37 +395,37 @@ x_real_pos_and_offsets (struct frame *f,
if (FRAME_X_WINDOW (f) == FRAME_OUTER_WINDOW (f))
{
- outer_x = win_x;
- outer_y = win_y;
+ outer_x = win_x;
+ outer_y = win_y;
}
else
- {
+ {
#ifdef USE_XCB
- xcb_translate_coordinates_reply_t *outer_trans;
-
- outer_trans = xcb_translate_coordinates_reply (xcb_conn,
- outer_trans_cookie,
- NULL);
- if (outer_trans)
- {
- outer_x = outer_trans->dst_x;
- outer_y = outer_trans->dst_y;
- free (outer_trans);
- }
- else
+ xcb_translate_coordinates_reply_t *outer_trans;
+
+ outer_trans = xcb_translate_coordinates_reply (xcb_conn,
+ outer_trans_cookie,
+ NULL);
+ if (outer_trans)
+ {
+ outer_x = outer_trans->dst_x;
+ outer_y = outer_trans->dst_y;
+ free (outer_trans);
+ }
+ else
had_errors = true;
#else
- XTranslateCoordinates (dpy,
+ XTranslateCoordinates (dpy,
- /* From-window, to-window. */
- FRAME_DISPLAY_INFO (f)->root_window,
- FRAME_OUTER_WINDOW (f),
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_OUTER_WINDOW (f),
- /* From-position, to-position. */
- 0, 0, &outer_x, &outer_y,
+ /* From-position, to-position. */
+ 0, 0, &outer_x, &outer_y,
- /* Child of win. */
- &child);
+ /* Child of win. */
+ &child);
#endif
outer_x += real_x;
@@ -442,46 +442,46 @@ x_real_pos_and_offsets (struct frame *f,
/* Try _NET_FRAME_EXTENTS if our parent is the root window. */
#ifdef USE_XCB
/* Make sure we didn't get an X error early and skip sending the
- request. */
+ request. */
if (sent_requests)
- {
- xcb_get_property_reply_t *prop;
-
- prop = xcb_get_property_reply (xcb_conn, prop_cookie, NULL);
- if (prop)
- {
- if (prop->type == target_type
- && prop->format == 32
- && (xcb_get_property_value_length (prop)
+ {
+ xcb_get_property_reply_t *prop;
+
+ prop = xcb_get_property_reply (xcb_conn, prop_cookie, NULL);
+ if (prop)
+ {
+ if (prop->type == target_type
+ && prop->format == 32
+ && (xcb_get_property_value_length (prop)
== 4 * sizeof (int32_t)))
- {
- int32_t *fe = xcb_get_property_value (prop);
-
- outer_x = -fe[0];
- outer_y = -fe[2];
- real_x -= fe[0];
- real_y -= fe[2];
- }
- free (prop);
- }
- /* Xlib version doesn't set had_errors here. Intentional or bug? */
- }
+ {
+ int32_t *fe = xcb_get_property_value (prop);
+
+ outer_x = -fe[0];
+ outer_y = -fe[2];
+ real_x -= fe[0];
+ real_y -= fe[2];
+ }
+ free (prop);
+ }
+ /* Xlib version doesn't set had_errors here. Intentional or bug? */
+ }
#else
rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_frame_extents,
- 0, max_len, False, target_type,
- &actual_type, &actual_format, &actual_size,
- &bytes_remaining, &tmp_data);
+ 0, max_len, False, target_type,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy)
- && actual_size == 4 && actual_format == 32)
- {
- long *fe = (long *)tmp_data;
+ && actual_size == 4 && actual_format == 32)
+ {
+ long *fe = (long *)tmp_data;
- outer_x = -fe[0];
- outer_y = -fe[2];
- real_x -= fe[0];
- real_y -= fe[2];
- }
+ outer_x = -fe[0];
+ outer_y = -fe[2];
+ real_x -= fe[0];
+ real_y -= fe[2];
+ }
if (tmp_data) XFree (tmp_data);
#endif
@@ -491,22 +491,22 @@ x_real_pos_and_offsets (struct frame *f,
{
#ifdef USE_XCB
/* Make sure we didn't get an X error early and skip sending the
- request. */
+ request. */
if (sent_requests)
- {
- xcb_get_geometry_reply_t *outer_geom;
-
- outer_geom = xcb_get_geometry_reply (xcb_conn, outer_geom_cookie,
- NULL);
- if (outer_geom)
- {
- fw = outer_geom->width;
- fh = outer_geom->height;
- free (outer_geom);
- }
- else
+ {
+ xcb_get_geometry_reply_t *outer_geom;
+
+ outer_geom = xcb_get_geometry_reply (xcb_conn, outer_geom_cookie,
+ NULL);
+ if (outer_geom)
+ {
+ fw = outer_geom->width;
+ fh = outer_geom->height;
+ free (outer_geom);
+ }
+ else
had_errors = true;
- }
+ }
#else
int xy_ign;
unsigned int ign;
@@ -548,7 +548,7 @@ void
x_real_positions (struct frame *f, int *xptr, int *yptr)
{
x_real_pos_and_offsets (f, NULL, NULL, NULL, NULL, NULL, NULL, xptr, yptr,
- NULL);
+ NULL);
}
@@ -565,35 +565,35 @@ x_relative_mouse_position (struct frame *f, int *x, int *y)
block_input ();
XQueryPointer (FRAME_X_DISPLAY (f),
- DefaultRootWindow (FRAME_X_DISPLAY (f)),
+ DefaultRootWindow (FRAME_X_DISPLAY (f)),
- /* The root window which contains the pointer. */
- &root,
+ /* The root window which contains the pointer. */
+ &root,
- /* Window pointer is on, not used */
- &dummy_window,
+ /* Window pointer is on, not used */
+ &dummy_window,
- /* The position on that root window. */
- x, y,
+ /* The position on that root window. */
+ x, y,
- /* x/y in dummy_window coordinates, not used. */
- &dummy, &dummy,
+ /* x/y in dummy_window coordinates, not used. */
+ &dummy, &dummy,
- /* Modifier keys and pointer buttons, about which
- we don't care. */
- (unsigned int *) &dummy);
+ /* Modifier keys and pointer buttons, about which
+ we don't care. */
+ (unsigned int *) &dummy);
XTranslateCoordinates (FRAME_X_DISPLAY (f),
- /* From-window, to-window. */
- FRAME_DISPLAY_INFO (f)->root_window,
- FRAME_X_WINDOW (f),
+ /* From-window, to-window. */
+ FRAME_DISPLAY_INFO (f)->root_window,
+ FRAME_X_WINDOW (f),
- /* From-position, to-position. */
- *x, *y, x, y,
+ /* From-position, to-position. */
+ *x, *y, x, y,
- /* Child of win. */
- &dummy_window);
+ /* Child of win. */
+ &dummy_window);
unblock_input ();
}
@@ -684,8 +684,8 @@ x_set_wait_for_wm (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
static void
x_set_tool_bar_position (struct frame *f,
- Lisp_Object new_value,
- Lisp_Object old_value)
+ Lisp_Object new_value,
+ Lisp_Object old_value)
{
Lisp_Object choice = list4 (Qleft, Qright, Qtop, Qbottom);
@@ -708,8 +708,8 @@ x_set_tool_bar_position (struct frame *f,
static void
x_set_inhibit_double_buffering (struct frame *f,
- Lisp_Object new_value,
- Lisp_Object old_value)
+ Lisp_Object new_value,
+ Lisp_Object old_value)
{
block_input ();
if (FRAME_X_WINDOW (f) && !EQ (new_value, old_value))
@@ -717,20 +717,20 @@ x_set_inhibit_double_buffering (struct frame *f,
bool want_double_buffering = NILP (new_value);
bool was_double_buffered = FRAME_X_DOUBLE_BUFFERED_P (f);
/* font_drop_xrender_surfaces in xftfont does something only if
- we're double-buffered, so call font_drop_xrender_surfaces before
- and after any potential change. One of the calls will end up
- being a no-op. */
+ we're double-buffered, so call font_drop_xrender_surfaces before
+ and after any potential change. One of the calls will end up
+ being a no-op. */
if (want_double_buffering != was_double_buffered)
- font_drop_xrender_surfaces (f);
+ font_drop_xrender_surfaces (f);
if (FRAME_X_DOUBLE_BUFFERED_P (f) && !want_double_buffering)
- tear_down_x_back_buffer (f);
+ tear_down_x_back_buffer (f);
else if (!FRAME_X_DOUBLE_BUFFERED_P (f) && want_double_buffering)
- set_up_x_back_buffer (f);
+ set_up_x_back_buffer (f);
if (FRAME_X_DOUBLE_BUFFERED_P (f) != was_double_buffered)
- {
- SET_FRAME_GARBAGED (f);
- font_drop_xrender_surfaces (f);
- }
+ {
+ SET_FRAME_GARBAGED (f);
+ font_drop_xrender_surfaces (f);
+ }
}
unblock_input ();
}
@@ -827,7 +827,7 @@ x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
update_face_from_frame_parameter (f, Qforeground_color, arg);
if (FRAME_VISIBLE_P (f))
- redraw_frame (f);
+ redraw_frame (f);
}
unload_color (f, old_fg);
@@ -875,7 +875,7 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
update_face_from_frame_parameter (f, Qbackground_color, arg);
if (FRAME_VISIBLE_P (f))
- redraw_frame (f);
+ redraw_frame (f);
}
}
@@ -1157,7 +1157,7 @@ x_set_border_pixel (struct frame *f, int pix)
unblock_input ();
if (FRAME_VISIBLE_P (f))
- redraw_frame (f);
+ redraw_frame (f);
}
}
@@ -1389,7 +1389,7 @@ x_change_tool_bar_height (struct frame *f, int height)
else
{
if (FRAME_EXTERNAL_TOOL_BAR (f))
- free_frame_tool_bar (f);
+ free_frame_tool_bar (f);
FRAME_EXTERNAL_TOOL_BAR (f) = false;
}
#else /* !USE_GTK */
@@ -1681,8 +1681,8 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
}
#ifdef USE_GTK
- gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- SSDATA (encoded_name));
+ gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
+ SSDATA (encoded_name));
#else /* not USE_GTK */
XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
@@ -2160,13 +2160,13 @@ xic_create_xfontset (struct frame *f)
struct frame *cf = XFRAME (frame);
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
- && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
+ && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
&& FRAME_FONT (f)
&& FRAME_FONT (f)->pixel_size == pixel_size)
- {
- xfs = FRAME_XIC_FONTSET (cf);
- break;
- }
+ {
+ xfs = FRAME_XIC_FONTSET (cf);
+ break;
+ }
}
if (! xfs)
@@ -2259,12 +2259,12 @@ xic_free_xfontset (struct frame *f)
{
struct frame *cf = XFRAME (frame);
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
- && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
- && FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f))
- {
- shared_p = true;
- break;
- }
+ && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
+ && FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f))
+ {
+ shared_p = true;
+ break;
+ }
}
if (!shared_p)
@@ -2323,7 +2323,7 @@ create_frame_xic (struct frame *f)
{
xfs = xic_create_xfontset (f);
if (!xfs)
- goto out;
+ goto out;
FRAME_XIC_FONTSET (f) = xfs;
}
@@ -2344,55 +2344,55 @@ create_frame_xic (struct frame *f)
NULL);
if (!preedit_attr)
- goto out;
+ goto out;
}
if (xic_style & XIMStatusArea)
{
s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1;
status_attr = XVaCreateNestedList (0,
- XNArea,
- &s_area,
- XNFontSet,
- xfs,
- XNForeground,
- FRAME_FOREGROUND_PIXEL (f),
- XNBackground,
- FRAME_BACKGROUND_PIXEL (f),
- NULL);
+ XNArea,
+ &s_area,
+ XNFontSet,
+ xfs,
+ XNForeground,
+ FRAME_FOREGROUND_PIXEL (f),
+ XNBackground,
+ FRAME_BACKGROUND_PIXEL (f),
+ NULL);
if (!status_attr)
- goto out;
+ goto out;
}
if (preedit_attr && status_attr)
xic = XCreateIC (xim,
- XNInputStyle, xic_style,
- XNClientWindow, FRAME_X_WINDOW (f),
- XNFocusWindow, FRAME_X_WINDOW (f),
- XNStatusAttributes, status_attr,
- XNPreeditAttributes, preedit_attr,
- NULL);
+ XNInputStyle, xic_style,
+ XNClientWindow, FRAME_X_WINDOW (f),
+ XNFocusWindow, FRAME_X_WINDOW (f),
+ XNStatusAttributes, status_attr,
+ XNPreeditAttributes, preedit_attr,
+ NULL);
else if (preedit_attr)
xic = XCreateIC (xim,
- XNInputStyle, xic_style,
- XNClientWindow, FRAME_X_WINDOW (f),
- XNFocusWindow, FRAME_X_WINDOW (f),
- XNPreeditAttributes, preedit_attr,
- NULL);
+ XNInputStyle, xic_style,
+ XNClientWindow, FRAME_X_WINDOW (f),
+ XNFocusWindow, FRAME_X_WINDOW (f),
+ XNPreeditAttributes, preedit_attr,
+ NULL);
else if (status_attr)
xic = XCreateIC (xim,
- XNInputStyle, xic_style,
- XNClientWindow, FRAME_X_WINDOW (f),
- XNFocusWindow, FRAME_X_WINDOW (f),
- XNStatusAttributes, status_attr,
- NULL);
+ XNInputStyle, xic_style,
+ XNClientWindow, FRAME_X_WINDOW (f),
+ XNFocusWindow, FRAME_X_WINDOW (f),
+ XNStatusAttributes, status_attr,
+ NULL);
else
xic = XCreateIC (xim,
- XNInputStyle, xic_style,
- XNClientWindow, FRAME_X_WINDOW (f),
- XNFocusWindow, FRAME_X_WINDOW (f),
- NULL);
+ XNInputStyle, xic_style,
+ XNClientWindow, FRAME_X_WINDOW (f),
+ XNFocusWindow, FRAME_X_WINDOW (f),
+ NULL);
if (!xic)
goto out;
@@ -2481,7 +2481,7 @@ xic_set_statusarea (struct frame *f)
area.y = (FRAME_PIXEL_HEIGHT (f) - area.height
- FRAME_MENUBAR_HEIGHT (f)
- FRAME_TOOLBAR_TOP_HEIGHT (f)
- - FRAME_INTERNAL_BORDER_WIDTH (f));
+ - FRAME_INTERNAL_BORDER_WIDTH (f));
XFree (needed);
attr = XVaCreateNestedList (0, XNArea, &area, NULL);
@@ -2534,19 +2534,19 @@ set_up_x_back_buffer (struct frame *f)
{
FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f);
if (FRAME_DISPLAY_INFO (f)->supports_xdbe)
- {
- /* If allocating a back buffer fails, either because the
- server ran out of memory or we don't have the right kind
- of visual, just use single-buffered rendering. */
- x_catch_errors (FRAME_X_DISPLAY (f));
- FRAME_X_RAW_DRAWABLE (f) = XdbeAllocateBackBufferName (
- FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- XdbeCopied);
- if (x_had_errors_p (FRAME_X_DISPLAY (f)))
- FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f);
- x_uncatch_errors_after_check ();
- }
+ {
+ /* If allocating a back buffer fails, either because the
+ server ran out of memory or we don't have the right kind
+ of visual, just use single-buffered rendering. */
+ x_catch_errors (FRAME_X_DISPLAY (f));
+ FRAME_X_RAW_DRAWABLE (f) = XdbeAllocateBackBufferName (
+ FRAME_X_DISPLAY (f),
+ FRAME_X_WINDOW (f),
+ XdbeCopied);
+ if (x_had_errors_p (FRAME_X_DISPLAY (f)))
+ FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f);
+ x_uncatch_errors_after_check ();
+ }
}
unblock_input ();
#endif
@@ -2560,11 +2560,11 @@ tear_down_x_back_buffer (struct frame *f)
if (FRAME_X_WINDOW (f) && FRAME_X_DOUBLE_BUFFERED_P (f))
{
if (FRAME_X_DOUBLE_BUFFERED_P (f))
- {
- XdbeDeallocateBackBufferName (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f));
- FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f);
- }
+ {
+ XdbeDeallocateBackBufferName (FRAME_X_DISPLAY (f),
+ FRAME_X_DRAWABLE (f));
+ FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f);
+ }
}
unblock_input ();
#endif
@@ -2670,9 +2670,9 @@ x_window (struct frame *f, long window_prompting)
for -geometry -0-0 without this. 24 Aug 96, rms. */
if (FRAME_EXTERNAL_MENU_BAR (f))
{
- Dimension ibw = 0;
- XtVaGetValues (pane_widget, XtNinternalBorderWidth, &ibw, NULL);
- menubar_size += ibw;
+ Dimension ibw = 0;
+ XtVaGetValues (pane_widget, XtNinternalBorderWidth, &ibw, NULL);
+ menubar_size += ibw;
}
#endif
@@ -2711,19 +2711,19 @@ x_window (struct frame *f, long window_prompting)
(xneg ? '-' : '+'), left,
(yneg ? '-' : '+'), top);
else
- {
- sprintf (f->shell_position, "=%dx%d",
- FRAME_PIXEL_WIDTH (f) + extra_borders,
- FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders);
-
- /* Setting x and y when the position is not specified in
- the geometry string will set program position in the WM hints.
- If Emacs had just one program position, we could set it in
- fallback resources, but since each make-frame call can specify
- different program positions, this is easier. */
- XtSetArg (gal[gac], XtNx, left); gac++;
- XtSetArg (gal[gac], XtNy, top); gac++;
- }
+ {
+ sprintf (f->shell_position, "=%dx%d",
+ FRAME_PIXEL_WIDTH (f) + extra_borders,
+ FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders);
+
+ /* Setting x and y when the position is not specified in
+ the geometry string will set program position in the WM hints.
+ If Emacs had just one program position, we could set it in
+ fallback resources, but since each make-frame call can specify
+ different program positions, this is easier. */
+ XtSetArg (gal[gac], XtNx, left); gac++;
+ XtSetArg (gal[gac], XtNy, top); gac++;
+ }
}
XtSetArg (gal[gac], XtNgeometry, f->shell_position); gac++;
@@ -2805,7 +2805,7 @@ x_window (struct frame *f, long window_prompting)
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->output_data.x->current_cursor
- = f->output_data.x->text_cursor);
+ = f->output_data.x->text_cursor);
unblock_input ();
@@ -2884,7 +2884,7 @@ x_window (struct frame *f)
CopyFromParent, /* depth */
InputOutput, /* class */
FRAME_X_VISUAL (f),
- attribute_mask, &attributes);
+ attribute_mask, &attributes);
initial_set_up_x_back_buffer (f);
#ifdef HAVE_X_I18N
@@ -2945,7 +2945,7 @@ x_window (struct frame *f)
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->output_data.x->current_cursor
- = f->output_data.x->text_cursor);
+ = f->output_data.x->text_cursor);
unblock_input ();
@@ -3039,7 +3039,7 @@ x_make_gc (struct frame *f)
gc_values.line_width = 0; /* Means 1 using fast algorithm. */
f->output_data.x->normal_gc
= XCreateGC (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
+ FRAME_X_DRAWABLE (f),
GCLineWidth | GCForeground | GCBackground,
&gc_values);
@@ -3048,7 +3048,7 @@ x_make_gc (struct frame *f)
gc_values.background = FRAME_FOREGROUND_PIXEL (f);
f->output_data.x->reverse_gc
= XCreateGC (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
+ FRAME_X_DRAWABLE (f),
GCForeground | GCBackground | GCLineWidth,
&gc_values);
@@ -3172,7 +3172,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
- RES_TYPE_STRING);
+ RES_TYPE_STRING);
Lisp_Object font = Qnil;
if (EQ (font_param, Qunbound))
font_param = Qnil;
@@ -3180,8 +3180,8 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms)
if (NILP (font_param))
{
/* System font should take precedence over X resources. We suggest this
- regardless of font-use-system-font because .emacs may not have been
- read yet. */
+ regardless of font-use-system-font because .emacs may not have been
+ read yet. */
const char *system_font = xsettings_get_system_font ();
if (system_font)
font = font_open_by_name (f, build_unibyte_string (system_font));
@@ -3254,7 +3254,7 @@ set_machine_and_pid_properties (struct frame *f)
{
/* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME. */
XSetWMProperties (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), NULL, NULL,
- NULL, 0, NULL, NULL, NULL);
+ NULL, 0, NULL, NULL, NULL);
pid_t pid = getpid ();
if (pid <= 0xffffffffu)
{
@@ -3563,10 +3563,10 @@ This function is an internal primitive--use `make-frame' instead. */)
x_default_parameter (f, parms, Qwait_for_wm, Qt,
"waitForWM", "WaitForWM", RES_TYPE_BOOLEAN);
x_default_parameter (f, parms, Qtool_bar_position,
- FRAME_TOOL_BAR_POSITION (f), 0, 0, RES_TYPE_SYMBOL);
+ FRAME_TOOL_BAR_POSITION (f), 0, 0, RES_TYPE_SYMBOL);
x_default_parameter (f, parms, Qinhibit_double_buffering, Qnil,
- "inhibitDoubleBuffering", "InhibitDoubleBuffering",
- RES_TYPE_BOOLEAN);
+ "inhibitDoubleBuffering", "InhibitDoubleBuffering",
+ RES_TYPE_BOOLEAN);
/* Compute the size of the X window. */
window_prompting = x_figure_window_size (f, parms, true, &x_width, &x_height);
@@ -3685,10 +3685,10 @@ This function is an internal primitive--use `make-frame' instead. */)
if (dpyinfo->client_leader_window != 0)
{
XChangeProperty (FRAME_X_DISPLAY (f),
- FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_wm_client_leader,
- XA_WINDOW, 32, PropModeReplace,
- (unsigned char *) &dpyinfo->client_leader_window, 1);
+ FRAME_OUTER_WINDOW (f),
+ dpyinfo->Xatom_wm_client_leader,
+ XA_WINDOW, 32, PropModeReplace,
+ (unsigned char *) &dpyinfo->client_leader_window, 1);
}
unblock_input ();
@@ -3697,7 +3697,7 @@ This function is an internal primitive--use `make-frame' instead. */)
frame on this terminal. */
if (FRAME_HAS_MINIBUF_P (f)
&& (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
- || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))))
+ || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))))
kset_default_minibuffer_frame (kb, frame);
/* All remaining specified parameters, which have not been "used"
@@ -3907,7 +3907,7 @@ If omitted or nil, that stands for the selected frame's display. */)
struct x_display_info *dpyinfo = check_x_display_info (terminal);
int nr_planes = DisplayPlanes (dpyinfo->display,
- XScreenNumberOfScreen (dpyinfo->screen));
+ XScreenNumberOfScreen (dpyinfo->screen));
/* Truncate nr_planes to 24 to avoid integer overflow.
Some displays says 32, but only 24 bits are actually significant.
@@ -4181,8 +4181,8 @@ x_get_net_workarea (struct x_display_info *dpyinfo, XRectangle *rect)
/* Return monitor number where F is "most" or closest to. */
static int
x_get_monitor_for_frame (struct frame *f,
- struct MonitorInfo *monitors,
- int n_monitors)
+ struct MonitorInfo *monitors,
+ int n_monitors)
{
XRectangle frect;
int area = 0, dist = -1;
@@ -4204,38 +4204,38 @@ x_get_monitor_for_frame (struct frame *f,
if (mi->geom.width == 0) continue;
if (x_intersect_rectangles (&mi->geom, &frect, &res))
- {
- a = res.width * res.height;
- if (a > area)
+ {
+ a = res.width * res.height;
+ if (a > area)
{
area = a;
best_area = i;
}
- }
+ }
if (a == 0 && area == 0)
- {
- int dx, dy, d;
- if (frect.x + frect.width < mi->geom.x)
- dx = mi->geom.x - frect.x + frect.width;
- else if (frect.x > mi->geom.x + mi->geom.width)
- dx = frect.x - mi->geom.x + mi->geom.width;
- else
- dx = 0;
- if (frect.y + frect.height < mi->geom.y)
- dy = mi->geom.y - frect.y + frect.height;
- else if (frect.y > mi->geom.y + mi->geom.height)
- dy = frect.y - mi->geom.y + mi->geom.height;
- else
- dy = 0;
-
- d = dx*dx + dy*dy;
- if (dist == -1 || dist > d)
- {
- dist = d;
- best_dist = i;
- }
- }
+ {
+ int dx, dy, d;
+ if (frect.x + frect.width < mi->geom.x)
+ dx = mi->geom.x - frect.x + frect.width;
+ else if (frect.x > mi->geom.x + mi->geom.width)
+ dx = frect.x - mi->geom.x + mi->geom.width;
+ else
+ dx = 0;
+ if (frect.y + frect.height < mi->geom.y)
+ dy = mi->geom.y - frect.y + frect.height;
+ else if (frect.y > mi->geom.y + mi->geom.height)
+ dy = frect.y - mi->geom.y + mi->geom.height;
+ else
+ dy = 0;
+
+ d = dx*dx + dy*dy;
+ if (dist == -1 || dist > d)
+ {
+ dist = d;
+ best_dist = i;
+ }
+ }
}
return best_area != -1 ? best_area : (best_dist != -1 ? best_dist : 0);
@@ -4243,10 +4243,10 @@ x_get_monitor_for_frame (struct frame *f,
static Lisp_Object
x_make_monitor_attribute_list (struct MonitorInfo *monitors,
- int n_monitors,
- int primary_monitor,
- struct x_display_info *dpyinfo,
- const char *source)
+ int n_monitors,
+ int primary_monitor,
+ struct x_display_info *dpyinfo,
+ const char *source)
{
Lisp_Object monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
Lisp_Object frame, rest;
@@ -4264,7 +4264,7 @@ x_make_monitor_attribute_list (struct MonitorInfo *monitors,
}
return make_monitor_attribute_list (monitors, n_monitors, primary_monitor,
- monitor_frames, source);
+ monitor_frames, source);
}
static Lisp_Object
@@ -4340,10 +4340,10 @@ x_get_monitor_attributes_xinerama (struct x_display_info *dpyinfo)
XFree (info);
attributes_list = x_make_monitor_attribute_list (monitors,
- n_monitors,
- 0,
- dpyinfo,
- "Xinerama");
+ n_monitors,
+ 0,
+ dpyinfo,
+ "Xinerama");
free_monitors (monitors, n_monitors);
return attributes_list;
}
@@ -4394,64 +4394,64 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo)
for (i = 0; i < n_monitors; ++i)
{
XRROutputInfo *info = XRRGetOutputInfo (dpy, resources,
- resources->outputs[i]);
+ resources->outputs[i]);
if (!info)
continue;
if (strcmp (info->name, "default") == 0)
- {
- /* Non XRandr 1.2 driver, does not give useful data. */
+ {
+ /* Non XRandr 1.2 driver, does not give useful data. */
XRRFreeOutputInfo (info);
XRRFreeScreenResources (resources);
- free_monitors (monitors, n_monitors);
- return Qnil;
- }
+ free_monitors (monitors, n_monitors);
+ return Qnil;
+ }
if (info->connection != RR_Disconnected && info->crtc != None)
- {
- XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, info->crtc);
- struct MonitorInfo *mi = &monitors[i];
- XRectangle workarea_r;
+ {
+ XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, info->crtc);
+ struct MonitorInfo *mi = &monitors[i];
+ XRectangle workarea_r;
- if (! crtc)
+ if (! crtc)
{
XRRFreeOutputInfo (info);
continue;
}
- mi->geom.x = crtc->x;
- mi->geom.y = crtc->y;
- mi->geom.width = crtc->width;
- mi->geom.height = crtc->height;
- mi->mm_width = info->mm_width;
- mi->mm_height = info->mm_height;
- mi->name = xstrdup (info->name);
-
- if (pxid != None && pxid == resources->outputs[i])
- primary = i;
- else if (primary == -1 && strcmp (info->name, "LVDS") == 0)
- primary = i;
-
- if (i == primary && x_get_net_workarea (dpyinfo, &workarea_r))
- {
- mi->work= workarea_r;
- if (! x_intersect_rectangles (&mi->geom, &mi->work, &mi->work))
- mi->work = mi->geom;
- }
- else
- mi->work = mi->geom;
-
- XRRFreeCrtcInfo (crtc);
- }
+ mi->geom.x = crtc->x;
+ mi->geom.y = crtc->y;
+ mi->geom.width = crtc->width;
+ mi->geom.height = crtc->height;
+ mi->mm_width = info->mm_width;
+ mi->mm_height = info->mm_height;
+ mi->name = xstrdup (info->name);
+
+ if (pxid != None && pxid == resources->outputs[i])
+ primary = i;
+ else if (primary == -1 && strcmp (info->name, "LVDS") == 0)
+ primary = i;
+
+ if (i == primary && x_get_net_workarea (dpyinfo, &workarea_r))
+ {
+ mi->work= workarea_r;
+ if (! x_intersect_rectangles (&mi->geom, &mi->work, &mi->work))
+ mi->work = mi->geom;
+ }
+ else
+ mi->work = mi->geom;
+
+ XRRFreeCrtcInfo (crtc);
+ }
XRRFreeOutputInfo (info);
}
XRRFreeScreenResources (resources);
attributes_list = x_make_monitor_attribute_list (monitors,
- n_monitors,
- primary,
- dpyinfo,
- "XRandr");
+ n_monitors,
+ primary,
+ dpyinfo,
+ "XRandr");
free_monitors (monitors, n_monitors);
return attributes_list;
}
@@ -4489,7 +4489,7 @@ x_get_monitor_attributes (struct x_display_info *dpyinfo)
bool xin_ok = false;
xin_ok = XineramaQueryExtension (dpy, &xin_event_base, &xin_error_base);
if (xin_ok && XineramaIsActive (dpy))
- attributes_list = x_get_monitor_attributes_xinerama (dpyinfo);
+ attributes_list = x_get_monitor_attributes_xinerama (dpyinfo);
}
#endif /* HAVE_XINERAMA */
@@ -4592,10 +4592,10 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
work.width = workarea_r.width;
work.height = workarea_r.height;
if (! gdk_rectangle_intersect (&rec, &work, &work))
- work = rec;
- }
- else
- work = rec;
+ work = rec;
+ }
+ else
+ work = rec;
}
#endif
@@ -4617,10 +4617,10 @@ Internal use only, use `display-monitor-attributes-list' instead. */)
}
attributes_list = make_monitor_attribute_list (monitors,
- n_monitors,
- primary_monitor,
- monitor_frames,
- source);
+ n_monitors,
+ primary_monitor,
+ monitor_frames,
+ source);
unblock_input ();
#else /* not USE_GTK */
@@ -4664,7 +4664,7 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
&ign, &ign);
/** XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &atts); **/
x_real_pos_and_offsets (f, &left_off, &right_off, &top_off, &bottom_off,
- NULL, NULL, &xptr, &yptr, NULL);
+ NULL, NULL, &xptr, &yptr, NULL);
unblock_input ();
/** native_width = atts.width; **/
@@ -4862,9 +4862,9 @@ selected frame's display. */)
block_input ();
XQueryPointer (FRAME_X_DISPLAY (f),
- DefaultRootWindow (FRAME_X_DISPLAY (f)),
- &root, &dummy_window, &x, &y, &dummy, &dummy,
- (unsigned int *) &dummy);
+ DefaultRootWindow (FRAME_X_DISPLAY (f)),
+ &root, &dummy_window, &x, &y, &dummy, &dummy,
+ (unsigned int *) &dummy);
unblock_input ();
return Fcons (make_number (x), make_number (y));
@@ -5150,7 +5150,7 @@ x_sync (struct frame *f)
\f
/***********************************************************************
- Window properties
+ Window properties
***********************************************************************/
DEFUN ("x-change-window-property", Fx_change_window_property,
@@ -5188,8 +5188,8 @@ FRAME. Default is to change on the edit X window. */)
CHECK_NUMBER (format);
if (XINT (format) != 8 && XINT (format) != 16
- && XINT (format) != 32)
- error ("FORMAT must be one of 8, 16 or 32");
+ && XINT (format) != 32)
+ error ("FORMAT must be one of 8, 16 or 32");
element_format = XINT (format);
}
@@ -5199,7 +5199,7 @@ FRAME. Default is to change on the edit X window. */)
nelements = x_check_property_data (value);
if (nelements == -1)
- error ("Bad data in VALUE, must be number, string or cons");
+ error ("Bad data in VALUE, must be number, string or cons");
/* The man page for XChangeProperty:
"If the specified format is 32, the property data must be a
@@ -5223,7 +5223,7 @@ FRAME. Default is to change on the edit X window. */)
/* See comment above about longs and format=32 */
elsize = element_format == 32 ? sizeof (long) : element_format >> 3;
if (SBYTES (value) % elsize != 0)
- error ("VALUE must contain an integral number of octets for FORMAT");
+ error ("VALUE must contain an integral number of octets for FORMAT");
nelements = SBYTES (value) / elsize;
}
@@ -5276,12 +5276,12 @@ FRAME nil or omitted means use the selected frame. Value is PROP. */)
static Lisp_Object
x_window_property_intern (struct frame *f,
- Window target_window,
- Atom prop_atom,
- Atom target_type,
- Lisp_Object delete_p,
- Lisp_Object vector_ret_p,
- bool *found)
+ Window target_window,
+ Atom prop_atom,
+ Atom target_type,
+ Lisp_Object delete_p,
+ Lisp_Object vector_ret_p,
+ bool *found)
{
unsigned char *tmp_data = NULL;
Lisp_Object prop_value = Qnil;
@@ -5303,47 +5303,47 @@ x_window_property_intern (struct frame *f,
tmp_data = NULL;
rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
- prop_atom, 0, bytes_remaining,
- ! NILP (delete_p), target_type,
- &actual_type, &actual_format,
- &actual_size, &bytes_remaining,
- &tmp_data);
+ prop_atom, 0, bytes_remaining,
+ ! NILP (delete_p), target_type,
+ &actual_type, &actual_format,
+ &actual_size, &bytes_remaining,
+ &tmp_data);
if (rc == Success && tmp_data)
- {
- /* The man page for XGetWindowProperty says:
- "If the returned format is 32, the returned data is represented
- as a long array and should be cast to that type to obtain the
- elements."
- This applies even if long is more than 32 bits, the X library
- converts from 32 bit elements received from the X server to long
- and passes the long array to us. Thus, for that case memcpy can not
- be used. We convert to a 32 bit type here, because so much code
- assume on that.
-
- The bytes and offsets passed to XGetWindowProperty refers to the
- property and those are indeed in 32 bit quantities if format is
- 32. */
-
- if (LONG_WIDTH > 32 && actual_format == 32)
- {
- unsigned long i;
- int *idata = (int *) tmp_data;
- long *ldata = (long *) tmp_data;
-
- for (i = 0; i < actual_size; ++i)
- idata[i] = (int) ldata[i];
- }
-
- if (NILP (vector_ret_p))
- prop_value = make_string ((char *) tmp_data,
- (actual_format >> 3) * actual_size);
- else
- prop_value = x_property_data_to_lisp (f,
- tmp_data,
- actual_type,
- actual_format,
- actual_size);
- }
+ {
+ /* The man page for XGetWindowProperty says:
+ "If the returned format is 32, the returned data is represented
+ as a long array and should be cast to that type to obtain the
+ elements."
+ This applies even if long is more than 32 bits, the X library
+ converts from 32 bit elements received from the X server to long
+ and passes the long array to us. Thus, for that case memcpy can not
+ be used. We convert to a 32 bit type here, because so much code
+ assume on that.
+
+ The bytes and offsets passed to XGetWindowProperty refers to the
+ property and those are indeed in 32 bit quantities if format is
+ 32. */
+
+ if (LONG_WIDTH > 32 && actual_format == 32)
+ {
+ unsigned long i;
+ int *idata = (int *) tmp_data;
+ long *ldata = (long *) tmp_data;
+
+ for (i = 0; i < actual_size; ++i)
+ idata[i] = (int) ldata[i];
+ }
+
+ if (NILP (vector_ret_p))
+ prop_value = make_string ((char *) tmp_data,
+ (actual_format >> 3) * actual_size);
+ else
+ prop_value = x_property_data_to_lisp (f,
+ tmp_data,
+ actual_type,
+ actual_format,
+ actual_size);
+ }
if (tmp_data) XFree (tmp_data);
}
@@ -5391,31 +5391,31 @@ no value of TYPE (always string in the MS Windows case). */)
if (STRINGP (type))
{
if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
- target_type = AnyPropertyType;
+ target_type = AnyPropertyType;
else
- target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
+ target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
}
prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
prop_value = x_window_property_intern (f,
- target_window,
- prop_atom,
- target_type,
- delete_p,
- vector_ret_p,
- &found);
+ target_window,
+ prop_atom,
+ target_type,
+ delete_p,
+ vector_ret_p,
+ &found);
if (NILP (prop_value)
&& ! found
&& NILP (source)
&& target_window != FRAME_OUTER_WINDOW (f))
{
prop_value = x_window_property_intern (f,
- FRAME_OUTER_WINDOW (f),
- prop_atom,
- target_type,
- delete_p,
- vector_ret_p,
- &found);
+ FRAME_OUTER_WINDOW (f),
+ prop_atom,
+ target_type,
+ delete_p,
+ vector_ret_p,
+ &found);
}
@@ -5471,13 +5471,13 @@ Otherwise, the return value is a vector with the following fields:
&& target_window != FRAME_OUTER_WINDOW (f))
{
/* analogous behavior to x-window-property: if property isn't found
- on the frame's inner window and no alternate window id was
- provided, try the frame's outer window. */
+ on the frame's inner window and no alternate window id was
+ provided, try the frame's outer window. */
target_window = FRAME_OUTER_WINDOW (f);
rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
- prop_atom, 0, 0, False, AnyPropertyType,
- &actual_type, &actual_format, &actual_size,
- &bytes_remaining, &tmp_data);
+ prop_atom, 0, 0, False, AnyPropertyType,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
}
if (rc == Success && actual_format != 0)
@@ -5499,7 +5499,7 @@ Otherwise, the return value is a vector with the following fields:
***********************************************************************/
static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
- Lisp_Object, int, int, int *, int *);
+ Lisp_Object, int, int, int *, int *);
/* The frame of a currently visible tooltip. */
@@ -5740,12 +5740,12 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
/* Border. */
f->border_width,
CopyFromParent, InputOutput, CopyFromParent,
- mask, &attrs);
+ mask, &attrs);
initial_set_up_x_back_buffer (f);
XChangeProperty (FRAME_X_DISPLAY (f), tip_window,
- FRAME_DISPLAY_INFO (f)->Xatom_net_window_type,
- XA_ATOM, 32, PropModeReplace,
- (unsigned char *)&type, 1);
+ FRAME_DISPLAY_INFO (f)->Xatom_net_window_type,
+ XA_ATOM, 32, PropModeReplace,
+ (unsigned char *)&type, 1);
unblock_input ();
}
@@ -5786,7 +5786,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms)
if (FRAME_DISPLAY_INFO (f)->n_planes == 1)
disptype = Qmono;
else if (FRAME_DISPLAY_INFO (f)->visual->class == GrayScale
- || FRAME_DISPLAY_INFO (f)->visual->class == StaticGray)
+ || FRAME_DISPLAY_INFO (f)->visual->class == StaticGray)
disptype = intern ("grayscale");
else
disptype = intern ("color");
@@ -5880,26 +5880,26 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object
attributes = Fx_display_monitor_attributes_list (frame);
/* Try to determine the monitor where the mouse pointer is and
- its geometry. See bug#22549. */
+ its geometry. See bug#22549. */
while (CONSP (attributes))
{
- monitor = XCAR (attributes);
- geometry = Fassq (Qgeometry, monitor);
- if (CONSP (geometry))
- {
- min_x = XINT (Fnth (make_number (1), geometry));
- min_y = XINT (Fnth (make_number (2), geometry));
- max_x = min_x + XINT (Fnth (make_number (3), geometry));
- max_y = min_y + XINT (Fnth (make_number (4), geometry));
- if (min_x <= *root_x && *root_x < max_x
- && min_y <= *root_y && *root_y < max_y)
- {
- break;
- }
- max_y = -1;
- }
-
- attributes = XCDR (attributes);
+ monitor = XCAR (attributes);
+ geometry = Fassq (Qgeometry, monitor);
+ if (CONSP (geometry))
+ {
+ min_x = XINT (Fnth (make_number (1), geometry));
+ min_y = XINT (Fnth (make_number (2), geometry));
+ max_x = min_x + XINT (Fnth (make_number (3), geometry));
+ max_y = min_y + XINT (Fnth (make_number (4), geometry));
+ if (min_x <= *root_x && *root_x < max_x
+ && min_y <= *root_y && *root_y < max_y)
+ {
+ break;
+ }
+ max_y = -1;
+ }
+
+ attributes = XCDR (attributes);
}
}
@@ -6103,12 +6103,12 @@ Text larger than the specified size is clipped. */)
block_input ();
ok = xg_prepare_tooltip (f, string, &width, &height);
if (ok)
- {
+ {
compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y);
- xg_show_tooltip (f, root_x, root_y);
- /* This is used in Fx_hide_tip. */
- XSETFRAME (tip_frame, f);
- }
+ xg_show_tooltip (f, root_x, root_y);
+ /* This is used in Fx_hide_tip. */
+ XSETFRAME (tip_frame, f);
+ }
unblock_input ();
if (ok) goto start_timer;
}
@@ -6482,20 +6482,20 @@ value of DIR as in previous invocations; this is standard Windows behavior. */)
XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext);
XmTextFieldReplace (wtext, 0, last_pos,
- (SSDATA (Ffile_name_nondirectory (default_filename))));
+ (SSDATA (Ffile_name_nondirectory (default_filename))));
/* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME
- must include the path for this to work. */
+ must include the path for this to work. */
default_xmstring = XmStringCreateLocalized (SSDATA (default_filename));
if (XmListItemExists (list, default_xmstring))
- {
- int item_pos = XmListItemPos (list, default_xmstring);
- /* Select the item and scroll it into view. */
- XmListSelectPos (list, item_pos, True);
- XmListSetPos (list, item_pos);
- }
+ {
+ int item_pos = XmListItemPos (list, default_xmstring);
+ /* Select the item and scroll it into view. */
+ XmListSelectPos (list, item_pos, True);
+ XmListSetPos (list, item_pos);
+ }
XmStringFree (default_xmstring);
}
@@ -6511,14 +6511,14 @@ value of DIR as in previous invocations; this is standard Windows behavior. */)
x_menu_wait_for_event (0);
XtAppNextEvent (Xt_app_con, &event);
if (event.type == KeyPress
- && FRAME_X_DISPLAY (f) == event.xkey.display)
- {
- KeySym keysym = XLookupKeysym (&event.xkey, 0);
+ && FRAME_X_DISPLAY (f) == event.xkey.display)
+ {
+ KeySym keysym = XLookupKeysym (&event.xkey, 0);
- /* Pop down on C-g. */
- if (keysym == XK_g && (event.xkey.state & ControlMask) != 0)
- XtUnmanageChild (dialog);
- }
+ /* Pop down on C-g. */
+ if (keysym == XK_g && (event.xkey.state & ControlMask) != 0)
+ XtUnmanageChild (dialog);
+ }
(void) x_dispatch_event (&event, FRAME_X_DISPLAY (f));
}
@@ -6601,8 +6601,8 @@ value of DIR as in previous invocations; this is standard Windows behavior. */)
cdef_file = SSDATA (dir);
fn = xg_get_file_name (f, SSDATA (prompt), cdef_file,
- ! NILP (mustmatch),
- ! NILP (only_dir_p));
+ ! NILP (mustmatch),
+ ! NILP (only_dir_p));
if (fn)
{
@@ -6656,7 +6656,7 @@ nil, it defaults to the selected frame. */)
{
font_param = Fframe_parameter (frame, Qfont_parameter);
if (STRINGP (font_param))
- default_name = xlispstrdup (font_param);
+ default_name = xlispstrdup (font_param);
}
font = xg_get_font (f, default_name);
@@ -7134,7 +7134,7 @@ When using Gtk+ tooltips, the tooltip face is not used. */);
Fprovide (intern_c_string ("move-toolbar"), Qnil);
DEFVAR_LISP ("gtk-version-string", Vgtk_version_string,
- doc: /* Version info for GTK+. */);
+ doc: /* Version info for GTK+. */);
{
char gtk_version[sizeof ".." + 3 * INT_STRLEN_BOUND (int)];
int len = sprintf (gtk_version, "%d.%d.%d",
@@ -7147,12 +7147,12 @@ When using Gtk+ tooltips, the tooltip face is not used. */);
Fprovide (intern_c_string ("cairo"), Qnil);
DEFVAR_LISP ("cairo-version-string", Vcairo_version_string,
- doc: /* Version info for cairo. */);
+ doc: /* Version info for cairo. */);
{
char cairo_version[sizeof ".." + 3 * INT_STRLEN_BOUND (int)];
int len = sprintf (cairo_version, "%d.%d.%d",
CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
- CAIRO_VERSION_MICRO);
+ CAIRO_VERSION_MICRO);
Vcairo_version_string = make_pure_string (cairo_version, len, len, false);
}
#endif
diff --git a/src/xfont.c b/src/xfont.c
index 09ca628..b5e794a 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -995,7 +995,7 @@ xfont_text_extents (struct font *font, unsigned int *code,
static int
xfont_draw (struct glyph_string *s, int from, int to, int x, int y,
- bool with_background)
+ bool with_background)
{
XFontStruct *xfont = ((struct xfont_info *) s->font)->xfont;
int len = to - from;
@@ -1020,20 +1020,20 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y,
{
if (s->padding_p)
for (i = 0; i < len; i++)
- XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x + i, y, str + i, 1);
else
- XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawImageString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x, y, str, len);
}
else
{
if (s->padding_p)
for (i = 0; i < len; i++)
- XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x + i, y, str + i, 1);
else
- XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawString (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x, y, str, len);
}
unblock_input ();
@@ -1046,20 +1046,20 @@ xfont_draw (struct glyph_string *s, int from, int to, int x, int y,
{
if (s->padding_p)
for (i = 0; i < len; i++)
- XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x + i, y, s->char2b + from + i, 1);
else
- XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawImageString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x, y, s->char2b + from, len);
}
else
{
if (s->padding_p)
for (i = 0; i < len; i++)
- XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x + i, y, s->char2b + from + i, 1);
else
- XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
+ XDrawString16 (FRAME_X_DISPLAY (s->f), FRAME_X_DRAWABLE (s->f),
gc, x, y, s->char2b + from, len);
}
unblock_input ();
diff --git a/src/xftfont.c b/src/xftfont.c
index 7f0e3c6..5e1e89e 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -212,7 +212,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
Lisp_Object val = XCDR (XCAR (tail));
if (EQ (key, QCantialias))
- FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue);
+ FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue);
else if (EQ (key, QChinting))
FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue);
else if (EQ (key, QCautohint))
@@ -221,24 +221,24 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
{
if (INTEGERP (val))
FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val));
- else if (SYMBOLP (val)
- && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+ else if (SYMBOLP (val)
+ && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
FcPatternAddInteger (pat, FC_HINT_STYLE, ival);
}
else if (EQ (key, QCrgba))
{
if (INTEGERP (val))
FcPatternAddInteger (pat, FC_RGBA, XINT (val));
- else if (SYMBOLP (val)
- && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+ else if (SYMBOLP (val)
+ && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
FcPatternAddInteger (pat, FC_RGBA, ival);
}
else if (EQ (key, QClcdfilter))
{
if (INTEGERP (val))
FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val));
- else if (SYMBOLP (val)
- && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+ else if (SYMBOLP (val)
+ && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
FcPatternAddInteger (pat, FC_LCD_FILTER, ival);
}
#ifdef FC_EMBOLDEN
@@ -583,7 +583,7 @@ xftfont_get_xft_draw (struct frame *f)
{
block_input ();
xft_draw= XftDrawCreate (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
+ FRAME_X_DRAWABLE (f),
FRAME_X_VISUAL (f),
FRAME_X_COLORMAP (f));
unblock_input ();
@@ -595,7 +595,7 @@ xftfont_get_xft_draw (struct frame *f)
static int
xftfont_draw (struct glyph_string *s, int from, int to, int x, int y,
- bool with_background)
+ bool with_background)
{
block_input ();
@@ -650,7 +650,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y,
x + i, y, code + i, 1);
else
XftDrawGlyphs (xft_draw, &fg, xftfont_info->xftfont,
- x, y, code, len);
+ x, y, code, len);
/* Need to explicitly mark the frame dirty because we didn't call
FRAME_X_DRAWABLE in order to draw: we cached the drawable in the
XftDraw structure. */
@@ -706,7 +706,7 @@ xftfont_drop_xrender_surfaces (struct frame *f)
static bool
xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object,
- Lisp_Object entity)
+ Lisp_Object entity)
{
struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object);
FcPattern *oldpat = info->xftfont->pattern;
diff --git a/src/xgselect.c b/src/xgselect.c
index a9461a5..21daba0 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -89,16 +89,16 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
for (i = 0; i < n_gfds; ++i)
{
if (gfds[i].events & G_IO_IN)
- {
- FD_SET (gfds[i].fd, &all_rfds);
- if (gfds[i].fd > max_fds) max_fds = gfds[i].fd;
- }
+ {
+ FD_SET (gfds[i].fd, &all_rfds);
+ if (gfds[i].fd > max_fds) max_fds = gfds[i].fd;
+ }
if (gfds[i].events & G_IO_OUT)
- {
- FD_SET (gfds[i].fd, &all_wfds);
- if (gfds[i].fd > max_fds) max_fds = gfds[i].fd;
- have_wfds = true;
- }
+ {
+ FD_SET (gfds[i].fd, &all_wfds);
+ if (gfds[i].fd > max_fds) max_fds = gfds[i].fd;
+ have_wfds = true;
+ }
}
if (must_free)
@@ -121,26 +121,26 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
else if (nfds > 0)
{
for (i = 0; i < fds_lim; ++i)
- {
- if (FD_ISSET (i, &all_rfds))
- {
- if (rfds && FD_ISSET (i, rfds)) ++retval;
- else ++our_fds;
- }
- else if (rfds)
- FD_CLR (i, rfds);
-
- if (have_wfds && FD_ISSET (i, &all_wfds))
- {
- if (wfds && FD_ISSET (i, wfds)) ++retval;
- else ++our_fds;
- }
- else if (wfds)
- FD_CLR (i, wfds);
-
- if (efds && FD_ISSET (i, efds))
- ++retval;
- }
+ {
+ if (FD_ISSET (i, &all_rfds))
+ {
+ if (rfds && FD_ISSET (i, rfds)) ++retval;
+ else ++our_fds;
+ }
+ else if (rfds)
+ FD_CLR (i, rfds);
+
+ if (have_wfds && FD_ISSET (i, &all_wfds))
+ {
+ if (wfds && FD_ISSET (i, wfds)) ++retval;
+ else ++our_fds;
+ }
+ else if (wfds)
+ FD_CLR (i, wfds);
+
+ if (efds && FD_ISSET (i, efds))
+ ++retval;
+ }
}
/* If Gtk+ is in use eventually gtk_main_iteration will be called,
@@ -154,11 +154,11 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
{
int pselect_errno = errno;
/* Prevent g_main_dispatch recursion, that would occur without
- block_input wrapper, because event handlers call
- unblock_input. Event loop recursion was causing Bug#15801. */
+ block_input wrapper, because event handlers call
+ unblock_input. Event loop recursion was causing Bug#15801. */
block_input ();
while (g_main_context_pending (context))
- g_main_context_dispatch (context);
+ g_main_context_dispatch (context);
unblock_input ();
errno = pselect_errno;
}
diff --git a/src/xmenu.c b/src/xmenu.c
index 9ab7bdf..4cc2ba3 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -162,13 +162,13 @@ x_menu_wait_for_event (void *data)
while (
#ifdef USE_X_TOOLKIT
- ! XtAppPending (Xt_app_con)
+ ! XtAppPending (Xt_app_con)
#elif defined USE_GTK
- ! gtk_events_pending ()
+ ! gtk_events_pending ()
#else
- ! XPending (data)
+ ! XPending (data)
#endif
- )
+ )
{
struct timespec next_time = timer_check (), *ntp;
fd_set read_fds;
@@ -177,17 +177,17 @@ x_menu_wait_for_event (void *data)
FD_ZERO (&read_fds);
for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
- {
- int fd = ConnectionNumber (dpyinfo->display);
- FD_SET (fd, &read_fds);
- if (fd > n) n = fd;
- XFlush (dpyinfo->display);
- }
+ {
+ int fd = ConnectionNumber (dpyinfo->display);
+ FD_SET (fd, &read_fds);
+ if (fd > n) n = fd;
+ XFlush (dpyinfo->display);
+ }
if (! timespec_valid_p (next_time))
- ntp = 0;
+ ntp = 0;
else
- ntp = &next_time;
+ ntp = &next_time;
#if defined USE_GTK && defined HAVE_GTK3
/* Gtk3 have arrows on menus when they don't fit. When the
@@ -222,44 +222,44 @@ popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo,
while (popup_activated_flag)
{
if (initial_event)
- {
- event = *initial_event;
- initial_event = 0;
- }
+ {
+ event = *initial_event;
+ initial_event = 0;
+ }
else
- {
- if (do_timers) x_menu_wait_for_event (0);
- XtAppNextEvent (Xt_app_con, &event);
- }
+ {
+ if (do_timers) x_menu_wait_for_event (0);
+ XtAppNextEvent (Xt_app_con, &event);
+ }
/* Make sure we don't consider buttons grabbed after menu goes.
- And make sure to deactivate for any ButtonRelease,
- even if XtDispatchEvent doesn't do that. */
+ And make sure to deactivate for any ButtonRelease,
+ even if XtDispatchEvent doesn't do that. */
if (event.type == ButtonRelease
- && dpyinfo->display == event.xbutton.display)
- {
- dpyinfo->grabbed &= ~(1 << event.xbutton.button);
+ && dpyinfo->display == event.xbutton.display)
+ {
+ dpyinfo->grabbed &= ~(1 << event.xbutton.button);
#ifdef USE_MOTIF /* Pretending that the event came from a
- Btn1Down seems the only way to convince Motif to
- activate its callbacks; setting the XmNmenuPost
- isn't working. --marcus@sysc.pdx.edu. */
- event.xbutton.button = 1;
- /* Motif only pops down menus when no Ctrl, Alt or Mod
- key is pressed and the button is released. So reset key state
- so Motif thinks this is the case. */
- event.xbutton.state = 0;
+ Btn1Down seems the only way to convince Motif to
+ activate its callbacks; setting the XmNmenuPost
+ isn't working. --marcus@sysc.pdx.edu. */
+ event.xbutton.button = 1;
+ /* Motif only pops down menus when no Ctrl, Alt or Mod
+ key is pressed and the button is released. So reset key state
+ so Motif thinks this is the case. */
+ event.xbutton.state = 0;
#endif
- }
+ }
/* Pop down on C-g and Escape. */
else if (event.type == KeyPress
- && dpyinfo->display == event.xbutton.display)
- {
- KeySym keysym = XLookupKeysym (&event.xkey, 0);
+ && dpyinfo->display == event.xbutton.display)
+ {
+ KeySym keysym = XLookupKeysym (&event.xkey, 0);
- if ((keysym == XK_g && (event.xkey.state & ControlMask) != 0)
- || keysym == XK_Escape) /* Any escape, ignore modifiers. */
- popup_activated_flag = 0;
- }
+ if ((keysym == XK_g && (event.xkey.state & ControlMask) != 0)
+ || keysym == XK_Escape) /* Any escape, ignore modifiers. */
+ popup_activated_flag = 0;
+ }
x_dispatch_event (&event, event.xany.display);
}
@@ -300,39 +300,39 @@ If FRAME is nil or not given, use the selected frame. */)
#ifdef USE_MOTIF
{
- Arg al[2];
- WidgetList list;
- Cardinal nr;
- XtSetArg (al[0], XtNchildren, &list);
- XtSetArg (al[1], XtNnumChildren, &nr);
- XtGetValues (menubar, al, 2);
- ev.xbutton.window = XtWindow (list[0]);
+ Arg al[2];
+ WidgetList list;
+ Cardinal nr;
+ XtSetArg (al[0], XtNchildren, &list);
+ XtSetArg (al[1], XtNnumChildren, &nr);
+ XtGetValues (menubar, al, 2);
+ ev.xbutton.window = XtWindow (list[0]);
}
#endif
XTranslateCoordinates (FRAME_X_DISPLAY (f),
- /* From-window, to-window. */
- ev.xbutton.window, ev.xbutton.root,
+ /* From-window, to-window. */
+ ev.xbutton.window, ev.xbutton.root,
- /* From-position, to-position. */
- ev.xbutton.x, ev.xbutton.y,
- &ev.xbutton.x_root, &ev.xbutton.y_root,
+ /* From-position, to-position. */
+ ev.xbutton.x, ev.xbutton.y,
+ &ev.xbutton.x_root, &ev.xbutton.y_root,
- /* Child of win. */
- &child);
+ /* Child of win. */
+ &child);
error_p = x_had_errors_p (FRAME_X_DISPLAY (f));
x_uncatch_errors_after_check ();
if (! error_p)
- {
- ev.type = ButtonPress;
- ev.xbutton.state = 0;
-
- XtDispatchEvent (&ev);
- ev.xbutton.type = ButtonRelease;
- ev.xbutton.state = Button1Mask;
- XtDispatchEvent (&ev);
- }
+ {
+ ev.type = ButtonPress;
+ ev.xbutton.state = 0;
+
+ XtDispatchEvent (&ev);
+ ev.xbutton.type = ButtonRelease;
+ ev.xbutton.state = Button1Mask;
+ XtDispatchEvent (&ev);
+ }
}
unblock_input ();
@@ -368,11 +368,11 @@ If FRAME is nil or not given, use the selected frame. */)
GList *children = gtk_container_get_children (GTK_CONTAINER (menubar));
if (children)
- {
- g_signal_emit_by_name (children->data, "activate_item");
- popup_activated_flag = 1;
- g_list_free (children);
- }
+ {
+ g_signal_emit_by_name (children->data, "activate_item");
+ popup_activated_flag = 1;
+ g_list_free (children);
+ }
}
unblock_input ();
@@ -420,7 +420,7 @@ x_activate_menubar (struct frame *f)
#ifdef USE_GTK
if (! xg_win_to_widget (FRAME_X_DISPLAY (f),
- f->output_data.x->saved_menu_event->xany.window))
+ f->output_data.x->saved_menu_event->xany.window))
return;
#endif
@@ -429,7 +429,7 @@ x_activate_menubar (struct frame *f)
popup_activated_flag = 1;
#ifdef USE_GTK
XPutBackEvent (f->output_data.x->display_info->display,
- f->output_data.x->saved_menu_event);
+ f->output_data.x->saved_menu_event);
#else
XtDispatchEvent (f->output_data.x->saved_menu_event);
#endif
@@ -509,7 +509,7 @@ menu_highlight_callback (GtkWidget *widget, gpointer call_data)
directly without using an Emacs event. This is what the Lucid code
does below. */
show_help_event (popup_activated_flag <= 1 ? cb_data->cl_data->f : NULL,
- widget, help);
+ widget, help);
}
#else
static void
@@ -568,9 +568,9 @@ menubar_selection_callback (GtkWidget *widget, gpointer client_data)
unblock_input ();
find_and_call_menu_selection (cb_data->cl_data->f,
- cb_data->cl_data->menu_bar_items_used,
- cb_data->cl_data->menu_bar_vector,
- cb_data->call_data);
+ cb_data->cl_data->menu_bar_items_used,
+ cb_data->cl_data->menu_bar_vector,
+ cb_data->call_data);
}
#else /* not USE_GTK */
@@ -588,7 +588,7 @@ menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
if (!f)
return;
find_and_call_menu_selection (f, f->menu_bar_items_used,
- f->menu_bar_vector, client_data);
+ f->menu_bar_vector, client_data);
}
#endif /* not USE_GTK */
\f
@@ -646,7 +646,7 @@ apply_systemfont_to_dialog (Widget w)
{
XrmDatabase db = XtDatabase (XtDisplay (w));
if (db)
- XrmPutStringResource (&db, "*dialog.font", fn);
+ XrmPutStringResource (&db, "*dialog.font", fn);
}
}
@@ -659,10 +659,10 @@ apply_systemfont_to_menu (struct frame *f, Widget w)
{
XrmDatabase db = XtDatabase (XtDisplay (w));
if (db)
- {
- XrmPutStringResource (&db, "*menubar*font", fn);
- XrmPutStringResource (&db, "*popup*font", fn);
- }
+ {
+ XrmPutStringResource (&db, "*menubar*font", fn);
+ XrmPutStringResource (&db, "*popup*font", fn);
+ }
}
}
@@ -850,10 +850,10 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
Lisp_Object string;
string = AREF (items, i + 1);
if (NILP (string))
- break;
- wv->name = SSDATA (string);
- update_submenu_strings (wv->contents);
- wv = wv->next;
+ break;
+ wv->name = SSDATA (string);
+ update_submenu_strings (wv->contents);
+ wv = wv->next;
}
}
@@ -907,20 +907,20 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
/* The fourth arg is DEEP_P, which says to consider the entire
menu trees we supply, rather than just the menu bar item names. */
xg_modify_menubar_widgets (menubar_widget,
- f,
- first_wv,
- deep_p,
- G_CALLBACK (menubar_selection_callback),
- G_CALLBACK (popup_deactivate_callback),
- G_CALLBACK (menu_highlight_callback));
+ f,
+ first_wv,
+ deep_p,
+ G_CALLBACK (menubar_selection_callback),
+ G_CALLBACK (popup_deactivate_callback),
+ G_CALLBACK (menu_highlight_callback));
}
else
{
menubar_widget
- = xg_create_widget ("menubar", "menubar", f, first_wv,
- G_CALLBACK (menubar_selection_callback),
- G_CALLBACK (popup_deactivate_callback),
- G_CALLBACK (menu_highlight_callback));
+ = xg_create_widget ("menubar", "menubar", f, first_wv,
+ G_CALLBACK (menubar_selection_callback),
+ G_CALLBACK (popup_deactivate_callback),
+ G_CALLBACK (menu_highlight_callback));
f->output_data.x->menubar_widget = menubar_widget;
}
@@ -948,7 +948,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
apply_systemfont_to_menu (f, f->output_data.x->column_widget);
#endif
menubar_widget = lw_create_widget ("menubar", "menubar", id,
- first_wv,
+ first_wv,
f->output_data.x->column_widget,
false,
popup_activate_callback,
@@ -983,13 +983,13 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
#ifdef USE_LUCID
/* Experimentally, we now get the right results
for -geometry -0-0 without this. 24 Aug 96, rms.
- Maybe so, but the menu bar size is missing the pixels so the
- WM size hints are off by these pixels. Jan D, oct 2009. */
+ Maybe so, but the menu bar size is missing the pixels so the
+ WM size hints are off by these pixels. Jan D, oct 2009. */
if (FRAME_EXTERNAL_MENU_BAR (f))
{
- Dimension ibw = 0;
+ Dimension ibw = 0;
- XtVaGetValues (f->output_data.x->column_widget,
+ XtVaGetValues (f->output_data.x->column_widget,
XtNinternalBorderWidth, &ibw, NULL);
menubar_size += ibw;
}
@@ -1206,9 +1206,9 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
xg_crazy_callback_abort = true;
menu = xg_create_widget ("popup", first_wv->name, f, first_wv,
- G_CALLBACK (popup_selection_callback),
- G_CALLBACK (popup_deactivate_callback),
- G_CALLBACK (menu_highlight_callback));
+ G_CALLBACK (popup_selection_callback),
+ G_CALLBACK (popup_deactivate_callback),
+ G_CALLBACK (menu_highlight_callback));
xg_crazy_callback_abort = false;
if (use_pos_func)
@@ -1222,15 +1222,15 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
block_input ();
XTranslateCoordinates (FRAME_X_DISPLAY (f),
- /* From-window, to-window. */
- FRAME_X_WINDOW (f),
- FRAME_DISPLAY_INFO (f)->root_window,
+ /* From-window, to-window. */
+ FRAME_X_WINDOW (f),
+ FRAME_DISPLAY_INFO (f)->root_window,
- /* From-position, to-position. */
- x, y, &x, &y,
+ /* From-position, to-position. */
+ x, y, &x, &y,
- /* Child of win. */
- &dummy_window);
+ /* Child of win. */
+ &dummy_window);
unblock_input ();
popup_x_y.x = x;
popup_x_y.y = y;
@@ -1242,8 +1242,8 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
if (for_click)
{
for (i = 0; i < 5; i++)
- if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
- break;
+ if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
+ break;
/* If keys aren't grabbed (i.e., a mouse up event), use 0. */
if (i == 5) i = 0;
}
@@ -1259,7 +1259,7 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
if (gtk_widget_get_mapped (menu))
{
/* Set this to one. popup_widget_loop increases it by one, so it becomes
- two. show_help_echo uses this to detect popup menus. */
+ two. show_help_echo uses this to detect popup menus. */
popup_activated_flag = 1;
/* Process events that apply to the menu. */
popup_widget_loop (true, menu);
@@ -1325,10 +1325,10 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
menu_id = widget_id_tick++;
menu = lw_create_widget ("popup", first_wv->name, menu_id, first_wv,
- f->output_data.x->widget, true, 0,
- popup_selection_callback,
- popup_deactivate_callback,
- menu_highlight_callback);
+ f->output_data.x->widget, true, 0,
+ popup_selection_callback,
+ popup_deactivate_callback,
+ menu_highlight_callback);
event->type = ButtonPress;
event->serial = 0;
@@ -1345,15 +1345,15 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
x += FRAME_LEFT_SCROLL_BAR_AREA_WIDTH (f);
XTranslateCoordinates (FRAME_X_DISPLAY (f),
- /* From-window, to-window. */
- FRAME_X_WINDOW (f),
- FRAME_DISPLAY_INFO (f)->root_window,
+ /* From-window, to-window. */
+ FRAME_X_WINDOW (f),
+ FRAME_DISPLAY_INFO (f)->root_window,
- /* From-position, to-position. */
- x, y, &x, &y,
+ /* From-position, to-position. */
+ x, y, &x, &y,
- /* Child of win. */
- &dummy_window);
+ /* Child of win. */
+ &dummy_window);
unblock_input ();
event->x_root = x;
@@ -1513,13 +1513,13 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
help = AREF (menu_items, i + MENU_ITEMS_ITEM_HELP);
#ifndef HAVE_MULTILINGUAL_MENU
- if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
+ if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
{
item_name = ENCODE_MENU_STRING (item_name);
ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name);
}
- if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
+ if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
descrip = ENCODE_MENU_STRING (descrip);
ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip);
@@ -1679,9 +1679,9 @@ create_and_show_dialog (struct frame *f, widget_value *first_wv)
eassert (FRAME_X_P (f));
menu = xg_create_widget ("dialog", first_wv->name, f, first_wv,
- G_CALLBACK (dialog_selection_callback),
- G_CALLBACK (popup_deactivate_callback),
- 0);
+ G_CALLBACK (dialog_selection_callback),
+ G_CALLBACK (popup_deactivate_callback),
+ 0);
if (menu)
{
@@ -1729,8 +1729,8 @@ create_and_show_dialog (struct frame *f, widget_value *first_wv)
apply_systemfont_to_dialog (f->output_data.x->widget);
#endif
lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
- f->output_data.x->widget, true, 0,
- dialog_selection_callback, 0, 0);
+ f->output_data.x->widget, true, 0,
+ dialog_selection_callback, 0, 0);
lw_modify_all_widgets (dialog_id, first_wv->contents, True);
/* Display the dialog box. */
lw_pop_up_all_widgets (dialog_id);
@@ -1852,8 +1852,8 @@ x_dialog_show (struct frame *f, Lisp_Object title,
wv = make_widget_value (dialog_name, NULL, false, Qnil);
/* Frame title: 'Q' = Question, 'I' = Information.
- Can also have 'E' = Error if, one day, we want
- a popup for errors. */
+ Can also have 'E' = Error if, one day, we want
+ a popup for errors. */
if (NILP (header))
dialog_name[0] = 'Q';
else
@@ -2079,7 +2079,7 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
int left_off, top_off;
x_real_pos_and_offsets (f, &left_off, NULL, &top_off, NULL,
- NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
x += left_off;
y += top_off;
@@ -2100,8 +2100,8 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
Lisp_Object pane_name, prefix;
const char *pane_string;
- maxlines = max (maxlines, lines);
- lines = 0;
+ maxlines = max (maxlines, lines);
+ lines = 0;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
pane_string = (NILP (pane_name)
@@ -2179,7 +2179,7 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
goto return_entry;
}
i += MENU_ITEMS_ITEM_LENGTH;
- lines++;
+ lines++;
}
}
@@ -2228,8 +2228,8 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
if (!(menuflags & MENU_FOR_CLICK))
{
/* If position was not given by a mouse click, adjust so upper left
- corner of the menu as a whole ends up at given coordinates. This
- is what x-popup-menu says in its documentation. */
+ corner of the menu as a whole ends up at given coordinates. This
+ is what x-popup-menu says in its documentation. */
x += width/2;
y += 1.5*height/(maxlines+2);
}
@@ -2248,8 +2248,8 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
a loop that doesn't give Emacs a chance to process it. */
menu_help_frame = f;
status = XMenuActivate (FRAME_X_DISPLAY (f), menu, &pane, &selidx,
- x, y, ButtonReleaseMask, &datap,
- menu_help_callback);
+ x, y, ButtonReleaseMask, &datap,
+ menu_help_callback);
pane_prefix = Qnil;
switch (status)
diff --git a/src/xml.c b/src/xml.c
index 7d61dc7..6fb4b17 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -231,18 +231,18 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url,
{
Lisp_Object r = Qnil;
if (NILP(discard_comments))
- {
- /* If the document has toplevel comments, then this should
- get us the nodes and the comments. */
- xmlNode *n = doc->children;
-
- while (n) {
- if (!NILP (r))
- result = Fcons (r, result);
- r = make_dom (n);
- n = n->next;
- }
- }
+ {
+ /* If the document has toplevel comments, then this should
+ get us the nodes and the comments. */
+ xmlNode *n = doc->children;
+
+ while (n) {
+ if (!NILP (r))
+ result = Fcons (r, result);
+ r = make_dom (n);
+ n = n->next;
+ }
+ }
if (NILP (result)) {
/* The document doesn't have toplevel comments or we discarded
diff --git a/src/xrdb.c b/src/xrdb.c
index b4bc118..d84a52a 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -82,9 +82,9 @@ x_get_customization_string (XrmDatabase db, const char *name,
(We treat this just like %L. If someone can tell us what
we're really supposed to do, dandy.)
%t The territory part of the display's language string
- (This never gets used.)
+ (This never gets used.)
%c The codeset part of the display's language string
- (This never gets used either.)
+ (This never gets used either.)
%C The customization string retrieved from the resource
database associated with display.
(This is x_customization_string.)
diff --git a/src/xselect.c b/src/xselect.c
index b997cc8..502662e 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -46,12 +46,12 @@ static bool x_convert_selection (Lisp_Object, Lisp_Object, Atom, bool,
struct x_display_info *);
static bool waiting_for_other_props_on_window (Display *, Window);
static struct prop_location *expect_property_change (Display *, Window,
- Atom, int);
+ Atom, int);
static void unexpect_property_change (struct prop_location *);
static void wait_for_property_change (struct prop_location *);
static Lisp_Object x_get_window_property_as_lisp_data (struct x_display_info *,
- Window, Atom,
- Lisp_Object, Atom);
+ Window, Atom,
+ Lisp_Object, Atom);
static Lisp_Object selection_data_to_lisp_data (struct x_display_info *,
const unsigned char *,
ptrdiff_t, Atom, int);
@@ -555,7 +555,7 @@ static int x_reply_selection_request_cnt;
static void
x_reply_selection_request (struct selection_input_event *event,
- struct x_display_info *dpyinfo)
+ struct x_display_info *dpyinfo)
{
XEvent reply_base;
XSelectionEvent *reply = &(reply_base.xselection);
@@ -649,10 +649,10 @@ x_reply_selection_request (struct selection_input_event *event,
int format_bytes = cs->format / 8;
bool had_errors_p = x_had_errors_p (display);
- /* Must set this inside block_input (). unblock_input may read
- events and setting property_change_reply in
- wait_for_property_change is then too late. */
- set_property_change_object (cs->wait_object);
+ /* Must set this inside block_input (). unblock_input may read
+ events and setting property_change_reply in
+ wait_for_property_change is then too late. */
+ set_property_change_object (cs->wait_object);
unblock_input ();
bytes_remaining = cs->size;
@@ -693,8 +693,8 @@ x_reply_selection_request (struct selection_input_event *event,
: format_bytes);
XFlush (display);
had_errors_p = x_had_errors_p (display);
- /* See comment above about property_change_reply. */
- set_property_change_object (cs->wait_object);
+ /* See comment above about property_change_reply. */
+ set_property_change_object (cs->wait_object);
unblock_input ();
if (had_errors_p) break;
@@ -1019,7 +1019,7 @@ waiting_for_other_props_on_window (Display *display, Window window)
static struct prop_location *
expect_property_change (Display *display, Window window,
- Atom property, int state)
+ Atom property, int state)
{
struct prop_location *pl = xmalloc (sizeof *pl);
pl->identifier = ++prop_location_identifier;
@@ -1289,17 +1289,17 @@ x_get_window_property (Display *display, Window window, Atom property,
eassert (*actual_size_ret <= buffer_size / bytes_per_item);
/* The man page for XGetWindowProperty says:
- "If the returned format is 32, the returned data is represented
- as a long array and should be cast to that type to obtain the
- elements."
- This applies even if long is more than 32 bits, the X library
- converts from 32 bit elements received from the X server to long
- and passes the long array to us. Thus, for that case memcpy can not
- be used. We convert to a 32 bit type here, because so much code
- assume on that.
-
- The bytes and offsets passed to XGetWindowProperty refers to the
- property and those are indeed in 32 bit quantities if format is 32. */
+ "If the returned format is 32, the returned data is represented
+ as a long array and should be cast to that type to obtain the
+ elements."
+ This applies even if long is more than 32 bits, the X library
+ converts from 32 bit elements received from the X server to long
+ and passes the long array to us. Thus, for that case memcpy can not
+ be used. We convert to a 32 bit type here, because so much code
+ assume on that.
+
+ The bytes and offsets passed to XGetWindowProperty refers to the
+ property and those are indeed in 32 bit quantities if format is 32. */
bytes_gotten = *actual_size_ret;
bytes_gotten *= bytes_per_item;
@@ -1319,14 +1319,14 @@ x_get_window_property (Display *display, Window window, Atom property,
}
if (LONG_WIDTH > 32 && *actual_format_ret == 32)
- {
- unsigned long i;
+ {
+ unsigned long i;
int *idata = (int *) (data + offset);
- long *ldata = (long *) tmp_data;
+ long *ldata = (long *) tmp_data;
- for (i = 0; i < *actual_size_ret; ++i)
+ for (i = 0; i < *actual_size_ret; ++i)
idata[i] = ldata[i];
- }
+ }
else
memcpy (data + offset, tmp_data, bytes_gotten);
@@ -1593,9 +1593,9 @@ selection_data_to_lisp_data (struct x_display_info *dpyinfo,
{
ptrdiff_t i;
/* On a 64 bit machine sizeof(Atom) == sizeof(long) == 8.
- But the callers of these function has made sure the data for
- format == 32 is an array of int. Thus, use int instead
- of Atom. */
+ But the callers of these function has made sure the data for
+ format == 32 is an array of int. Thus, use int instead
+ of Atom. */
int *idata = (int *) data;
if (size == sizeof (int))
@@ -1620,16 +1620,16 @@ selection_data_to_lisp_data (struct x_display_info *dpyinfo,
else if (format == 32 && size == sizeof (int))
{
if (type == XA_INTEGER)
- return INTEGER_TO_CONS (((int *) data) [0]);
+ return INTEGER_TO_CONS (((int *) data) [0]);
else
- return INTEGER_TO_CONS (((unsigned int *) data) [0]);
+ return INTEGER_TO_CONS (((unsigned int *) data) [0]);
}
else if (format == 16 && size == sizeof (short))
{
if (type == XA_INTEGER)
- return make_number (((short *) data) [0]);
+ return make_number (((short *) data) [0]);
else
- return make_number (((unsigned short *) data) [0]);
+ return make_number (((unsigned short *) data) [0]);
}
/* Convert any other kind of data to a vector of numbers, represented
@@ -1641,21 +1641,21 @@ selection_data_to_lisp_data (struct x_display_info *dpyinfo,
Lisp_Object v = make_uninit_vector (size / 2);
if (type == XA_INTEGER)
- {
- for (i = 0; i < size / 2; i++)
- {
- short j = ((short *) data) [i];
- ASET (v, i, make_number (j));
- }
- }
+ {
+ for (i = 0; i < size / 2; i++)
+ {
+ short j = ((short *) data) [i];
+ ASET (v, i, make_number (j));
+ }
+ }
else
- {
- for (i = 0; i < size / 2; i++)
- {
- unsigned short j = ((unsigned short *) data) [i];
- ASET (v, i, make_number (j));
- }
- }
+ {
+ for (i = 0; i < size / 2; i++)
+ {
+ unsigned short j = ((unsigned short *) data) [i];
+ ASET (v, i, make_number (j));
+ }
+ }
return v;
}
else
@@ -1664,21 +1664,21 @@ selection_data_to_lisp_data (struct x_display_info *dpyinfo,
Lisp_Object v = make_uninit_vector (size / X_LONG_SIZE);
if (type == XA_INTEGER)
- {
- for (i = 0; i < size / X_LONG_SIZE; i++)
- {
- int j = ((int *) data) [i];
- ASET (v, i, INTEGER_TO_CONS (j));
- }
- }
+ {
+ for (i = 0; i < size / X_LONG_SIZE; i++)
+ {
+ int j = ((int *) data) [i];
+ ASET (v, i, INTEGER_TO_CONS (j));
+ }
+ }
else
- {
- for (i = 0; i < size / X_LONG_SIZE; i++)
- {
- unsigned int j = ((unsigned int *) data) [i];
- ASET (v, i, INTEGER_TO_CONS (j));
- }
- }
+ {
+ for (i = 0; i < size / X_LONG_SIZE; i++)
+ {
+ unsigned int j = ((unsigned int *) data) [i];
+ ASET (v, i, INTEGER_TO_CONS (j));
+ }
+ }
return v;
}
}
@@ -2247,7 +2247,7 @@ x_clipboard_manager_save_all (void)
\f
/***********************************************************************
- Drag and drop support
+ Drag and drop support
***********************************************************************/
/* Check that lisp values are of correct type for x_fill_property_data.
That is, number, string or a cons with two numbers (low and high 16
@@ -2265,10 +2265,10 @@ x_check_property_data (Lisp_Object data)
Lisp_Object o = XCAR (iter);
if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o))
- return -1;
+ return -1;
else if (CONSP (o) &&
- (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o))))
- return -1;
+ (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o))))
+ return -1;
if (size == INT_MAX)
return -1;
size++;
@@ -2304,30 +2304,30 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
Lisp_Object o = XCAR (iter);
if (NUMBERP (o) || CONSP (o))
- {
- if (CONSP (o)
+ {
+ if (CONSP (o)
&& RANGED_INTEGERP (X_LONG_MIN >> 16, XCAR (o), X_LONG_MAX >> 16)
&& RANGED_INTEGERP (- (1 << 15), XCDR (o), -1))
- {
+ {
/* cons_to_x_long does not handle negative values for v2.
- For XDnd, v2 might be y of a window, and can be negative.
- The XDnd spec. is not explicit about negative values,
- but let's assume negative v2 is sent modulo 2**16. */
+ For XDnd, v2 might be y of a window, and can be negative.
+ The XDnd spec. is not explicit about negative values,
+ but let's assume negative v2 is sent modulo 2**16. */
unsigned long v1 = XINT (XCAR (o)) & 0xffff;
unsigned long v2 = XINT (XCDR (o)) & 0xffff;
val = (v1 << 16) | v2;
- }
- else
- val = cons_to_x_long (o);
- }
+ }
+ else
+ val = cons_to_x_long (o);
+ }
else if (STRINGP (o))
- {
- block_input ();
- val = XInternAtom (dpy, SSDATA (o), False);
- unblock_input ();
- }
+ {
+ block_input ();
+ val = XInternAtom (dpy, SSDATA (o), False);
+ unblock_input ();
+ }
else
- error ("Wrong type, must be string, number or cons");
+ error ("Wrong type, must be string, number or cons");
if (format == 8)
{
@@ -2342,7 +2342,7 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
*d16++ = val;
}
else
- *d32++ = val;
+ *d32++ = val;
}
}
@@ -2451,7 +2451,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
bool
x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event,
- struct x_display_info *dpyinfo, struct input_event *bufp)
+ struct x_display_info *dpyinfo, struct input_event *bufp)
{
Lisp_Object vec;
Lisp_Object frame;
@@ -2536,17 +2536,17 @@ are ignored. */)
CHECK_STRING (message_type);
x_send_client_event (display, dest, from,
- XInternAtom (dpyinfo->display,
- SSDATA (message_type),
- False),
- format, values);
+ XInternAtom (dpyinfo->display,
+ SSDATA (message_type),
+ False),
+ format, values);
return Qnil;
}
void
x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
- Atom message_type, Lisp_Object format, Lisp_Object values)
+ Atom message_type, Lisp_Object format, Lisp_Object values)
{
struct x_display_info *dpyinfo = check_x_display_info (display);
Window wdest;
@@ -2574,11 +2574,11 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
else if (STRINGP (dest))
{
if (strcmp (SSDATA (dest), "PointerWindow") == 0)
- wdest = PointerWindow;
+ wdest = PointerWindow;
else if (strcmp (SSDATA (dest), "InputFocus") == 0)
- wdest = InputFocus;
+ wdest = InputFocus;
else
- error ("DEST as a string must be one of PointerWindow or InputFocus");
+ error ("DEST as a string must be one of PointerWindow or InputFocus");
}
else if (NUMBERP (dest) || CONSP (dest))
CONS_TO_INTEGER (dest, Window, wdest);
@@ -2601,7 +2601,7 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
memset (event.xclient.data.l, 0, sizeof (event.xclient.data.l));
x_fill_property_data (dpyinfo->display, values, event.xclient.data.b,
- event.xclient.format);
+ event.xclient.format);
/* If event mask is 0 the event is sent to the client that created
the destination window. But if we are sending to the root window,
diff --git a/src/xsettings.c b/src/xsettings.c
index d7af68f..4b353b0 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -75,7 +75,7 @@ dpyinfo_valid (struct x_display_info *dpyinfo)
{
struct x_display_info *d;
for (d = x_display_list; !found && d; d = d->next)
- found = d == dpyinfo && d->display == dpyinfo->display;
+ found = d == dpyinfo && d->display == dpyinfo->display;
}
return found;
}
@@ -94,7 +94,7 @@ store_monospaced_changed (const char *newfont)
if (dpyinfo_valid (first_dpyinfo) && use_system_font)
{
store_config_changed_event (Qmonospace_font_name,
- XCAR (first_dpyinfo->name_list_element));
+ XCAR (first_dpyinfo->name_list_element));
}
}
#endif
@@ -113,7 +113,7 @@ store_font_name_changed (const char *newfont)
if (dpyinfo_valid (first_dpyinfo))
{
store_config_changed_event (Qfont_name,
- XCAR (first_dpyinfo->name_list_element));
+ XCAR (first_dpyinfo->name_list_element));
}
}
#endif /* HAVE_XFT */
@@ -128,13 +128,13 @@ map_tool_bar_style (const char *tool_bar_style)
if (tool_bar_style)
{
if (strcmp (tool_bar_style, "both") == 0)
- style = Qboth;
+ style = Qboth;
else if (strcmp (tool_bar_style, "both-horiz") == 0)
- style = Qboth_horiz;
+ style = Qboth_horiz;
else if (strcmp (tool_bar_style, "icons") == 0)
- style = Qimage;
+ style = Qimage;
else if (strcmp (tool_bar_style, "text") == 0)
- style = Qtext;
+ style = Qtext;
}
return style;
@@ -144,7 +144,7 @@ map_tool_bar_style (const char *tool_bar_style)
static void
store_tool_bar_style_changed (const char *newstyle,
- struct x_display_info *dpyinfo)
+ struct x_display_info *dpyinfo)
{
Lisp_Object style = map_tool_bar_style (newstyle);
if (EQ (current_tool_bar_style, style))
@@ -153,7 +153,7 @@ store_tool_bar_style_changed (const char *newstyle,
current_tool_bar_style = style;
if (dpyinfo_valid (dpyinfo))
store_config_changed_event (Qtool_bar_style,
- XCAR (dpyinfo->name_list_element));
+ XCAR (dpyinfo->name_list_element));
}
#ifdef HAVE_XFT
@@ -204,8 +204,8 @@ static GSettings *gsettings_client;
static void
something_changed_gsettingsCB (GSettings *settings,
- gchar *key,
- gpointer user_data)
+ gchar *key,
+ gpointer user_data)
{
GVariant *val;
@@ -213,44 +213,44 @@ something_changed_gsettingsCB (GSettings *settings,
{
val = g_settings_get_value (settings, GSETTINGS_TOOL_BAR_STYLE);
if (val)
- {
- g_variant_ref_sink (val);
- if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
- {
- const gchar *newstyle = g_variant_get_string (val, NULL);
- store_tool_bar_style_changed (newstyle, first_dpyinfo);
- }
- g_variant_unref (val);
- }
+ {
+ g_variant_ref_sink (val);
+ if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
+ {
+ const gchar *newstyle = g_variant_get_string (val, NULL);
+ store_tool_bar_style_changed (newstyle, first_dpyinfo);
+ }
+ g_variant_unref (val);
+ }
}
#ifdef HAVE_XFT
else if (strcmp (key, GSETTINGS_MONO_FONT) == 0)
{
val = g_settings_get_value (settings, GSETTINGS_MONO_FONT);
if (val)
- {
- g_variant_ref_sink (val);
- if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
- {
- const gchar *newfont = g_variant_get_string (val, NULL);
- store_monospaced_changed (newfont);
- }
- g_variant_unref (val);
- }
+ {
+ g_variant_ref_sink (val);
+ if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
+ {
+ const gchar *newfont = g_variant_get_string (val, NULL);
+ store_monospaced_changed (newfont);
+ }
+ g_variant_unref (val);
+ }
}
else if (strcmp (key, GSETTINGS_FONT_NAME) == 0)
{
val = g_settings_get_value (settings, GSETTINGS_FONT_NAME);
if (val)
- {
- g_variant_ref_sink (val);
- if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
- {
- const gchar *newfont = g_variant_get_string (val, NULL);
- store_font_name_changed (newfont);
- }
- g_variant_unref (val);
- }
+ {
+ g_variant_ref_sink (val);
+ if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
+ {
+ const gchar *newfont = g_variant_get_string (val, NULL);
+ store_font_name_changed (newfont);
+ }
+ g_variant_unref (val);
+ }
}
#endif /* HAVE_XFT */
}
@@ -272,9 +272,9 @@ static GConfClient *gconf_client;
static void
something_changed_gconfCB (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
GConfValue *v = gconf_entry_get_value (entry);
const char *key = gconf_entry_get_key (entry);
@@ -325,12 +325,12 @@ get_prop_window (struct x_display_info *dpyinfo)
XGrabServer (dpy);
dpyinfo->xsettings_window = XGetSelectionOwner (dpy,
- dpyinfo->Xatom_xsettings_sel);
+ dpyinfo->Xatom_xsettings_sel);
if (dpyinfo->xsettings_window != None)
/* Select events so we can detect if window is deleted or if settings
are changed. */
XSelectInput (dpy, dpyinfo->xsettings_window,
- PropertyChangeMask|StructureNotifyMask);
+ PropertyChangeMask|StructureNotifyMask);
XUngrabServer (dpy);
}
@@ -389,8 +389,8 @@ get_prop_window (struct x_display_info *dpyinfo)
static int
parse_settings (unsigned char *prop,
- unsigned long bytes,
- struct xsettings *settings)
+ unsigned long bytes,
+ struct xsettings *settings)
{
Lisp_Object byteorder = Fbyteorder ();
int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst;
@@ -410,7 +410,7 @@ parse_settings (unsigned char *prop,
memset (settings, 0, sizeof (*settings));
while (bytes_parsed+4 < bytes && settings_seen < 7
- && i < n_settings)
+ && i < n_settings)
{
int type = prop[bytes_parsed++];
CARD16 nlen;
@@ -446,117 +446,117 @@ parse_settings (unsigned char *prop,
#endif
switch (type)
- {
- case 0: /* Integer */
- if (bytes_parsed + 4 > bytes) return settings_seen;
- if (want_this)
- {
- memcpy (&ival, prop+bytes_parsed, 4);
- if (my_bo != that_bo) ival = bswap_32 (ival);
- }
- bytes_parsed += 4;
- break;
-
- case 1: /* String */
- if (bytes_parsed + 4 > bytes) return settings_seen;
- memcpy (&vlen, prop+bytes_parsed, 4);
- bytes_parsed += 4;
- if (my_bo != that_bo) vlen = bswap_32 (vlen);
- if (want_this)
- {
- to_cpy = min (vlen, sizeof sval - 1);
- memcpy (sval, prop+bytes_parsed, to_cpy);
- sval[to_cpy] = '\0';
- }
- bytes_parsed += vlen;
- bytes_parsed = PAD (bytes_parsed);
- break;
-
- case 2: /* RGB value */
- /* No need to parse this */
- if (bytes_parsed + 8 > bytes) return settings_seen;
- bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */
- break;
-
- default: /* Parse Error */
- return settings_seen;
- }
+ {
+ case 0: /* Integer */
+ if (bytes_parsed + 4 > bytes) return settings_seen;
+ if (want_this)
+ {
+ memcpy (&ival, prop+bytes_parsed, 4);
+ if (my_bo != that_bo) ival = bswap_32 (ival);
+ }
+ bytes_parsed += 4;
+ break;
+
+ case 1: /* String */
+ if (bytes_parsed + 4 > bytes) return settings_seen;
+ memcpy (&vlen, prop+bytes_parsed, 4);
+ bytes_parsed += 4;
+ if (my_bo != that_bo) vlen = bswap_32 (vlen);
+ if (want_this)
+ {
+ to_cpy = min (vlen, sizeof sval - 1);
+ memcpy (sval, prop+bytes_parsed, to_cpy);
+ sval[to_cpy] = '\0';
+ }
+ bytes_parsed += vlen;
+ bytes_parsed = PAD (bytes_parsed);
+ break;
+
+ case 2: /* RGB value */
+ /* No need to parse this */
+ if (bytes_parsed + 8 > bytes) return settings_seen;
+ bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */
+ break;
+
+ default: /* Parse Error */
+ return settings_seen;
+ }
if (want_this)
- {
- if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0)
- {
- dupstring (&settings->tb_style, sval);
- settings->seen |= SEEN_TB_STYLE;
- }
+ {
+ if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0)
+ {
+ dupstring (&settings->tb_style, sval);
+ settings->seen |= SEEN_TB_STYLE;
+ }
#ifdef HAVE_XFT
- else if (strcmp (name, XSETTINGS_FONT_NAME) == 0)
- {
- dupstring (&settings->font, sval);
- settings->seen |= SEEN_FONT;
- }
- else if (strcmp (name, "Xft/Antialias") == 0)
- {
- settings->seen |= SEEN_AA;
- settings->aa = ival != 0;
- }
- else if (strcmp (name, "Xft/Hinting") == 0)
- {
- settings->seen |= SEEN_HINTING;
- settings->hinting = ival != 0;
- }
+ else if (strcmp (name, XSETTINGS_FONT_NAME) == 0)
+ {
+ dupstring (&settings->font, sval);
+ settings->seen |= SEEN_FONT;
+ }
+ else if (strcmp (name, "Xft/Antialias") == 0)
+ {
+ settings->seen |= SEEN_AA;
+ settings->aa = ival != 0;
+ }
+ else if (strcmp (name, "Xft/Hinting") == 0)
+ {
+ settings->seen |= SEEN_HINTING;
+ settings->hinting = ival != 0;
+ }
# ifdef FC_HINT_STYLE
- else if (strcmp (name, "Xft/HintStyle") == 0)
- {
- settings->seen |= SEEN_HINTSTYLE;
- if (strcmp (sval, "hintnone") == 0)
- settings->hintstyle = FC_HINT_NONE;
- else if (strcmp (sval, "hintslight") == 0)
- settings->hintstyle = FC_HINT_SLIGHT;
- else if (strcmp (sval, "hintmedium") == 0)
- settings->hintstyle = FC_HINT_MEDIUM;
- else if (strcmp (sval, "hintfull") == 0)
- settings->hintstyle = FC_HINT_FULL;
- else
- settings->seen &= ~SEEN_HINTSTYLE;
- }
+ else if (strcmp (name, "Xft/HintStyle") == 0)
+ {
+ settings->seen |= SEEN_HINTSTYLE;
+ if (strcmp (sval, "hintnone") == 0)
+ settings->hintstyle = FC_HINT_NONE;
+ else if (strcmp (sval, "hintslight") == 0)
+ settings->hintstyle = FC_HINT_SLIGHT;
+ else if (strcmp (sval, "hintmedium") == 0)
+ settings->hintstyle = FC_HINT_MEDIUM;
+ else if (strcmp (sval, "hintfull") == 0)
+ settings->hintstyle = FC_HINT_FULL;
+ else
+ settings->seen &= ~SEEN_HINTSTYLE;
+ }
# endif
- else if (strcmp (name, "Xft/RGBA") == 0)
- {
- settings->seen |= SEEN_RGBA;
- if (strcmp (sval, "none") == 0)
- settings->rgba = FC_RGBA_NONE;
- else if (strcmp (sval, "rgb") == 0)
- settings->rgba = FC_RGBA_RGB;
- else if (strcmp (sval, "bgr") == 0)
- settings->rgba = FC_RGBA_BGR;
- else if (strcmp (sval, "vrgb") == 0)
- settings->rgba = FC_RGBA_VRGB;
- else if (strcmp (sval, "vbgr") == 0)
- settings->rgba = FC_RGBA_VBGR;
- else
- settings->seen &= ~SEEN_RGBA;
- }
- else if (strcmp (name, "Xft/DPI") == 0 && ival != (CARD32) -1)
- {
- settings->seen |= SEEN_DPI;
- settings->dpi = ival / 1024.0;
- }
- else if (strcmp (name, "Xft/lcdfilter") == 0)
- {
- settings->seen |= SEEN_LCDFILTER;
- if (strcmp (sval, "none") == 0)
- settings->lcdfilter = FC_LCD_NONE;
- else if (strcmp (sval, "lcddefault") == 0)
- settings->lcdfilter = FC_LCD_DEFAULT;
- else
- settings->seen &= ~SEEN_LCDFILTER;
- }
+ else if (strcmp (name, "Xft/RGBA") == 0)
+ {
+ settings->seen |= SEEN_RGBA;
+ if (strcmp (sval, "none") == 0)
+ settings->rgba = FC_RGBA_NONE;
+ else if (strcmp (sval, "rgb") == 0)
+ settings->rgba = FC_RGBA_RGB;
+ else if (strcmp (sval, "bgr") == 0)
+ settings->rgba = FC_RGBA_BGR;
+ else if (strcmp (sval, "vrgb") == 0)
+ settings->rgba = FC_RGBA_VRGB;
+ else if (strcmp (sval, "vbgr") == 0)
+ settings->rgba = FC_RGBA_VBGR;
+ else
+ settings->seen &= ~SEEN_RGBA;
+ }
+ else if (strcmp (name, "Xft/DPI") == 0 && ival != (CARD32) -1)
+ {
+ settings->seen |= SEEN_DPI;
+ settings->dpi = ival / 1024.0;
+ }
+ else if (strcmp (name, "Xft/lcdfilter") == 0)
+ {
+ settings->seen |= SEEN_LCDFILTER;
+ if (strcmp (sval, "none") == 0)
+ settings->lcdfilter = FC_LCD_NONE;
+ else if (strcmp (sval, "lcddefault") == 0)
+ settings->lcdfilter = FC_LCD_DEFAULT;
+ else
+ settings->seen &= ~SEEN_LCDFILTER;
+ }
#endif /* HAVE_XFT */
else
want_this = false;
settings_seen += want_this;
- }
+ }
}
return settings_seen;
@@ -579,11 +579,11 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings)
x_catch_errors (dpy);
rc = XGetWindowProperty (dpy,
- dpyinfo->xsettings_window,
- dpyinfo->Xatom_xsettings_prop,
- 0, LONG_MAX, False, AnyPropertyType,
- &act_type, &act_form, &nitems, &bytes_after,
- &prop);
+ dpyinfo->xsettings_window,
+ dpyinfo->Xatom_xsettings_prop,
+ 0, LONG_MAX, False, AnyPropertyType,
+ &act_type, &act_form, &nitems, &bytes_after,
+ &prop);
if (rc == Success && prop != NULL && act_form == 8 && nitems > 0
&& act_type == dpyinfo->Xatom_xsettings_prop)
@@ -601,7 +601,7 @@ read_settings (struct x_display_info *dpyinfo, struct xsettings *settings)
static void
apply_xft_settings (struct x_display_info *dpyinfo,
- struct xsettings *settings)
+ struct xsettings *settings)
{
#ifdef HAVE_XFT
FcPattern *pat;
@@ -611,8 +611,8 @@ apply_xft_settings (struct x_display_info *dpyinfo,
memset (&oldsettings, 0, sizeof (oldsettings));
pat = FcPatternCreate ();
XftDefaultSubstitute (dpyinfo->display,
- XScreenNumberOfScreen (dpyinfo->screen),
- pat);
+ XScreenNumberOfScreen (dpyinfo->screen),
+ pat);
FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa);
FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting);
#ifdef FC_HINT_STYLE
@@ -727,16 +727,16 @@ read_and_apply_settings (struct x_display_info *dpyinfo, bool send_event_p)
if (settings.seen & SEEN_TB_STYLE)
{
if (send_event_p)
- store_tool_bar_style_changed (settings.tb_style, dpyinfo);
+ store_tool_bar_style_changed (settings.tb_style, dpyinfo);
else
- current_tool_bar_style = map_tool_bar_style (settings.tb_style);
+ current_tool_bar_style = map_tool_bar_style (settings.tb_style);
xfree (settings.tb_style);
}
#ifdef HAVE_XFT
if (settings.seen & SEEN_FONT)
{
if (send_event_p)
- store_font_name_changed (settings.font);
+ store_font_name_changed (settings.font);
else
dupstring (¤t_font, settings.font);
xfree (settings.font);
@@ -755,21 +755,21 @@ xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event)
{
case DestroyNotify:
if (dpyinfo->xsettings_window == event->xany.window)
- check_window_p = true;
+ check_window_p = true;
break;
case ClientMessage:
if (event->xclient.message_type == dpyinfo->Xatom_xsettings_mgr
- && event->xclient.data.l[1] == dpyinfo->Xatom_xsettings_sel
- && event->xclient.window == dpyinfo->root_window)
- check_window_p = true;
+ && event->xclient.data.l[1] == dpyinfo->Xatom_xsettings_sel
+ && event->xclient.window == dpyinfo->root_window)
+ check_window_p = true;
break;
case PropertyNotify:
if (event->xproperty.window == dpyinfo->xsettings_window
- && event->xproperty.state == PropertyNewValue
- && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop)
- apply_settings_p = true;
+ && event->xproperty.state == PropertyNewValue
+ && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop)
+ apply_settings_p = true;
break;
}
@@ -779,7 +779,7 @@ xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event)
dpyinfo->xsettings_window = None;
get_prop_window (dpyinfo);
if (dpyinfo->xsettings_window != None)
- apply_settings_p = true;
+ apply_settings_p = true;
}
if (apply_settings_p)
@@ -822,15 +822,15 @@ init_gsettings (void)
if (!gsettings_client) return;
g_object_ref_sink (G_OBJECT (gsettings_client));
g_signal_connect (G_OBJECT (gsettings_client), "changed",
- G_CALLBACK (something_changed_gsettingsCB), NULL);
+ G_CALLBACK (something_changed_gsettingsCB), NULL);
val = g_settings_get_value (gsettings_client, GSETTINGS_TOOL_BAR_STYLE);
if (val)
{
g_variant_ref_sink (val);
if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
- current_tool_bar_style
- = map_tool_bar_style (g_variant_get_string (val, NULL));
+ current_tool_bar_style
+ = map_tool_bar_style (g_variant_get_string (val, NULL));
g_variant_unref (val);
}
@@ -849,7 +849,7 @@ init_gsettings (void)
{
g_variant_ref_sink (val);
if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))
- dupstring (¤t_font, g_variant_get_string (val, NULL));
+ dupstring (¤t_font, g_variant_get_string (val, NULL));
g_variant_unref (val);
}
#endif /* HAVE_XFT */
@@ -872,13 +872,13 @@ init_gconf (void)
gconf_client = gconf_client_get_default ();
gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE);
gconf_client_add_dir (gconf_client,
- GCONF_TOOL_BAR_STYLE,
- GCONF_CLIENT_PRELOAD_ONELEVEL,
- NULL);
+ GCONF_TOOL_BAR_STYLE,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
gconf_client_notify_add (gconf_client,
- GCONF_TOOL_BAR_STYLE,
- something_changed_gconfCB,
- NULL, NULL, NULL);
+ GCONF_TOOL_BAR_STYLE,
+ something_changed_gconfCB,
+ NULL, NULL, NULL);
s = gconf_client_get_string (gconf_client, GCONF_TOOL_BAR_STYLE, NULL);
if (s)
@@ -901,21 +901,21 @@ init_gconf (void)
g_free (s);
}
gconf_client_add_dir (gconf_client,
- GCONF_MONO_FONT,
- GCONF_CLIENT_PRELOAD_ONELEVEL,
- NULL);
+ GCONF_MONO_FONT,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
gconf_client_notify_add (gconf_client,
- GCONF_MONO_FONT,
- something_changed_gconfCB,
- NULL, NULL, NULL);
+ GCONF_MONO_FONT,
+ something_changed_gconfCB,
+ NULL, NULL, NULL);
gconf_client_add_dir (gconf_client,
- GCONF_FONT_NAME,
- GCONF_CLIENT_PRELOAD_ONELEVEL,
- NULL);
+ GCONF_FONT_NAME,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
gconf_client_notify_add (gconf_client,
- GCONF_FONT_NAME,
- something_changed_gconfCB,
- NULL, NULL, NULL);
+ GCONF_FONT_NAME,
+ something_changed_gconfCB,
+ NULL, NULL, NULL);
#endif /* HAVE_XFT */
#endif /* HAVE_GCONF */
}
@@ -1031,7 +1031,7 @@ If this variable is nil, Emacs ignores system font changes. */);
use_system_font = false;
DEFVAR_LISP ("xft-settings", Vxft_settings,
- doc: /* Font settings applied to Xft. */);
+ doc: /* Font settings applied to Xft. */);
Vxft_settings = empty_unibyte_string;
#ifdef HAVE_XFT
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 95ede64..d8116a1 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -111,7 +111,7 @@ x_session_check_input (int fd, void *data)
{
/* Either IO error or Connection closed. */
if (ret == IceProcessMessagesIOError)
- IceCloseConnection (SmcGetIceConnection (smc_conn));
+ IceCloseConnection (SmcGetIceConnection (smc_conn));
ice_connection_closed ();
}
@@ -348,7 +348,7 @@ ice_io_error_handler (IceConn iceConn)
static void
ice_conn_watch_CB (IceConn iceConn, IcePointer clientData,
- int opening, IcePointer *watchData)
+ int opening, IcePointer *watchData)
{
if (! opening)
{
@@ -370,9 +370,9 @@ create_client_leader_window (struct x_display_info *dpyinfo, char *client_ID)
XClassHint class_hints;
w = XCreateSimpleWindow (dpyinfo->display,
- dpyinfo->root_window,
- -1, -1, 1, 1,
- CopyFromParent, CopyFromParent, CopyFromParent);
+ dpyinfo->root_window,
+ -1, -1, 1, 1,
+ CopyFromParent, CopyFromParent, CopyFromParent);
validate_x_resource_name ();
class_hints.res_name = SSDATA (Vx_resource_name);
@@ -381,8 +381,8 @@ create_client_leader_window (struct x_display_info *dpyinfo, char *client_ID)
XStoreName (dpyinfo->display, w, class_hints.res_name);
XChangeProperty (dpyinfo->display, w, dpyinfo->Xatom_SM_CLIENT_ID,
- XA_STRING, 8, PropModeReplace,
- (unsigned char *) client_ID, strlen (client_ID));
+ XA_STRING, 8, PropModeReplace,
+ (unsigned char *) client_ID, strlen (client_ID));
dpyinfo->client_leader_window = w;
}
@@ -404,7 +404,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
if (! emacs_get_current_dir_name ())
{
fprintf (stderr, "Disabling session management due to pwd error: %s\n",
- emacs_strerror (errno));
+ emacs_strerror (errno));
return;
}
@@ -455,15 +455,15 @@ x_session_initialize (struct x_display_info *dpyinfo)
critical, it usually means that no session manager is running.
The errorstring is here for debugging. */
smc_conn = SmcOpenConnection (NULL, NULL, 1, 0,
- (SmcSaveYourselfProcMask|
- SmcDieProcMask|
- SmcSaveCompleteProcMask|
- SmcShutdownCancelledProcMask),
- &callbacks,
- previous_id,
- &client_id,
- SM_ERRORSTRING_LEN,
- errorstring);
+ (SmcSaveYourselfProcMask|
+ SmcDieProcMask|
+ SmcSaveCompleteProcMask|
+ SmcShutdownCancelledProcMask),
+ &callbacks,
+ previous_id,
+ &client_id,
+ SM_ERRORSTRING_LEN,
+ errorstring);
if (smc_conn != 0)
{
@@ -471,7 +471,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
#ifdef USE_GTK
/* GTK creates a leader window by itself, but we need to tell
- it about our client_id. */
+ it about our client_id. */
gdk_x11_set_sm_client_id (client_id);
#else
create_client_leader_window (dpyinfo, client_id);
@@ -519,7 +519,7 @@ Do not call this function yourself. */)
else if (kill_emacs)
{
/* We should not do user interaction here, but it is not easy to
- prevent. Fix this in next version. */
+ prevent. Fix this in next version. */
Fkill_emacs (Qnil);
#if false
diff --git a/src/xterm.c b/src/xterm.c
index bdc21e6..9e0473d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -219,9 +219,9 @@ static void x_clip_to_row (struct window *, struct glyph_row *,
enum glyph_row_area, GC);
static struct scroll_bar *x_window_to_scroll_bar (Display *, Window, int);
static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
- enum scroll_bar_part *,
- Lisp_Object *, Lisp_Object *,
- Time *);
+ enum scroll_bar_part *,
+ Lisp_Object *, Lisp_Object *,
+ Time *);
static void x_horizontal_scroll_bar_report_motion (struct frame **, Lisp_Object *,
enum scroll_bar_part *,
Lisp_Object *, Lisp_Object *,
@@ -361,18 +361,18 @@ x_begin_cr_clip (struct frame *f, GC gc)
{
if (! FRAME_CR_SURFACE (f))
- {
- cairo_surface_t *surface;
- surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
- FRAME_DISPLAY_INFO (f)->visual,
- FRAME_PIXEL_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f));
- cr = cairo_create (surface);
- cairo_surface_destroy (surface);
- }
+ {
+ cairo_surface_t *surface;
+ surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
+ FRAME_X_DRAWABLE (f),
+ FRAME_DISPLAY_INFO (f)->visual,
+ FRAME_PIXEL_WIDTH (f),
+ FRAME_PIXEL_HEIGHT (f));
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
+ }
else
- cr = cairo_create (FRAME_CR_SURFACE (f));
+ cr = cairo_create (FRAME_CR_SURFACE (f));
FRAME_CR_CONTEXT (f) = cr;
}
cairo_save (cr);
@@ -948,8 +948,8 @@ x_set_frame_alpha (struct frame *f)
parent = x_find_topmost_parent (f);
if (parent != None)
XChangeProperty (dpy, parent, dpyinfo->Xatom_net_wm_window_opacity,
- XA_CARDINAL, 32, PropModeReplace,
- (unsigned char *) &opac, 1);
+ XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *) &opac, 1);
/* return unless necessary */
{
@@ -965,7 +965,7 @@ x_set_frame_alpha (struct frame *f)
if (rc == Success && actual != None)
{
- unsigned long value = *(unsigned long *)data;
+ unsigned long value = *(unsigned long *)data;
XFree (data);
if (value == opac)
{
@@ -1004,29 +1004,29 @@ x_update_begin (struct frame *f)
int width, height;
#ifdef USE_GTK
if (FRAME_GTK_WIDGET (f))
- {
- GdkWindow *w = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
- width = gdk_window_get_width (w);
- height = gdk_window_get_height (w);
- }
+ {
+ GdkWindow *w = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
+ width = gdk_window_get_width (w);
+ height = gdk_window_get_height (w);
+ }
else
#endif
- {
- width = FRAME_PIXEL_WIDTH (f);
- height = FRAME_PIXEL_HEIGHT (f);
- if (! FRAME_EXTERNAL_TOOL_BAR (f))
- height += FRAME_TOOL_BAR_HEIGHT (f);
- if (! FRAME_EXTERNAL_MENU_BAR (f))
- height += FRAME_MENU_BAR_HEIGHT (f);
- }
+ {
+ width = FRAME_PIXEL_WIDTH (f);
+ height = FRAME_PIXEL_HEIGHT (f);
+ if (! FRAME_EXTERNAL_TOOL_BAR (f))
+ height += FRAME_TOOL_BAR_HEIGHT (f);
+ if (! FRAME_EXTERNAL_MENU_BAR (f))
+ height += FRAME_MENU_BAR_HEIGHT (f);
+ }
if (width > 0 && height > 0)
- {
- block_input();
- FRAME_CR_SURFACE (f) = cairo_image_surface_create
- (CAIRO_FORMAT_ARGB32, width, height);
- unblock_input();
- }
+ {
+ block_input();
+ FRAME_CR_SURFACE (f) = cairo_image_surface_create
+ (CAIRO_FORMAT_ARGB32, width, height);
+ unblock_input();
+ }
}
#endif /* USE_CAIRO */
}
@@ -1234,28 +1234,28 @@ x_update_end (struct frame *f)
block_input();
#if defined (USE_GTK) && defined (HAVE_GTK3)
if (FRAME_GTK_WIDGET (f))
- {
- GdkWindow *w = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
- cr = gdk_cairo_create (w);
- }
+ {
+ GdkWindow *w = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
+ cr = gdk_cairo_create (w);
+ }
else
#endif
- {
- cairo_surface_t *surface;
- int width = FRAME_PIXEL_WIDTH (f);
- int height = FRAME_PIXEL_HEIGHT (f);
- if (! FRAME_EXTERNAL_TOOL_BAR (f))
- height += FRAME_TOOL_BAR_HEIGHT (f);
- if (! FRAME_EXTERNAL_MENU_BAR (f))
- height += FRAME_MENU_BAR_HEIGHT (f);
- surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
- FRAME_DISPLAY_INFO (f)->visual,
- width,
- height);
- cr = cairo_create (surface);
- cairo_surface_destroy (surface);
- }
+ {
+ cairo_surface_t *surface;
+ int width = FRAME_PIXEL_WIDTH (f);
+ int height = FRAME_PIXEL_HEIGHT (f);
+ if (! FRAME_EXTERNAL_TOOL_BAR (f))
+ height += FRAME_TOOL_BAR_HEIGHT (f);
+ if (! FRAME_EXTERNAL_MENU_BAR (f))
+ height += FRAME_MENU_BAR_HEIGHT (f);
+ surface = cairo_xlib_surface_create (FRAME_X_DISPLAY (f),
+ FRAME_X_DRAWABLE (f),
+ FRAME_DISPLAY_INFO (f)->visual,
+ width,
+ height);
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
+ }
cairo_set_source_surface (cr, FRAME_CR_SURFACE (f), 0, 0);
cairo_paint (cr);
@@ -1473,19 +1473,19 @@ static void x_set_mouse_face_gc (struct glyph_string *);
static bool x_alloc_lighter_color (struct frame *, Display *, Colormap,
unsigned long *, double, int);
static void x_setup_relief_color (struct frame *, struct relief *,
- double, int, unsigned long);
+ double, int, unsigned long);
static void x_setup_relief_colors (struct glyph_string *);
static void x_draw_image_glyph_string (struct glyph_string *);
static void x_draw_image_relief (struct glyph_string *);
static void x_draw_image_foreground (struct glyph_string *);
static void x_draw_image_foreground_1 (struct glyph_string *, Pixmap);
static void x_clear_glyph_string_rect (struct glyph_string *, int,
- int, int, int);
+ int, int, int);
static void x_draw_relief_rect (struct frame *, int, int, int, int,
- int, bool, bool, bool, bool, bool,
- XRectangle *);
+ int, bool, bool, bool, bool, bool,
+ XRectangle *);
static void x_draw_box_rect (struct glyph_string *, int, int, int, int,
- int, bool, bool, XRectangle *);
+ int, bool, bool, XRectangle *);
static void x_scroll_bar_clear (struct frame *);
#ifdef GLYPH_DEBUG
@@ -1538,7 +1538,7 @@ x_set_cursor_gc (struct glyph_string *s)
mask, &xgcv);
else
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
- = XCreateGC (s->display, FRAME_X_DRAWABLE (s->f), mask, &xgcv);
+ = XCreateGC (s->display, FRAME_X_DRAWABLE (s->f), mask, &xgcv);
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
}
@@ -1585,7 +1585,7 @@ x_set_mouse_face_gc (struct glyph_string *s)
mask, &xgcv);
else
FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
- = XCreateGC (s->display, FRAME_X_DRAWABLE (s->f), mask, &xgcv);
+ = XCreateGC (s->display, FRAME_X_DRAWABLE (s->f), mask, &xgcv);
s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
@@ -2255,13 +2255,13 @@ x_query_colors (struct frame *f, XColor *colors, int ncolors)
in other words, we'd like 0xff to become 0xffff instead of
the 0xff00 we'd get by just zero-filling the lower bits.
- We generate a 32-bit scaled-up value and shift it, in case
- the bit count doesn't divide 16 evenly (e.g., when dealing
- with a 3-3-2 bit RGB display), to get more of the lower bits
- correct.
+ We generate a 32-bit scaled-up value and shift it, in case
+ the bit count doesn't divide 16 evenly (e.g., when dealing
+ with a 3-3-2 bit RGB display), to get more of the lower bits
+ correct.
- Should we cache the multipliers in dpyinfo? Maybe
- special-case the 8-8-8 common case? */
+ Should we cache the multipliers in dpyinfo? Maybe
+ special-case the 8-8-8 common case? */
rmult = 0xffffffff / rmask;
gmult = 0xffffffff / gmask;
bmult = 0xffffffff / bmask;
@@ -2400,8 +2400,8 @@ x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color)
else
{
/* If allocation succeeded, and the allocated pixel color is not
- equal to a cached pixel color recorded earlier, there was a
- change in the colormap, so clear the color cache. */
+ equal to a cached pixel color recorded earlier, there was a
+ change in the colormap, so clear the color cache. */
struct x_display_info *dpyinfo = x_display_info_for_display (dpy);
eassume (dpyinfo);
@@ -2766,12 +2766,12 @@ x_draw_relief_rect (struct frame *f,
if (top_p)
{
if (width == 1)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
left_x + left_p, top_y,
right_x + !right_p, top_y);
for (i = 1; i < width; ++i)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
left_x + i * left_p, top_y + i,
right_x + 1 - i * right_p, top_y + i);
}
@@ -2780,13 +2780,13 @@ x_draw_relief_rect (struct frame *f,
if (left_p)
{
if (width == 1)
- XDrawLine (dpy, drawable, gc, left_x, top_y + 1, left_x, bottom_y);
+ XDrawLine (dpy, drawable, gc, left_x, top_y + 1, left_x, bottom_y);
x_clear_area(f, left_x, top_y, 1, 1);
x_clear_area(f, left_x, bottom_y, 1, 1);
for (i = (width > 1 ? 1 : 0); i < width; ++i)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
left_x + i, top_y + (i + 1) * top_p,
left_x + i, bottom_y + 1 - (i + 1) * bot_p);
}
@@ -2802,13 +2802,13 @@ x_draw_relief_rect (struct frame *f,
{
/* Outermost top line. */
if (top_p)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
left_x + left_p, top_y,
right_x + !right_p, top_y);
/* Outermost left line. */
if (left_p)
- XDrawLine (dpy, drawable, gc, left_x, top_y + 1, left_x, bottom_y);
+ XDrawLine (dpy, drawable, gc, left_x, top_y + 1, left_x, bottom_y);
}
/* Bottom. */
@@ -2818,7 +2818,7 @@ x_draw_relief_rect (struct frame *f,
left_x + left_p, bottom_y,
right_x + !right_p, bottom_y);
for (i = 1; i < width; ++i)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
left_x + i * left_p, bottom_y - i,
right_x + 1 - i * right_p, bottom_y - i);
}
@@ -2829,7 +2829,7 @@ x_draw_relief_rect (struct frame *f,
x_clear_area(f, right_x, top_y, 1, 1);
x_clear_area(f, right_x, bottom_y, 1, 1);
for (i = 0; i < width; ++i)
- XDrawLine (dpy, drawable, gc,
+ XDrawLine (dpy, drawable, gc,
right_x - i, top_y + (i + 1) * top_p,
right_x - i, bottom_y + 1 - (i + 1) * bot_p);
}
@@ -2981,8 +2981,8 @@ x_draw_image_foreground (struct glyph_string *s)
image_rect.width = s->slice.width;
image_rect.height = s->slice.height;
if (x_intersect_rectangles (&clip_rect, &image_rect, &r))
- XCopyArea (s->display, s->img->pixmap,
- FRAME_X_DRAWABLE (s->f), s->gc,
+ XCopyArea (s->display, s->img->pixmap,
+ FRAME_X_DRAWABLE (s->f), s->gc,
s->slice.x + r.x - x, s->slice.y + r.y - y,
r.width, r.height, r.x, r.y);
}
@@ -2996,8 +2996,8 @@ x_draw_image_foreground (struct glyph_string *s)
image_rect.width = s->slice.width;
image_rect.height = s->slice.height;
if (x_intersect_rectangles (&clip_rect, &image_rect, &r))
- XCopyArea (s->display, s->img->pixmap,
- FRAME_X_DRAWABLE (s->f), s->gc,
+ XCopyArea (s->display, s->img->pixmap,
+ FRAME_X_DRAWABLE (s->f), s->gc,
s->slice.x + r.x - x, s->slice.y + r.y - y,
r.width, r.height, r.x, r.y);
@@ -3191,7 +3191,7 @@ x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h)
/* Draw image glyph string S.
- s->y
+ s->y
s->x +-------------------------
| s->face->box
|
@@ -3237,7 +3237,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
int depth = DefaultDepthOfScreen (screen);
/* Create a pixmap as large as the glyph string. */
- pixmap = XCreatePixmap (s->display, FRAME_X_DRAWABLE (s->f),
+ pixmap = XCreatePixmap (s->display, FRAME_X_DRAWABLE (s->f),
s->background_width,
s->height, depth);
@@ -3300,8 +3300,8 @@ x_draw_image_glyph_string (struct glyph_string *s)
int width = s->background_width;
cairo_set_source_surface (cr, s->img->cr_data,
- x - s->slice.x,
- y - s->slice.y);
+ x - s->slice.x,
+ y - s->slice.y);
cairo_rectangle (cr, x, y, width, height);
cairo_fill (cr);
x_end_cr_clip (s->f);
@@ -3418,7 +3418,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA);
/* Don't draw into left margin, fringe or scrollbar area
- except for header line and mode line. */
+ except for header line and mode line. */
if (x < left_x && !s->row->mode_line_p)
{
background_width -= left_x - x;
@@ -3434,10 +3434,10 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
/*
Draw a wavy line under S. The wave fills wave_height pixels from y0.
- x0 wave_length = 2
- --
- y0 * * * * *
- |* * * * * * * * *
+ x0 wave_length = 2
+ --
+ y0 * * * * *
+ |* * * * * * * * *
wave_height = 3 | * * * *
*/
@@ -3608,84 +3608,84 @@ x_draw_glyph_string (struct glyph_string *s)
{
/* Draw underline. */
if (s->face->underline_p)
- {
- if (s->face->underline_type == FACE_UNDER_WAVE)
- {
- if (s->face->underline_defaulted_p)
- x_draw_underwave (s);
- else
- {
- XGCValues xgcv;
- XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
- XSetForeground (s->display, s->gc, s->face->underline_color);
- x_draw_underwave (s);
- XSetForeground (s->display, s->gc, xgcv.foreground);
- }
- }
- else if (s->face->underline_type == FACE_UNDER_LINE)
- {
- unsigned long thickness, position;
- int y;
-
- if (s->prev && s->prev->face->underline_p
+ {
+ if (s->face->underline_type == FACE_UNDER_WAVE)
+ {
+ if (s->face->underline_defaulted_p)
+ x_draw_underwave (s);
+ else
+ {
+ XGCValues xgcv;
+ XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
+ XSetForeground (s->display, s->gc, s->face->underline_color);
+ x_draw_underwave (s);
+ XSetForeground (s->display, s->gc, xgcv.foreground);
+ }
+ }
+ else if (s->face->underline_type == FACE_UNDER_LINE)
+ {
+ unsigned long thickness, position;
+ int y;
+
+ if (s->prev && s->prev->face->underline_p
&& s->prev->face->underline_type == FACE_UNDER_LINE)
- {
- /* We use the same underline style as the previous one. */
- thickness = s->prev->underline_thickness;
- position = s->prev->underline_position;
- }
- else
- {
- /* Get the underline thickness. Default is 1 pixel. */
- if (s->font && s->font->underline_thickness > 0)
- thickness = s->font->underline_thickness;
- else
- thickness = 1;
- if (x_underline_at_descent_line)
- position = (s->height - thickness) - (s->ybase - s->y);
- else
- {
- /* Get the underline position. This is the recommended
- vertical offset in pixels from the baseline to the top of
- the underline. This is a signed value according to the
- specs, and its default is
-
- ROUND ((maximum descent) / 2), with
- ROUND(x) = floor (x + 0.5) */
-
- if (x_use_underline_position_properties
- && s->font && s->font->underline_position >= 0)
- position = s->font->underline_position;
- else if (s->font)
- position = (s->font->descent + 1) / 2;
- else
- position = underline_minimum_offset;
- }
- position = max (position, underline_minimum_offset);
- }
- /* Check the sanity of thickness and position. We should
- avoid drawing underline out of the current line area. */
- if (s->y + s->height <= s->ybase + position)
- position = (s->height - 1) - (s->ybase - s->y);
- if (s->y + s->height < s->ybase + position + thickness)
- thickness = (s->y + s->height) - (s->ybase + position);
- s->underline_thickness = thickness;
- s->underline_position = position;
- y = s->ybase + position;
- if (s->face->underline_defaulted_p)
- x_fill_rectangle (s->f, s->gc,
- s->x, y, s->width, thickness);
- else
- {
- XGCValues xgcv;
- XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
- XSetForeground (s->display, s->gc, s->face->underline_color);
- x_fill_rectangle (s->f, s->gc,
- s->x, y, s->width, thickness);
- XSetForeground (s->display, s->gc, xgcv.foreground);
- }
- }
- }
+ {
+ /* We use the same underline style as the previous one. */
+ thickness = s->prev->underline_thickness;
+ position = s->prev->underline_position;
+ }
+ else
+ {
+ /* Get the underline thickness. Default is 1 pixel. */
+ if (s->font && s->font->underline_thickness > 0)
+ thickness = s->font->underline_thickness;
+ else
+ thickness = 1;
+ if (x_underline_at_descent_line)
+ position = (s->height - thickness) - (s->ybase - s->y);
+ else
+ {
+ /* Get the underline position. This is the recommended
+ vertical offset in pixels from the baseline to the top of
+ the underline. This is a signed value according to the
+ specs, and its default is
+
+ ROUND ((maximum descent) / 2), with
+ ROUND(x) = floor (x + 0.5) */
+
+ if (x_use_underline_position_properties
+ && s->font && s->font->underline_position >= 0)
+ position = s->font->underline_position;
+ else if (s->font)
+ position = (s->font->descent + 1) / 2;
+ else
+ position = underline_minimum_offset;
+ }
+ position = max (position, underline_minimum_offset);
+ }
+ /* Check the sanity of thickness and position. We should
+ avoid drawing underline out of the current line area. */
+ if (s->y + s->height <= s->ybase + position)
+ position = (s->height - 1) - (s->ybase - s->y);
+ if (s->y + s->height < s->ybase + position + thickness)
+ thickness = (s->y + s->height) - (s->ybase + position);
+ s->underline_thickness = thickness;
+ s->underline_position = position;
+ y = s->ybase + position;
+ if (s->face->underline_defaulted_p)
+ x_fill_rectangle (s->f, s->gc,
+ s->x, y, s->width, thickness);
+ else
+ {
+ XGCValues xgcv;
+ XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
+ XSetForeground (s->display, s->gc, s->face->underline_color);
+ x_fill_rectangle (s->f, s->gc,
+ s->x, y, s->width, thickness);
+ XSetForeground (s->display, s->gc, xgcv.foreground);
+ }
+ }
+ }
/* Draw overline. */
if (s->face->overline_p)
{
@@ -3815,7 +3815,7 @@ x_delete_glyphs (struct frame *f, register int n)
static ATTRIBUTE_UNUSED void
x_clear_area1 (Display *dpy, Window window,
- int x, int y, int width, int height, int exposures)
+ int x, int y, int width, int height, int exposures)
{
eassert (width > 0 && height > 0);
XClearArea (dpy, window, x, y, width, height, exposures);
@@ -3837,12 +3837,12 @@ x_clear_area (struct frame *f, int x, int y, int width, int height)
#else
if (FRAME_X_DOUBLE_BUFFERED_P (f))
XFillRectangle (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f),
- f->output_data.x->reverse_gc,
- x, y, width, height);
+ FRAME_X_DRAWABLE (f),
+ f->output_data.x->reverse_gc,
+ x, y, width, height);
else
x_clear_area1 (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- x, y, width, height, False);
+ x, y, width, height, False);
#endif
}
@@ -3886,26 +3886,26 @@ x_show_hourglass (struct frame *f)
if (FRAME_OUTER_WINDOW (f))
#endif
{
- x->hourglass_p = true;
+ x->hourglass_p = true;
- if (!x->hourglass_window)
- {
+ if (!x->hourglass_window)
+ {
unsigned long mask = CWCursor;
XSetWindowAttributes attrs;
#ifdef USE_GTK
- Window parent = FRAME_X_WINDOW (f);
+ Window parent = FRAME_X_WINDOW (f);
#else
- Window parent = FRAME_OUTER_WINDOW (f);
+ Window parent = FRAME_OUTER_WINDOW (f);
#endif
attrs.cursor = x->hourglass_cursor;
- x->hourglass_window = XCreateWindow
- (dpy, parent, 0, 0, 32000, 32000, 0, 0,
- InputOnly, CopyFromParent, mask, &attrs);
- }
+ x->hourglass_window = XCreateWindow
+ (dpy, parent, 0, 0, 32000, 32000, 0, 0,
+ InputOnly, CopyFromParent, mask, &attrs);
+ }
- XMapRaised (dpy, x->hourglass_window);
- XFlush (dpy);
+ XMapRaised (dpy, x->hourglass_window);
+ XFlush (dpy);
}
}
}
@@ -3954,10 +3954,10 @@ XTflash (struct frame *f)
GdkGCValues vals;
GdkGC *gc;
vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
- ^ FRAME_BACKGROUND_PIXEL (f));
+ ^ FRAME_BACKGROUND_PIXEL (f));
vals.function = GDK_XOR;
gc = gdk_gc_new_with_values (window,
- &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
+ &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
#define XFillRectangle(d, win, gc, x, y, w, h) \
gdk_draw_rectangle (window, gc, true, x, y, w, h)
#endif /* ! HAVE_GTK3 */
@@ -4093,7 +4093,7 @@ XTring_bell (struct frame *f)
{
block_input ();
#ifdef HAVE_XKB
- XkbBell (FRAME_X_DISPLAY (f), None, 0, None);
+ XkbBell (FRAME_X_DISPLAY (f), None, 0, None);
#else
XBell (FRAME_X_DISPLAY (f), 0);
#endif
@@ -4162,7 +4162,7 @@ x_scroll_run (struct window *w, struct run *run)
SET_FRAME_GARBAGED (f);
#else
XCopyArea (FRAME_X_DISPLAY (f),
- FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f),
+ FRAME_X_DRAWABLE (f), FRAME_X_DRAWABLE (f),
f->output_data.x->normal_gc,
x, from_y,
width, height,
@@ -4257,28 +4257,28 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
if (type == FocusIn)
{
if (dpyinfo->x_focus_event_frame != frame)
- {
- x_new_focus_frame (dpyinfo, frame);
- dpyinfo->x_focus_event_frame = frame;
-
- /* Don't stop displaying the initial startup message
- for a switch-frame event we don't need. */
- /* When run as a daemon, Vterminal_frame is always NIL. */
- bufp->arg = (((NILP (Vterminal_frame)
- || ! FRAME_X_P (XFRAME (Vterminal_frame))
- || EQ (Fdaemonp (), Qt))
+ {
+ x_new_focus_frame (dpyinfo, frame);
+ dpyinfo->x_focus_event_frame = frame;
+
+ /* Don't stop displaying the initial startup message
+ for a switch-frame event we don't need. */
+ /* When run as a daemon, Vterminal_frame is always NIL. */
+ bufp->arg = (((NILP (Vterminal_frame)
+ || ! FRAME_X_P (XFRAME (Vterminal_frame))
+ || EQ (Fdaemonp (), Qt))
&& CONSP (Vframe_list)
&& !NILP (XCDR (Vframe_list)))
? Qt : Qnil);
- bufp->kind = FOCUS_IN_EVENT;
- XSETFRAME (bufp->frame_or_window, frame);
- }
+ bufp->kind = FOCUS_IN_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
+ }
frame->output_data.x->focus_state |= state;
#ifdef HAVE_X_I18N
if (FRAME_XIC (frame))
- XSetICFocus (FRAME_XIC (frame));
+ XSetICFocus (FRAME_XIC (frame));
#endif
}
else if (type == FocusOut)
@@ -4286,20 +4286,20 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
frame->output_data.x->focus_state &= ~state;
if (dpyinfo->x_focus_event_frame == frame)
- {
- dpyinfo->x_focus_event_frame = 0;
- x_new_focus_frame (dpyinfo, 0);
+ {
+ dpyinfo->x_focus_event_frame = 0;
+ x_new_focus_frame (dpyinfo, 0);
- bufp->kind = FOCUS_OUT_EVENT;
- XSETFRAME (bufp->frame_or_window, frame);
- }
+ bufp->kind = FOCUS_OUT_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (frame))
- XUnsetICFocus (FRAME_XIC (frame));
+ XUnsetICFocus (FRAME_XIC (frame));
#endif
if (frame->pointer_invisible)
- XTtoggle_invisible_pointer (frame, false);
+ XTtoggle_invisible_pointer (frame, false);
}
}
@@ -4328,21 +4328,21 @@ x_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
/* A tooltip frame? */
|| (!f->output_data.x->edit_widget
&& FRAME_X_WINDOW (f) == wdesc)
- || f->output_data.x->icon_desc == wdesc)
- return f;
+ || f->output_data.x->icon_desc == wdesc)
+ return f;
#else /* not USE_X_TOOLKIT */
#ifdef USE_GTK
if (f->output_data.x->edit_widget)
{
- GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
- struct x_output *x = f->output_data.x;
- if (gwdesc != 0 && gwdesc == x->edit_widget)
- return f;
+ GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+ struct x_output *x = f->output_data.x;
+ if (gwdesc != 0 && gwdesc == x->edit_widget)
+ return f;
}
#endif /* USE_GTK */
if (FRAME_X_WINDOW (f) == wdesc
- || f->output_data.x->icon_desc == wdesc)
- return f;
+ || f->output_data.x->icon_desc == wdesc)
+ return f;
#endif /* not USE_X_TOOLKIT */
}
return 0;
@@ -4366,7 +4366,7 @@ x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
FOR_EACH_FRAME (tail, frame)
{
if (found)
- break;
+ break;
f = XFRAME (frame);
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
{
@@ -4377,10 +4377,10 @@ x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
else if (x->widget)
{
#ifdef USE_GTK
- GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
- if (gwdesc != 0
- && gtk_widget_get_toplevel (gwdesc) == x->widget)
- found = f;
+ GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+ if (gwdesc != 0
+ && gtk_widget_get_toplevel (gwdesc) == x->widget)
+ found = f;
#else
if (wdesc == XtWindow (x->widget)
|| wdesc == XtWindow (x->column_widget)
@@ -4422,7 +4422,7 @@ x_menubar_window_to_frame (struct x_display_info *dpyinfo,
x = f->output_data.x;
#ifdef USE_GTK
if (x->menubar_widget && xg_event_is_for_menubar (f, event))
- return f;
+ return f;
#else
/* Match if the window is this frame's menubar. */
if (x->menubar_widget
@@ -4457,9 +4457,9 @@ x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc)
{
/* This frame matches if the window is its topmost widget. */
#ifdef USE_GTK
- GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
- if (gwdesc == x->widget)
- return f;
+ GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+ if (gwdesc == x->widget)
+ return f;
#else
if (wdesc == XtWindow (x->widget))
return f;
@@ -4496,14 +4496,14 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame,
case EnterNotify:
case LeaveNotify:
{
- struct frame *focus_frame = dpyinfo->x_focus_event_frame;
- int focus_state
- = focus_frame ? focus_frame->output_data.x->focus_state : 0;
-
- if (event->xcrossing.detail != NotifyInferior
- && event->xcrossing.focus
- && ! (focus_state & FOCUS_EXPLICIT))
- x_focus_changed ((event->type == EnterNotify ? FocusIn : FocusOut),
+ struct frame *focus_frame = dpyinfo->x_focus_event_frame;
+ int focus_state
+ = focus_frame ? focus_frame->output_data.x->focus_state : 0;
+
+ if (event->xcrossing.detail != NotifyInferior
+ && event->xcrossing.focus
+ && ! (focus_state & FOCUS_EXPLICIT))
+ x_focus_changed ((event->type == EnterNotify ? FocusIn : FocusOut),
FOCUS_IMPLICIT,
dpyinfo, frame, bufp);
}
@@ -4720,11 +4720,11 @@ x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, int state)
if (INTEGERP (tem)) mod_super = XINT (tem) & INT_MAX;
return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0)
- | ((state & ControlMask) ? mod_ctrl : 0)
- | ((state & dpyinfo->meta_mod_mask) ? mod_meta : 0)
- | ((state & dpyinfo->alt_mod_mask) ? mod_alt : 0)
- | ((state & dpyinfo->super_mod_mask) ? mod_super : 0)
- | ((state & dpyinfo->hyper_mod_mask) ? mod_hyper : 0));
+ | ((state & ControlMask) ? mod_ctrl : 0)
+ | ((state & dpyinfo->meta_mod_mask) ? mod_meta : 0)
+ | ((state & dpyinfo->alt_mod_mask) ? mod_alt : 0)
+ | ((state & dpyinfo->super_mod_mask) ? mod_super : 0)
+ | ((state & dpyinfo->hyper_mod_mask) ? mod_hyper : 0));
}
static int
@@ -4751,11 +4751,11 @@ x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, EMACS_INT state)
return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0)
- | ((state & mod_super) ? dpyinfo->super_mod_mask : 0)
- | ((state & mod_hyper) ? dpyinfo->hyper_mod_mask : 0)
- | ((state & shift_modifier) ? ShiftMask : 0)
- | ((state & mod_ctrl) ? ControlMask : 0)
- | ((state & mod_meta) ? dpyinfo->meta_mod_mask : 0));
+ | ((state & mod_super) ? dpyinfo->super_mod_mask : 0)
+ | ((state & mod_hyper) ? dpyinfo->hyper_mod_mask : 0)
+ | ((state & shift_modifier) ? ShiftMask : 0)
+ | ((state & mod_ctrl) ? ControlMask : 0)
+ | ((state & mod_meta) ? dpyinfo->meta_mod_mask : 0));
}
/* Convert a keysym to its name. */
@@ -4923,7 +4923,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
/* Clear the mouse-moved flag for every frame on this display. */
FOR_EACH_FRAME (tail, frame)
if (FRAME_X_P (XFRAME (frame))
- && FRAME_X_DISPLAY (XFRAME (frame)) == FRAME_X_DISPLAY (*fp))
+ && FRAME_X_DISPLAY (XFRAME (frame)) == FRAME_X_DISPLAY (*fp))
XFRAME (frame)->mouse_moved = false;
dpyinfo->last_mouse_scroll_bar = NULL;
@@ -5053,7 +5053,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
{
struct scroll_bar *bar;
- bar = x_window_to_scroll_bar (FRAME_X_DISPLAY (*fp), win, 2);
+ bar = x_window_to_scroll_bar (FRAME_X_DISPLAY (*fp), win, 2);
if (bar)
{
@@ -5121,20 +5121,20 @@ x_window_to_scroll_bar (Display *display, Window window_id, int type)
Lisp_Object bar, condemned;
if (! FRAME_X_P (XFRAME (frame)))
- continue;
+ continue;
/* Scan this frame's scroll bar list for a scroll bar with the
- right window ID. */
+ right window ID. */
condemned = FRAME_CONDEMNED_SCROLL_BARS (XFRAME (frame));
for (bar = FRAME_SCROLL_BARS (XFRAME (frame));
/* This trick allows us to search both the ordinary and
- condemned scroll bar lists with one loop. */
+ condemned scroll bar lists with one loop. */
! NILP (bar) || (bar = condemned,
condemned = Qnil,
! NILP (bar));
bar = XSCROLL_BAR (bar)->next)
if (XSCROLL_BAR (bar)->x_window == window_id
- && FRAME_X_DISPLAY (XFRAME (frame)) == display
+ && FRAME_X_DISPLAY (XFRAME (frame)) == display
&& (type = 2
|| (type == 1 && XSCROLL_BAR (bar)->horizontal)
|| (type == 0 && !XSCROLL_BAR (bar)->horizontal)))
@@ -5176,7 +5176,7 @@ x_window_to_menu_bar (Window window)
#ifdef USE_TOOLKIT_SCROLL_BARS
static void x_send_scroll_bar_event (Lisp_Object, enum scroll_bar_part,
- int, int, bool);
+ int, int, bool);
/* Lisp window being scrolled. Set when starting to interact with
a toolkit scroll bar, reset to nil when ending the interaction. */
@@ -5511,9 +5511,9 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
static gboolean
xg_scroll_callback (GtkRange *range,
- GtkScrollType scroll,
- gdouble value,
- gpointer user_data)
+ GtkScrollType scroll,
+ gdouble value,
+ gpointer user_data)
{
int whole = 0, portion = 0;
struct scroll_bar *bar = user_data;
@@ -5528,8 +5528,8 @@ xg_scroll_callback (GtkRange *range,
case GTK_SCROLL_JUMP:
/* Buttons 1 2 or 3 must be grabbed. */
if (FRAME_DISPLAY_INFO (f)->grabbed != 0
- && FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4))
- {
+ && FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4))
+ {
if (bar->horizontal)
{
part = scroll_bar_horizontal_handle;
@@ -5586,15 +5586,15 @@ xg_scroll_callback (GtkRange *range,
static gboolean
xg_end_scroll_callback (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
+ GdkEventButton *event,
+ gpointer user_data)
{
struct scroll_bar *bar = user_data;
bar->dragging = -1;
if (WINDOWP (window_being_scrolled))
{
x_send_scroll_bar_event (window_being_scrolled,
- scroll_bar_end_scroll, 0, 0, bar->horizontal);
+ scroll_bar_end_scroll, 0, 0, bar->horizontal);
window_being_scrolled = Qnil;
}
@@ -5751,8 +5751,8 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
block_input ();
xg_create_scroll_bar (f, bar, G_CALLBACK (xg_scroll_callback),
- G_CALLBACK (xg_end_scroll_callback),
- scroll_bar_name);
+ G_CALLBACK (xg_end_scroll_callback),
+ scroll_bar_name);
unblock_input ();
}
@@ -5831,7 +5831,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
/* Set the cursor to an arrow. I didn't find a resource to do that.
And I'm wondering why it hasn't an arrow cursor by default. */
XDefineCursor (XtDisplay (widget), XtWindow (widget),
- f->output_data.x->nontext_cursor);
+ f->output_data.x->nontext_cursor);
#else /* !USE_MOTIF i.e. use Xaw */
@@ -5865,25 +5865,25 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
if (pixel != -1)
- {
- if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
- FRAME_X_COLORMAP (f),
- &pixel, 1.2, 0x8000))
- pixel = -1;
- f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
- }
+ {
+ if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+ FRAME_X_COLORMAP (f),
+ &pixel, 1.2, 0x8000))
+ pixel = -1;
+ f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
+ }
}
if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
if (pixel != -1)
- {
- if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
- FRAME_X_COLORMAP (f),
- &pixel, 0.6, 0x4000))
- pixel = -1;
- f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
- }
+ {
+ if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+ FRAME_X_COLORMAP (f),
+ &pixel, 0.6, 0x4000))
+ pixel = -1;
+ f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
+ }
}
#ifdef XtNbeNiceToColormap
@@ -5896,7 +5896,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
colors itself. */
{
XtSetArg (av[ac], XtNbeNiceToColormap,
- DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
+ DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
++ac;
}
else
@@ -6030,7 +6030,7 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
/* Set the cursor to an arrow. I didn't find a resource to do that.
And I'm wondering why it hasn't an arrow cursor by default. */
XDefineCursor (XtDisplay (widget), XtWindow (widget),
- f->output_data.x->nontext_cursor);
+ f->output_data.x->nontext_cursor);
#else /* !USE_MOTIF i.e. use Xaw */
@@ -6064,25 +6064,25 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
if (pixel != -1)
- {
- if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
- FRAME_X_COLORMAP (f),
- &pixel, 1.2, 0x8000))
- pixel = -1;
- f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
- }
+ {
+ if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+ FRAME_X_COLORMAP (f),
+ &pixel, 1.2, 0x8000))
+ pixel = -1;
+ f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
+ }
}
if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
{
pixel = f->output_data.x->scroll_bar_background_pixel;
if (pixel != -1)
- {
- if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
- FRAME_X_COLORMAP (f),
- &pixel, 0.6, 0x4000))
- pixel = -1;
- f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
- }
+ {
+ if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+ FRAME_X_COLORMAP (f),
+ &pixel, 0.6, 0x4000))
+ pixel = -1;
+ f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
+ }
}
#ifdef XtNbeNiceToColormap
@@ -6095,7 +6095,7 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
colors itself. */
{
XtSetArg (av[ac], XtNbeNiceToColormap,
- DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
+ DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
++ac;
}
else
@@ -6203,19 +6203,19 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
if (scroll_bar_adjust_thumb_portion_p)
{
/* We use an estimate of 30 chars per line rather than the real
- `portion' value. This has the disadvantage that the thumb size
- is not very representative, but it makes our life a lot easier.
- Otherwise, we have to constantly adjust the thumb size, which
- we can't always do quickly enough: while dragging, the size of
- the thumb might prevent the user from dragging the thumb all the
- way to the end. but Motif and some versions of Xaw3d don't allow
- updating the thumb size while dragging. Also, even if we can update
- its size, the update will often happen too late.
- If you don't believe it, check out revision 1.650 of xterm.c to see
- what hoops we were going through and the still poor behavior we got. */
+ `portion' value. This has the disadvantage that the thumb size
+ is not very representative, but it makes our life a lot easier.
+ Otherwise, we have to constantly adjust the thumb size, which
+ we can't always do quickly enough: while dragging, the size of
+ the thumb might prevent the user from dragging the thumb all the
+ way to the end. but Motif and some versions of Xaw3d don't allow
+ updating the thumb size while dragging. Also, even if we can update
+ its size, the update will often happen too late.
+ If you don't believe it, check out revision 1.650 of xterm.c to see
+ what hoops we were going through and the still poor behavior we got. */
portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
/* When the thumb is at the bottom, position == whole.
- So we need to increase `whole' to make space for the thumb. */
+ So we need to increase `whole' to make space for the thumb. */
whole += portion;
}
@@ -6232,7 +6232,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
int size, value;
/* Slider size. Must be in the range [1 .. MAX - MIN] where MAX
- is the scroll bar's maximum and MIN is the scroll bar's minimum
+ is the scroll bar's maximum and MIN is the scroll bar's minimum
value. */
size = clip_to_bounds (1, shown * XM_SB_MAX, XM_SB_MAX);
@@ -6658,7 +6658,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
if (width > 0 && height > 0)
{
block_input ();
- x_clear_area (f, left, top, width, height);
+ x_clear_area (f, left, top, width, height);
unblock_input ();
}
@@ -6692,11 +6692,11 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
if (width > 0 && height > 0)
x_clear_area (f, left, top, width, height);
#ifdef USE_GTK
- xg_update_scrollbar_pos (f, bar->x_window, top,
+ xg_update_scrollbar_pos (f, bar->x_window, top,
left, width, max (height, 1));
#else /* not USE_GTK */
- XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
- left, top, width, max (height, 1), 0);
+ XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
+ left, top, width, max (height, 1), 0);
#endif /* not USE_GTK */
}
#else /* not USE_TOOLKIT_SCROLL_BARS */
@@ -6811,11 +6811,11 @@ XTset_horizontal_scroll_bar (struct window *w, int portion, int whole, int posit
WINDOW_LEFT_EDGE_X (w), top,
pixel_width - WINDOW_RIGHT_DIVIDER_WIDTH (w), height);
#ifdef USE_GTK
- xg_update_horizontal_scrollbar_pos (f, bar->x_window, top, left,
+ xg_update_horizontal_scrollbar_pos (f, bar->x_window, top, left,
width, height);
#else /* not USE_GTK */
- XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
- left, top, width, height, 0);
+ XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
+ left, top, width, height, 0);
#endif /* not USE_GTK */
}
#else /* not USE_TOOLKIT_SCROLL_BARS */
@@ -7411,7 +7411,7 @@ x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
was created. */
struct frame *f1 = x_any_window_to_frame (dpyinfo,
- event->xclient.window);
+ event->xclient.window);
return XFilterEvent (event, f1 ? FRAME_X_WINDOW (f1) : None);
}
@@ -7439,8 +7439,8 @@ event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
#ifdef HAVE_X_I18N
/* Filter events for the current X input method.
- GTK calls XFilterEvent but not for key press and release,
- so we do it here. */
+ GTK calls XFilterEvent but not for key press and release,
+ so we do it here. */
if ((xev->type == KeyPress || xev->type == KeyRelease)
&& dpyinfo
&& x_filter_event (dpyinfo, xev))
@@ -7451,7 +7451,7 @@ event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
#endif
if (! dpyinfo)
- current_finish = X_EVENT_NORMAL;
+ current_finish = X_EVENT_NORMAL;
else
current_count
+= handle_one_xevent (dpyinfo, xev, ¤t_finish,
@@ -7471,8 +7471,8 @@ event_handler_gdk (GdkXEvent *gxev, GdkEvent *ev, gpointer data)
static void xembed_send_message (struct frame *f, Time,
- enum xembed_message,
- long detail, long data1, long data2);
+ enum xembed_message,
+ long detail, long data1, long data2);
static void
x_net_wm_state (struct frame *f, Window window)
@@ -7517,12 +7517,12 @@ flush_dirty_back_buffers (void)
{
struct frame *f = XFRAME (frame);
if (FRAME_LIVE_P (f) &&
- FRAME_X_P (f) &&
- FRAME_X_WINDOW (f) &&
- !FRAME_GARBAGED_P (f) &&
- !buffer_flipping_blocked_p () &&
- FRAME_X_NEED_BUFFER_FLIP (f))
- show_back_buffer (f);
+ FRAME_X_P (f) &&
+ FRAME_X_WINDOW (f) &&
+ !FRAME_GARBAGED_P (f) &&
+ !buffer_flipping_blocked_p () &&
+ FRAME_X_NEED_BUFFER_FLIP (f))
+ show_back_buffer (f);
}
unblock_input ();
}
@@ -7573,19 +7573,19 @@ handle_one_xevent (struct x_display_info *dpyinfo,
{
case ClientMessage:
{
- if (event->xclient.message_type == dpyinfo->Xatom_wm_protocols
- && event->xclient.format == 32)
- {
- if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_take_focus)
- {
- /* Use the value returned by x_any_window_to_frame
+ if (event->xclient.message_type == dpyinfo->Xatom_wm_protocols
+ && event->xclient.format == 32)
+ {
+ if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_take_focus)
+ {
+ /* Use the value returned by x_any_window_to_frame
because this could be the shell widget window
if the frame has no title bar. */
- f = any;
+ f = any;
#ifdef HAVE_X_I18N
- /* Not quite sure this is needed -pd */
- if (f && FRAME_XIC (f))
- XSetICFocus (FRAME_XIC (f));
+ /* Not quite sure this is needed -pd */
+ if (f && FRAME_XIC (f))
+ XSetICFocus (FRAME_XIC (f));
#endif
#if false
/* Emacs sets WM hints whose `input' field is `true'. This
@@ -7601,146 +7601,146 @@ handle_one_xevent (struct x_display_info *dpyinfo,
below can generate additional FocusIn events which confuse
Emacs. */
- /* Since we set WM_TAKE_FOCUS, we must call
- XSetInputFocus explicitly. But not if f is null,
- since that might be an event for a deleted frame. */
- if (f)
- {
- Display *d = event->xclient.display;
- /* Catch and ignore errors, in case window has been
- iconified by a window manager such as GWM. */
- x_catch_errors (d);
- XSetInputFocus (d, event->xclient.window,
- /* The ICCCM says this is
- the only valid choice. */
- RevertToParent,
- event->xclient.data.l[1]);
- x_uncatch_errors ();
- }
- /* Not certain about handling scroll bars here */
+ /* Since we set WM_TAKE_FOCUS, we must call
+ XSetInputFocus explicitly. But not if f is null,
+ since that might be an event for a deleted frame. */
+ if (f)
+ {
+ Display *d = event->xclient.display;
+ /* Catch and ignore errors, in case window has been
+ iconified by a window manager such as GWM. */
+ x_catch_errors (d);
+ XSetInputFocus (d, event->xclient.window,
+ /* The ICCCM says this is
+ the only valid choice. */
+ RevertToParent,
+ event->xclient.data.l[1]);
+ x_uncatch_errors ();
+ }
+ /* Not certain about handling scroll bars here */
#endif
goto done;
- }
-
- if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_save_yourself)
- {
- /* Save state modify the WM_COMMAND property to
- something which can reinstate us. This notifies
- the session manager, who's looking for such a
- PropertyNotify. Can restart processing when
- a keyboard or mouse event arrives. */
- /* If we have a session manager, don't set this.
- KDE will then start two Emacsen, one for the
- session manager and one for this. */
+ }
+
+ if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_save_yourself)
+ {
+ /* Save state modify the WM_COMMAND property to
+ something which can reinstate us. This notifies
+ the session manager, who's looking for such a
+ PropertyNotify. Can restart processing when
+ a keyboard or mouse event arrives. */
+ /* If we have a session manager, don't set this.
+ KDE will then start two Emacsen, one for the
+ session manager and one for this. */
#ifdef HAVE_X_SM
- if (! x_session_have_connection ())
-#endif
- {
- f = x_top_window_to_frame (dpyinfo,
- event->xclient.window);
- /* This is just so we only give real data once
- for a single Emacs process. */
- if (f == SELECTED_FRAME ())
- XSetCommand (FRAME_X_DISPLAY (f),
- event->xclient.window,
- initial_argv, initial_argc);
- else if (f)
- XSetCommand (FRAME_X_DISPLAY (f),
- event->xclient.window,
- 0, 0);
- }
+ if (! x_session_have_connection ())
+#endif
+ {
+ f = x_top_window_to_frame (dpyinfo,
+ event->xclient.window);
+ /* This is just so we only give real data once
+ for a single Emacs process. */
+ if (f == SELECTED_FRAME ())
+ XSetCommand (FRAME_X_DISPLAY (f),
+ event->xclient.window,
+ initial_argv, initial_argc);
+ else if (f)
+ XSetCommand (FRAME_X_DISPLAY (f),
+ event->xclient.window,
+ 0, 0);
+ }
goto done;
- }
+ }
- if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_delete_window)
- {
- f = any;
- if (!f)
+ if (event->xclient.data.l[0] == dpyinfo->Xatom_wm_delete_window)
+ {
+ f = any;
+ if (!f)
goto OTHER; /* May be a dialog that is to be removed */
inev.ie.kind = DELETE_WINDOW_EVENT;
XSETFRAME (inev.ie.frame_or_window, f);
goto done;
- }
+ }
goto done;
- }
+ }
- if (event->xclient.message_type == dpyinfo->Xatom_wm_configure_denied)
+ if (event->xclient.message_type == dpyinfo->Xatom_wm_configure_denied)
goto done;
- if (event->xclient.message_type == dpyinfo->Xatom_wm_window_moved)
- {
- int new_x, new_y;
+ if (event->xclient.message_type == dpyinfo->Xatom_wm_window_moved)
+ {
+ int new_x, new_y;
f = x_window_to_frame (dpyinfo, event->xclient.window);
- new_x = event->xclient.data.s[0];
- new_y = event->xclient.data.s[1];
+ new_x = event->xclient.data.s[0];
+ new_y = event->xclient.data.s[1];
- if (f)
- {
- f->left_pos = new_x;
- f->top_pos = new_y;
- }
+ if (f)
+ {
+ f->left_pos = new_x;
+ f->top_pos = new_y;
+ }
goto done;
- }
+ }
#ifdef X_TOOLKIT_EDITRES
- if (event->xclient.message_type == dpyinfo->Xatom_editres)
- {
+ if (event->xclient.message_type == dpyinfo->Xatom_editres)
+ {
f = any;
if (f)
- _XEditResCheckMessages (f->output_data.x->widget,
+ _XEditResCheckMessages (f->output_data.x->widget,
NULL, (XEvent *) event, NULL);
goto done;
- }
+ }
#endif /* X_TOOLKIT_EDITRES */
- if (event->xclient.message_type == dpyinfo->Xatom_DONE
+ if (event->xclient.message_type == dpyinfo->Xatom_DONE
|| event->xclient.message_type == dpyinfo->Xatom_PAGE)
- {
- /* Ghostview job completed. Kill it. We could
- reply with "Next" if we received "Page", but we
- currently never do because we are interested in
- images, only, which should have 1 page. */
- Pixmap pixmap = (Pixmap) event->xclient.data.l[1];
+ {
+ /* Ghostview job completed. Kill it. We could
+ reply with "Next" if we received "Page", but we
+ currently never do because we are interested in
+ images, only, which should have 1 page. */
+ Pixmap pixmap = (Pixmap) event->xclient.data.l[1];
f = x_window_to_frame (dpyinfo, event->xclient.window);
if (!f)
goto OTHER;
- x_kill_gs_process (pixmap, f);
- expose_frame (f, 0, 0, 0, 0);
+ x_kill_gs_process (pixmap, f);
+ expose_frame (f, 0, 0, 0, 0);
goto done;
- }
+ }
#ifdef USE_TOOLKIT_SCROLL_BARS
- /* Scroll bar callbacks send a ClientMessage from which
- we construct an input_event. */
- if (event->xclient.message_type == dpyinfo->Xatom_Scrollbar)
- {
- x_scroll_bar_to_input_event (event, &inev.ie);
+ /* Scroll bar callbacks send a ClientMessage from which
+ we construct an input_event. */
+ if (event->xclient.message_type == dpyinfo->Xatom_Scrollbar)
+ {
+ x_scroll_bar_to_input_event (event, &inev.ie);
*finish = X_EVENT_GOTO_OUT;
- goto done;
- }
- else if (event->xclient.message_type == dpyinfo->Xatom_Horizontal_Scrollbar)
- {
- x_horizontal_scroll_bar_to_input_event (event, &inev.ie);
+ goto done;
+ }
+ else if (event->xclient.message_type == dpyinfo->Xatom_Horizontal_Scrollbar)
+ {
+ x_horizontal_scroll_bar_to_input_event (event, &inev.ie);
*finish = X_EVENT_GOTO_OUT;
- goto done;
- }
+ goto done;
+ }
#endif /* USE_TOOLKIT_SCROLL_BARS */
/* XEmbed messages from the embedder (if any). */
- if (event->xclient.message_type == dpyinfo->Xatom_XEMBED)
- {
+ if (event->xclient.message_type == dpyinfo->Xatom_XEMBED)
+ {
enum xembed_message msg = event->xclient.data.l[1];
if (msg == XEMBED_FOCUS_IN || msg == XEMBED_FOCUS_OUT)
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
*finish = X_EVENT_GOTO_OUT;
- goto done;
- }
+ goto done;
+ }
- xft_settings_event (dpyinfo, event);
+ xft_settings_event (dpyinfo, event);
f = any;
if (!f)
@@ -7754,7 +7754,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_display_set_last_user_time (dpyinfo, event->xselection.time);
#ifdef USE_X_TOOLKIT
if (! x_window_to_frame (dpyinfo, event->xselection.requestor))
- goto OTHER;
+ goto OTHER;
#endif /* not USE_X_TOOLKIT */
x_handle_selection_notify (&event->xselection);
break;
@@ -7763,15 +7763,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_display_set_last_user_time (dpyinfo, event->xselectionclear.time);
#ifdef USE_X_TOOLKIT
if (! x_window_to_frame (dpyinfo, event->xselectionclear.window))
- goto OTHER;
+ goto OTHER;
#endif /* USE_X_TOOLKIT */
{
- const XSelectionClearEvent *eventp = &event->xselectionclear;
+ const XSelectionClearEvent *eventp = &event->xselectionclear;
- inev.sie.kind = SELECTION_CLEAR_EVENT;
- SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
- SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
- SELECTION_EVENT_TIME (&inev.sie) = eventp->time;
+ inev.sie.kind = SELECTION_CLEAR_EVENT;
+ SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
+ SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
+ SELECTION_EVENT_TIME (&inev.sie) = eventp->time;
}
break;
@@ -7779,7 +7779,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_display_set_last_user_time (dpyinfo, event->xselectionrequest.time);
#ifdef USE_X_TOOLKIT
if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner))
- goto OTHER;
+ goto OTHER;
#endif /* USE_X_TOOLKIT */
{
const XSelectionRequestEvent *eventp = &event->xselectionrequest;
@@ -7799,7 +7799,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
f = x_top_window_to_frame (dpyinfo, event->xproperty.window);
if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state)
{
- bool not_hidden = x_handle_net_wm_state (f, &event->xproperty);
+ bool not_hidden = x_handle_net_wm_state (f, &event->xproperty);
if (not_hidden && FRAME_ICONIFIED_P (f))
{
/* Gnome shell does not iconify us when C-z is pressed.
@@ -7827,184 +7827,184 @@ handle_one_xevent (struct x_display_info *dpyinfo,
case ReparentNotify:
f = x_top_window_to_frame (dpyinfo, event->xreparent.window);
if (f)
- {
- f->output_data.x->parent_desc = event->xreparent.parent;
- x_real_positions (f, &f->left_pos, &f->top_pos);
+ {
+ f->output_data.x->parent_desc = event->xreparent.parent;
+ x_real_positions (f, &f->left_pos, &f->top_pos);
- /* Perhaps reparented due to a WM restart. Reset this. */
- FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
- FRAME_DISPLAY_INFO (f)->net_supported_window = 0;
+ /* Perhaps reparented due to a WM restart. Reset this. */
+ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
+ FRAME_DISPLAY_INFO (f)->net_supported_window = 0;
- x_set_frame_alpha (f);
- }
+ x_set_frame_alpha (f);
+ }
goto OTHER;
case Expose:
f = x_window_to_frame (dpyinfo, event->xexpose.window);
if (f)
- {
- if (!FRAME_VISIBLE_P (f))
- {
- block_input ();
- SET_FRAME_VISIBLE (f, 1);
- SET_FRAME_ICONIFIED (f, false);
- if (FRAME_X_DOUBLE_BUFFERED_P (f))
- font_drop_xrender_surfaces (f);
- f->output_data.x->has_been_visible = true;
- SET_FRAME_GARBAGED (f);
- unblock_input ();
- }
- else if (FRAME_GARBAGED_P (f))
- {
+ {
+ if (!FRAME_VISIBLE_P (f))
+ {
+ block_input ();
+ SET_FRAME_VISIBLE (f, 1);
+ SET_FRAME_ICONIFIED (f, false);
+ if (FRAME_X_DOUBLE_BUFFERED_P (f))
+ font_drop_xrender_surfaces (f);
+ f->output_data.x->has_been_visible = true;
+ SET_FRAME_GARBAGED (f);
+ unblock_input ();
+ }
+ else if (FRAME_GARBAGED_P (f))
+ {
#ifdef USE_GTK
- /* Go around the back buffer and manually clear the
- window the first time we show it. This way, we avoid
- showing users the sanity-defying horror of whatever
- GtkWindow is rendering beneath us. We've garbaged
- the frame, so we'll redraw the whole thing on next
- redisplay anyway. Yuck. */
- x_clear_area1 (
- FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- event->xexpose.x, event->xexpose.y,
- event->xexpose.width, event->xexpose.height,
- 0);
-#endif
- }
-
-
- if (!FRAME_GARBAGED_P (f))
- {
+ /* Go around the back buffer and manually clear the
+ window the first time we show it. This way, we avoid
+ showing users the sanity-defying horror of whatever
+ GtkWindow is rendering beneath us. We've garbaged
+ the frame, so we'll redraw the whole thing on next
+ redisplay anyway. Yuck. */
+ x_clear_area1 (
+ FRAME_X_DISPLAY (f),
+ FRAME_X_WINDOW (f),
+ event->xexpose.x, event->xexpose.y,
+ event->xexpose.width, event->xexpose.height,
+ 0);
+#endif
+ }
+
+
+ if (!FRAME_GARBAGED_P (f))
+ {
#ifdef USE_GTK
- /* This seems to be needed for GTK 2.6 and later, see
- http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15398. */
- x_clear_area (f,
- event->xexpose.x, event->xexpose.y,
- event->xexpose.width, event->xexpose.height);
+ /* This seems to be needed for GTK 2.6 and later, see
+ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15398. */
+ x_clear_area (f,
+ event->xexpose.x, event->xexpose.y,
+ event->xexpose.width, event->xexpose.height);
#endif
- expose_frame (f, event->xexpose.x, event->xexpose.y,
+ expose_frame (f, event->xexpose.x, event->xexpose.y,
event->xexpose.width, event->xexpose.height);
- }
+ }
- if (!FRAME_GARBAGED_P (f))
- show_back_buffer (f);
- }
+ if (!FRAME_GARBAGED_P (f))
+ show_back_buffer (f);
+ }
else
- {
+ {
#ifndef USE_TOOLKIT_SCROLL_BARS
- struct scroll_bar *bar;
+ struct scroll_bar *bar;
#endif
#if defined USE_LUCID
- /* Submenus of the Lucid menu bar aren't widgets
- themselves, so there's no way to dispatch events
- to them. Recognize this case separately. */
- {
- Widget widget = x_window_to_menu_bar (event->xexpose.window);
- if (widget)
- xlwmenu_redisplay (widget);
- }
+ /* Submenus of the Lucid menu bar aren't widgets
+ themselves, so there's no way to dispatch events
+ to them. Recognize this case separately. */
+ {
+ Widget widget = x_window_to_menu_bar (event->xexpose.window);
+ if (widget)
+ xlwmenu_redisplay (widget);
+ }
#endif /* USE_LUCID */
#ifdef USE_TOOLKIT_SCROLL_BARS
- /* Dispatch event to the widget. */
- goto OTHER;
+ /* Dispatch event to the widget. */
+ goto OTHER;
#else /* not USE_TOOLKIT_SCROLL_BARS */
- bar = x_window_to_scroll_bar (event->xexpose.display,
- event->xexpose.window, 2);
+ bar = x_window_to_scroll_bar (event->xexpose.display,
+ event->xexpose.window, 2);
- if (bar)
- x_scroll_bar_expose (bar, event);
+ if (bar)
+ x_scroll_bar_expose (bar, event);
#ifdef USE_X_TOOLKIT
- else
- goto OTHER;
+ else
+ goto OTHER;
#endif /* USE_X_TOOLKIT */
#endif /* not USE_TOOLKIT_SCROLL_BARS */
- }
+ }
break;
case GraphicsExpose: /* This occurs when an XCopyArea's
- source area was obscured or not
- available. */
+ source area was obscured or not
+ available. */
f = x_window_to_frame (dpyinfo, event->xgraphicsexpose.drawable);
if (f)
- {
- expose_frame (f, event->xgraphicsexpose.x,
- event->xgraphicsexpose.y,
- event->xgraphicsexpose.width,
- event->xgraphicsexpose.height);
- show_back_buffer (f);
- }
+ {
+ expose_frame (f, event->xgraphicsexpose.x,
+ event->xgraphicsexpose.y,
+ event->xgraphicsexpose.width,
+ event->xgraphicsexpose.height);
+ show_back_buffer (f);
+ }
#ifdef USE_X_TOOLKIT
else
- goto OTHER;
+ goto OTHER;
#endif /* USE_X_TOOLKIT */
break;
case NoExpose: /* This occurs when an XCopyArea's
- source area was completely
- available. */
+ source area was completely
+ available. */
break;
case UnmapNotify:
/* Redo the mouse-highlight after the tooltip has gone. */
if (event->xunmap.window == tip_window)
- {
- tip_window = 0;
- x_redo_mouse_highlight (dpyinfo);
- }
+ {
+ tip_window = 0;
+ x_redo_mouse_highlight (dpyinfo);
+ }
f = x_top_window_to_frame (dpyinfo, event->xunmap.window);
if (f) /* F may no longer exist if
- the frame was deleted. */
- {
+ the frame was deleted. */
+ {
bool visible = FRAME_VISIBLE_P (f);
- /* While a frame is unmapped, display generation is
- disabled; you don't want to spend time updating a
- display that won't ever be seen. */
- SET_FRAME_VISIBLE (f, 0);
- /* We can't distinguish, from the event, whether the window
- has become iconified or invisible. So assume, if it
- was previously visible, than now it is iconified.
- But x_make_frame_invisible clears both
- the visible flag and the iconified flag;
- and that way, we know the window is not iconified now. */
- if (visible || FRAME_ICONIFIED_P (f))
- {
- SET_FRAME_ICONIFIED (f, true);
- inev.ie.kind = ICONIFY_EVENT;
- XSETFRAME (inev.ie.frame_or_window, f);
- }
- }
+ /* While a frame is unmapped, display generation is
+ disabled; you don't want to spend time updating a
+ display that won't ever be seen. */
+ SET_FRAME_VISIBLE (f, 0);
+ /* We can't distinguish, from the event, whether the window
+ has become iconified or invisible. So assume, if it
+ was previously visible, than now it is iconified.
+ But x_make_frame_invisible clears both
+ the visible flag and the iconified flag;
+ and that way, we know the window is not iconified now. */
+ if (visible || FRAME_ICONIFIED_P (f))
+ {
+ SET_FRAME_ICONIFIED (f, true);
+ inev.ie.kind = ICONIFY_EVENT;
+ XSETFRAME (inev.ie.frame_or_window, f);
+ }
+ }
goto OTHER;
case MapNotify:
/* We use x_top_window_to_frame because map events can
- come for sub-windows and they don't mean that the
- frame is visible. */
+ come for sub-windows and they don't mean that the
+ frame is visible. */
f = x_top_window_to_frame (dpyinfo, event->xmap.window);
if (f)
- {
+ {
bool iconified = FRAME_ICONIFIED_P (f);
- /* Check if fullscreen was specified before we where mapped the
- first time, i.e. from the command line. */
- if (!f->output_data.x->has_been_visible)
- x_check_fullscreen (f);
-
- SET_FRAME_VISIBLE (f, 1);
- SET_FRAME_ICONIFIED (f, false);
- f->output_data.x->has_been_visible = true;
-
- if (iconified)
- {
- inev.ie.kind = DEICONIFY_EVENT;
- XSETFRAME (inev.ie.frame_or_window, f);
- }
- else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list)))
- /* Force a redisplay sooner or later to update the
+ /* Check if fullscreen was specified before we where mapped the
+ first time, i.e. from the command line. */
+ if (!f->output_data.x->has_been_visible)
+ x_check_fullscreen (f);
+
+ SET_FRAME_VISIBLE (f, 1);
+ SET_FRAME_ICONIFIED (f, false);
+ f->output_data.x->has_been_visible = true;
+
+ if (iconified)
+ {
+ inev.ie.kind = DEICONIFY_EVENT;
+ XSETFRAME (inev.ie.frame_or_window, f);
+ }
+ else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list)))
+ /* Force a redisplay sooner or later to update the
frame titles in case this is the second frame. */
- record_asynch_buffer_change ();
- }
+ record_asynch_buffer_change ();
+ }
goto OTHER;
case KeyPress:
@@ -8015,7 +8015,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
/* Dispatch KeyPress events when in menu. */
if (popup_activated ())
- goto OTHER;
+ goto OTHER;
#endif
f = any;
@@ -8028,127 +8028,127 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|| !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
#endif
)
- {
- clear_mouse_face (hlinfo);
- hlinfo->mouse_face_hidden = true;
- }
+ {
+ clear_mouse_face (hlinfo);
+ hlinfo->mouse_face_hidden = true;
+ }
#if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS
if (f == 0)
- {
- /* Scroll bars consume key events, but we want
- the keys to go to the scroll bar's frame. */
- Widget widget = XtWindowToWidget (dpyinfo->display,
- event->xkey.window);
- if (widget && XmIsScrollBar (widget))
- {
- widget = XtParent (widget);
- f = x_any_window_to_frame (dpyinfo, XtWindow (widget));
- }
- }
+ {
+ /* Scroll bars consume key events, but we want
+ the keys to go to the scroll bar's frame. */
+ Widget widget = XtWindowToWidget (dpyinfo->display,
+ event->xkey.window);
+ if (widget && XmIsScrollBar (widget))
+ {
+ widget = XtParent (widget);
+ f = x_any_window_to_frame (dpyinfo, XtWindow (widget));
+ }
+ }
#endif /* USE_MOTIF and USE_TOOLKIT_SCROLL_BARS */
if (f != 0)
- {
- KeySym keysym, orig_keysym;
- /* al%imercury@uunet.uu.net says that making this 81
- instead of 80 fixed a bug whereby meta chars made
- his Emacs hang.
-
- It seems that some version of XmbLookupString has
- a bug of not returning XBufferOverflow in
- status_return even if the input is too long to
- fit in 81 bytes. So, we must prepare sufficient
- bytes for copy_buffer. 513 bytes (256 chars for
- two-byte character set) seems to be a fairly good
- approximation. -- 2000.8.10 handa@etl.go.jp */
- unsigned char copy_buffer[513];
- unsigned char *copy_bufptr = copy_buffer;
- int copy_bufsiz = sizeof (copy_buffer);
- int modifiers;
- Lisp_Object coding_system = Qlatin_1;
+ {
+ KeySym keysym, orig_keysym;
+ /* al%imercury@uunet.uu.net says that making this 81
+ instead of 80 fixed a bug whereby meta chars made
+ his Emacs hang.
+
+ It seems that some version of XmbLookupString has
+ a bug of not returning XBufferOverflow in
+ status_return even if the input is too long to
+ fit in 81 bytes. So, we must prepare sufficient
+ bytes for copy_buffer. 513 bytes (256 chars for
+ two-byte character set) seems to be a fairly good
+ approximation. -- 2000.8.10 handa@etl.go.jp */
+ unsigned char copy_buffer[513];
+ unsigned char *copy_bufptr = copy_buffer;
+ int copy_bufsiz = sizeof (copy_buffer);
+ int modifiers;
+ Lisp_Object coding_system = Qlatin_1;
Lisp_Object c;
/* Event will be modified. */
XKeyEvent xkey = event->xkey;
#ifdef USE_GTK
- /* Don't pass keys to GTK. A Tab will shift focus to the
- tool bar in GTK 2.4. Keys will still go to menus and
- dialogs because in that case popup_activated is nonzero
- (see above). */
- *finish = X_EVENT_DROP;
+ /* Don't pass keys to GTK. A Tab will shift focus to the
+ tool bar in GTK 2.4. Keys will still go to menus and
+ dialogs because in that case popup_activated is nonzero
+ (see above). */
+ *finish = X_EVENT_DROP;
#endif
- xkey.state |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f),
+ xkey.state |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f),
extra_keyboard_modifiers);
- modifiers = xkey.state;
+ modifiers = xkey.state;
- /* This will have to go some day... */
+ /* This will have to go some day... */
- /* make_lispy_event turns chars into control chars.
- Don't do it here because XLookupString is too eager. */
- xkey.state &= ~ControlMask;
- xkey.state &= ~(dpyinfo->meta_mod_mask
+ /* make_lispy_event turns chars into control chars.
+ Don't do it here because XLookupString is too eager. */
+ xkey.state &= ~ControlMask;
+ xkey.state &= ~(dpyinfo->meta_mod_mask
| dpyinfo->super_mod_mask
| dpyinfo->hyper_mod_mask
| dpyinfo->alt_mod_mask);
- /* In case Meta is ComposeCharacter,
- clear its status. According to Markus Ehrnsperger
- Markus.Ehrnsperger@lehrstuhl-bross.physik.uni-muenchen.de
- this enables ComposeCharacter to work whether or
- not it is combined with Meta. */
- if (modifiers & dpyinfo->meta_mod_mask)
- memset (&compose_status, 0, sizeof (compose_status));
+ /* In case Meta is ComposeCharacter,
+ clear its status. According to Markus Ehrnsperger
+ Markus.Ehrnsperger@lehrstuhl-bross.physik.uni-muenchen.de
+ this enables ComposeCharacter to work whether or
+ not it is combined with Meta. */
+ if (modifiers & dpyinfo->meta_mod_mask)
+ memset (&compose_status, 0, sizeof (compose_status));
#ifdef HAVE_X_I18N
- if (FRAME_XIC (f))
- {
- Status status_return;
-
- coding_system = Vlocale_coding_system;
- nbytes = XmbLookupString (FRAME_XIC (f),
- &xkey, (char *) copy_bufptr,
- copy_bufsiz, &keysym,
- &status_return);
- if (status_return == XBufferOverflow)
- {
- copy_bufsiz = nbytes + 1;
- copy_bufptr = alloca (copy_bufsiz);
- nbytes = XmbLookupString (FRAME_XIC (f),
- &xkey, (char *) copy_bufptr,
- copy_bufsiz, &keysym,
- &status_return);
- }
- /* Xutf8LookupString is a new but already deprecated interface. -stef */
- if (status_return == XLookupNone)
- break;
- else if (status_return == XLookupChars)
- {
- keysym = NoSymbol;
- modifiers = 0;
- }
- else if (status_return != XLookupKeySym
- && status_return != XLookupBoth)
- emacs_abort ();
- }
- else
- nbytes = XLookupString (&xkey, (char *) copy_bufptr,
- copy_bufsiz, &keysym,
- &compose_status);
+ if (FRAME_XIC (f))
+ {
+ Status status_return;
+
+ coding_system = Vlocale_coding_system;
+ nbytes = XmbLookupString (FRAME_XIC (f),
+ &xkey, (char *) copy_bufptr,
+ copy_bufsiz, &keysym,
+ &status_return);
+ if (status_return == XBufferOverflow)
+ {
+ copy_bufsiz = nbytes + 1;
+ copy_bufptr = alloca (copy_bufsiz);
+ nbytes = XmbLookupString (FRAME_XIC (f),
+ &xkey, (char *) copy_bufptr,
+ copy_bufsiz, &keysym,
+ &status_return);
+ }
+ /* Xutf8LookupString is a new but already deprecated interface. -stef */
+ if (status_return == XLookupNone)
+ break;
+ else if (status_return == XLookupChars)
+ {
+ keysym = NoSymbol;
+ modifiers = 0;
+ }
+ else if (status_return != XLookupKeySym
+ && status_return != XLookupBoth)
+ emacs_abort ();
+ }
+ else
+ nbytes = XLookupString (&xkey, (char *) copy_bufptr,
+ copy_bufsiz, &keysym,
+ &compose_status);
#else
- nbytes = XLookupString (&xkey, (char *) copy_bufptr,
- copy_bufsiz, &keysym,
- &compose_status);
+ nbytes = XLookupString (&xkey, (char *) copy_bufptr,
+ copy_bufsiz, &keysym,
+ &compose_status);
#endif
- /* If not using XIM/XIC, and a compose sequence is in progress,
- we break here. Otherwise, chars_matched is always 0. */
- if (compose_status.chars_matched > 0 && nbytes == 0)
- break;
+ /* If not using XIM/XIC, and a compose sequence is in progress,
+ we break here. Otherwise, chars_matched is always 0. */
+ if (compose_status.chars_matched > 0 && nbytes == 0)
+ break;
- memset (&compose_status, 0, sizeof (compose_status));
- orig_keysym = keysym;
+ memset (&compose_status, 0, sizeof (compose_status));
+ orig_keysym = keysym;
/* Common for all keysym input events. */
XSETFRAME (inev.ie.frame_or_window, f);
@@ -8185,83 +8185,83 @@ handle_one_xevent (struct x_display_info *dpyinfo,
NATNUMP (c)))
{
inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
- ? ASCII_KEYSTROKE_EVENT
- : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
+ ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
inev.ie.code = XFASTINT (c);
goto done_keysym;
}
/* Random non-modifier sorts of keysyms. */
if (((keysym >= XK_BackSpace && keysym <= XK_Escape)
- || keysym == XK_Delete
+ || keysym == XK_Delete
#ifdef XK_ISO_Left_Tab
- || (keysym >= XK_ISO_Left_Tab
- && keysym <= XK_ISO_Enter)
+ || (keysym >= XK_ISO_Left_Tab
+ && keysym <= XK_ISO_Enter)
#endif
- || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */
- || IsMiscFunctionKey (keysym) /* 0xff60 <= x < VARIES */
+ || IsCursorKey (keysym) /* 0xff50 <= x < 0xff60 */
+ || IsMiscFunctionKey (keysym) /* 0xff60 <= x < VARIES */
#ifdef HPUX
- /* This recognizes the "extended function
- keys". It seems there's no cleaner way.
- Test IsModifierKey to avoid handling
- mode_switch incorrectly. */
- || (XK_Select <= keysym && keysym < XK_KP_Space)
+ /* This recognizes the "extended function
+ keys". It seems there's no cleaner way.
+ Test IsModifierKey to avoid handling
+ mode_switch incorrectly. */
+ || (XK_Select <= keysym && keysym < XK_KP_Space)
#endif
#ifdef XK_dead_circumflex
- || orig_keysym == XK_dead_circumflex
+ || orig_keysym == XK_dead_circumflex
#endif
#ifdef XK_dead_grave
- || orig_keysym == XK_dead_grave
+ || orig_keysym == XK_dead_grave
#endif
#ifdef XK_dead_tilde
- || orig_keysym == XK_dead_tilde
+ || orig_keysym == XK_dead_tilde
#endif
#ifdef XK_dead_diaeresis
- || orig_keysym == XK_dead_diaeresis
+ || orig_keysym == XK_dead_diaeresis
#endif
#ifdef XK_dead_macron
- || orig_keysym == XK_dead_macron
+ || orig_keysym == XK_dead_macron
#endif
#ifdef XK_dead_degree
- || orig_keysym == XK_dead_degree
+ || orig_keysym == XK_dead_degree
#endif
#ifdef XK_dead_acute
- || orig_keysym == XK_dead_acute
+ || orig_keysym == XK_dead_acute
#endif
#ifdef XK_dead_cedilla
- || orig_keysym == XK_dead_cedilla
+ || orig_keysym == XK_dead_cedilla
#endif
#ifdef XK_dead_breve
- || orig_keysym == XK_dead_breve
+ || orig_keysym == XK_dead_breve
#endif
#ifdef XK_dead_ogonek
- || orig_keysym == XK_dead_ogonek
+ || orig_keysym == XK_dead_ogonek
#endif
#ifdef XK_dead_caron
- || orig_keysym == XK_dead_caron
+ || orig_keysym == XK_dead_caron
#endif
#ifdef XK_dead_doubleacute
- || orig_keysym == XK_dead_doubleacute
+ || orig_keysym == XK_dead_doubleacute
#endif
#ifdef XK_dead_abovedot
- || orig_keysym == XK_dead_abovedot
-#endif
- || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */
- || IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */
- /* Any "vendor-specific" key is ok. */
- || (orig_keysym & (1 << 28))
- || (keysym != NoSymbol && nbytes == 0))
- && ! (IsModifierKey (orig_keysym)
- /* The symbols from XK_ISO_Lock
- to XK_ISO_Last_Group_Lock
- don't have real modifiers but
- should be treated similarly to
- Mode_switch by Emacs. */
+ || orig_keysym == XK_dead_abovedot
+#endif
+ || IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */
+ || IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */
+ /* Any "vendor-specific" key is ok. */
+ || (orig_keysym & (1 << 28))
+ || (keysym != NoSymbol && nbytes == 0))
+ && ! (IsModifierKey (orig_keysym)
+ /* The symbols from XK_ISO_Lock
+ to XK_ISO_Last_Group_Lock
+ don't have real modifiers but
+ should be treated similarly to
+ Mode_switch by Emacs. */
#if defined XK_ISO_Lock && defined XK_ISO_Last_Group_Lock
- || (XK_ISO_Lock <= orig_keysym
+ || (XK_ISO_Lock <= orig_keysym
&& orig_keysym <= XK_ISO_Last_Group_Lock)
#endif
- ))
+ ))
{
STORE_KEYSYM_FOR_DEBUG (keysym);
/* make_lispy_event will convert this to a symbolic
@@ -8332,12 +8332,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
}
/* FIXME: check side effects and remove this. */
((XEvent *) event)->xkey = xkey;
- }
+ }
done_keysym:
#ifdef HAVE_X_I18N
/* Don't dispatch this event since XtDispatchEvent calls
- XFilterEvent, and two calls in a row may freeze the
- client. */
+ XFilterEvent, and two calls in a row may freeze the
+ client. */
break;
#else
goto OTHER;
@@ -8347,8 +8347,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
x_display_set_last_user_time (dpyinfo, event->xkey.time);
#ifdef HAVE_X_I18N
/* Don't dispatch this event since XtDispatchEvent calls
- XFilterEvent, and two calls in a row may freeze the
- client. */
+ XFilterEvent, and two calls in a row may freeze the
+ client. */
break;
#else
goto OTHER;
@@ -8369,9 +8369,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
note_mouse_movement (f, &event->xmotion);
#ifdef USE_GTK
/* We may get an EnterNotify on the buttons in the toolbar. In that
- case we moved out of any highlighted area and need to note this. */
+ case we moved out of any highlighted area and need to note this. */
if (!f && dpyinfo->last_mouse_glyph_frame)
- note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &event->xmotion);
+ note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &event->xmotion);
#endif
goto OTHER;
@@ -8385,26 +8385,26 @@ handle_one_xevent (struct x_display_info *dpyinfo,
f = x_top_window_to_frame (dpyinfo, event->xcrossing.window);
if (f)
- {
- if (f == hlinfo->mouse_face_mouse_frame)
- {
- /* If we move outside the frame, then we're
- certainly no longer on any text in the frame. */
- clear_mouse_face (hlinfo);
- hlinfo->mouse_face_mouse_frame = 0;
- }
-
- /* Generate a nil HELP_EVENT to cancel a help-echo.
- Do it only if there's something to cancel.
- Otherwise, the startup message is cleared when
- the mouse leaves the frame. */
- if (any_help_event_p)
+ {
+ if (f == hlinfo->mouse_face_mouse_frame)
+ {
+ /* If we move outside the frame, then we're
+ certainly no longer on any text in the frame. */
+ clear_mouse_face (hlinfo);
+ hlinfo->mouse_face_mouse_frame = 0;
+ }
+
+ /* Generate a nil HELP_EVENT to cancel a help-echo.
+ Do it only if there's something to cancel.
+ Otherwise, the startup message is cleared when
+ the mouse leaves the frame. */
+ if (any_help_event_p)
do_help = -1;
- }
+ }
#ifdef USE_GTK
/* See comment in EnterNotify above */
else if (dpyinfo->last_mouse_glyph_frame)
- note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &event->xmotion);
+ note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &event->xmotion);
#endif
goto OTHER;
@@ -8414,29 +8414,29 @@ handle_one_xevent (struct x_display_info *dpyinfo,
case MotionNotify:
{
- x_display_set_last_user_time (dpyinfo, event->xmotion.time);
- previous_help_echo_string = help_echo_string;
- help_echo_string = Qnil;
+ x_display_set_last_user_time (dpyinfo, event->xmotion.time);
+ previous_help_echo_string = help_echo_string;
+ help_echo_string = Qnil;
f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
: x_window_to_frame (dpyinfo, event->xmotion.window));
- if (hlinfo->mouse_face_hidden)
- {
- hlinfo->mouse_face_hidden = false;
- clear_mouse_face (hlinfo);
- }
+ if (hlinfo->mouse_face_hidden)
+ {
+ hlinfo->mouse_face_hidden = false;
+ clear_mouse_face (hlinfo);
+ }
#ifdef USE_GTK
- if (f && xg_event_is_for_scrollbar (f, event))
- f = 0;
+ if (f && xg_event_is_for_scrollbar (f, event))
+ f = 0;
#endif
- if (f)
- {
+ if (f)
+ {
- /* Generate SELECT_WINDOW_EVENTs when needed.
- Don't let popup menus influence things (bug#1261). */
- if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
+ /* Generate SELECT_WINDOW_EVENTs when needed.
+ Don't let popup menus influence things (bug#1261). */
+ if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
{
static Lisp_Object last_mouse_window;
Lisp_Object window = window_from_coordinates
@@ -8461,249 +8461,249 @@ handle_one_xevent (struct x_display_info *dpyinfo,
/* Remember the last window where we saw the mouse. */
last_mouse_window = window;
}
- if (!note_mouse_movement (f, &event->xmotion))
+ if (!note_mouse_movement (f, &event->xmotion))
help_echo_string = previous_help_echo_string;
- }
- else
- {
+ }
+ else
+ {
#ifndef USE_TOOLKIT_SCROLL_BARS
- struct scroll_bar *bar
- = x_window_to_scroll_bar (event->xmotion.display,
- event->xmotion.window, 2);
+ struct scroll_bar *bar
+ = x_window_to_scroll_bar (event->xmotion.display,
+ event->xmotion.window, 2);
- if (bar)
- x_scroll_bar_note_movement (bar, &event->xmotion);
+ if (bar)
+ x_scroll_bar_note_movement (bar, &event->xmotion);
#endif /* USE_TOOLKIT_SCROLL_BARS */
- /* If we move outside the frame, then we're
- certainly no longer on any text in the frame. */
- clear_mouse_face (hlinfo);
- }
+ /* If we move outside the frame, then we're
+ certainly no longer on any text in the frame. */
+ clear_mouse_face (hlinfo);
+ }
- /* If the contents of the global variable help_echo_string
- has changed, generate a HELP_EVENT. */
- if (!NILP (help_echo_string)
- || !NILP (previous_help_echo_string))
+ /* If the contents of the global variable help_echo_string
+ has changed, generate a HELP_EVENT. */
+ if (!NILP (help_echo_string)
+ || !NILP (previous_help_echo_string))
do_help = 1;
- goto OTHER;
+ goto OTHER;
}
case ConfigureNotify:
/* An opaque move can generate a stream of events as the window
- is dragged around. If the connection round trip time isn't
- really short, they may come faster than we can respond to
- them, given the multiple queries we can do to check window
- manager state, translate coordinates, etc.
-
- So if this ConfigureNotify is immediately followed by another
- for the same window, use the info from the latest update, and
- consider the events all handled. */
+ is dragged around. If the connection round trip time isn't
+ really short, they may come faster than we can respond to
+ them, given the multiple queries we can do to check window
+ manager state, translate coordinates, etc.
+
+ So if this ConfigureNotify is immediately followed by another
+ for the same window, use the info from the latest update, and
+ consider the events all handled. */
/* Opaque resize may be trickier; ConfigureNotify events are
- mixed with Expose events for multiple windows. */
+ mixed with Expose events for multiple windows. */
configureEvent = *event;
while (XPending (dpyinfo->display))
- {
- XNextEvent (dpyinfo->display, &next_event);
- if (next_event.type != ConfigureNotify
- || next_event.xconfigure.window != event->xconfigure.window
- /* Skipping events with different sizes can lead to a
- mispositioned mode line at initial window creation.
- Only drop window motion events for now. */
- || next_event.xconfigure.width != event->xconfigure.width
- || next_event.xconfigure.height != event->xconfigure.height)
- {
- XPutBackEvent (dpyinfo->display, &next_event);
- break;
- }
- else
+ {
+ XNextEvent (dpyinfo->display, &next_event);
+ if (next_event.type != ConfigureNotify
+ || next_event.xconfigure.window != event->xconfigure.window
+ /* Skipping events with different sizes can lead to a
+ mispositioned mode line at initial window creation.
+ Only drop window motion events for now. */
+ || next_event.xconfigure.width != event->xconfigure.width
+ || next_event.xconfigure.height != event->xconfigure.height)
+ {
+ XPutBackEvent (dpyinfo->display, &next_event);
+ break;
+ }
+ else
configureEvent = next_event;
- }
+ }
f = x_top_window_to_frame (dpyinfo, configureEvent.xconfigure.window);
/* Unfortunately, we need to call font_drop_xrender_surfaces for
- _all_ ConfigureNotify events, otherwise we miss some and
- flicker. Don't try to optimize these calls by looking only
- for size changes: that's not sufficient. We miss some
- surface invalidations and flicker. */
+ _all_ ConfigureNotify events, otherwise we miss some and
+ flicker. Don't try to optimize these calls by looking only
+ for size changes: that's not sufficient. We miss some
+ surface invalidations and flicker. */
block_input ();
if (f && FRAME_X_DOUBLE_BUFFERED_P (f))
- font_drop_xrender_surfaces (f);
+ font_drop_xrender_surfaces (f);
unblock_input ();
#ifdef USE_CAIRO
if (f) x_cr_destroy_surface (f);
#endif
#ifdef USE_GTK
if (!f
- && (f = any)
- && configureEvent.xconfigure.window == FRAME_X_WINDOW (f))
- {
- block_input ();
- if (FRAME_X_DOUBLE_BUFFERED_P (f))
- font_drop_xrender_surfaces (f);
- unblock_input ();
- xg_frame_resized (f, configureEvent.xconfigure.width,
- configureEvent.xconfigure.height);
+ && (f = any)
+ && configureEvent.xconfigure.window == FRAME_X_WINDOW (f))
+ {
+ block_input ();
+ if (FRAME_X_DOUBLE_BUFFERED_P (f))
+ font_drop_xrender_surfaces (f);
+ unblock_input ();
+ xg_frame_resized (f, configureEvent.xconfigure.width,
+ configureEvent.xconfigure.height);
#ifdef USE_CAIRO
- x_cr_destroy_surface (f);
+ x_cr_destroy_surface (f);
#endif
- f = 0;
- }
+ f = 0;
+ }
#endif
if (f)
- {
+ {
- x_net_wm_state (f, configureEvent.xconfigure.window);
+ x_net_wm_state (f, configureEvent.xconfigure.window);
#ifdef USE_X_TOOLKIT
- /* Tip frames are pure X window, set size for them. */
- if (! NILP (tip_frame) && XFRAME (tip_frame) == f)
- {
- if (FRAME_PIXEL_HEIGHT (f) != configureEvent.xconfigure.height
- || FRAME_PIXEL_WIDTH (f) != configureEvent.xconfigure.width)
- {
- SET_FRAME_GARBAGED (f);
- }
- FRAME_PIXEL_HEIGHT (f) = configureEvent.xconfigure.height;
- FRAME_PIXEL_WIDTH (f) = configureEvent.xconfigure.width;
- }
+ /* Tip frames are pure X window, set size for them. */
+ if (! NILP (tip_frame) && XFRAME (tip_frame) == f)
+ {
+ if (FRAME_PIXEL_HEIGHT (f) != configureEvent.xconfigure.height
+ || FRAME_PIXEL_WIDTH (f) != configureEvent.xconfigure.width)
+ {
+ SET_FRAME_GARBAGED (f);
+ }
+ FRAME_PIXEL_HEIGHT (f) = configureEvent.xconfigure.height;
+ FRAME_PIXEL_WIDTH (f) = configureEvent.xconfigure.width;
+ }
#endif
#ifndef USE_X_TOOLKIT
#ifndef USE_GTK
- int width =
+ int width =
FRAME_PIXEL_TO_TEXT_WIDTH (f, configureEvent.xconfigure.width);
- int height =
+ int height =
FRAME_PIXEL_TO_TEXT_HEIGHT (f, configureEvent.xconfigure.height);
- /* In the toolkit version, change_frame_size
- is called by the code that handles resizing
- of the EmacsFrame widget. */
-
- /* Even if the number of character rows and columns has
- not changed, the font size may have changed, so we need
- to check the pixel dimensions as well. */
- if (width != FRAME_TEXT_WIDTH (f)
- || height != FRAME_TEXT_HEIGHT (f)
- || configureEvent.xconfigure.width != FRAME_PIXEL_WIDTH (f)
- || configureEvent.xconfigure.height != FRAME_PIXEL_HEIGHT (f))
- {
- change_frame_size (f, width, height, false, true, false, true);
- x_clear_under_internal_border (f);
- SET_FRAME_GARBAGED (f);
- cancel_mouse_face (f);
- }
+ /* In the toolkit version, change_frame_size
+ is called by the code that handles resizing
+ of the EmacsFrame widget. */
+
+ /* Even if the number of character rows and columns has
+ not changed, the font size may have changed, so we need
+ to check the pixel dimensions as well. */
+ if (width != FRAME_TEXT_WIDTH (f)
+ || height != FRAME_TEXT_HEIGHT (f)
+ || configureEvent.xconfigure.width != FRAME_PIXEL_WIDTH (f)
+ || configureEvent.xconfigure.height != FRAME_PIXEL_HEIGHT (f))
+ {
+ change_frame_size (f, width, height, false, true, false, true);
+ x_clear_under_internal_border (f);
+ SET_FRAME_GARBAGED (f);
+ cancel_mouse_face (f);
+ }
#endif /* not USE_GTK */
#endif
#ifdef USE_GTK
- /* GTK creates windows but doesn't map them.
- Only get real positions when mapped. */
- if (FRAME_GTK_OUTER_WIDGET (f)
- && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
+ /* GTK creates windows but doesn't map them.
+ Only get real positions when mapped. */
+ if (FRAME_GTK_OUTER_WIDGET (f)
+ && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f)))
#endif
x_real_positions (f, &f->left_pos, &f->top_pos);
#ifdef HAVE_X_I18N
- if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMStatusArea))
- xic_set_statusarea (f);
+ if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMStatusArea))
+ xic_set_statusarea (f);
#endif
- }
+ }
goto OTHER;
case ButtonRelease:
case ButtonPress:
{
- /* If we decide we want to generate an event to be seen
- by the rest of Emacs, we put it here. */
- bool tool_bar_p = false;
+ /* If we decide we want to generate an event to be seen
+ by the rest of Emacs, we put it here. */
+ bool tool_bar_p = false;
memset (&compose_status, 0, sizeof (compose_status));
dpyinfo->last_mouse_glyph_frame = NULL;
x_display_set_last_user_time (dpyinfo, event->xbutton.time);
- f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
+ f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
: x_window_to_frame (dpyinfo, event->xbutton.window));
#ifdef USE_GTK
- if (f && xg_event_is_for_scrollbar (f, event))
- f = 0;
+ if (f && xg_event_is_for_scrollbar (f, event))
+ f = 0;
#endif
- if (f)
- {
+ if (f)
+ {
#if ! defined (USE_GTK)
- /* Is this in the tool-bar? */
- if (WINDOWP (f->tool_bar_window)
- && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
- {
- Lisp_Object window;
- int x = event->xbutton.x;
- int y = event->xbutton.y;
-
- window = window_from_coordinates (f, x, y, 0, true);
- tool_bar_p = EQ (window, f->tool_bar_window);
-
- if (tool_bar_p && event->xbutton.button < 4)
+ /* Is this in the tool-bar? */
+ if (WINDOWP (f->tool_bar_window)
+ && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
+ {
+ Lisp_Object window;
+ int x = event->xbutton.x;
+ int y = event->xbutton.y;
+
+ window = window_from_coordinates (f, x, y, 0, true);
+ tool_bar_p = EQ (window, f->tool_bar_window);
+
+ if (tool_bar_p && event->xbutton.button < 4)
handle_tool_bar_click
(f, x, y, event->xbutton.type == ButtonPress,
x_x_to_emacs_modifiers (dpyinfo, event->xbutton.state));
- }
+ }
#endif /* !USE_GTK */
- if (!tool_bar_p)
+ if (!tool_bar_p)
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
- if (! popup_activated ())
-#endif
- {
- if (ignore_next_mouse_click_timeout)
- {
- if (event->type == ButtonPress
- && event->xbutton.time > ignore_next_mouse_click_timeout)
- {
- ignore_next_mouse_click_timeout = 0;
- construct_mouse_click (&inev.ie, &event->xbutton, f);
- }
- if (event->type == ButtonRelease)
- ignore_next_mouse_click_timeout = 0;
- }
- else
- construct_mouse_click (&inev.ie, &event->xbutton, f);
- }
- if (FRAME_X_EMBEDDED_P (f))
- xembed_send_message (f, event->xbutton.time,
- XEMBED_REQUEST_FOCUS, 0, 0, 0);
- }
- else
- {
- struct scroll_bar *bar
- = x_window_to_scroll_bar (event->xbutton.display,
- event->xbutton.window, 2);
+ if (! popup_activated ())
+#endif
+ {
+ if (ignore_next_mouse_click_timeout)
+ {
+ if (event->type == ButtonPress
+ && event->xbutton.time > ignore_next_mouse_click_timeout)
+ {
+ ignore_next_mouse_click_timeout = 0;
+ construct_mouse_click (&inev.ie, &event->xbutton, f);
+ }
+ if (event->type == ButtonRelease)
+ ignore_next_mouse_click_timeout = 0;
+ }
+ else
+ construct_mouse_click (&inev.ie, &event->xbutton, f);
+ }
+ if (FRAME_X_EMBEDDED_P (f))
+ xembed_send_message (f, event->xbutton.time,
+ XEMBED_REQUEST_FOCUS, 0, 0, 0);
+ }
+ else
+ {
+ struct scroll_bar *bar
+ = x_window_to_scroll_bar (event->xbutton.display,
+ event->xbutton.window, 2);
#ifdef USE_TOOLKIT_SCROLL_BARS
- /* Make the "Ctrl-Mouse-2 splits window" work for toolkit
- scroll bars. */
- if (bar && event->xbutton.state & ControlMask)
- {
- x_scroll_bar_handle_click (bar, event, &inev.ie);
- *finish = X_EVENT_DROP;
- }
+ /* Make the "Ctrl-Mouse-2 splits window" work for toolkit
+ scroll bars. */
+ if (bar && event->xbutton.state & ControlMask)
+ {
+ x_scroll_bar_handle_click (bar, event, &inev.ie);
+ *finish = X_EVENT_DROP;
+ }
#else /* not USE_TOOLKIT_SCROLL_BARS */
- if (bar)
- x_scroll_bar_handle_click (bar, event, &inev.ie);
+ if (bar)
+ x_scroll_bar_handle_click (bar, event, &inev.ie);
#endif /* not USE_TOOLKIT_SCROLL_BARS */
- }
+ }
- if (event->type == ButtonPress)
- {
- dpyinfo->grabbed |= (1 << event->xbutton.button);
- dpyinfo->last_mouse_frame = f;
+ if (event->type == ButtonPress)
+ {
+ dpyinfo->grabbed |= (1 << event->xbutton.button);
+ dpyinfo->last_mouse_frame = f;
#if ! defined (USE_GTK)
- if (f && !tool_bar_p)
- f->last_tool_bar_item = -1;
+ if (f && !tool_bar_p)
+ f->last_tool_bar_item = -1;
#endif /* not USE_GTK */
- }
- else
- dpyinfo->grabbed &= ~(1 << event->xbutton.button);
+ }
+ else
+ dpyinfo->grabbed &= ~(1 << event->xbutton.button);
/* Ignore any mouse motion that happened before this event;
any subsequent mouse-movement Emacs events should reflect
@@ -8712,35 +8712,35 @@ handle_one_xevent (struct x_display_info *dpyinfo,
f->mouse_moved = false;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
- f = x_menubar_window_to_frame (dpyinfo, event);
- /* For a down-event in the menu bar,
- don't pass it to Xt right now.
- Instead, save it away
- and we will pass it to Xt from kbd_buffer_get_event.
- That way, we can run some Lisp code first. */
- if (! popup_activated ()
+ f = x_menubar_window_to_frame (dpyinfo, event);
+ /* For a down-event in the menu bar,
+ don't pass it to Xt right now.
+ Instead, save it away
+ and we will pass it to Xt from kbd_buffer_get_event.
+ That way, we can run some Lisp code first. */
+ if (! popup_activated ()
#ifdef USE_GTK
- /* Gtk+ menus only react to the first three buttons. */
- && event->xbutton.button < 3
-#endif
- && f && event->type == ButtonPress
- /* Verify the event is really within the menu bar
- and not just sent to it due to grabbing. */
- && event->xbutton.x >= 0
- && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
- && event->xbutton.y >= 0
- && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
- && event->xbutton.same_screen)
- {
+ /* Gtk+ menus only react to the first three buttons. */
+ && event->xbutton.button < 3
+#endif
+ && f && event->type == ButtonPress
+ /* Verify the event is really within the menu bar
+ and not just sent to it due to grabbing. */
+ && event->xbutton.x >= 0
+ && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
+ && event->xbutton.y >= 0
+ && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
+ && event->xbutton.same_screen)
+ {
if (!f->output_data.x->saved_menu_event)
f->output_data.x->saved_menu_event = xmalloc (sizeof *event);
*f->output_data.x->saved_menu_event = *event;
inev.ie.kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (inev.ie.frame_or_window, f);
*finish = X_EVENT_DROP;
- }
- else
- goto OTHER;
+ }
+ else
+ goto OTHER;
#endif /* USE_X_TOOLKIT || USE_GTK */
}
break;
@@ -8756,15 +8756,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
case MappingNotify:
/* Someone has changed the keyboard mapping - update the
- local cache. */
+ local cache. */
switch (event->xmapping.request)
- {
- case MappingModifier:
- x_find_modifier_meanings (dpyinfo);
- /* This is meant to fall through. */
- case MappingKeyboard:
- XRefreshKeyboardMapping ((XMappingEvent *) &event->xmapping);
- }
+ {
+ case MappingModifier:
+ x_find_modifier_meanings (dpyinfo);
+ /* This is meant to fall through. */
+ case MappingKeyboard:
+ XRefreshKeyboardMapping ((XMappingEvent *) &event->xmapping);
+ }
goto OTHER;
case DestroyNotify:
@@ -8874,7 +8874,7 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit)
#ifdef HAVE_X_I18N
/* Filter events for the current X input method. */
if (x_filter_event (dpyinfo, &event))
- continue;
+ continue;
#endif
event_found = true;
@@ -8906,7 +8906,7 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit)
current_hold_quit = 0;
if (current_finish == X_EVENT_GOTO_OUT)
- break;
+ break;
}
#endif /* USE_GTK */
@@ -9086,7 +9086,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
XChangeGC (dpy, gc, mask, &xgcv);
else
{
- gc = XCreateGC (dpy, drawable, mask, &xgcv);
+ gc = XCreateGC (dpy, drawable, mask, &xgcv);
FRAME_DISPLAY_INFO (f)->scratch_cursor_gc = gc;
}
@@ -9129,8 +9129,8 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
x += cursor_glyph->pixel_width - w->phys_cursor_width + 1;
x_fill_rectangle (f, gc, x,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
- row->height - width),
- w->phys_cursor_width - 1, width);
+ row->height - width),
+ w->phys_cursor_width - 1, width);
}
x_reset_clip_rectangles (f, gc);
@@ -9258,12 +9258,12 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
#ifdef USE_GTK
- if (xg_set_icon (f, xg_default_icon_file)
- || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
- {
- FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2;
- return false;
- }
+ if (xg_set_icon (f, xg_default_icon_file)
+ || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
+ {
+ FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2;
+ return false;
+ }
#elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
@@ -9528,7 +9528,7 @@ x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
if (dpyinfo)
{
/* Protect display from being closed when we delete the last
- frame on it. */
+ frame on it. */
dpyinfo->reference_count++;
dpyinfo->terminal->reference_count++;
}
@@ -9566,8 +9566,8 @@ x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
if (dpyinfo)
{
/* We can not call XtCloseDisplay here because it calls XSync.
- XSync inside the error handler apparently hangs Emacs. On
- current Xt versions, this isn't needed either. */
+ XSync inside the error handler apparently hangs Emacs. On
+ current Xt versions, this isn't needed either. */
#ifdef USE_GTK
/* A long-standing GTK bug prevents proper disconnect handling
(https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once,
@@ -9588,8 +9588,8 @@ For details, see etc/PROBLEMS.\n",
dpyinfo->reference_count--;
dpyinfo->terminal->reference_count--;
if (dpyinfo->reference_count != 0)
- /* We have just closed all frames on this display. */
- emacs_abort ();
+ /* We have just closed all frames on this display. */
+ emacs_abort ();
{
Lisp_Object tmp;
@@ -9800,7 +9800,7 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
{
FRAME_XIC (f) = NULL;
- xic_free_xfontset (f);
+ xic_free_xfontset (f);
}
}
@@ -9883,7 +9883,7 @@ xim_instantiate_callback (Display *display, XPointer client_data, XPointer call_
struct frame *f = XFRAME (frame);
if (FRAME_X_P (f)
- && FRAME_DISPLAY_INFO (f) == xim_inst->dpyinfo)
+ && FRAME_DISPLAY_INFO (f) == xim_inst->dpyinfo)
if (FRAME_XIC (f) == NULL)
{
create_frame_xic (f);
@@ -10054,17 +10054,17 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
if (change_gravity != 0 && FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A)
{
/* Some WMs (twm, wmaker at least) has an offset that is smaller
- than the WM decorations. So we use the calculated offset instead
- of the WM decoration sizes here (x/y_pixels_outer_diff). */
+ than the WM decorations. So we use the calculated offset instead
+ of the WM decoration sizes here (x/y_pixels_outer_diff). */
modified_left += FRAME_X_OUTPUT (f)->move_offset_left;
modified_top += FRAME_X_OUTPUT (f)->move_offset_top;
}
XMoveWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- modified_left, modified_top);
+ modified_left, modified_top);
x_sync_with_move (f, f->left_pos, f->top_pos,
- FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN);
+ FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN);
/* change_gravity is non-zero when this function is called from Lisp to
programmatically move a frame. In that case, we call
@@ -10111,10 +10111,10 @@ x_wm_supports (struct frame *f, Atom want_atom)
x_catch_errors (dpy);
rc = XGetWindowProperty (dpy, target_window,
- dpyinfo->Xatom_net_supporting_wm_check,
- 0, max_len, False, target_type,
- &actual_type, &actual_format, &actual_size,
- &bytes_remaining, &tmp_data);
+ dpyinfo->Xatom_net_supporting_wm_check,
+ 0, max_len, False, target_type,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
if (rc != Success || actual_type != XA_WINDOW || x_had_errors_p (dpy))
{
@@ -10140,7 +10140,7 @@ x_wm_supports (struct frame *f, Atom want_atom)
{
/* Window changed, reload atoms */
if (dpyinfo->net_supported_atoms != NULL)
- XFree (dpyinfo->net_supported_atoms);
+ XFree (dpyinfo->net_supported_atoms);
dpyinfo->net_supported_atoms = NULL;
dpyinfo->nr_net_supported_atoms = 0;
dpyinfo->net_supported_window = 0;
@@ -10148,18 +10148,18 @@ x_wm_supports (struct frame *f, Atom want_atom)
target_type = XA_ATOM;
tmp_data = NULL;
rc = XGetWindowProperty (dpy, target_window,
- dpyinfo->Xatom_net_supported,
- 0, max_len, False, target_type,
- &actual_type, &actual_format, &actual_size,
- &bytes_remaining, &tmp_data);
+ dpyinfo->Xatom_net_supported,
+ 0, max_len, False, target_type,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
if (rc != Success || actual_type != XA_ATOM || x_had_errors_p (dpy))
- {
- if (tmp_data) XFree (tmp_data);
- x_uncatch_errors ();
- unblock_input ();
- return false;
- }
+ {
+ if (tmp_data) XFree (tmp_data);
+ x_uncatch_errors ();
+ unblock_input ();
+ return false;
+ }
dpyinfo->net_supported_atoms = (Atom *)tmp_data;
dpyinfo->nr_net_supported_atoms = actual_size;
@@ -10183,14 +10183,14 @@ set_wm_state (Lisp_Object frame, bool add, Atom atom, Atom value)
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame));
x_send_client_event (frame, make_number (0), frame,
- dpyinfo->Xatom_net_wm_state,
- make_number (32),
- /* 1 = add, 0 = remove */
- Fcons
- (make_number (add),
- Fcons
- (make_fixnum_or_float (atom),
- (value != 0
+ dpyinfo->Xatom_net_wm_state,
+ make_number (32),
+ /* 1 = add, 0 = remove */
+ Fcons
+ (make_number (add),
+ Fcons
+ (make_fixnum_or_float (atom),
+ (value != 0
? list1 (make_fixnum_or_float (value))
: Qnil))));
}
@@ -10204,7 +10204,7 @@ x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
XSETFRAME (frame, f);
set_wm_state (frame, !NILP (new_value),
- dpyinfo->Xatom_net_wm_state_sticky, None);
+ dpyinfo->Xatom_net_wm_state_sticky, None);
}
/* Return the current _NET_WM_STATE.
@@ -10215,9 +10215,9 @@ x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
static bool
get_current_wm_state (struct frame *f,
- Window window,
- int *size_state,
- bool *sticky)
+ Window window,
+ int *size_state,
+ bool *sticky)
{
unsigned long actual_size;
int i;
@@ -10246,8 +10246,8 @@ get_current_wm_state (struct frame *f,
#ifdef USE_XCB
prop_cookie = xcb_get_property (dpyinfo->xcb_connection, 0, window,
- dpyinfo->Xatom_net_wm_state,
- target_type, 0, max_len);
+ dpyinfo->Xatom_net_wm_state,
+ target_type, 0, max_len);
prop = xcb_get_property_reply (dpyinfo->xcb_connection, prop_cookie, NULL);
if (prop && prop->type == target_type)
{
@@ -10264,9 +10264,9 @@ get_current_wm_state (struct frame *f,
#else
x_catch_errors (dpy);
rc = XGetWindowProperty (dpy, window, dpyinfo->Xatom_net_wm_state,
- 0, max_len, False, target_type,
- &actual_type, &actual_format, &actual_size,
- &bytes_remaining, &tmp_data);
+ 0, max_len, False, target_type,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
if (rc == Success && actual_type == target_type && ! x_had_errors_p (dpy))
reply_data = (Atom *) tmp_data;
@@ -10285,23 +10285,23 @@ get_current_wm_state (struct frame *f,
if (a == dpyinfo->Xatom_net_wm_state_hidden)
is_hidden = true;
else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
- {
- if (*size_state == FULLSCREEN_HEIGHT)
- *size_state = FULLSCREEN_MAXIMIZED;
- else
- *size_state = FULLSCREEN_WIDTH;
- }
+ {
+ if (*size_state == FULLSCREEN_HEIGHT)
+ *size_state = FULLSCREEN_MAXIMIZED;
+ else
+ *size_state = FULLSCREEN_WIDTH;
+ }
else if (a == dpyinfo->Xatom_net_wm_state_maximized_vert)
- {
- if (*size_state == FULLSCREEN_WIDTH)
- *size_state = FULLSCREEN_MAXIMIZED;
- else
- *size_state = FULLSCREEN_HEIGHT;
- }
+ {
+ if (*size_state == FULLSCREEN_WIDTH)
+ *size_state = FULLSCREEN_MAXIMIZED;
+ else
+ *size_state = FULLSCREEN_HEIGHT;
+ }
else if (a == dpyinfo->Xatom_net_wm_state_fullscreen)
- *size_state = FULLSCREEN_BOTH;
+ *size_state = FULLSCREEN_BOTH;
else if (a == dpyinfo->Xatom_net_wm_state_sticky)
- *sticky = true;
+ *sticky = true;
}
#ifdef USE_XCB
@@ -10338,16 +10338,16 @@ do_ewmh_fullscreen (struct frame *f)
XSETFRAME (frame, f);
/* Keep number of calls to set_wm_state as low as possible.
- Some window managers, or possible Gtk+, hangs when too many
- are sent at once. */
+ Some window managers, or possible Gtk+, hangs when too many
+ are sent at once. */
switch (f->want_fullscreen)
- {
- case FULLSCREEN_BOTH:
- if (cur != FULLSCREEN_BOTH)
- set_wm_state (frame, true, dpyinfo->Xatom_net_wm_state_fullscreen,
- None);
- break;
- case FULLSCREEN_WIDTH:
+ {
+ case FULLSCREEN_BOTH:
+ if (cur != FULLSCREEN_BOTH)
+ set_wm_state (frame, true, dpyinfo->Xatom_net_wm_state_fullscreen,
+ None);
+ break;
+ case FULLSCREEN_WIDTH:
if (x_frame_normalize_before_maximize && cur == FULLSCREEN_MAXIMIZED)
{
set_wm_state (frame, false,
@@ -10366,8 +10366,8 @@ do_ewmh_fullscreen (struct frame *f)
set_wm_state (frame, true,
dpyinfo->Xatom_net_wm_state_maximized_horz, None);
}
- break;
- case FULLSCREEN_HEIGHT:
+ break;
+ case FULLSCREEN_HEIGHT:
if (x_frame_normalize_before_maximize && cur == FULLSCREEN_MAXIMIZED)
{
set_wm_state (frame, false,
@@ -10386,8 +10386,8 @@ do_ewmh_fullscreen (struct frame *f)
set_wm_state (frame, true,
dpyinfo->Xatom_net_wm_state_maximized_vert, None);
}
- break;
- case FULLSCREEN_MAXIMIZED:
+ break;
+ case FULLSCREEN_MAXIMIZED:
if (x_frame_normalize_before_maximize && cur == FULLSCREEN_BOTH)
{
set_wm_state (frame, false,
@@ -10428,16 +10428,16 @@ do_ewmh_fullscreen (struct frame *f)
dpyinfo->Xatom_net_wm_state_maximized_horz,
dpyinfo->Xatom_net_wm_state_maximized_vert);
}
- break;
- case FULLSCREEN_NONE:
- if (cur == FULLSCREEN_BOTH)
- set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen,
+ break;
+ case FULLSCREEN_NONE:
+ if (cur == FULLSCREEN_BOTH)
+ set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen,
None);
- else
- set_wm_state (frame, false,
+ else
+ set_wm_state (frame, false,
dpyinfo->Xatom_net_wm_state_maximized_horz,
- dpyinfo->Xatom_net_wm_state_maximized_vert);
- }
+ dpyinfo->Xatom_net_wm_state_maximized_vert);
+ }
f->want_fullscreen = FULLSCREEN_NONE;
@@ -10517,30 +10517,30 @@ x_check_fullscreen (struct frame *f)
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
switch (f->want_fullscreen)
- {
- /* No difference between these two when there is no WM */
- case FULLSCREEN_MAXIMIZED:
- lval = Qmaximized;
- width = x_display_pixel_width (dpyinfo);
- height = x_display_pixel_height (dpyinfo);
- break;
- case FULLSCREEN_BOTH:
- lval = Qfullboth;
- width = x_display_pixel_width (dpyinfo);
- height = x_display_pixel_height (dpyinfo);
- break;
- case FULLSCREEN_WIDTH:
- lval = Qfullwidth;
- width = x_display_pixel_width (dpyinfo);
+ {
+ /* No difference between these two when there is no WM */
+ case FULLSCREEN_MAXIMIZED:
+ lval = Qmaximized;
+ width = x_display_pixel_width (dpyinfo);
+ height = x_display_pixel_height (dpyinfo);
+ break;
+ case FULLSCREEN_BOTH:
+ lval = Qfullboth;
+ width = x_display_pixel_width (dpyinfo);
+ height = x_display_pixel_height (dpyinfo);
+ break;
+ case FULLSCREEN_WIDTH:
+ lval = Qfullwidth;
+ width = x_display_pixel_width (dpyinfo);
height = height + FRAME_MENUBAR_HEIGHT (f);
break;
- case FULLSCREEN_HEIGHT:
- lval = Qfullheight;
- height = x_display_pixel_height (dpyinfo);
+ case FULLSCREEN_HEIGHT:
+ lval = Qfullheight;
+ height = x_display_pixel_height (dpyinfo);
break;
default:
emacs_abort ();
- }
+ }
frame_size_history_add
(f, Qx_check_fullscreen, width, height, Qnil);
@@ -10590,7 +10590,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top)
int adjusted_left;
int adjusted_top;
- FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
+ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
FRAME_X_OUTPUT (f)->move_offset_left = expected_left - current_left;
FRAME_X_OUTPUT (f)->move_offset_top = expected_top - current_top;
@@ -10600,7 +10600,7 @@ x_check_expected_move (struct frame *f, int expected_left, int expected_top)
adjusted_top = expected_top + FRAME_X_OUTPUT (f)->move_offset_top;
XMoveWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- adjusted_left, adjusted_top);
+ adjusted_left, adjusted_top);
x_sync_with_move (f, expected_left, expected_top, false);
}
@@ -10628,23 +10628,23 @@ x_sync_with_move (struct frame *f, int left, int top, bool fuzzy)
int current_left = 0, current_top = 0;
/* In theory, this call to XSync only needs to happen once, but in
- practice, it doesn't seem to work, hence the need for the surrounding
- loop. */
+ practice, it doesn't seem to work, hence the need for the surrounding
+ loop. */
XSync (FRAME_X_DISPLAY (f), False);
x_real_positions (f, ¤t_left, ¤t_top);
if (fuzzy)
- {
- /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40
- pixels. */
+ {
+ /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40
+ pixels. */
- if (eabs (current_left - left) <= 10
+ if (eabs (current_left - left) <= 10
&& eabs (current_top - top) <= 40)
- return;
+ return;
}
else if (current_left == left && current_top == top)
- return;
+ return;
}
/* As a last resort, just wait 0.5 seconds and hope that XGetGeometry
@@ -10688,7 +10688,7 @@ x_wait_for_event (struct frame *f, int eventtype)
tmo = timespec_sub (tmo_at, time_now);
if (pselect (fd + 1, &fds, NULL, NULL, &tmo, NULL) == 0)
- break; /* Timeout */
+ break; /* Timeout */
}
f->wait_event_type = 0;
@@ -10817,16 +10817,16 @@ x_set_window_size (struct frame *f, bool change_gravity,
int text_width, text_height;
/* When the frame is maximized/fullscreen or running under for
- example Xmonad, x_set_window_size_1 will be a no-op.
- In that case, the right thing to do is extend rows/width to
- the current frame size. We do that first if x_set_window_size_1
- turns out to not be a no-op (there is no way to know).
- The size will be adjusted again if the frame gets a
- ConfigureNotify event as a result of x_set_window_size. */
+ example Xmonad, x_set_window_size_1 will be a no-op.
+ In that case, the right thing to do is extend rows/width to
+ the current frame size. We do that first if x_set_window_size_1
+ turns out to not be a no-op (there is no way to know).
+ The size will be adjusted again if the frame gets a
+ ConfigureNotify event as a result of x_set_window_size. */
int pixelh = FRAME_PIXEL_HEIGHT (f);
#ifdef USE_X_TOOLKIT
/* The menu bar is not part of text lines. The tool bar
- is however. */
+ is however. */
pixelh -= FRAME_MENUBAR_HEIGHT (f);
#endif
text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, FRAME_PIXEL_WIDTH (f));
@@ -10965,7 +10965,7 @@ xembed_set_info (struct frame *f, enum xembed_info flags)
data[1] = flags;
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_XEMBED_INFO, dpyinfo->Xatom_XEMBED_INFO,
+ dpyinfo->Xatom_XEMBED_INFO, dpyinfo->Xatom_XEMBED_INFO,
32, PropModeReplace, (unsigned char *) data, 2);
}
#endif /* defined USE_X_TOOLKIT || ! defined USE_GTK */
@@ -11013,8 +11013,8 @@ x_make_frame_visible (struct frame *f)
if (! FRAME_VISIBLE_P (f))
{
/* We test asked_for_visible here to make sure we don't
- call x_set_offset a second time
- if we get to x_make_frame_visible a second time
+ call x_set_offset a second time
+ if we get to x_make_frame_visible a second time
before the window gets really visible. */
if (! FRAME_ICONIFIED_P (f)
&& ! FRAME_X_EMBEDDED_P (f)
@@ -11112,11 +11112,11 @@ x_make_frame_visible (struct frame *f)
/* Force processing of queued events. */
x_sync (f);
- /* If on another desktop, the deiconify/map may be ignored and the
- frame never becomes visible. XMonad does this.
- Prevent an endless loop. */
- if (FRAME_ICONIFIED_P (f) && ++tries > 100)
- break;
+ /* If on another desktop, the deiconify/map may be ignored and the
+ frame never becomes visible. XMonad does this.
+ Prevent an endless loop. */
+ if (FRAME_ICONIFIED_P (f) && ++tries > 100)
+ break;
/* This hack is still in use at least for Cygwin. See
http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
@@ -11229,7 +11229,7 @@ x_iconify_frame (struct frame *f)
if (FRAME_GTK_OUTER_WIDGET (f))
{
if (! FRAME_VISIBLE_P (f))
- gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f));
+ gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f));
gtk_window_iconify (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
SET_FRAME_VISIBLE (f, 0);
@@ -11382,7 +11382,7 @@ x_free_frame_resources (struct frame *f)
/* Tooltips don't have widgets, only a simple X window, even if
we are using a toolkit. */
else if (FRAME_X_WINDOW (f))
- XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
+ XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
free_frame_menubar (f);
@@ -11396,7 +11396,7 @@ x_free_frame_resources (struct frame *f)
tear_down_x_back_buffer (f);
if (FRAME_X_WINDOW (f))
- XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
+ XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
#endif /* !USE_X_TOOLKIT */
unload_color (f, FRAME_FOREGROUND_PIXEL (f));
@@ -11851,7 +11851,7 @@ make_invisible_cursor (struct x_display_info *dpyinfo)
col.flags = DoRed | DoGreen | DoBlue;
pixc = XCreatePixmapCursor (dpy, pix, pix, &col, &col, 0, 0);
if (! x_had_errors_p (dpy) && pixc != None)
- c = pixc;
+ c = pixc;
XFreePixmap (dpy, pix);
}
@@ -11960,68 +11960,68 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
if (x_initialized++ > 1)
{
- xg_display_open (SSDATA (display_name), &dpy);
+ xg_display_open (SSDATA (display_name), &dpy);
}
else
{
- static char display_opt[] = "--display";
- static char name_opt[] = "--name";
+ static char display_opt[] = "--display";
+ static char name_opt[] = "--name";
- for (argc = 0; argc < NUM_ARGV; ++argc)
- argv[argc] = 0;
+ for (argc = 0; argc < NUM_ARGV; ++argc)
+ argv[argc] = 0;
- argc = 0;
- argv[argc++] = initial_argv[0];
+ argc = 0;
+ argv[argc++] = initial_argv[0];
- if (! NILP (display_name))
- {
- argv[argc++] = display_opt;
- argv[argc++] = SSDATA (display_name);
- }
+ if (! NILP (display_name))
+ {
+ argv[argc++] = display_opt;
+ argv[argc++] = SSDATA (display_name);
+ }
- argv[argc++] = name_opt;
- argv[argc++] = resource_name;
+ argv[argc++] = name_opt;
+ argv[argc++] = resource_name;
- XSetLocaleModifiers ("");
+ XSetLocaleModifiers ("");
- /* Work around GLib bug that outputs a faulty warning. See
- https://bugzilla.gnome.org/show_bug.cgi?id=563627. */
- id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
- | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
+ /* Work around GLib bug that outputs a faulty warning. See
+ https://bugzilla.gnome.org/show_bug.cgi?id=563627. */
+ id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
+ | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
- /* NULL window -> events for all windows go to our function.
- Call before gtk_init so Gtk+ event filters comes after our. */
- gdk_window_add_filter (NULL, event_handler_gdk, NULL);
+ /* NULL window -> events for all windows go to our function.
+ Call before gtk_init so Gtk+ event filters comes after our. */
+ gdk_window_add_filter (NULL, event_handler_gdk, NULL);
- /* gtk_init does set_locale. Fix locale before and after. */
- fixup_locale ();
- unrequest_sigio (); /* See comment in x_display_ok. */
- gtk_init (&argc, &argv2);
- request_sigio ();
- fixup_locale ();
+ /* gtk_init does set_locale. Fix locale before and after. */
+ fixup_locale ();
+ unrequest_sigio (); /* See comment in x_display_ok. */
+ gtk_init (&argc, &argv2);
+ request_sigio ();
+ fixup_locale ();
- g_log_remove_handler ("GLib", id);
+ g_log_remove_handler ("GLib", id);
- xg_initialize ();
+ xg_initialize ();
- dpy = DEFAULT_GDK_DISPLAY ();
+ dpy = DEFAULT_GDK_DISPLAY ();
#if ! GTK_CHECK_VERSION (2, 90, 0)
- /* Load our own gtkrc if it exists. */
- {
- const char *file = "~/.emacs.d/gtkrc";
- Lisp_Object s, abs_file;
+ /* Load our own gtkrc if it exists. */
+ {
+ const char *file = "~/.emacs.d/gtkrc";
+ Lisp_Object s, abs_file;
- s = build_string (file);
- abs_file = Fexpand_file_name (s, Qnil);
+ s = build_string (file);
+ abs_file = Fexpand_file_name (s, Qnil);
- if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file)))
- gtk_rc_parse (SSDATA (abs_file));
- }
+ if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file)))
+ gtk_rc_parse (SSDATA (abs_file));
+ }
#endif
- XSetErrorHandler (x_error_handler);
- XSetIOErrorHandler (x_io_error_quitter);
+ XSetErrorHandler (x_error_handler);
+ XSetIOErrorHandler (x_io_error_quitter);
}
}
#else /* not USE_GTK */
@@ -12211,11 +12211,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
if (dpyinfo->visual->class == TrueColor)
{
get_bits_and_offset (dpyinfo->visual->red_mask,
- &dpyinfo->red_bits, &dpyinfo->red_offset);
+ &dpyinfo->red_bits, &dpyinfo->red_offset);
get_bits_and_offset (dpyinfo->visual->blue_mask,
- &dpyinfo->blue_bits, &dpyinfo->blue_offset);
+ &dpyinfo->blue_bits, &dpyinfo->blue_offset);
get_bits_and_offset (dpyinfo->visual->green_mask,
- &dpyinfo->green_bits, &dpyinfo->green_offset);
+ &dpyinfo->green_bits, &dpyinfo->green_offset);
}
/* See if a private colormap is requested. */
@@ -12236,7 +12236,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
}
else
dpyinfo->cmap = XCreateColormap (dpyinfo->display, dpyinfo->root_window,
- dpyinfo->visual, AllocNone);
+ dpyinfo->visual, AllocNone);
#ifdef HAVE_XDBE
dpyinfo->supports_xdbe = false;
@@ -12377,7 +12377,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
atom_names[i] = xsettings_atom_name;
XInternAtoms (dpyinfo->display, atom_names, total_atom_count,
- False, atoms_return);
+ False, atoms_return);
for (i = 0; i < atom_count; i++)
*(Atom *) ((char *) dpyinfo + atom_refs[i].offset) = atoms_return[i];
@@ -12388,7 +12388,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
dpyinfo->x_dnd_atoms_size = 8;
dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
- * dpyinfo->x_dnd_atoms_size);
+ * dpyinfo->x_dnd_atoms_size);
dpyinfo->gray
= XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
gray_bits, gray_width, gray_height,
@@ -12499,12 +12499,12 @@ x_delete_display (struct x_display_info *dpyinfo)
if (t->type == output_x_window && t->display_info.x == dpyinfo)
{
#ifdef HAVE_X_SM
- /* Close X session management when we close its display. */
- if (t->id == 1 && x_session_have_connection ())
- x_session_close ();
+ /* Close X session management when we close its display. */
+ if (t->id == 1 && x_session_have_connection ())
+ x_session_close ();
#endif
- delete_terminal (t);
- break;
+ delete_terminal (t);
+ break;
}
if (next_noop_dpyinfo == dpyinfo)
diff --git a/src/xterm.h b/src/xterm.h
index 01d7efc..cb93ce4 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -53,7 +53,7 @@ typedef Widget xt_or_gtk_widget;
typedef GtkWidget *xt_or_gtk_widget;
#undef XSync
#define XSync(d, b) do { gdk_window_process_all_updates (); \
- XSync (d, b); } while (false)
+ XSync (d, b); } while (false)
#endif /* USE_GTK */
/* True iff GTK's version is at least I.J.K. */
@@ -772,8 +772,8 @@ extern void x_mark_frame_dirty (struct frame *f);
/* Return the outermost X window associated with the frame F. */
#ifdef USE_X_TOOLKIT
#define FRAME_OUTER_WINDOW(f) ((f)->output_data.x->widget ? \
- XtWindow ((f)->output_data.x->widget) : \
- FRAME_X_WINDOW (f))
+ XtWindow ((f)->output_data.x->widget) : \
+ FRAME_X_WINDOW (f))
#else
#ifdef USE_GTK
/* Functions not present in older Gtk+ */
@@ -808,8 +808,8 @@ extern void x_mark_frame_dirty (struct frame *f);
#define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget)
#define FRAME_OUTER_WINDOW(f) \
(FRAME_GTK_OUTER_WIDGET (f) ? \
- GTK_WIDGET_TO_X_WIN (FRAME_GTK_OUTER_WIDGET (f)) : \
- FRAME_X_WINDOW (f))
+ GTK_WIDGET_TO_X_WIN (FRAME_GTK_OUTER_WIDGET (f)) : \
+ FRAME_X_WINDOW (f))
#else /* !USE_GTK */
#define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f))
@@ -1056,15 +1056,15 @@ SELECTION_EVENT_DISPLAY (struct selection_input_event *ev)
extern void x_free_gcs (struct frame *);
extern void x_relative_mouse_position (struct frame *, int *, int *);
extern void x_real_pos_and_offsets (struct frame *f,
- int *left_offset_x,
- int *right_offset_x,
- int *top_offset_y,
- int *bottom_offset_y,
- int *x_pixels_diff,
- int *y_pixels_diff,
- int *xptr,
- int *yptr,
- int *outer_border);
+ int *left_offset_x,
+ int *right_offset_x,
+ int *top_offset_y,
+ int *bottom_offset_y,
+ int *x_pixels_diff,
+ int *y_pixels_diff,
+ int *xptr,
+ int *yptr,
+ int *outer_border);
/* From xrdb.c. */
@@ -1183,11 +1183,11 @@ extern void x_handle_selection_event (struct selection_input_event *);
extern void x_clear_frame_selections (struct frame *);
extern void x_send_client_event (Lisp_Object display,
- Lisp_Object dest,
- Lisp_Object from,
- Atom message_type,
- Lisp_Object format,
- Lisp_Object values);
+ Lisp_Object dest,
+ Lisp_Object from,
+ Atom message_type,
+ Lisp_Object format,
+ Lisp_Object values);
extern bool x_handle_dnd_message (struct frame *,
const XClientMessageEvent *,
@@ -1195,14 +1195,14 @@ extern bool x_handle_dnd_message (struct frame *,
struct input_event *);
extern int x_check_property_data (Lisp_Object);
extern void x_fill_property_data (Display *,
- Lisp_Object,
- void *,
- int);
+ Lisp_Object,
+ void *,
+ int);
extern Lisp_Object x_property_data_to_lisp (struct frame *,
- const unsigned char *,
- Atom,
- int,
- unsigned long);
+ const unsigned char *,
+ Atom,
+ int,
+ unsigned long);
extern void x_clipboard_manager_save_frame (Lisp_Object);
extern void x_clipboard_manager_save_all (void);
@@ -1229,7 +1229,7 @@ extern char *xic_create_fontsetname (const char *, bool);
#ifdef USE_X_TOOLKIT
extern void x_free_dpy_colors (Display *, Screen *, Colormap,
- unsigned long *, int);
+ unsigned long *, int);
#endif /* USE_X_TOOLKIT */
/* Defined in xmenu.c */
diff --git a/src/xwidget.c b/src/xwidget.c
index 62df665..b35fa0a 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -40,7 +40,7 @@ static struct xwidget_view *
allocate_xwidget_view (void)
{
return ALLOCATE_PSEUDOVECTOR (struct xwidget_view, redisplayed,
- PVEC_XWIDGET_VIEW);
+ PVEC_XWIDGET_VIEW);
}
#define XSETXWIDGET(a, b) XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET)
@@ -49,18 +49,18 @@ allocate_xwidget_view (void)
static struct xwidget_view *xwidget_view_lookup (struct xwidget *,
struct window *);
static void webkit_view_load_changed_cb (WebKitWebView *,
- WebKitLoadEvent,
- gpointer);
+ WebKitLoadEvent,
+ gpointer);
static void webkit_javascript_finished_cb (GObject *,
- GAsyncResult *,
- gpointer);
+ GAsyncResult *,
+ gpointer);
static gboolean webkit_download_cb (WebKitWebContext *, WebKitDownload *, gpointer);
static gboolean
webkit_decide_policy_cb (WebKitWebView *,
- WebKitPolicyDecision *,
- WebKitPolicyDecisionType,
- gpointer);
+ WebKitPolicyDecision *,
+ WebKitPolicyDecisionType,
+ gpointer);
DEFUN ("make-xwidget",
@@ -101,52 +101,52 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
block_input ();
xw->widgetwindow_osr = gtk_offscreen_window_new ();
gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width,
- xw->height);
+ xw->height);
if (EQ (xw->type, Qwebkit))
- {
- xw->widget_osr = webkit_web_view_new ();
- }
+ {
+ xw->widget_osr = webkit_web_view_new ();
+ }
gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,
- xw->height);
+ xw->height);
if (EQ (xw->type, Qwebkit))
- {
- gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr),
- GTK_WIDGET (WEBKIT_WEB_VIEW (xw->widget_osr)));
- }
+ {
+ gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr),
+ GTK_WIDGET (WEBKIT_WEB_VIEW (xw->widget_osr)));
+ }
else
- {
- gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr),
- xw->widget_osr);
- }
+ {
+ gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr),
+ xw->widget_osr);
+ }
gtk_widget_show (xw->widget_osr);
gtk_widget_show (xw->widgetwindow_osr);
/* Store some xwidget data in the gtk widgets for convenient
- retrieval in the event handlers. */
+ retrieval in the event handlers. */
g_object_set_data (G_OBJECT (xw->widget_osr), XG_XWIDGET, xw);
g_object_set_data (G_OBJECT (xw->widgetwindow_osr), XG_XWIDGET, xw);
/* signals */
if (EQ (xw->type, Qwebkit))
- {
- g_signal_connect (G_OBJECT (xw->widget_osr),
- "load-changed",
- G_CALLBACK (webkit_view_load_changed_cb), xw);
-
- g_signal_connect (G_OBJECT (webkit_web_context_get_default ()),
- "download-started",
- G_CALLBACK (webkit_download_cb), xw);
-
- g_signal_connect (G_OBJECT (xw->widget_osr),
- "decide-policy",
- G_CALLBACK
- (webkit_decide_policy_cb),
- xw);
- }
+ {
+ g_signal_connect (G_OBJECT (xw->widget_osr),
+ "load-changed",
+ G_CALLBACK (webkit_view_load_changed_cb), xw);
+
+ g_signal_connect (G_OBJECT (webkit_web_context_get_default ()),
+ "download-started",
+ G_CALLBACK (webkit_download_cb), xw);
+
+ g_signal_connect (G_OBJECT (xw->widget_osr),
+ "decide-policy",
+ G_CALLBACK
+ (webkit_decide_policy_cb),
+ xw);
+ }
unblock_input ();
}
@@ -174,7 +174,7 @@ BUFFER may be a buffer or the name of one. */)
{
xw = XCAR (tail);
if (XWIDGETP (xw) && EQ (Fxwidget_buffer (xw), buffer))
- xw_list = Fcons (xw, xw_list);
+ xw_list = Fcons (xw, xw_list);
}
return xw_list;
}
@@ -191,9 +191,9 @@ xwidget_show_view (struct xwidget_view *xv)
xv->hidden = false;
gtk_widget_show (xv->widgetwindow);
gtk_fixed_move (GTK_FIXED (xv->emacswindow),
- xv->widgetwindow,
- xv->x + xv->clip_left,
- xv->y + xv->clip_top);
+ xv->widgetwindow,
+ xv->x + xv->clip_left,
+ xv->y + xv->clip_top);
}
/* Hide an xwidget view. */
@@ -202,14 +202,14 @@ xwidget_hide_view (struct xwidget_view *xv)
{
xv->hidden = true;
gtk_fixed_move (GTK_FIXED (xv->emacswindow), xv->widgetwindow,
- 10000, 10000);
+ 10000, 10000);
}
/* When the off-screen webkit master view changes this signal is called.
It copies the bitmap from the off-screen instance. */
static gboolean
offscreen_damage_event (GtkWidget *widget, GdkEvent *event,
- gpointer xv_widget)
+ gpointer xv_widget)
{
/* Queue a redraw of onscreen widget.
There is a guard against receiving an invalid widget,
@@ -219,14 +219,14 @@ offscreen_damage_event (GtkWidget *widget, GdkEvent *event,
gtk_widget_queue_draw (GTK_WIDGET (xv_widget));
else
printf ("Warning, offscreen_damage_event received invalid xv pointer:%p\n",
- xv_widget);
+ xv_widget);
return FALSE;
}
static void
store_xwidget_event_string (struct xwidget *xw, const char *eventname,
- const char *eventstr)
+ const char *eventstr)
{
struct input_event event;
Lisp_Object xwl;
@@ -240,8 +240,8 @@ store_xwidget_event_string (struct xwidget *xw, const char *eventname,
static void
store_xwidget_js_callback_event (struct xwidget *xw,
- Lisp_Object proc,
- Lisp_Object argument)
+ Lisp_Object proc,
+ Lisp_Object argument)
{
struct input_event event;
Lisp_Object xwl;
@@ -256,14 +256,14 @@ store_xwidget_js_callback_event (struct xwidget *xw,
void
webkit_view_load_changed_cb (WebKitWebView *webkitwebview,
- WebKitLoadEvent load_event,
- gpointer data)
+ WebKitLoadEvent load_event,
+ gpointer data)
{
switch (load_event) {
case WEBKIT_LOAD_FINISHED:
{
struct xwidget *xw = g_object_get_data (G_OBJECT (webkitwebview),
- XG_XWIDGET);
+ XG_XWIDGET);
store_xwidget_event_string (xw, "load-changed", "");
break;
}
@@ -280,16 +280,16 @@ webkit_js_to_lisp (JSContextRef context, JSValueRef value)
{
case kJSTypeString:
{
- JSStringRef js_str_value;
- gchar *str_value;
- gsize str_length;
-
- js_str_value = JSValueToStringCopy (context, value, NULL);
- str_length = JSStringGetMaximumUTF8CStringSize (js_str_value);
- str_value = (gchar *)g_malloc (str_length);
- JSStringGetUTF8CString (js_str_value, str_value, str_length);
- JSStringRelease (js_str_value);
- return build_string (str_value);
+ JSStringRef js_str_value;
+ gchar *str_value;
+ gsize str_length;
+
+ js_str_value = JSValueToStringCopy (context, value, NULL);
+ str_length = JSStringGetMaximumUTF8CStringSize (js_str_value);
+ str_value = (gchar *)g_malloc (str_length);
+ JSStringGetUTF8CString (js_str_value, str_value, str_length);
+ JSStringRelease (js_str_value);
+ return build_string (str_value);
}
case kJSTypeBoolean:
return (JSValueToBoolean (context, value)) ? Qt : Qnil;
@@ -297,60 +297,60 @@ webkit_js_to_lisp (JSContextRef context, JSValueRef value)
return make_number (JSValueToNumber (context, value, NULL));
case kJSTypeObject:
{
- if (JSValueIsArray (context, value))
- {
- JSStringRef pname = JSStringCreateWithUTF8CString("length");
- JSValueRef len = JSObjectGetProperty (context, (JSObjectRef) value, pname, NULL);
- int n = JSValueToNumber (context, len, NULL);
- JSStringRelease(pname);
-
- Lisp_Object obj;
- struct Lisp_Vector *p = allocate_vector (n);
-
- for (int i = 0; i < n; ++i)
- {
- p->contents[i] =
- webkit_js_to_lisp (context,
- JSObjectGetPropertyAtIndex (context,
- (JSObjectRef) value,
- i, NULL));
- }
- XSETVECTOR (obj, p);
- return obj;
- }
- else
- {
- JSPropertyNameArrayRef properties =
- JSObjectCopyPropertyNames (context, (JSObjectRef) value);
-
- int n = JSPropertyNameArrayGetCount (properties);
- Lisp_Object obj;
-
- /* TODO: can we use a regular list here? */
- struct Lisp_Vector *p = allocate_vector (n);
-
- for (int i = 0; i < n; ++i)
- {
- JSStringRef name = JSPropertyNameArrayGetNameAtIndex (properties, i);
- JSValueRef property = JSObjectGetProperty (context,
- (JSObjectRef) value,
- name, NULL);
- gchar *str_name;
- gsize str_length;
- str_length = JSStringGetMaximumUTF8CStringSize (name);
- str_name = (gchar *)g_malloc (str_length);
- JSStringGetUTF8CString (name, str_name, str_length);
- JSStringRelease (name);
-
- p->contents[i] =
- Fcons (build_string (str_name),
- webkit_js_to_lisp (context, property));
- }
-
- JSPropertyNameArrayRelease (properties);
- XSETVECTOR (obj, p);
- return obj;
- }
+ if (JSValueIsArray (context, value))
+ {
+ JSStringRef pname = JSStringCreateWithUTF8CString("length");
+ JSValueRef len = JSObjectGetProperty (context, (JSObjectRef) value, pname, NULL);
+ int n = JSValueToNumber (context, len, NULL);
+ JSStringRelease(pname);
+
+ Lisp_Object obj;
+ struct Lisp_Vector *p = allocate_vector (n);
+
+ for (int i = 0; i < n; ++i)
+ {
+ p->contents[i] =
+ webkit_js_to_lisp (context,
+ JSObjectGetPropertyAtIndex (context,
+ (JSObjectRef) value,
+ i, NULL));
+ }
+ XSETVECTOR (obj, p);
+ return obj;
+ }
+ else
+ {
+ JSPropertyNameArrayRef properties =
+ JSObjectCopyPropertyNames (context, (JSObjectRef) value);
+
+ int n = JSPropertyNameArrayGetCount (properties);
+ Lisp_Object obj;
+
+ /* TODO: can we use a regular list here? */
+ struct Lisp_Vector *p = allocate_vector (n);
+
+ for (int i = 0; i < n; ++i)
+ {
+ JSStringRef name = JSPropertyNameArrayGetNameAtIndex (properties, i);
+ JSValueRef property = JSObjectGetProperty (context,
+ (JSObjectRef) value,
+ name, NULL);
+ gchar *str_name;
+ gsize str_length;
+ str_length = JSStringGetMaximumUTF8CStringSize (name);
+ str_name = (gchar *)g_malloc (str_length);
+ JSStringGetUTF8CString (name, str_name, str_length);
+ JSStringRelease (name);
+
+ p->contents[i] =
+ Fcons (build_string (str_name),
+ webkit_js_to_lisp (context, property));
+ }
+
+ JSPropertyNameArrayRelease (properties);
+ XSETVECTOR (obj, p);
+ return obj;
+ }
}
case kJSTypeUndefined:
case kJSTypeNull:
@@ -361,24 +361,24 @@ webkit_js_to_lisp (JSContextRef context, JSValueRef value)
static void
webkit_javascript_finished_cb (GObject *webview,
- GAsyncResult *result,
- gpointer lisp_callback)
+ GAsyncResult *result,
+ gpointer lisp_callback)
{
WebKitJavascriptResult *js_result;
JSValueRef value;
JSGlobalContextRef context;
GError *error = NULL;
struct xwidget *xw = g_object_get_data (G_OBJECT (webview),
- XG_XWIDGET);
+ XG_XWIDGET);
js_result = webkit_web_view_run_javascript_finish
(WEBKIT_WEB_VIEW (webview), result, &error);
if (!js_result)
{
- g_warning ("Error running javascript: %s", error->message);
- g_error_free (error);
- return;
+ g_warning ("Error running javascript: %s", error->message);
+ g_error_free (error);
+ return;
}
context = webkit_javascript_result_get_global_context (js_result);
@@ -390,30 +390,30 @@ webkit_javascript_finished_cb (GObject *webview,
This ensures that the callback runs in sync with the Emacs
event loop. */
store_xwidget_js_callback_event (xw, (Lisp_Object)lisp_callback,
- lisp_value);
+ lisp_value);
}
gboolean
webkit_download_cb (WebKitWebContext *webkitwebcontext,
- WebKitDownload *arg1,
- gpointer data)
+ WebKitDownload *arg1,
+ gpointer data)
{
WebKitWebView *view = webkit_download_get_web_view(arg1);
WebKitURIRequest *request = webkit_download_get_request(arg1);
struct xwidget *xw = g_object_get_data (G_OBJECT (view),
- XG_XWIDGET);
+ XG_XWIDGET);
store_xwidget_event_string (xw, "download-started",
- webkit_uri_request_get_uri(request));
+ webkit_uri_request_get_uri(request));
return FALSE;
}
static gboolean
webkit_decide_policy_cb (WebKitWebView *webView,
- WebKitPolicyDecision *decision,
- WebKitPolicyDecisionType type,
- gpointer user_data)
+ WebKitPolicyDecision *decision,
+ WebKitPolicyDecisionType type,
+ gpointer user_data)
{
switch (type) {
case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
@@ -422,29 +422,29 @@ webkit_decide_policy_cb (WebKitWebView *webView,
possible to make Emacs handle mime text for instance. */
{
WebKitResponsePolicyDecision *response =
- WEBKIT_RESPONSE_POLICY_DECISION (decision);
+ WEBKIT_RESPONSE_POLICY_DECISION (decision);
if (!webkit_response_policy_decision_is_mime_type_supported (response))
- {
- webkit_policy_decision_download (decision);
- return TRUE;
- }
+ {
+ webkit_policy_decision_download (decision);
+ return TRUE;
+ }
else
- return FALSE;
+ return FALSE;
break;
}
case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
{
WebKitNavigationPolicyDecision *navigation_decision =
- WEBKIT_NAVIGATION_POLICY_DECISION (decision);
+ WEBKIT_NAVIGATION_POLICY_DECISION (decision);
WebKitNavigationAction *navigation_action =
- webkit_navigation_policy_decision_get_navigation_action (navigation_decision);
+ webkit_navigation_policy_decision_get_navigation_action (navigation_decision);
WebKitURIRequest *request =
- webkit_navigation_action_get_request (navigation_action);
+ webkit_navigation_action_get_request (navigation_action);
struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET);
store_xwidget_event_string (xw, "decide-policy",
- webkit_uri_request_get_uri (request));
+ webkit_uri_request_get_uri (request));
return FALSE;
break;
}
@@ -460,7 +460,7 @@ xwidget_osr_draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
{
struct xwidget *xw = g_object_get_data (G_OBJECT (widget), XG_XWIDGET);
struct xwidget_view *xv = g_object_get_data (G_OBJECT (widget),
- XG_XWIDGET_VIEW);
+ XG_XWIDGET_VIEW);
cairo_rectangle (cr, 0, 0, xv->clip_right, xv->clip_bottom);
cairo_clip (cr);
@@ -494,7 +494,7 @@ xwidget_osr_event_set_embedder (GtkWidget *widget, GdkEvent *event,
struct xwidget *xww = XXWIDGET (xv->model);
gdk_offscreen_window_set_embedder (gtk_widget_get_window
(xww->widgetwindow_osr),
- gtk_widget_get_window (xv->widget));
+ gtk_widget_get_window (xv->widget));
return FALSE;
}
@@ -502,8 +502,8 @@ xwidget_osr_event_set_embedder (GtkWidget *widget, GdkEvent *event,
/* Initializes and does initial placement of an xwidget view on screen. */
static struct xwidget_view *
xwidget_init_view (struct xwidget *xww,
- struct glyph_string *s,
- int x, int y)
+ struct glyph_string *s,
+ int x, int y)
{
struct xwidget_view *xv = allocate_xwidget_view ();
Lisp_Object val;
@@ -523,25 +523,25 @@ xwidget_init_view (struct xwidget *xww,
/* Draw the view on damage-event. */
g_signal_connect (G_OBJECT (xww->widgetwindow_osr), "damage-event",
- G_CALLBACK (offscreen_damage_event), xv->widget);
+ G_CALLBACK (offscreen_damage_event), xv->widget);
if (EQ (xww->type, Qwebkit))
- {
- g_signal_connect (G_OBJECT (xv->widget), "button-press-event",
- G_CALLBACK (xwidget_osr_event_forward), NULL);
- g_signal_connect (G_OBJECT (xv->widget), "button-release-event",
- G_CALLBACK (xwidget_osr_event_forward), NULL);
- g_signal_connect (G_OBJECT (xv->widget), "motion-notify-event",
- G_CALLBACK (xwidget_osr_event_forward), NULL);
- }
+ {
+ g_signal_connect (G_OBJECT (xv->widget), "button-press-event",
+ G_CALLBACK (xwidget_osr_event_forward), NULL);
+ g_signal_connect (G_OBJECT (xv->widget), "button-release-event",
+ G_CALLBACK (xwidget_osr_event_forward), NULL);
+ g_signal_connect (G_OBJECT (xv->widget), "motion-notify-event",
+ G_CALLBACK (xwidget_osr_event_forward), NULL);
+ }
else
- {
- /* xwgir debug, orthogonal to forwarding. */
- g_signal_connect (G_OBJECT (xv->widget), "enter-notify-event",
- G_CALLBACK (xwidget_osr_event_set_embedder), xv);
- }
+ {
+ /* xwgir debug, orthogonal to forwarding. */
+ g_signal_connect (G_OBJECT (xv->widget), "enter-notify-event",
+ G_CALLBACK (xwidget_osr_event_set_embedder), xv);
+ }
g_signal_connect (G_OBJECT (xv->widget), "draw",
- G_CALLBACK (xwidget_osr_draw_cb), NULL);
+ G_CALLBACK (xwidget_osr_draw_cb), NULL);
}
/* Widget realization.
@@ -565,7 +565,7 @@ xwidget_init_view (struct xwidget *xww,
g_object_set_data (G_OBJECT (xv->widgetwindow), XG_XWIDGET_VIEW, xv);
gtk_widget_set_size_request (GTK_WIDGET (xv->widget), xww->width,
- xww->height);
+ xww->height);
gtk_widget_set_size_request (xv->widgetwindow, xww->width, xww->height);
gtk_fixed_put (GTK_FIXED (FRAME_GTK_WIDGET (s->f)), xv->widgetwindow, x, y);
xv->x = x;
@@ -602,7 +602,7 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
int text_area_x, text_area_y, text_area_width, text_area_height;
window_box (s->w, TEXT_AREA, &text_area_x, &text_area_y,
- &text_area_width, &text_area_height);
+ &text_area_width, &text_area_height);
clip_left = max (0, text_area_x - x);
clip_right = max (clip_left,
min (xww->width, text_area_x + text_area_width - x));
@@ -638,9 +638,9 @@ x_draw_xwidget_glyph_string (struct glyph_string *s)
|| xv->clip_top != clip_top || xv->clip_left != clip_left)
{
gtk_widget_set_size_request (xv->widgetwindow, clip_right - clip_left,
- clip_bottom - clip_top);
+ clip_bottom - clip_top);
gtk_fixed_move (GTK_FIXED (xv->widgetwindow), xv->widget, -clip_left,
- -clip_top);
+ -clip_top);
xv->clip_right = clip_right;
xv->clip_bottom = clip_bottom;
@@ -693,9 +693,9 @@ referenced by XWIDGET. */)
{
double zoom_change = XFLOAT_DATA (factor);
webkit_web_view_set_zoom_level
- (WEBKIT_WEB_VIEW (xw->widget_osr),
- webkit_web_view_get_zoom_level
- (WEBKIT_WEB_VIEW (xw->widget_osr)) + zoom_change);
+ (WEBKIT_WEB_VIEW (xw->widget_osr),
+ webkit_web_view_get_zoom_level
+ (WEBKIT_WEB_VIEW (xw->widget_osr)) + zoom_change);
}
return Qnil;
}
@@ -721,10 +721,10 @@ argument procedure FUN.*/)
callback function is provided we pass it to the C callback
procedure that retrieves the return value. */
webkit_web_view_run_javascript (WEBKIT_WEB_VIEW (xw->widget_osr),
- SSDATA (script),
- NULL, /* cancelable */
- callback,
- (gpointer) fun);
+ SSDATA (script),
+ NULL, /* cancelable */
+ callback,
+ (gpointer) fun);
return Qnil;
}
@@ -746,21 +746,21 @@ DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 3, 3, 0,
if (xw->widget_osr)
{
gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width,
- xw->height);
+ xw->height);
gtk_container_resize_children (GTK_CONTAINER (xw->widgetwindow_osr));
gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,
- xw->height);
+ xw->height);
}
for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail); tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
- {
- struct xwidget_view *xv = XXWIDGET_VIEW (XCAR (tail));
- if (XXWIDGET (xv->model) == xw)
- gtk_widget_set_size_request (GTK_WIDGET (xv->widget), xw->width,
- xw->height);
- }
+ {
+ struct xwidget_view *xv = XXWIDGET_VIEW (XCAR (tail));
+ if (XXWIDGET (xv->model) == xw)
+ gtk_widget_set_size_request (GTK_WIDGET (xv->widget), xw->width,
+ xw->height);
+ }
}
return Qnil;
@@ -863,9 +863,9 @@ DEFUN ("delete-xwidget-view",
/* xv->model still has signals pointing to the view. There can be
several views. Find the matching signals and delete them all. */
g_signal_handlers_disconnect_matched (XXWIDGET (xv->model)->widgetwindow_osr,
- G_SIGNAL_MATCH_DATA,
- 0, 0, 0, 0,
- xv->widget);
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, 0, 0,
+ xv->widget);
return Qnil;
}
@@ -888,8 +888,8 @@ Return nil if no association is found. */)
{
Lisp_Object xwidget_view = XCAR (tail);
if (EQ (Fxwidget_view_model (xwidget_view), xwidget)
- && EQ (Fxwidget_view_window (xwidget_view), window))
- return xwidget_view;
+ && EQ (Fxwidget_view_window (xwidget_view), window))
+ return xwidget_view;
}
return Qnil;
@@ -997,11 +997,11 @@ syms_of_xwidget (void)
DEFSYM (QCplist, ":plist");
DEFVAR_LISP ("xwidget-list", Vxwidget_list,
- doc: /* xwidgets list. */);
+ doc: /* xwidgets list. */);
Vxwidget_list = Qnil;
DEFVAR_LISP ("xwidget-view-list", Vxwidget_view_list,
- doc: /* xwidget views list. */);
+ doc: /* xwidget views list. */);
Vxwidget_view_list = Qnil;
Fprovide (intern ("xwidget-internal"), Qnil);
@@ -1049,13 +1049,13 @@ xwidget_view_delete_all_in_window (struct window *w)
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
- {
- xv = XXWIDGET_VIEW (XCAR (tail));
- if (XWINDOW (xv->w) == w)
- {
- Fdelete_xwidget_view (XCAR (tail));
- }
- }
+ {
+ xv = XXWIDGET_VIEW (XCAR (tail));
+ if (XWINDOW (xv->w) == w)
+ {
+ Fdelete_xwidget_view (XCAR (tail));
+ }
+ }
}
}
@@ -1094,7 +1094,7 @@ xwidget_start_redisplay (void)
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
- XXWIDGET_VIEW (XCAR (tail))->redisplayed = false;
+ XXWIDGET_VIEW (XCAR (tail))->redisplayed = false;
}
}
@@ -1157,19 +1157,19 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix)
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
- {
- struct xwidget_view *xv = XXWIDGET_VIEW (XCAR (tail));
-
- /* "touched" is only meaningful for the current window, so
- disregard other views. */
- if (XWINDOW (xv->w) == w)
- {
- if (xwidget_touched (xv))
- xwidget_show_view (xv);
- else
- xwidget_hide_view (xv);
- }
- }
+ {
+ struct xwidget_view *xv = XXWIDGET_VIEW (XCAR (tail));
+
+ /* "touched" is only meaningful for the current window, so
+ disregard other views. */
+ if (XWINDOW (xv->w) == w)
+ {
+ if (xwidget_touched (xv))
+ xwidget_show_view (xv);
+ else
+ xwidget_hide_view (xv);
+ }
+ }
}
}
@@ -1184,13 +1184,13 @@ kill_buffer_xwidgets (Lisp_Object buffer)
Vxwidget_list = Fdelq (xwidget, Vxwidget_list);
/* TODO free the GTK things in xw. */
{
- CHECK_XWIDGET (xwidget);
- struct xwidget *xw = XXWIDGET (xwidget);
- if (xw->widget_osr && xw->widgetwindow_osr)
- {
- gtk_widget_destroy (xw->widget_osr);
- gtk_widget_destroy (xw->widgetwindow_osr);
- }
+ CHECK_XWIDGET (xwidget);
+ struct xwidget *xw = XXWIDGET (xwidget);
+ if (xw->widget_osr && xw->widgetwindow_osr)
+ {
+ gtk_widget_destroy (xw->widget_osr);
+ gtk_widget_destroy (xw->widgetwindow_osr);
+ }
}
}
}
diff --git a/src/xwidget.h b/src/xwidget.h
index 4447abb..00d4914 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -91,7 +91,7 @@ struct xwidget_view
/* Test for xwidget pseudovector. */
#define XWIDGETP(x) PSEUDOVECTORP (x, PVEC_XWIDGET)
#define XXWIDGET(a) (eassert (XWIDGETP (a)), \
- (struct xwidget *) XUNTAG (a, Lisp_Vectorlike))
+ (struct xwidget *) XUNTAG (a, Lisp_Vectorlike))
#define CHECK_XWIDGET(x) \
CHECK_TYPE (XWIDGETP (x), Qxwidgetp, x)
@@ -99,7 +99,7 @@ struct xwidget_view
/* Test for xwidget_view pseudovector. */
#define XWIDGET_VIEW_P(x) PSEUDOVECTORP (x, PVEC_XWIDGET_VIEW)
#define XXWIDGET_VIEW(a) (eassert (XWIDGET_VIEW_P (a)), \
- (struct xwidget_view *) XUNTAG (a, Lisp_Vectorlike))
+ (struct xwidget_view *) XUNTAG (a, Lisp_Vectorlike))
#define CHECK_XWIDGET_VIEW(x) \
CHECK_TYPE (XWIDGET_VIEW_P (x), Qxwidget_view_p, x)
^ permalink raw reply related [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 0:59 Reformat all of src/ Chris Gregory
@ 2016-12-28 3:43 ` Stefan Monnier
2016-12-28 4:45 ` John Wiegley
2016-12-28 10:27 ` hector
2 siblings, 0 replies; 45+ messages in thread
From: Stefan Monnier @ 2016-12-28 3:43 UTC (permalink / raw)
To: emacs-devel
> I found it irritating that there was inconsistent usage of tabs and
> spaces at the beginning of lines.
When this happens, I recommend to go take a walk, look at the trees,
enjoy life,
Stefan
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 0:59 Reformat all of src/ Chris Gregory
2016-12-28 3:43 ` Stefan Monnier
@ 2016-12-28 4:45 ` John Wiegley
2016-12-28 4:52 ` Chris Gregory
` (3 more replies)
2016-12-28 10:27 ` hector
2 siblings, 4 replies; 45+ messages in thread
From: John Wiegley @ 2016-12-28 4:45 UTC (permalink / raw)
To: Chris Gregory; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
>>>>> "CG" == Chris Gregory <czipperz@gmail.com> writes:
CG> I found it irritating that there was inconsistent usage of tabs and spaces
CG> at the beginning of lines. So I reformatted the entirety of the src
CG> directory such that all lines that begin with 8 spaces now begin with
CG> tabs, and all lines that begin with 1 tab and 8 spaces now begin with 2
CG> tabs, and so on.
Hi Chris,
I appreciate the other cleanup changes you've made, but I must reject this
one. Feel free to fix whitespace along with other changes you make to a given
area of code, but bulk changes like this do nothing but cure a problem people
aren't having, while hurting our history and blame tools.
Respectfully,
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 4:45 ` John Wiegley
@ 2016-12-28 4:52 ` Chris Gregory
2016-12-28 5:01 ` Chris Gregory
` (2 subsequent siblings)
3 siblings, 0 replies; 45+ messages in thread
From: Chris Gregory @ 2016-12-28 4:52 UTC (permalink / raw)
To: Emacs Development Mailing List, jwiegley
[-- Attachment #1: Type: text/plain, Size: 61 bytes --]
Can't really blame you. Makes total sense.
--
Chris Gregory
[-- Attachment #2: Type: text/html, Size: 324 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 4:45 ` John Wiegley
2016-12-28 4:52 ` Chris Gregory
@ 2016-12-28 5:01 ` Chris Gregory
2016-12-28 12:58 ` Phillip Lord
2016-12-29 1:36 ` Richard Stallman
3 siblings, 0 replies; 45+ messages in thread
From: Chris Gregory @ 2016-12-28 5:01 UTC (permalink / raw)
To: Emacs Development Mailing List, jwiegley
[-- Attachment #1: Type: text/plain, Size: 51 bytes --]
Can't really blame you.
Sincerely,
Chris Gregory
[-- Attachment #2: Type: text/html, Size: 366 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 4:45 ` John Wiegley
2016-12-28 4:52 ` Chris Gregory
2016-12-28 5:01 ` Chris Gregory
@ 2016-12-28 12:58 ` Phillip Lord
2016-12-28 15:35 ` John Yates
2016-12-28 16:59 ` John Wiegley
2016-12-29 1:36 ` Richard Stallman
3 siblings, 2 replies; 45+ messages in thread
From: Phillip Lord @ 2016-12-28 12:58 UTC (permalink / raw)
To: Chris Gregory, emacs-devel
On Wed, December 28, 2016 4:45 am, John Wiegley wrote:
>>>>>> "CG" == Chris Gregory <czipperz@gmail.com> writes:
>>>>>>
>
> CG> I found it irritating that there was inconsistent usage of tabs and
> spaces CG> at the beginning of lines. So I reformatted the entirety of the
> src CG> directory such that all lines that begin with 8 spaces now begin
> with CG> tabs, and all lines that begin with 1 tab and 8 spaces now begin
> with 2 CG> tabs, and so on.
>
>
> Hi Chris,
>
>
> I appreciate the other cleanup changes you've made, but I must reject
> this one. Feel free to fix whitespace along with other changes you make to
> a given area of code, but bulk changes like this do nothing but cure a
> problem people aren't having, while hurting our history and blame tools.
Why not patch up dir-locals.el to switch on whitespace.el, and highlight
bad spacing? At the moment, the spacing is inconsistent enough that I
don't know which spacing is considered correct and highlighting would help
to define this.
As Chris says, it's somewhat inconsistent at the moment, so copying nearby
lines doesn't really help.
FWIW (not very much) I think tabs suck...
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 12:58 ` Phillip Lord
@ 2016-12-28 15:35 ` John Yates
2016-12-28 15:39 ` Lars Ingebrigtsen
2016-12-28 16:59 ` John Wiegley
1 sibling, 1 reply; 45+ messages in thread
From: John Yates @ 2016-12-28 15:35 UTC (permalink / raw)
To: Phillip Lord; +Cc: Chris Gregory, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
On Wed, Dec 28, 2016 at 7:58 AM, Phillip Lord <phillip.lord@russet.org.uk>
wrote:
> FWIW (not very much) I think tabs suck...
>
They made sense 40 years ago when my 2315 disk pack held 1.2MB.
These days I too think they suck.
/john
[-- Attachment #2: Type: text/html, Size: 1103 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 15:35 ` John Yates
@ 2016-12-28 15:39 ` Lars Ingebrigtsen
2016-12-28 16:01 ` John Yates
` (2 more replies)
0 siblings, 3 replies; 45+ messages in thread
From: Lars Ingebrigtsen @ 2016-12-28 15:39 UTC (permalink / raw)
To: Emacs developers
John Yates <john@yates-sheets.org> writes:
> They made sense 40 years ago when my 2315 disk pack held 1.2MB.
> These days I too think they suck.
I think that if you notice whether the indentation is made from tabs,
spaces or a mix of them, you're probably doing something wrong.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 15:39 ` Lars Ingebrigtsen
@ 2016-12-28 16:01 ` John Yates
2016-12-28 16:27 ` Lars Ingebrigtsen
2016-12-28 16:17 ` Phillip Lord
2016-12-28 16:32 ` Yuri Khan
2 siblings, 1 reply; 45+ messages in thread
From: John Yates @ 2016-12-28 16:01 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
On Wed, Dec 28, 2016 at 10:39 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> John Yates <john@yates-sheets.org> writes:
>
> > They made sense 40 years ago when my 2315 disk pack held 1.2MB.
> > These days I too think they suck.
>
> I think that if you notice whether the indentation is made from tabs,
> spaces or a mix of them, you're probably doing something wrong.
>
"Something" is not very helpful. Would you care to suggest a set of best
practices to insulate me (or more importantly a programming newbie) from
<ht> pain?
Pain extends beyond mere emacs editing. I have worked on projects where
tabstops were at multiples other than 8. I commend to you the task of
writing
a language frontend that tries to report errors in context in such
settings.
And - assuming you believe in unit testing - providing tests for that
facility.
Not saying it cannot be done. (I have done it.) But it does leave one
wondering why such an anachronism is allowed to persist.
/john
[-- Attachment #2: Type: text/html, Size: 2589 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 15:39 ` Lars Ingebrigtsen
2016-12-28 16:01 ` John Yates
@ 2016-12-28 16:17 ` Phillip Lord
2016-12-28 17:19 ` Stefan Monnier
2016-12-28 16:32 ` Yuri Khan
2 siblings, 1 reply; 45+ messages in thread
From: Phillip Lord @ 2016-12-28 16:17 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Emacs developers
On Wed, December 28, 2016 3:39 pm, Lars Ingebrigtsen wrote:
> John Yates <john@yates-sheets.org> writes:
>
>
>> They made sense 40 years ago when my 2315 disk pack held 1.2MB.
>> These days I too think they suck.
>>
>
> I think that if you notice whether the indentation is made from tabs,
> spaces or a mix of them, you're probably doing something wrong.
Oh dear, what have I done?
I notice whether indentation is made from tabs, spaces or a mix because I
use whitespace.el to highlight them (and some other whitespace
arrangments), so that I can try and use them consistently. Of course, if
they never made any difference, then it wouldn't matter, but I find they
tend to throw up false diffs. In this sense, I am using the Emacs to
highlight the short-comings of other tools, so I can avoid them.
Phil
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:17 ` Phillip Lord
@ 2016-12-28 17:19 ` Stefan Monnier
2016-12-28 17:35 ` Phillip Lord
0 siblings, 1 reply; 45+ messages in thread
From: Stefan Monnier @ 2016-12-28 17:19 UTC (permalink / raw)
To: emacs-devel
> I notice whether indentation is made from tabs, spaces or a mix because I
> use whitespace.el to highlight them (and some other whitespace
That's one example of "something wrong".
There might be cases where the difference is important and it's hence
valuable to use whitespace.el to help you avoid problems, but your life
will be more pleasant when you stop worrying about those details when they
don't matter.
Stefan
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 17:19 ` Stefan Monnier
@ 2016-12-28 17:35 ` Phillip Lord
2016-12-28 17:52 ` Stefan Monnier
0 siblings, 1 reply; 45+ messages in thread
From: Phillip Lord @ 2016-12-28 17:35 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
On Wed, December 28, 2016 5:19 pm, Stefan Monnier wrote:
>> I notice whether indentation is made from tabs, spaces or a mix because
>> I
>> use whitespace.el to highlight them (and some other whitespace
>
> That's one example of "something wrong".
>
>
> There might be cases where the difference is important and it's hence
> valuable to use whitespace.el to help you avoid problems, but your life
> will be more pleasant when you stop worrying about those details when
> they don't matter.
Probably true. I switched whitespace on, because I noticed in my own
projects that my whitespace handling was very messy and this caused
diffing issues. I just never got around to fiddling with my whitespace.el
configuration to switch it off for Emacs. Probably never will, now;
wouldn't recognize Emacs source without the occasional fluorescent yellow
tab, which is the colour I use.
It doesn't both me overly, although to stop worrying about details which
are not important, you have to know which ones are important. You've
corrected my patches for indentation several times (which I've always been
grateful for). Some projects are extremely picky on whitespace.
Hence, my conclusion: if tooling support could be added to incrementally
approach convergence, that would not be a bad thing. But it's not worth
worrying about excessively.
I will leave it there!
Phil
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 17:35 ` Phillip Lord
@ 2016-12-28 17:52 ` Stefan Monnier
2016-12-28 17:59 ` Eli Zaretskii
0 siblings, 1 reply; 45+ messages in thread
From: Stefan Monnier @ 2016-12-28 17:52 UTC (permalink / raw)
To: Phillip Lord; +Cc: emacs-devel
> Hence, my conclusion: if tooling support could be added to incrementally
> approach convergence, that would not be a bad thing. But it's not worth
> worrying about excessively.
We do have
(emacs-lisp-mode . ((indent-tabs-mode . nil))))
in .dir-locals.el, but for some reason it looks like we don't have that
for the C files. I don't think there'd be much opposition to adding it,
and it would support eventual convergence.
Stefan
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 17:52 ` Stefan Monnier
@ 2016-12-28 17:59 ` Eli Zaretskii
0 siblings, 0 replies; 45+ messages in thread
From: Eli Zaretskii @ 2016-12-28 17:59 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel, phillip.lord
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 28 Dec 2016 12:52:08 -0500
> Cc: emacs-devel@gnu.org
>
> We do have
>
> (emacs-lisp-mode . ((indent-tabs-mode . nil))))
>
> in .dir-locals.el, but for some reason it looks like we don't have that
> for the C files. I don't think there'd be much opposition to adding it
It's not there because there was, in fact, opposition. Doing that for
Lisp files was the only acceptable compromise, AFAIR.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 15:39 ` Lars Ingebrigtsen
2016-12-28 16:01 ` John Yates
2016-12-28 16:17 ` Phillip Lord
@ 2016-12-28 16:32 ` Yuri Khan
2016-12-28 16:37 ` Lars Ingebrigtsen
2 siblings, 1 reply; 45+ messages in thread
From: Yuri Khan @ 2016-12-28 16:32 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Emacs developers
On Wed, Dec 28, 2016 at 10:39 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> I think that if you notice whether the indentation is made from tabs,
> spaces or a mix of them, you're probably doing something wrong.
My mind is configured for 4-position indentation. If a source file
uses spaces and a different indentation width, I notice but am okay
with that.
My editors are all configured for 4-position tabs. If a source file
uses a mix of tabs and spaces and assumes 8-position tabs, I notice
and am annoyed. (I am forced to locally override tab-width when
reading nxml.el, several other Emacs sources, and many C sources, both
GNU and other.)
By your estimate, I am doing something wrong. What exactly is that?
PS: I recognize the unfortunate effect reformatting would have on
source archaeology, but maybe we could flag each file which is
unreadable with a tab-width other than 8 with a file-local variable?
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:32 ` Yuri Khan
@ 2016-12-28 16:37 ` Lars Ingebrigtsen
2016-12-28 16:56 ` Yuri Khan
0 siblings, 1 reply; 45+ messages in thread
From: Lars Ingebrigtsen @ 2016-12-28 16:37 UTC (permalink / raw)
To: Yuri Khan; +Cc: Emacs developers
Yuri Khan <yuri.v.khan@gmail.com> writes:
> My editors are all configured for 4-position tabs.
[...]
> By your estimate, I am doing something wrong. What exactly is that?
You answered your own question. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:37 ` Lars Ingebrigtsen
@ 2016-12-28 16:56 ` Yuri Khan
0 siblings, 0 replies; 45+ messages in thread
From: Yuri Khan @ 2016-12-28 16:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Emacs developers
On Wed, Dec 28, 2016 at 11:37 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
>> My editors are all configured for 4-position tabs.
> [...]
>> By your estimate, I am doing something wrong. What exactly is that?
>
> You answered your own question. :-)
Now *that* was a tabwidthist comment.
As a child, I was exposed to a computer that had square character
cells, a 32-character line width, and 16-character tab width. Since
then, I have perceived tabs that are wider than two line heights as
excessively wide.
You could be more tolerant to people like me.
Just half kidding.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 12:58 ` Phillip Lord
2016-12-28 15:35 ` John Yates
@ 2016-12-28 16:59 ` John Wiegley
2016-12-28 17:12 ` Yuri Khan
` (3 more replies)
1 sibling, 4 replies; 45+ messages in thread
From: John Wiegley @ 2016-12-28 16:59 UTC (permalink / raw)
To: Phillip Lord; +Cc: Chris Gregory, emacs-devel
>>>>> "PL" == Phillip Lord <phillip.lord@russet.org.uk> writes:
PL> FWIW (not very much) I think tabs suck...
If we were going to reformat all the sources, I'd rather we observe the rule
"never use tabs". I don't see what benefit they possibly offer.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:59 ` John Wiegley
@ 2016-12-28 17:12 ` Yuri Khan
2016-12-28 17:20 ` Phillip Lord
` (2 subsequent siblings)
3 siblings, 0 replies; 45+ messages in thread
From: Yuri Khan @ 2016-12-28 17:12 UTC (permalink / raw)
To: Phillip Lord, Chris Gregory, Emacs developers
On Wed, Dec 28, 2016 at 11:59 PM, John Wiegley <jwiegley@gmail.com> wrote:
> If we were going to reformat all the sources, I'd rather we observe the rule
> "never use tabs". I don't see what benefit they possibly offer.
They offer customizable indentation, but only for some coding styles.
For the GNU style where function parameters and arguments on the
continuation lines are lined up with those on the first line, tabs are
indeed harmful.
GNU style:
void some_function(int arg1,
...................int arg2)
Tab-friendly style:
void some_function(int arg1,
<-->int arg2)
Bad:
void some_function(int arg1,
<--><--><--><-->...int arg2)
Equally bad:
void some_function(int arg1,
<------><------>...int arg2)
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:59 ` John Wiegley
2016-12-28 17:12 ` Yuri Khan
@ 2016-12-28 17:20 ` Phillip Lord
2016-12-28 18:38 ` Paul Eggert
2016-12-28 17:23 ` John Yates
2016-12-31 10:23 ` Philippe Vaucher
3 siblings, 1 reply; 45+ messages in thread
From: Phillip Lord @ 2016-12-28 17:20 UTC (permalink / raw)
To: Phillip Lord, Chris Gregory, emacs-devel
On Wed, December 28, 2016 4:59 pm, John Wiegley wrote:
>>>>>> "PL" == Phillip Lord <phillip.lord@russet.org.uk> writes:
>>>>>>
>
> PL> FWIW (not very much) I think tabs suck...
>
>
> If we were going to reformat all the sources, I'd rather we observe the
> rule "never use tabs". I don't see what benefit they possibly offer.
I don't know if there is a policy in the GNU coding guidelines or not, or
whether Emacs has one, but some visual indication of where it is (not)
being followed would be a good thing.
The commit hook already checks for some whitespace issues (spaces before
tabs for instance). Clearly adding something to this hook to enforce a
whitespace policy now would not work given that Emacs is inconsistent in
its use, unless it could be made to just check the diffed region perhaps,
which might be a way of "fix things as we go".
What the policy would be (if it does not exist), I care less about.
Phil
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 17:20 ` Phillip Lord
@ 2016-12-28 18:38 ` Paul Eggert
2016-12-29 1:10 ` Dmitry Gutov
0 siblings, 1 reply; 45+ messages in thread
From: Paul Eggert @ 2016-12-28 18:38 UTC (permalink / raw)
To: Phillip Lord, Chris Gregory, emacs-devel
Phillip Lord wrote:
> The commit hook already checks for some whitespace issues (spaces before
> tabs for instance).
That it checks for spaces-for-tabs is mostly an accident. I added 'git
diff-index --check' to the pre-commit hook mostly to catch white space at line
end, which can be a real problem due to languages like C and Elisp where such
white space (typically invisible) can quietly change the semantics of a program.
Althoug the --check option also happens to look for space-before-tab in initial
indent, this is not a significant problem in practice for us and we could easily
remove that part of the check if we want. I haven't worried about it, though,
because (like Stefan) I view this tab-vs-spaces thing as a waste of time. I
don't even like the indent-tabs-mode thing that we default to in elisp code, as
it's one more thing to worry about in an area where we should not be worrying.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 18:38 ` Paul Eggert
@ 2016-12-29 1:10 ` Dmitry Gutov
2016-12-29 5:53 ` Paul Eggert
0 siblings, 1 reply; 45+ messages in thread
From: Dmitry Gutov @ 2016-12-29 1:10 UTC (permalink / raw)
To: Paul Eggert, Phillip Lord, Chris Gregory, emacs-devel
On 28.12.2016 20:38, Paul Eggert wrote:
> I don't even like the
> indent-tabs-mode thing that we default to in elisp code, as it's one
> more thing to worry about in an area where we should not be worrying.
What's there for you to worry about?
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 1:10 ` Dmitry Gutov
@ 2016-12-29 5:53 ` Paul Eggert
2016-12-29 11:28 ` Dmitry Gutov
2016-12-29 13:18 ` Phillip Lord
0 siblings, 2 replies; 45+ messages in thread
From: Paul Eggert @ 2016-12-29 5:53 UTC (permalink / raw)
To: Dmitry Gutov, Phillip Lord, emacs-devel
Dmitry Gutov wrote:
> What's there for you to worry about?
Use of the elisp indent-tabs-mode thing sometimes creates whitespace-only
changes to lines, which makes it harder to read patches and dig into history.
This can happen when you change a line, and then change it back.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 5:53 ` Paul Eggert
@ 2016-12-29 11:28 ` Dmitry Gutov
2016-12-30 1:07 ` Paul Eggert
2016-12-29 13:18 ` Phillip Lord
1 sibling, 1 reply; 45+ messages in thread
From: Dmitry Gutov @ 2016-12-29 11:28 UTC (permalink / raw)
To: Paul Eggert, Phillip Lord, emacs-devel
On 29.12.2016 07:53, Paul Eggert wrote:
> Use of the elisp indent-tabs-mode thing sometimes creates
> whitespace-only changes to lines, which makes it harder to read patches
> and dig into history. This can happen when you change a line, and then
> change it back.
That would still happen, whichever your global setting of
indent-tabs-mode is, on lines that disagree with it (which exist either
way).
The only difference is, with the directory-local setting, the odds of
this happening are going to decrease over time.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 11:28 ` Dmitry Gutov
@ 2016-12-30 1:07 ` Paul Eggert
2016-12-30 10:34 ` Phillip Lord
0 siblings, 1 reply; 45+ messages in thread
From: Paul Eggert @ 2016-12-30 1:07 UTC (permalink / raw)
To: Dmitry Gutov, emacs-devel
Dmitry Gutov wrote:
> That would still happen, whichever your global setting of indent-tabs-mode is,
> on lines that disagree with it (which exist either way).
Ah, I didn't know that. I thought Emacs by default inserted indentation that
resembles that of adjacent lines. It would be nice if Emacs could do that, as
this should lessen this problem either way. In the meantime, it's annoying when
indent-tabs-mode mindlessly changes tabs to spaces and introduces no-change
"changes".
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-30 1:07 ` Paul Eggert
@ 2016-12-30 10:34 ` Phillip Lord
2017-01-01 1:14 ` Dmitry Gutov
0 siblings, 1 reply; 45+ messages in thread
From: Phillip Lord @ 2016-12-30 10:34 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel, Dmitry Gutov
On Fri, December 30, 2016 1:07 am, Paul Eggert wrote:
> Dmitry Gutov wrote:
>
>> That would still happen, whichever your global setting of
>> indent-tabs-mode is, on lines that disagree with it (which exist either
>> way).
>
> Ah, I didn't know that. I thought Emacs by default inserted indentation
> that resembles that of adjacent lines. It would be nice if Emacs could do
> that, as this should lessen this problem either way.
That would work if the indentation of adjacent lines were consistent. In
the situation where there is a tab indented line followed by a space
indented line, the issue is still going to occur.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-30 10:34 ` Phillip Lord
@ 2017-01-01 1:14 ` Dmitry Gutov
0 siblings, 0 replies; 45+ messages in thread
From: Dmitry Gutov @ 2017-01-01 1:14 UTC (permalink / raw)
To: Phillip Lord, Paul Eggert; +Cc: emacs-devel
On 30.12.2016 13:34, Phillip Lord wrote:
> That would work if the indentation of adjacent lines were consistent. In
> the situation where there is a tab indented line followed by a space
> indented line, the issue is still going to occur.
And with indent-tabs-mode on and tab-with 8, this will occur regularly,
because these default settings of ours mandate tabs-mixed-with-spaces
indentation.
So I'm having hard time imagining an auto-detection algorithm that
wouldn't be biased toward one of the options.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 5:53 ` Paul Eggert
2016-12-29 11:28 ` Dmitry Gutov
@ 2016-12-29 13:18 ` Phillip Lord
2016-12-29 16:17 ` Eli Zaretskii
1 sibling, 1 reply; 45+ messages in thread
From: Phillip Lord @ 2016-12-29 13:18 UTC (permalink / raw)
To: Paul Eggert; +Cc: Phillip Lord, emacs-devel, Dmitry Gutov
On Thu, December 29, 2016 5:53 am, Paul Eggert wrote:
> Dmitry Gutov wrote:
>
>> What's there for you to worry about?
>>
>
> Use of the elisp indent-tabs-mode thing sometimes creates whitespace-only
> changes to lines, which makes it harder to read patches and dig into
> history. This can happen when you change a line, and then change it back
I just checked and I think that comparing git diff --numstat output with
and without -b should identify when whitespace-only changes have happened;
this could be caught in the commit hook.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 13:18 ` Phillip Lord
@ 2016-12-29 16:17 ` Eli Zaretskii
2016-12-29 17:18 ` John Covici
` (2 more replies)
0 siblings, 3 replies; 45+ messages in thread
From: Eli Zaretskii @ 2016-12-29 16:17 UTC (permalink / raw)
To: Phillip Lord; +Cc: eggert, dgutov, emacs-devel
> Date: Thu, 29 Dec 2016 13:18:59 -0000
> From: "Phillip Lord" <phillip.lord@russet.org.uk>
> Cc: Phillip Lord <phillip.lord@russet.org.uk>, emacs-devel@gnu.org,
> Dmitry Gutov <dgutov@yandex.ru>
>
> I just checked and I think that comparing git diff --numstat output with
> and without -b should identify when whitespace-only changes have happened;
> this could be caught in the commit hook.
Every mandatory check in the commit hook is a potential annoyance
(think of someone, such as myself, who needs to push changes for
others), so I'd prefer not to add any, unless we really must.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 16:17 ` Eli Zaretskii
@ 2016-12-29 17:18 ` John Covici
2016-12-29 17:19 ` John Covici
2016-12-30 10:30 ` Phillip Lord
2 siblings, 0 replies; 45+ messages in thread
From: John Covici @ 2016-12-29 17:18 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, eggert, dgutov, Phillip Lord
Yep, you have to do it once more and you should be good. On the
phone, you have to swipe right for each number, so maybe this is your
problem. VEry weird way they did it.
On Thu, 29 Dec 2016 11:17:49 -0500,
Eli Zaretskii wrote:
>
> > Date: Thu, 29 Dec 2016 13:18:59 -0000
> > From: "Phillip Lord" <phillip.lord@russet.org.uk>
> > Cc: Phillip Lord <phillip.lord@russet.org.uk>, emacs-devel@gnu.org,
> > Dmitry Gutov <dgutov@yandex.ru>
> >
> > I just checked and I think that comparing git diff --numstat output with
> > and without -b should identify when whitespace-only changes have happened;
> > this could be caught in the commit hook.
>
> Every mandatory check in the commit hook is a potential annoyance
> (think of someone, such as myself, who needs to push changes for
> others), so I'd prefer not to add any, unless we really must.
>
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 16:17 ` Eli Zaretskii
2016-12-29 17:18 ` John Covici
@ 2016-12-29 17:19 ` John Covici
2016-12-30 10:30 ` Phillip Lord
2 siblings, 0 replies; 45+ messages in thread
From: John Covici @ 2016-12-29 17:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, eggert, dgutov, Phillip Lord
I think I replied to the wrong message, sorry for the noise.
On Thu, 29 Dec 2016 11:17:49 -0500,
Eli Zaretskii wrote:
>
> > Date: Thu, 29 Dec 2016 13:18:59 -0000
> > From: "Phillip Lord" <phillip.lord@russet.org.uk>
> > Cc: Phillip Lord <phillip.lord@russet.org.uk>, emacs-devel@gnu.org,
> > Dmitry Gutov <dgutov@yandex.ru>
> >
> > I just checked and I think that comparing git diff --numstat output with
> > and without -b should identify when whitespace-only changes have happened;
> > this could be caught in the commit hook.
>
> Every mandatory check in the commit hook is a potential annoyance
> (think of someone, such as myself, who needs to push changes for
> others), so I'd prefer not to add any, unless we really must.
>
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 16:17 ` Eli Zaretskii
2016-12-29 17:18 ` John Covici
2016-12-29 17:19 ` John Covici
@ 2016-12-30 10:30 ` Phillip Lord
2 siblings, 0 replies; 45+ messages in thread
From: Phillip Lord @ 2016-12-30 10:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, eggert, dgutov, Phillip Lord
On Thu, December 29, 2016 4:17 pm, Eli Zaretskii wrote:
>> Date: Thu, 29 Dec 2016 13:18:59 -0000
>> From: "Phillip Lord" <phillip.lord@russet.org.uk>
>> Cc: Phillip Lord <phillip.lord@russet.org.uk>, emacs-devel@gnu.org,
>> Dmitry Gutov <dgutov@yandex.ru>
>>
>>
>> I just checked and I think that comparing git diff --numstat output
>> with and without -b should identify when whitespace-only changes have
>> happened; this could be caught in the commit hook.
>
> Every mandatory check in the commit hook is a potential annoyance
> (think of someone, such as myself, who needs to push changes for
> others), so I'd prefer not to add any, unless we really must
When you say "push" changes, I guess you mean commit patches? AFAICT,
commit hooks do not run on pushes, so there should be no problem. But,
yes, for patches, then indeed if it is you applying them, then you will be
affected by the commit hook.
On the other hand, if the person who creates the patch uses git to do so,
the commit hook should affect their local commit when creating the patch.
Likewise with pull requests.
But, I agree, it is a small additional hassle.
Phil
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:59 ` John Wiegley
2016-12-28 17:12 ` Yuri Khan
2016-12-28 17:20 ` Phillip Lord
@ 2016-12-28 17:23 ` John Yates
2016-12-31 10:23 ` Philippe Vaucher
3 siblings, 0 replies; 45+ messages in thread
From: John Yates @ 2016-12-28 17:23 UTC (permalink / raw)
To: Phillip Lord, Chris Gregory, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
On Wed, Dec 28, 2016 at 11:59 AM, John Wiegley <jwiegley@gmail.com> wrote:
> If we were going to reformat all the sources, I'd rather we observe the
> rule
> "never use tabs". I don't see what benefit they possibly offer.
>
Make files aside, is there any other justification for hard tabs besides
compression?
40
+
years ago when
my
only available language
s were DEC
assembler
s
a line
typically looked like:
<ht> OPCODE <ht> OPERAND [ ',' OPERAND ]* <ht>+ ';' COMMENT
With identifiers limited to 6 characters and short comments tabs easily
produced
50% compression. In more modern languages I have to believe that the
compression
is _much_ less.
[-- Attachment #2: Type: text/html, Size: 2650 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 16:59 ` John Wiegley
` (2 preceding siblings ...)
2016-12-28 17:23 ` John Yates
@ 2016-12-31 10:23 ` Philippe Vaucher
3 siblings, 0 replies; 45+ messages in thread
From: Philippe Vaucher @ 2016-12-31 10:23 UTC (permalink / raw)
To: Phillip Lord, Chris Gregory, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
>
> PL> FWIW (not very much) I think tabs suck...
>
> If we were going to reformat all the sources, I'd rather we observe the
> rule
> "never use tabs". I don't see what benefit they possibly offer.
I agree. "Always use spaces" is just simpler in pretty much all aspects: no
need to worry about tab width or tabs intermixes and it works with all
editors. The only drawback being file size but it's been over a decade that
this is no longer an argument.
Philippe
[-- Attachment #2: Type: text/html, Size: 750 bytes --]
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-28 4:45 ` John Wiegley
` (2 preceding siblings ...)
2016-12-28 12:58 ` Phillip Lord
@ 2016-12-29 1:36 ` Richard Stallman
2016-12-29 3:41 ` Eli Zaretskii
2016-12-29 14:39 ` Stefan Monnier
3 siblings, 2 replies; 45+ messages in thread
From: Richard Stallman @ 2016-12-29 1:36 UTC (permalink / raw)
To: John Wiegley; +Cc: czipperz, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
One can argue about whether it was worth time to make the changes, but
since that has been done already, why not put it in?
A single change which affects only whitespace
won't cause any confusion no matter how many places that whitespace
is changed.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 1:36 ` Richard Stallman
@ 2016-12-29 3:41 ` Eli Zaretskii
2016-12-29 12:04 ` Tino Calancha
2016-12-29 14:39 ` Stefan Monnier
1 sibling, 1 reply; 45+ messages in thread
From: Eli Zaretskii @ 2016-12-29 3:41 UTC (permalink / raw)
To: rms; +Cc: jwiegley, czipperz, emacs-devel
> From: Richard Stallman <rms@gnu.org>
> Date: Wed, 28 Dec 2016 20:36:40 -0500
> Cc: czipperz@gmail.com, emacs-devel@gnu.org
>
> One can argue about whether it was worth time to make the changes, but
> since that has been done already, why not put it in?
>
> A single change which affects only whitespace
> won't cause any confusion no matter how many places that whitespace
> is changed.
It makes digging into code history harder, especially when files are
also renamed later.
We arrived at the current convention of not doing such changes unless
real code changes are also committed based on our practice, so I don't
think we should reverse that decision.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 3:41 ` Eli Zaretskii
@ 2016-12-29 12:04 ` Tino Calancha
2016-12-29 16:15 ` Eli Zaretskii
2016-12-30 0:09 ` Richard Stallman
0 siblings, 2 replies; 45+ messages in thread
From: Tino Calancha @ 2016-12-29 12:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: jwiegley, czipperz, rms, emacs-devel
On Thu, 29 Dec 2016, Eli Zaretskii wrote:
>> A single change which affects only whitespace
>> won't cause any confusion no matter how many places that whitespace
>> is changed.
>
> It makes digging into code history harder, especially when files are
> also renamed later.
>
> We arrived at the current convention of not doing such changes unless
> real code changes are also committed based on our practice, so I don't
> think we should reverse that decision.
Is just a voluntary convention? Is is prefered or discouraged?
If the former, then we might encourage it adding some instructions
in CONTRIBUTE about when/how do this thing.
When i am changing a function which uses tabs for indentation, i
think that is a good opportunity to change such func. to use white
spaces instead. The reason why i don't do it by default in any commit
is the lack of official instructions on this subject.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 12:04 ` Tino Calancha
@ 2016-12-29 16:15 ` Eli Zaretskii
2016-12-30 0:09 ` Richard Stallman
1 sibling, 0 replies; 45+ messages in thread
From: Eli Zaretskii @ 2016-12-29 16:15 UTC (permalink / raw)
To: Tino Calancha; +Cc: jwiegley, czipperz, rms, emacs-devel
> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Thu, 29 Dec 2016 21:04:13 +0900 (JST)
> cc: rms@gnu.org, jwiegley@gmail.com, czipperz@gmail.com, emacs-devel@gnu.org
>
> > We arrived at the current convention of not doing such changes unless
> > real code changes are also committed based on our practice, so I don't
> > think we should reverse that decision.
> Is just a voluntary convention? Is is prefered or discouraged?
I think you will generally get responses such as you've seen for any
patch suggestion that only changes whitespace.
> If the former, then we might encourage it adding some instructions
> in CONTRIBUTE about when/how do this thing.
It probably should be in CONTRIBUTE, yes. I think the reason it isn't
is that this issue doesn't pop up too frequently.
> When i am changing a function which uses tabs for indentation, i
> think that is a good opportunity to change such func. to use white
> spaces instead.
That is a separate issue: whether C sources should use the default
TABs and SPACEs indentation or just SPACEs. I think we agreed to
disagree about that, and that's why .dir-locals.el doesn't say
anything about the C mode, so that everyone could use the settings
they have in their .emacs.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 12:04 ` Tino Calancha
2016-12-29 16:15 ` Eli Zaretskii
@ 2016-12-30 0:09 ` Richard Stallman
2016-12-30 8:21 ` Eli Zaretskii
1 sibling, 1 reply; 45+ messages in thread
From: Richard Stallman @ 2016-12-30 0:09 UTC (permalink / raw)
To: Tino Calancha; +Cc: jwiegley, eliz, czipperz, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> When i am changing a function which uses tabs for indentation, i
> think that is a good opportunity to change such func. to use white
> spaces instead.
I prefer tabs, myself, but in regard to when to install whitespace
changes, I came to the conclusion that it was useful to install them
SEPARATELY. (Likewise, other changes that don't affect code, such as
comment changes.)
If they are in separate check-ins, it is easy to ignore those check-ins
and look at the ones that make substantive changes.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-30 0:09 ` Richard Stallman
@ 2016-12-30 8:21 ` Eli Zaretskii
0 siblings, 0 replies; 45+ messages in thread
From: Eli Zaretskii @ 2016-12-30 8:21 UTC (permalink / raw)
To: rms; +Cc: jwiegley, emacs-devel, czipperz, tino.calancha
> From: Richard Stallman <rms@gnu.org>
> CC: eliz@gnu.org, jwiegley@gmail.com, czipperz@gmail.com,
> emacs-devel@gnu.org
> Date: Thu, 29 Dec 2016 19:09:55 -0500
>
> If they are in separate check-ins, it is easy to ignore those check-ins
> and look at the ones that make substantive changes.
Modern tools for digging into code history make the job harder, not
easier, when such changes are made separately, because these changes
mask the true author and date of real changes. This is especially
problematic when "git log -L" and its variants are unable to do the
job, because of file renaming or code that was moved from one function
to another or from one file to another.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
2016-12-29 1:36 ` Richard Stallman
2016-12-29 3:41 ` Eli Zaretskii
@ 2016-12-29 14:39 ` Stefan Monnier
1 sibling, 0 replies; 45+ messages in thread
From: Stefan Monnier @ 2016-12-29 14:39 UTC (permalink / raw)
To: emacs-devel
> One can argue about whether it was worth time to make the changes, but
> since that has been done already, why not put it in?
Because it's a pain in the rear to sync that change with all the
branches we have (and there are more than those in emacs.git).
Stefan "already annoyed by the recent lisp.h re-ordering"
^ permalink raw reply [flat|nested] 45+ messages in thread
* Reformat all of src/
2016-12-28 0:59 Reformat all of src/ Chris Gregory
2016-12-28 3:43 ` Stefan Monnier
2016-12-28 4:45 ` John Wiegley
@ 2016-12-28 10:27 ` hector
2 siblings, 0 replies; 45+ messages in thread
From: hector @ 2016-12-28 10:27 UTC (permalink / raw)
To: emacs-devel
On Tue, Dec 27, 2016 at 06:59:59PM -0600, Chris Gregory wrote:
> I found it irritating that there was inconsistent usage of tabs and
> spaces at the beginning of lines.
Consistency is an important thing. Even with little details. And not
only in programming.
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: Reformat all of src/
@ 2016-12-29 2:08 Chris Gregory
2016-12-29 3:38 ` Eli Zaretskii
0 siblings, 1 reply; 45+ messages in thread
From: Chris Gregory @ 2016-12-29 2:08 UTC (permalink / raw)
Just so you know, if you use `git blame -w' or `git diff -w' it ignores
white space changes.
--
Chris Gregory
^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2017-01-01 1:14 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-28 0:59 Reformat all of src/ Chris Gregory
2016-12-28 3:43 ` Stefan Monnier
2016-12-28 4:45 ` John Wiegley
2016-12-28 4:52 ` Chris Gregory
2016-12-28 5:01 ` Chris Gregory
2016-12-28 12:58 ` Phillip Lord
2016-12-28 15:35 ` John Yates
2016-12-28 15:39 ` Lars Ingebrigtsen
2016-12-28 16:01 ` John Yates
2016-12-28 16:27 ` Lars Ingebrigtsen
2016-12-28 16:17 ` Phillip Lord
2016-12-28 17:19 ` Stefan Monnier
2016-12-28 17:35 ` Phillip Lord
2016-12-28 17:52 ` Stefan Monnier
2016-12-28 17:59 ` Eli Zaretskii
2016-12-28 16:32 ` Yuri Khan
2016-12-28 16:37 ` Lars Ingebrigtsen
2016-12-28 16:56 ` Yuri Khan
2016-12-28 16:59 ` John Wiegley
2016-12-28 17:12 ` Yuri Khan
2016-12-28 17:20 ` Phillip Lord
2016-12-28 18:38 ` Paul Eggert
2016-12-29 1:10 ` Dmitry Gutov
2016-12-29 5:53 ` Paul Eggert
2016-12-29 11:28 ` Dmitry Gutov
2016-12-30 1:07 ` Paul Eggert
2016-12-30 10:34 ` Phillip Lord
2017-01-01 1:14 ` Dmitry Gutov
2016-12-29 13:18 ` Phillip Lord
2016-12-29 16:17 ` Eli Zaretskii
2016-12-29 17:18 ` John Covici
2016-12-29 17:19 ` John Covici
2016-12-30 10:30 ` Phillip Lord
2016-12-28 17:23 ` John Yates
2016-12-31 10:23 ` Philippe Vaucher
2016-12-29 1:36 ` Richard Stallman
2016-12-29 3:41 ` Eli Zaretskii
2016-12-29 12:04 ` Tino Calancha
2016-12-29 16:15 ` Eli Zaretskii
2016-12-30 0:09 ` Richard Stallman
2016-12-30 8:21 ` Eli Zaretskii
2016-12-29 14:39 ` Stefan Monnier
2016-12-28 10:27 ` hector
-- strict thread matches above, loose matches on Subject: below --
2016-12-29 2:08 Chris Gregory
2016-12-29 3:38 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).