X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/6c2ef893427b86cbbcadcb271bf9b45e68e4b72e..e0f24100c74828aadd926f0afa6e3440be8c89d0:/src/buffer.h diff --git a/src/buffer.h b/src/buffer.h index 930424b0b4..ed99dc4ffb 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1,12 +1,12 @@ /* Header file for the buffer manipulation primitives. - Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999, 2000, 01, 2003 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -16,8 +16,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ /* Accessing the parameters of the current buffer. */ @@ -82,6 +82,9 @@ Boston, MA 02111-1307, USA. */ /* Modification count. */ #define MODIFF (current_buffer->text->modiff) +/* Character modification count. */ +#define CHARS_MODIFF (current_buffer->text->chars_modiff) + /* Overlay modification count. */ #define OVERLAY_MODIFF (current_buffer->text->overlay_modiff) @@ -147,6 +150,9 @@ Boston, MA 02111-1307, USA. */ /* Modification count. */ #define BUF_MODIFF(buf) ((buf)->text->modiff) +/* Character modification count. */ +#define BUF_CHARS_MODIFF(buf) ((buf)->text->chars_modiff) + /* Modification count as of last visit or save. */ #define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff) @@ -406,6 +412,10 @@ struct buffer_text for this buffer. It is incremented for each such event, and never otherwise changed. */ + int chars_modiff; /* This is modified with character change + events for this buffer. It is set to + modiff for each such event, and never + otherwise changed. */ int save_modiff; /* Previous value of modiff, as of last time buffer visited or saved a file. */ @@ -551,7 +561,7 @@ struct buffer Lisp_Object filename; /* Dir for expanding relative file names. */ Lisp_Object directory; - /* True iff this buffer has been backed up (if you write to the + /* True if this buffer has been backed up (if you write to the visited file and it hasn't been backed up, then a backup will be made). */ /* This isn't really used by the C code, so could be deleted. */ @@ -666,6 +676,9 @@ struct buffer /* List of symbols naming the file format used for visited file. */ Lisp_Object file_format; + /* List of symbols naming the file format used for auto-save file. */ + Lisp_Object auto_save_file_format; + /* True if the newline position cache and width run cache are enabled. See search.c and indent.c. */ Lisp_Object cache_long_line_scans; @@ -733,6 +746,15 @@ struct buffer like vi). */ Lisp_Object indicate_empty_lines; + /* Non-nil means indicate buffer boundaries and scrolling. */ + Lisp_Object indicate_buffer_boundaries; + + /* Logical to physical fringe bitmap mappings. */ + Lisp_Object fringe_indicator_alist; + + /* Logical to physical cursor bitmap mappings. */ + Lisp_Object fringe_cursor_alist; + /* Time stamp updated each time this buffer is displayed in a window. */ Lisp_Object display_time; @@ -755,6 +777,11 @@ struct buffer /* An integer > 0 means put that number of pixels below text lines in the display of this buffer. */ Lisp_Object extra_line_spacing; + + /* *Cursor type to display in non-selected windows. + t means to use hollow box cursor. + See `cursor-type' for other values. */ + Lisp_Object cursor_in_non_selected_windows; }; @@ -816,15 +843,35 @@ extern void set_buffer_internal P_ ((struct buffer *)); extern void set_buffer_internal_1 P_ ((struct buffer *)); extern void set_buffer_temp P_ ((struct buffer *)); extern void record_buffer P_ ((Lisp_Object)); -extern void buffer_slot_type_mismatch P_ ((int)); +extern void buffer_slot_type_mismatch P_ ((int)) NO_RETURN; extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT)); extern void mmap_set_vars P_ ((int)); +/* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements. + If NEXTP is non-NULL, return next overlay there. + See overlay_at arg CHANGE_REQ for meaning of CHRQ arg. */ + +#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \ + do { \ + int maxlen = 40; \ + overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \ + noverlays = overlays_at (posn, 0, &overlays, &maxlen, \ + nextp, NULL, chrq); \ + if (noverlays > maxlen) \ + { \ + maxlen = noverlays; \ + overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \ + noverlays = overlays_at (posn, 0, &overlays, &maxlen, \ + nextp, NULL, chrq); \ + } \ + } while (0) + EXFUN (Fbuffer_name, 1); EXFUN (Fget_file_buffer, 1); EXFUN (Fnext_overlay_change, 1); EXFUN (Fdelete_overlay, 1); EXFUN (Fbuffer_local_value, 2); +EXFUN (Fgenerate_new_buffer_name, 2); /* Functions to call before and after each text change. */ extern Lisp_Object Vbefore_change_functions;