int last_per_buffer_idx;
EXFUN (Fset_buffer, 1);
-void set_buffer_internal (struct buffer *b);
-void set_buffer_internal_1 (struct buffer *b);
static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
int after, Lisp_Object arg1,
Lisp_Object arg2, Lisp_Object arg3);
Lisp_Object Qoverlayp;
-Lisp_Object Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string;
+Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string;
Lisp_Object Qmodification_hooks;
Lisp_Object Qinsert_in_front_hooks;
static void modify_overlay (struct buffer *, EMACS_INT, EMACS_INT);
static Lisp_Object buffer_lisp_local_variables (struct buffer *);
-extern char * emacs_strerror (int);
-
/* For debugging; temporary. See set_buffer_internal. */
/* Lisp_Object Qlisp_mode, Vcheck_symbol; */
void
-nsberror (spec)
- Lisp_Object spec;
+nsberror (Lisp_Object spec)
{
if (STRINGP (spec))
error ("No buffer named %s", SDATA (spec));
DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0,
doc: /* Return non-nil if OBJECT is a buffer which has not been killed.
Value is nil if OBJECT is not a buffer or if it has been killed. */)
- (object)
- Lisp_Object object;
+ (Lisp_Object object)
{
return ((BUFFERP (object) && ! NILP (XBUFFER (object)->name))
? Qt : Qnil);
If the optional arg FRAME is a frame, we return the buffer list
in the proper order for that frame: the buffers in FRAME's `buffer-list'
frame parameter come first, followed by the rest of the buffers. */)
- (frame)
- Lisp_Object frame;
+ (Lisp_Object frame)
{
Lisp_Object general;
general = Fmapcar (Qcdr, Vbuffer_alist);
and don't ever QUIT. */
static Lisp_Object
-assoc_ignore_text_properties (key, list)
- register Lisp_Object key;
- Lisp_Object list;
+assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list)
{
register Lisp_Object tail;
for (tail = list; CONSP (tail); tail = XCDR (tail))
BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME
is a string and there is no buffer with that name, return nil. If
BUFFER-OR-NAME is a buffer, return it as given. */)
- (buffer_or_name)
- register Lisp_Object buffer_or_name;
+ (register Lisp_Object buffer_or_name)
{
if (BUFFERP (buffer_or_name))
return buffer_or_name;
The buffer's `buffer-file-name' must match exactly the expansion of FILENAME.
If there is no such live buffer, return nil.
See also `find-buffer-visiting'. */)
- (filename)
- register Lisp_Object filename;
+ (register Lisp_Object filename)
{
register Lisp_Object tail, buf, tem;
Lisp_Object handler;
}
Lisp_Object
-get_truename_buffer (filename)
- register Lisp_Object filename;
+get_truename_buffer (register Lisp_Object filename)
{
register Lisp_Object tail, buf, tem;
If BUFFER-OR-NAME is a buffer instead of a string, return it as given,
even if it is dead. The return value is never nil. */)
- (buffer_or_name)
- register Lisp_Object buffer_or_name;
+ (register Lisp_Object buffer_or_name)
{
register Lisp_Object buffer, name;
register struct buffer *b;
LIST, but for buffer B. */
static struct Lisp_Overlay *
-copy_overlays (b, list)
- struct buffer *b;
- struct Lisp_Overlay *list;
+copy_overlays (struct buffer *b, struct Lisp_Overlay *list)
{
Lisp_Object buffer;
struct Lisp_Overlay *result = NULL, *tail = NULL;
copied. */
static void
-clone_per_buffer_values (from, to)
- struct buffer *from, *to;
+clone_per_buffer_values (struct buffer *from, struct buffer *to)
{
Lisp_Object to_buffer;
int offset;
PER_BUFFER_VALUE (to, offset) = obj;
}
- bcopy (from->local_flags, to->local_flags, sizeof to->local_flags);
+ memcpy (to->local_flags, from->local_flags, sizeof to->local_flags);
to->overlays_before = copy_overlays (to, from->overlays_before);
to->overlays_after = copy_overlays (to, from->overlays_after);
Optional argument CLONE non-nil means preserve BASE-BUFFER's state,
such as major and minor modes, in the indirect buffer.
CLONE nil means the indirect buffer's state is reset to default values. */)
- (base_buffer, name, clone)
- Lisp_Object base_buffer, name, clone;
+ (Lisp_Object base_buffer, Lisp_Object name, Lisp_Object clone)
{
Lisp_Object buf, tem;
struct buffer *b;
}
void
-delete_all_overlays (b)
- struct buffer *b;
+delete_all_overlays (struct buffer *b)
{
Lisp_Object overlay;
claims it doesn't belong to it. */
void
-reset_buffer (b)
- register struct buffer *b;
+reset_buffer (register struct buffer *b)
{
b->filename = Qnil;
b->file_truename = Qnil;
we preserve those. */
static void
-reset_buffer_local_variables (b, permanent_too)
- register struct buffer *b;
- int permanent_too;
+reset_buffer_local_variables (register struct buffer *b, int permanent_too)
{
register int offset;
int i;
\(starting at 2) until an unused name is found, and then return that name.
Optional second argument IGNORE specifies a name that is okay to use (if
it is in the sequence to be tried) even if a buffer with that name exists. */)
- (name, ignore)
- register Lisp_Object name, ignore;
+ (register Lisp_Object name, Lisp_Object ignore)
{
register Lisp_Object gentemp, tem;
int count;
doc: /* Return the name of BUFFER, as a string.
BUFFER defaults to the current buffer.
Return nil if BUFFER has been killed. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
if (NILP (buffer))
return current_buffer->name;
DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
doc: /* Return name of file BUFFER is visiting, or nil if none.
No argument or nil as argument means use the current buffer. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
if (NILP (buffer))
return current_buffer->filename;
doc: /* Return the base buffer of indirect buffer BUFFER.
If BUFFER is not indirect, return nil.
BUFFER defaults to the current buffer. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
struct buffer *base;
Lisp_Object base_buffer;
doc: /* Return the value of VARIABLE in BUFFER.
If VARIABLE does not have a buffer-local binding in BUFFER, the value
is the default binding of the variable. */)
- (variable, buffer)
- register Lisp_Object variable;
- register Lisp_Object buffer;
+ (register Lisp_Object variable, register Lisp_Object buffer)
{
register struct buffer *buf;
register Lisp_Object result;
in special slots in the buffer object. */
static Lisp_Object
-buffer_lisp_local_variables (buf)
- struct buffer *buf;
+buffer_lisp_local_variables (struct buffer *buf)
{
Lisp_Object result = Qnil;
register Lisp_Object tail;
For a symbol that is locally unbound, just the symbol appears in the value.
Note that storing new VALUEs in these elements doesn't change the variables.
No argument or nil as argument means use current buffer as BUFFER. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
register struct buffer *buf;
register Lisp_Object result;
0, 1, 0,
doc: /* Return t if BUFFER was modified since its file was last read or saved.
No argument or nil as argument means use current buffer as BUFFER. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
register struct buffer *buf;
if (NILP (buffer))
1, 1, 0,
doc: /* Mark current buffer as modified or unmodified according to FLAG.
A non-nil FLAG means mark the buffer modified. */)
- (flag)
- register Lisp_Object flag;
+ (register Lisp_Object flag)
{
register int already;
register Lisp_Object fn;
doc: /* Like `set-buffer-modified-p', with a difference concerning redisplay.
It is not ensured that mode lines will be updated to show the modified
state of the current buffer. Use with care. */)
- (flag)
- Lisp_Object flag;
+ (Lisp_Object flag)
{
#ifdef CLASH_DETECTION
Lisp_Object fn;
Each buffer has a tick counter which is incremented each time the
text in that buffer is changed. It wraps around occasionally.
No argument or nil as argument means use current buffer as BUFFER. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
register struct buffer *buf;
if (NILP (buffer))
you can tell whether a character change occurred in that buffer in
between these calls. No argument or nil as argument means use current
buffer as BUFFER. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
register struct buffer *buf;
if (NILP (buffer))
Interactively, you can set UNIQUE with a prefix argument.
We return the name we actually gave the buffer.
This does not change the name of the visited file (if any). */)
- (newname, unique)
- register Lisp_Object newname, unique;
+ (register Lisp_Object newname, Lisp_Object unique)
{
register Lisp_Object tem, buf;
buffer list instead of the selected frame's buffer list.
If no other buffer exists, the buffer `*scratch*' is returned.
If BUFFER is omitted or nil, some interesting buffer is returned. */)
- (buffer, visible_ok, frame)
- register Lisp_Object buffer, visible_ok, frame;
+ (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame)
{
- Lisp_Object Fset_buffer_major_mode ();
+ Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer);
register Lisp_Object tail, buf, notsogood, tem, pred, add_ons;
notsogood = Qnil;
0, 1, "",
doc: /* Start keeping undo information for buffer BUFFER.
No argument or nil as argument means do this for the current buffer. */)
- (buffer)
- register Lisp_Object buffer;
+ (register Lisp_Object buffer)
{
Lisp_Object real_buffer;
Any processes that have this buffer as the `process-buffer' are killed
with SIGHUP. */)
- (buffer_or_name)
- Lisp_Object buffer_or_name;
+ (Lisp_Object buffer_or_name)
{
Lisp_Object buffer;
register struct buffer *b;
means that other_buffer is more likely to choose a relevant buffer. */
void
-record_buffer (buf)
- Lisp_Object buf;
+record_buffer (Lisp_Object buf)
{
register Lisp_Object link, prev;
Lisp_Object frame;
according to `default-major-mode'.
Use this function before selecting the buffer, since it may need to inspect
the current buffer's major mode. */)
- (buffer)
- Lisp_Object buffer;
+ (Lisp_Object buffer)
{
int count;
Lisp_Object function;
If NORECORD is non-nil, don't call record_buffer. */
Lisp_Object
-switch_to_buffer_1 (buffer_or_name, norecord)
- Lisp_Object buffer_or_name, norecord;
+switch_to_buffer_1 (Lisp_Object buffer_or_name, Lisp_Object norecord)
{
register Lisp_Object buffer;
WARNING: This is NOT the way to work on another buffer temporarily
within a Lisp program! Use `set-buffer' instead. That avoids
messing with the window-buffer correspondences. */)
- (buffer_or_name, norecord)
- Lisp_Object buffer_or_name, norecord;
+ (Lisp_Object buffer_or_name, Lisp_Object norecord)
{
if (EQ (buffer_or_name, Fwindow_buffer (selected_window)))
{
DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0,
doc: /* Return the current buffer as a Lisp object. */)
- ()
+ (void)
{
register Lisp_Object buf;
XSETBUFFER (buf, current_buffer);
time, and that increments windows_or_buffers_changed. */
void
-set_buffer_internal (b)
- register struct buffer *b;
+set_buffer_internal (register struct buffer *b)
{
if (current_buffer != b)
set_buffer_internal_1 (b);
This is used by redisplay. */
void
-set_buffer_internal_1 (b)
- register struct buffer *b;
+set_buffer_internal_1 (register struct buffer *b)
{
register struct buffer *old_buf;
register Lisp_Object tail;
This avoids certain things that don't need to be done within redisplay. */
void
-set_buffer_temp (b)
- struct buffer *b;
+set_buffer_temp (struct buffer *b)
{
register struct buffer *old_buf;
temporarily. This function does not display the buffer, so its effect
ends when the current command terminates. Use `switch-to-buffer' or
`pop-to-buffer' to switch buffers permanently. */)
- (buffer_or_name)
- register Lisp_Object buffer_or_name;
+ (register Lisp_Object buffer_or_name)
{
register Lisp_Object buffer;
buffer = Fget_buffer (buffer_or_name);
/* Set the current buffer to BUFFER provided it is alive. */
Lisp_Object
-set_buffer_if_live (buffer)
- Lisp_Object buffer;
+set_buffer_if_live (Lisp_Object buffer)
{
if (! NILP (XBUFFER (buffer)->name))
Fset_buffer (buffer);
DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
Sbarf_if_buffer_read_only, 0, 0, 0,
doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */)
- ()
+ (void)
{
if (!NILP (current_buffer->read_only)
&& NILP (Vinhibit_read_only))
window is dedicated to its buffer, delete that window if there are other
windows on the same frame. If the selected window is the only window on
its frame, iconify that frame. */)
- (buffer_or_name)
- register Lisp_Object buffer_or_name;
+ (register Lisp_Object buffer_or_name)
{
Lisp_Object buffer;
doc: /* Delete the entire contents of the current buffer.
Any narrowing restriction in effect (see `narrow-to-region') is removed,
so the buffer is truly empty after this. */)
- ()
+ (void)
{
Fwiden ();
}
void
-validate_region (b, e)
- register Lisp_Object *b, *e;
+validate_region (register Lisp_Object *b, register Lisp_Object *e)
{
CHECK_NUMBER_COERCE_MARKER (*b);
CHECK_NUMBER_COERCE_MARKER (*e);
and return the adjusted position. */
static int
-advance_to_char_boundary (byte_pos)
- int byte_pos;
+advance_to_char_boundary (int byte_pos)
{
int c;
DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
1, 1, 0,
doc: /* Swap the text between current buffer and BUFFER. */)
- (buffer)
- Lisp_Object buffer;
+ (Lisp_Object buffer)
{
struct buffer *other_buffer;
CHECK_BUFFER (buffer);
all eight-bit bytes to eight-bit characters.
If the multibyte flag was really changed, undo information of the
current buffer is cleared. */)
- (flag)
- Lisp_Object flag;
+ (Lisp_Object flag)
{
struct Lisp_Marker *tail, *markers;
struct buffer *other;
{
c = STRING_CHAR_AND_LENGTH (p, bytes);
/* Delete all bytes for this 8-bit character but the
- last one, and change the last one to the charcter
+ last one, and change the last one to the character
code. */
bytes--;
del_range_2 (pos, pos, pos + bytes, pos + bytes, 0);
if (!EQ (old_undo, Qt))
{
/* Represent all the above changes by a special undo entry. */
- extern Lisp_Object Qapply;
current_buffer->undo_list = Fcons (list3 (Qapply,
intern ("set-buffer-multibyte"),
NILP (flag) ? Qt : Qnil),
if (!modified_p && !NILP (Fbuffer_modified_p (Qnil)))
Fset_buffer_modified_p (Qnil);
-#ifdef subprocesses
/* Update coding systems of this buffer's process (if any). */
{
Lisp_Object process;
if (PROCESSP (process))
setup_process_coding_systems (process);
}
-#endif /* subprocesses */
return flag;
}
The first thing this function does is run
the normal hook `change-major-mode-hook'. */)
- ()
+ (void)
{
if (!NILP (Vrun_hooks))
call1 (Vrun_hooks, Qchange_major_mode_hook);
for their current values. */
static void
-swap_out_buffer_local_variables (b)
- struct buffer *b;
+swap_out_buffer_local_variables (struct buffer *b)
{
Lisp_Object oalist, alist, buffer;
default (BEGV or ZV). */
int
-overlays_at (pos, extend, vec_ptr, len_ptr, next_ptr, prev_ptr, change_req)
- EMACS_INT pos;
- int extend;
- Lisp_Object **vec_ptr;
- int *len_ptr;
- EMACS_INT *next_ptr;
- EMACS_INT *prev_ptr;
- int change_req;
+overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr,
+ EMACS_INT *next_ptr, EMACS_INT *prev_ptr, int change_req)
{
Lisp_Object overlay, start, end;
struct Lisp_Overlay *tail;
But we still return the total number of overlays. */
static int
-overlays_in (beg, end, extend, vec_ptr, len_ptr, next_ptr, prev_ptr)
- int beg, end;
- int extend;
- Lisp_Object **vec_ptr;
- int *len_ptr;
- int *next_ptr;
- int *prev_ptr;
+overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr,
+ int *next_ptr, int *prev_ptr)
{
Lisp_Object overlay, ostart, oend;
struct Lisp_Overlay *tail;
`mouse-face' property overlapping OVERLAY. */
int
-mouse_face_overlay_overlaps (overlay)
- Lisp_Object overlay;
+mouse_face_overlay_overlaps (Lisp_Object overlay)
{
int start = OVERLAY_POSITION (OVERLAY_START (overlay));
int end = OVERLAY_POSITION (OVERLAY_END (overlay));
\f
/* Fast function to just test if we're at an overlay boundary. */
int
-overlay_touches_p (pos)
- int pos;
+overlay_touches_p (int pos)
{
Lisp_Object overlay;
struct Lisp_Overlay *tail;
};
static int
-compare_overlays (v1, v2)
- const void *v1, *v2;
+compare_overlays (const void *v1, const void *v2)
{
const struct sortvec *s1 = (const struct sortvec *) v1;
const struct sortvec *s2 = (const struct sortvec *) v2;
The return value is the new size; this may be smaller than the original
size if some of the overlays were invalid or were window-specific. */
int
-sort_overlays (overlay_vec, noverlays, w)
- Lisp_Object *overlay_vec;
- int noverlays;
- struct window *w;
+sort_overlays (Lisp_Object *overlay_vec, int noverlays, struct window *w)
{
int i, j;
struct sortvec *sortvec;
/* A comparison function suitable for passing to qsort. */
static int
-cmp_for_strings (as1, as2)
- char *as1, *as2;
+cmp_for_strings (const void *as1, const void *as2)
{
struct sortstr *s1 = (struct sortstr *)as1;
struct sortstr *s2 = (struct sortstr *)as2;
}
static void
-record_overlay_string (ssl, str, str2, pri, size)
- struct sortstrlist *ssl;
- Lisp_Object str, str2, pri;
- int size;
+record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size)
{
int nbytes;
subsequent calls. */
int
-overlay_strings (pos, w, pstr)
- EMACS_INT pos;
- struct window *w;
- unsigned char **pstr;
+overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
{
Lisp_Object overlay, window, str;
struct Lisp_Overlay *ov;
/* Shift overlays in BUF's overlay lists, to center the lists at POS. */
void
-recenter_overlay_lists (buf, pos)
- struct buffer *buf;
- EMACS_INT pos;
+recenter_overlay_lists (struct buffer *buf, EMACS_INT pos)
{
Lisp_Object overlay, beg, end;
struct Lisp_Overlay *prev, *tail, *next;
}
void
-adjust_overlays_for_insert (pos, length)
- EMACS_INT pos;
- EMACS_INT length;
+adjust_overlays_for_insert (EMACS_INT pos, EMACS_INT length)
{
/* After an insertion, the lists are still sorted properly,
but we may need to update the value of the overlay center. */
}
void
-adjust_overlays_for_delete (pos, length)
- EMACS_INT pos;
- EMACS_INT length;
+adjust_overlays_for_delete (EMACS_INT pos, EMACS_INT length)
{
if (current_buffer->overlay_center < pos)
/* The deletion was to our right. No change needed; the before- and
Such an overlay might even have negative size at this point.
If so, we'll make the overlay empty. */
void
-fix_start_end_in_overlays (start, end)
- register int start, end;
+fix_start_end_in_overlays (register int start, register int end)
{
Lisp_Object overlay;
struct Lisp_Overlay *before_list, *after_list;
was at PREV, and now is at POS. */
void
-fix_overlays_before (bp, prev, pos)
- struct buffer *bp;
- EMACS_INT prev, pos;
+fix_overlays_before (struct buffer *bp, EMACS_INT prev, EMACS_INT pos)
{
/* If parent is nil, replace overlays_before; otherwise, parent->next. */
struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair;
\f
DEFUN ("overlayp", Foverlayp, Soverlayp, 1, 1, 0,
doc: /* Return t if OBJECT is an overlay. */)
- (object)
- Lisp_Object object;
+ (Lisp_Object object)
{
return (OVERLAYP (object) ? Qt : Qnil);
}
The fifth arg REAR-ADVANCE, if non-nil, makes the marker
for the rear of the overlay advance when text is inserted there
\(which means the text *is* included in the overlay). */)
- (beg, end, buffer, front_advance, rear_advance)
- Lisp_Object beg, end, buffer;
- Lisp_Object front_advance, rear_advance;
+ (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance)
{
Lisp_Object overlay;
struct buffer *b;
/* Mark a section of BUF as needing redisplay because of overlays changes. */
static void
-modify_overlay (buf, start, end)
- struct buffer *buf;
- EMACS_INT start, end;
+modify_overlay (struct buffer *buf, EMACS_INT start, EMACS_INT end)
{
if (start > end)
{
}
\f
-Lisp_Object Fdelete_overlay ();
+Lisp_Object Fdelete_overlay (Lisp_Object overlay);
static struct Lisp_Overlay *
-unchain_overlay (list, overlay)
- struct Lisp_Overlay *list, *overlay;
+unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay)
{
struct Lisp_Overlay *tmp, *prev;
for (tmp = list, prev = NULL; tmp; prev = tmp, tmp = tmp->next)
If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.
If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current
buffer. */)
- (overlay, beg, end, buffer)
- Lisp_Object overlay, beg, end, buffer;
+ (Lisp_Object overlay, Lisp_Object beg, Lisp_Object end, Lisp_Object buffer)
{
struct buffer *b, *ob;
Lisp_Object obuffer;
DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0,
doc: /* Delete the overlay OVERLAY from its buffer. */)
- (overlay)
- Lisp_Object overlay;
+ (Lisp_Object overlay)
{
Lisp_Object buffer;
struct buffer *b;
DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0,
doc: /* Return the position at which OVERLAY starts. */)
- (overlay)
- Lisp_Object overlay;
+ (Lisp_Object overlay)
{
CHECK_OVERLAY (overlay);
DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0,
doc: /* Return the position at which OVERLAY ends. */)
- (overlay)
- Lisp_Object overlay;
+ (Lisp_Object overlay)
{
CHECK_OVERLAY (overlay);
DEFUN ("overlay-buffer", Foverlay_buffer, Soverlay_buffer, 1, 1, 0,
doc: /* Return the buffer OVERLAY belongs to.
Return nil if OVERLAY has been deleted. */)
- (overlay)
- Lisp_Object overlay;
+ (Lisp_Object overlay)
{
CHECK_OVERLAY (overlay);
doc: /* Return a list of the properties on OVERLAY.
This is a copy of OVERLAY's plist; modifying its conses has no effect on
OVERLAY. */)
- (overlay)
- Lisp_Object overlay;
+ (Lisp_Object overlay)
{
CHECK_OVERLAY (overlay);
\f
DEFUN ("overlays-at", Foverlays_at, Soverlays_at, 1, 1, 0,
doc: /* Return a list of the overlays that contain the character at POS. */)
- (pos)
- Lisp_Object pos;
+ (Lisp_Object pos)
{
int noverlays;
Lisp_Object *overlay_vec;
Empty overlays are included in the result if they are located at BEG,
between BEG and END, or at END provided END denotes the position at the
end of the buffer. */)
- (beg, end)
- Lisp_Object beg, end;
+ (Lisp_Object beg, Lisp_Object end)
{
int noverlays;
Lisp_Object *overlay_vec;
doc: /* Return the next position after POS where an overlay starts or ends.
If there are no overlay boundaries from POS to (point-max),
the value is (point-max). */)
- (pos)
- Lisp_Object pos;
+ (Lisp_Object pos)
{
int noverlays;
EMACS_INT endpos;
doc: /* Return the previous position before POS where an overlay starts or ends.
If there are no overlay boundaries from (point-min) to POS,
the value is (point-min). */)
- (pos)
- Lisp_Object pos;
+ (Lisp_Object pos)
{
int noverlays;
EMACS_INT prevpos;
Recentering overlays moves overlays between these lists.
The lists you get are copies, so that changing them has no effect.
However, the overlays you get are the real objects that the buffer uses. */)
- ()
+ (void)
{
struct Lisp_Overlay *ol;
Lisp_Object before = Qnil, after = Qnil, tmp;
doc: /* Recenter the overlays of the current buffer around position POS.
That makes overlay lookup faster for positions near POS (but perhaps slower
for positions far away from POS). */)
- (pos)
- Lisp_Object pos;
+ (Lisp_Object pos)
{
CHECK_NUMBER_COERCE_MARKER (pos);
\f
DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0,
doc: /* Get the property of overlay OVERLAY with property name PROP. */)
- (overlay, prop)
- Lisp_Object overlay, prop;
+ (Lisp_Object overlay, Lisp_Object prop)
{
CHECK_OVERLAY (overlay);
return lookup_char_property (XOVERLAY (overlay)->plist, prop, 0);
DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0,
doc: /* Set one property of overlay OVERLAY: give property PROP value VALUE. */)
- (overlay, prop, value)
- Lisp_Object overlay, prop, value;
+ (Lisp_Object overlay, Lisp_Object prop, Lisp_Object value)
{
Lisp_Object tail, buffer;
int changed;
to the end of last_overlay_modification_hooks. */
static void
-add_overlay_mod_hooklist (functionlist, overlay)
- Lisp_Object functionlist, overlay;
+add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay)
{
int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
and the length of deleted or replaced old text. */
void
-report_overlay_modification (start, end, after, arg1, arg2, arg3)
- Lisp_Object start, end;
- int after;
- Lisp_Object arg1, arg2, arg3;
+report_overlay_modification (Lisp_Object start, Lisp_Object end, int after,
+ Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
{
Lisp_Object prop, overlay;
struct Lisp_Overlay *tail;
Lisp_Object *copy = (Lisp_Object *) alloca (size * sizeof (Lisp_Object));
int i;
- bcopy (XVECTOR (last_overlay_modification_hooks)->contents,
- copy, size * sizeof (Lisp_Object));
+ memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
+ size * sizeof (Lisp_Object));
gcpro1.var = copy;
gcpro1.nvars = size;
}
static void
-call_overlay_mod_hooks (list, overlay, after, arg1, arg2, arg3)
- Lisp_Object list, overlay;
- int after;
- Lisp_Object arg1, arg2, arg3;
+call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after,
+ Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
{
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
/* Delete any zero-sized overlays at position POS, if the `evaporate'
property is set. */
void
-evaporate_overlays (pos)
- EMACS_INT pos;
+evaporate_overlays (EMACS_INT pos)
{
Lisp_Object overlay, hit_list;
struct Lisp_Overlay *tail;
in the slot with offset OFFSET. */
void
-buffer_slot_type_mismatch (newval, type)
- Lisp_Object newval;
- int type;
+buffer_slot_type_mismatch (Lisp_Object newval, int type)
{
Lisp_Object predicate;
}
else if (mmap_alloc (var, nbytes))
{
- bcopy (old_ptr, *var, r->nbytes_specified);
+ memcpy (*var, old_ptr, r->nbytes_specified);
mmap_free_1 (MMAP_REGION (old_ptr));
result = *var;
r = MMAP_REGION (result);
/* Allocate NBYTES bytes for buffer B's text buffer. */
static void
-alloc_buffer_text (b, nbytes)
- struct buffer *b;
- size_t nbytes;
+alloc_buffer_text (struct buffer *b, size_t nbytes)
{
POINTER_TYPE *p;
/* Free buffer B's text buffer. */
static void
-free_buffer_text (b)
- struct buffer *b;
+free_buffer_text (struct buffer *b)
{
BLOCK_INPUT;
***********************************************************************/
void
-init_buffer_once ()
+init_buffer_once (void)
{
int idx;
- bzero (buffer_permanent_local_flags, sizeof buffer_permanent_local_flags);
+ memset (buffer_permanent_local_flags, 0, sizeof buffer_permanent_local_flags);
/* Make sure all markable slots in buffer_defaults
are initialized reasonably, so mark_buffer won't choke. */
if (sizeof (EMACS_INT) != sizeof (Lisp_Object)) abort ();
/* 0 means not a lisp var, -1 means always local, else mask */
- bzero (&buffer_local_flags, sizeof buffer_local_flags);
+ memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
XSETINT (buffer_local_flags.filename, -1);
XSETINT (buffer_local_flags.directory, -1);
XSETINT (buffer_local_flags.backed_up, -1);
}
void
-init_buffer ()
+init_buffer (void)
{
char *pwd;
Lisp_Object temp;
} while (0)
static void
-defvar_per_buffer (bo_fwd, namestring, address, type, doc)
- struct Lisp_Buffer_Objfwd *bo_fwd;
- char *namestring;
- Lisp_Object *address;
- Lisp_Object type;
- char *doc;
+defvar_per_buffer (struct Lisp_Buffer_Objfwd *bo_fwd, const char *namestring,
+ Lisp_Object *address, Lisp_Object type, char *doc)
{
struct Lisp_Symbol *sym;
int offset;
/* initialize the buffer routines */
void
-syms_of_buffer ()
+syms_of_buffer (void)
{
staticpro (&last_overlay_modification_hooks);
last_overlay_modification_hooks
staticpro (&Qget_file_buffer);
Qpriority = intern_c_string ("priority");
staticpro (&Qpriority);
- Qwindow = intern_c_string ("window");
- staticpro (&Qwindow);
Qbefore_string = intern_c_string ("before-string");
staticpro (&Qbefore_string);
Qafter_string = intern_c_string ("after-string");
INDICATOR specifies the logical indicator type which is one of the
following symbols: `truncation' , `continuation', `overlay-arrow',
-`top', `bottom', `up', `down', `one-line', `empty-line', or `unknown'.
+`top', `bottom', `top-bottom', `up', `down', empty-line', or `unknown'.
-BITMAPS is list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies
+BITMAPS is a list of symbols (LEFT RIGHT [LEFT1 RIGHT1]) which specifies
the actual bitmap shown in the left or right fringe for the logical
indicator. LEFT and RIGHT are the bitmaps shown in the left and/or
right fringe for the specific indicator. The LEFT1 or RIGHT1 bitmaps
-are used only for the `bottom' and `one-line' indicators when the last
-\(only) line in has no final newline. BITMAPS may also be a single
+are used only for the `bottom' and `top-bottom' indicators when the
+last (only) line has no final newline. BITMAPS may also be a single
symbol which is used in both left and right fringes. */);
DEFVAR_PER_BUFFER ("fringe-cursor-alist",
}
void
-keys_of_buffer ()
+keys_of_buffer (void)
{
initial_define_key (control_x_map, 'b', "switch-to-buffer");
initial_define_key (control_x_map, 'k', "kill-buffer");