/* Buffer manipulation primitives for GNU Emacs.
-Copyright (C) 1985-1989, 1993-1995, 1997-2015 Free Software Foundation,
+Copyright (C) 1985-1989, 1993-1995, 1997-2016 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 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "lisp.h"
#include "intervals.h"
+#include "systime.h"
#include "window.h"
#include "commands.h"
#include "character.h"
#include "region-cache.h"
#include "indent.h"
#include "blockinput.h"
-#include "keyboard.h"
#include "keymap.h"
#include "frame.h"
+#include "xwidget.h"
#ifdef WINDOWSNT
#include "w32heap.h" /* for mmap_* */
If NAME begins with a space (i.e., a buffer that is not normally
visible to users), then if buffer NAME already exists a random number
is first appended to NAME, to speed up finding a non-existent buffer. */)
- (register Lisp_Object name, Lisp_Object ignore)
+ (Lisp_Object name, Lisp_Object ignore)
{
- register Lisp_Object gentemp, tem, tem2;
- ptrdiff_t count;
- char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"];
+ Lisp_Object genbase;
CHECK_STRING (name);
- tem = Fstring_equal (name, ignore);
- if (!NILP (tem))
- return name;
- tem = Fget_buffer (name);
- if (NILP (tem))
+ if (!NILP (Fstring_equal (name, ignore)) || NILP (Fget_buffer (name)))
return name;
- if (!strncmp (SSDATA (name), " ", 1)) /* see bug#1229 */
+ if (SREF (name, 0) != ' ') /* See bug#1229. */
+ genbase = name;
+ else
{
/* Note fileio.c:make_temp_name does random differently. */
- tem2 = concat2 (name, make_formatted_string
- (number, "-%"pI"d",
- XFASTINT (Frandom (make_number (999999)))));
- tem = Fget_buffer (tem2);
- if (NILP (tem))
- return tem2;
+ char number[sizeof "-999999"];
+ int i = XFASTINT (Frandom (make_number (999999)));
+ AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
+ genbase = concat2 (name, lnumber);
+ if (NILP (Fget_buffer (genbase)))
+ return genbase;
}
- else
- tem2 = name;
- count = 1;
- while (1)
+ for (ptrdiff_t count = 2; ; count++)
{
- gentemp = concat2 (tem2, make_formatted_string
- (number, "<%"pD"d>", ++count));
- tem = Fstring_equal (gentemp, ignore);
- if (!NILP (tem))
- return gentemp;
- tem = Fget_buffer (gentemp);
- if (NILP (tem))
+ char number[INT_BUFSIZE_BOUND (ptrdiff_t) + sizeof "<>"];
+ AUTO_STRING_WITH_LEN (lnumber, number,
+ sprintf (number, "<%"pD"d>", count));
+ Lisp_Object gentemp = concat2 (genbase, lnumber);
+ if (!NILP (Fstring_equal (gentemp, ignore))
+ || NILP (Fget_buffer (gentemp)))
return gentemp;
}
}
Sbuffer_chars_modified_tick, 0, 1, 0,
doc: /* Return BUFFER's character-change tick counter.
Each buffer has a character-change tick counter, which is set to the
-value of the buffer's tick counter \(see `buffer-modified-tick'), each
+value of the buffer's tick counter (see `buffer-modified-tick'), each
time text in that buffer is inserted or deleted. By comparing the
values returned by two individual calls of `buffer-chars-modified-tick',
you can tell whether a character change occurred in that buffer in
(Lisp_Object buffer_or_name)
{
Lisp_Object buffer;
- register struct buffer *b;
- register Lisp_Object tem;
- register struct Lisp_Marker *m;
- struct gcpro gcpro1;
+ struct buffer *b;
+ Lisp_Object tem;
+ struct Lisp_Marker *m;
if (NILP (buffer_or_name))
buffer = Fcurrent_buffer ();
if (INTERACTIVE && !NILP (BVAR (b, filename))
&& BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
{
- GCPRO1 (buffer);
AUTO_STRING (format, "Buffer %s modified; kill anyway? ");
tem = do_yes_or_no_p (CALLN (Fformat, format, BVAR (b, name)));
- UNGCPRO;
if (NILP (tem))
return unbind_to (count, Qnil);
}
{
struct buffer *other;
- GCPRO1 (buffer);
-
FOR_EACH_BUFFER (other)
if (other->base_buffer == b)
{
Fkill_buffer (buf);
}
- UNGCPRO;
-
/* Exit if we now have killed the base buffer (Bug#11665). */
if (!BUFFER_LIVE_P (b))
return Qt;
/* Unlock this buffer's file, if it is locked. */
unlock_buffer (b);
- GCPRO1 (buffer);
kill_buffer_processes (buffer);
- UNGCPRO;
+ kill_buffer_xwidgets (buffer);
/* Killing buffer processes may run sentinels which may have killed
our buffer. */
function = BVAR (current_buffer, major_mode);
}
- if (NILP (function) || EQ (function, Qfundamental_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. */
return Qnil;
count = SPECPDL_INDEX ();
/* To select a nonfundamental mode,
select the buffer temporarily and then call the mode function. */
- record_unwind_protect (save_excursion_restore, save_excursion_save ());
+ record_unwind_current_buffer ();
Fset_buffer (buffer);
call0 (function);
doc: /* Signal a `buffer-read-only' error if the current buffer is read-only.
If the text under POSITION (which defaults to point) has the
`inhibit-read-only' text property set, the error will not be raised. */)
- (Lisp_Object pos)
+ (Lisp_Object position)
{
- if (NILP (pos))
- XSETFASTINT (pos, PT);
+ if (NILP (position))
+ XSETFASTINT (position, PT);
else
- CHECK_NUMBER (pos);
+ CHECK_NUMBER (position);
if (!NILP (BVAR (current_buffer, read_only))
&& NILP (Vinhibit_read_only)
- && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil)))
+ && NILP (Fget_text_property (position, Qinhibit_read_only, Qnil)))
xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
return Qnil;
}
bool narrowed = (BEG != BEGV || Z != ZV);
bool modified_p = !NILP (Fbuffer_modified_p (Qnil));
Lisp_Object old_undo = BVAR (current_buffer, undo_list);
- struct gcpro gcpro1;
if (current_buffer->base_buffer)
error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
if (NILP (flag) == NILP (BVAR (current_buffer, enable_multibyte_characters)))
return flag;
- GCPRO1 (old_undo);
-
/* Don't record these buffer changes. We will put a special undo entry
instead. */
bset_undo_list (current_buffer, Qt);
old_undo));
}
- UNGCPRO;
-
current_buffer->prevent_redisplay_optimizations_p = 1;
/* If buffer is shown in a window, let redisplay consider other windows. */
else
nbytes = SBYTES (str);
- if (INT_ADD_OVERFLOW (ssl->bytes, nbytes))
+ if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes))
memory_full (SIZE_MAX);
- ssl->bytes += nbytes;
+ ssl->bytes = nbytes;
if (STRINGP (str2))
{
else
nbytes = SBYTES (str2);
- if (INT_ADD_OVERFLOW (ssl->bytes, nbytes))
+ if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes))
memory_full (SIZE_MAX);
- ssl->bytes += nbytes;
+ ssl->bytes = nbytes;
}
}
unsigned char *p;
ptrdiff_t total;
- if (INT_ADD_OVERFLOW (overlay_heads.bytes, overlay_tails.bytes))
+ if (INT_ADD_WRAPV (overlay_heads.bytes, overlay_tails.bytes, &total))
memory_full (SIZE_MAX);
- total = overlay_heads.bytes + overlay_tails.bytes;
if (total > overlay_str_len)
overlay_str_buf = xpalloc (overlay_str_buf, &overlay_str_len,
total - overlay_str_len, -1, 1);
fix_start_end_in_overlays (register ptrdiff_t start, register ptrdiff_t end)
{
Lisp_Object overlay;
- struct Lisp_Overlay *before_list IF_LINT (= NULL);
- struct Lisp_Overlay *after_list IF_LINT (= NULL);
+ struct Lisp_Overlay *before_list;
+ struct Lisp_Overlay *after_list;
/* These are either nil, indicating that before_list or after_list
should be assigned, or the cons cell the cdr of which should be
assigned. */
/* If parent is nil, replace overlays_before; otherwise, parent->next. */
struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair;
Lisp_Object tem;
- ptrdiff_t end IF_LINT (= 0);
+ ptrdiff_t end;
/* After the insertion, the several overlays may be in incorrect
order. The possibility is that, in the list `overlays_before',
struct buffer *b, *ob = 0;
Lisp_Object obuffer;
ptrdiff_t count = SPECPDL_INDEX ();
- ptrdiff_t n_beg, n_end, o_beg IF_LINT (= 0), o_end IF_LINT (= 0);
+ ptrdiff_t n_beg, n_end;
+ ptrdiff_t o_beg UNINIT, o_end UNINIT;
CHECK_OVERLAY (overlay);
if (NILP (buffer))
struct Lisp_Overlay *tail;
/* True if this change is an insertion. */
bool insertion = (after ? XFASTINT (arg3) == 0 : EQ (start, end));
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
overlay = Qnil;
tail = NULL;
}
}
- GCPRO4 (overlay, arg1, arg2, arg3);
{
/* Call the functions recorded in last_overlay_modification_hooks.
First copy the vector contents, in case some of these hooks
Lisp_Object *copy;
ptrdiff_t i;
+ if (size)
+ {
+ Lisp_Object ovl
+ = XVECTOR (last_overlay_modification_hooks)->contents[1];
+
+ /* If the buffer of the first overlay in the array doesn't
+ match the current buffer, then these modification hooks
+ should not be run in this buffer. This could happen when
+ some code calls some insdel functions, such as del_range_1,
+ with the PREPARE argument false -- in that case this
+ function is never called to record the overlay modification
+ hook functions in the last_overlay_modification_hooks
+ array, so anything we find there is not ours. */
+ if (XMARKER (OVERLAY_START (ovl))->buffer != current_buffer)
+ return;
+ }
+
USE_SAFE_ALLOCA;
SAFE_ALLOCA_LISP (copy, size);
memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
SAFE_FREE ();
}
- UNGCPRO;
}
static void
call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, bool after,
Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
{
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
-
- GCPRO4 (list, arg1, arg2, arg3);
-
while (CONSP (list))
{
if (NILP (arg3))
call5 (XCAR (list), overlay, after ? Qt : Qnil, arg1, arg2, arg3);
list = XCDR (list);
}
- UNGCPRO;
}
/* Delete any zero-sized overlays at position POS, if the `evaporate'
#include <fcntl.h>
#endif
-#include "coding.h"
-
/* Memory is allocated in regions which are mapped using mmap(2).
The current implementation lets the system select mapped
if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
Fset_buffer_multibyte (Qnil);
- pwd = get_current_dir_name ();
+ pwd = emacs_get_current_dir_name ();
if (!pwd)
- fatal ("get_current_dir_name: %s\n", strerror (errno));
-
- /* Maybe this should really use some standard subroutine
- 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++;
+ fprintf (stderr, "Error getting directory: %s\n",
+ emacs_strerror (errno));
+ bset_directory (current_buffer, Qnil);
}
-
- /* 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. */
- bset_directory (current_buffer, make_unibyte_string (pwd, len));
-
- /* Add /: to the front of the name
- 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))))
+ else
{
- AUTO_STRING (slash_colon, "/:");
- bset_directory (current_buffer,
- concat2 (slash_colon,
- BVAR (current_buffer, directory)));
+ /* Maybe this should really use some standard subroutine
+ 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++;
+ }
+
+ /* 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. */
+ bset_directory (current_buffer, make_unibyte_string (pwd, len));
+
+ /* Add /: to the front of the name
+ 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)));
+ }
}
temp = get_minibuffer (0);
DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
mode_line_format,
doc: /* Default value of `mode-line-format' for buffers that don't override it.
-This is the same as (default-value 'mode-line-format). */);
+This is the same as (default-value \\='mode-line-format). */);
DEFVAR_BUFFER_DEFAULTS ("default-header-line-format",
header_line_format,
doc: /* Default value of `header-line-format' for buffers that don't override it.
-This is the same as (default-value 'header-line-format). */);
+This is the same as (default-value \\='header-line-format). */);
DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type,
doc: /* Default value of `cursor-type' for buffers that don't override it.
-This is the same as (default-value 'cursor-type). */);
+This is the same as (default-value \\='cursor-type). */);
DEFVAR_BUFFER_DEFAULTS ("default-line-spacing",
extra_line_spacing,
doc: /* Default value of `line-spacing' for buffers that don't override it.
-This is the same as (default-value 'line-spacing). */);
+This is the same as (default-value \\='line-spacing). */);
DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows",
cursor_in_non_selected_windows,
doc: /* Default value of `cursor-in-non-selected-windows'.
-This is the same as (default-value 'cursor-in-non-selected-windows). */);
+This is the same as (default-value \\='cursor-in-non-selected-windows). */);
DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode",
abbrev_mode,
doc: /* Default value of `abbrev-mode' for buffers that do not override it.
-This is the same as (default-value 'abbrev-mode). */);
+This is the same as (default-value \\='abbrev-mode). */);
DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow",
ctl_arrow,
doc: /* Default value of `ctl-arrow' for buffers that do not override it.
-This is the same as (default-value 'ctl-arrow). */);
+This is the same as (default-value \\='ctl-arrow). */);
DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters",
enable_multibyte_characters,
doc: /* Default value of `enable-multibyte-characters' for buffers not overriding it.
-This is the same as (default-value 'enable-multibyte-characters). */);
+This is the same as (default-value \\='enable-multibyte-characters). */);
DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system",
buffer_file_coding_system,
doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
-This is the same as (default-value 'buffer-file-coding-system). */);
+This is the same as (default-value \\='buffer-file-coding-system). */);
DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines",
truncate_lines,
doc: /* Default value of `truncate-lines' for buffers that do not override it.
-This is the same as (default-value 'truncate-lines). */);
+This is the same as (default-value \\='truncate-lines). */);
DEFVAR_BUFFER_DEFAULTS ("default-fill-column",
fill_column,
doc: /* Default value of `fill-column' for buffers that do not override it.
-This is the same as (default-value 'fill-column). */);
+This is the same as (default-value \\='fill-column). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-margin",
left_margin,
doc: /* Default value of `left-margin' for buffers that do not override it.
-This is the same as (default-value 'left-margin). */);
+This is the same as (default-value \\='left-margin). */);
DEFVAR_BUFFER_DEFAULTS ("default-tab-width",
tab_width,
doc: /* Default value of `tab-width' for buffers that do not override it.
NOTE: This controls the display width of a TAB character, and not
the size of an indentation step.
-This is the same as (default-value 'tab-width). */);
+This is the same as (default-value \\='tab-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search",
case_fold_search,
doc: /* Default value of `case-fold-search' for buffers that don't override it.
-This is the same as (default-value 'case-fold-search). */);
+This is the same as (default-value \\='case-fold-search). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
left_margin_cols,
doc: /* Default value of `left-margin-width' for buffers that don't override it.
-This is the same as (default-value 'left-margin-width). */);
+This is the same as (default-value \\='left-margin-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width",
right_margin_cols,
doc: /* Default value of `right-margin-width' for buffers that don't override it.
-This is the same as (default-value 'right-margin-width). */);
+This is the same as (default-value \\='right-margin-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width",
left_fringe_width,
doc: /* Default value of `left-fringe-width' for buffers that don't override it.
-This is the same as (default-value 'left-fringe-width). */);
+This is the same as (default-value \\='left-fringe-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width",
right_fringe_width,
doc: /* Default value of `right-fringe-width' for buffers that don't override it.
-This is the same as (default-value 'right-fringe-width). */);
+This is the same as (default-value \\='right-fringe-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins",
fringes_outside_margins,
doc: /* Default value of `fringes-outside-margins' for buffers that don't override it.
-This is the same as (default-value 'fringes-outside-margins). */);
+This is the same as (default-value \\='fringes-outside-margins). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width",
scroll_bar_width,
doc: /* Default value of `scroll-bar-width' for buffers that don't override it.
-This is the same as (default-value 'scroll-bar-width). */);
+This is the same as (default-value \\='scroll-bar-width). */);
DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar",
vertical_scroll_bar_type,
doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it.
-This is the same as (default-value 'vertical-scroll-bar). */);
+This is the same as (default-value \\='vertical-scroll-bar). */);
DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines",
indicate_empty_lines,
doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
-This is the same as (default-value 'indicate-empty-lines). */);
+This is the same as (default-value \\='indicate-empty-lines). */);
DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries",
indicate_buffer_boundaries,
doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
-This is the same as (default-value 'indicate-buffer-boundaries). */);
+This is the same as (default-value \\='indicate-buffer-boundaries). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist",
fringe_indicator_alist,
doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it.
-This is the same as (default-value 'fringe-indicator-alist'). */);
+This is the same as (default-value \\='fringe-indicator-alist). */);
DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist",
fringe_cursor_alist,
doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it.
-This is the same as (default-value 'fringe-cursor-alist'). */);
+This is the same as (default-value \\='fringe-cursor-alist). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively",
scroll_up_aggressively,
doc: /* Default value of `scroll-up-aggressively'.
This value applies in buffers that don't have their own local values.
-This is the same as (default-value 'scroll-up-aggressively). */);
+This is the same as (default-value \\='scroll-up-aggressively). */);
DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively",
scroll_down_aggressively,
doc: /* Default value of `scroll-down-aggressively'.
This value applies in buffers that don't have their own local values.
-This is the same as (default-value 'scroll-down-aggressively). */);
+This is the same as (default-value \\='scroll-down-aggressively). */);
DEFVAR_PER_BUFFER ("header-line-format",
&BVAR (current_buffer, header_line_format),
doc: /* Symbol for current buffer's major mode.
The default value (normally `fundamental-mode') affects new buffers.
A value of nil means to use the current buffer's major mode, provided
-it is not marked as "special".
-
-When a mode is used by default, `find-file' switches to it before it
-reads the contents into the buffer and before it finishes setting up
-the buffer. Thus, the mode and its hooks should not expect certain
-variables such as `buffer-read-only' and `buffer-file-coding-system'
-to be set up. */);
+it is not marked as "special". */);
DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name),
Qnil,
Any other value is treated as nil.
This variable has no effect unless the buffer's value of
-\`bidi-display-reordering' is non-nil. */);
+`bidi-display-reordering' is non-nil. */);
DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil,
doc: /* Non-nil means do not display continuation lines.
DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
Qstringp,
- doc: /* Name of default directory of current buffer. Should end with slash.
+ doc: /* Name of default directory of current buffer.
To interactively change the default directory, use command `cd'. */);
DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function),
DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer, selective_display),
Qnil,
doc: /* Non-nil enables selective display.
+
An integer N as value means display only lines
that start with less than N columns of space.
+
A value of t means that the character ^M makes itself and
all the rest of the line invisible; also, when saving the buffer
-in a file, save the ^M as a newline. */);
+in a file, save the ^M as a newline. This usage is obsolete; use
+overlays or text properties instead. */);
DEFVAR_PER_BUFFER ("selective-display-ellipses",
&BVAR (current_buffer, selective_display_ellipses),
Lisp programs may give this variable certain special values:
-- A value of `lambda' enables Transient Mark mode temporarily.
- It is disabled again after any subsequent action that would
+- The symbol `lambda' enables Transient Mark mode temporarily.
+ The mode is disabled again after any subsequent action that would
normally deactivate the mark (e.g. buffer modification).
-- A value of (only . OLDVAL) enables Transient Mark mode
+- The pair (only . OLDVAL) enables Transient Mark mode
temporarily. After any subsequent point motion command that is
not shift-translated, or any other action that would normally
deactivate the mark (e.g. buffer modification), the value of
(hbar . HEIGHT) display a horizontal bar cursor with height HEIGHT
ANYTHING ELSE display a hollow box cursor
+WIDTH and HEIGHT can't exceed the frame's canonical character size.
+
When the buffer is displayed in a non-selected window, the
cursor's appearance is instead controlled by the variable
`cursor-in-non-selected-windows'. */);
If t, displays a cursor related to the usual cursor type
\(a solid box becomes hollow, a bar becomes a narrower bar).
You can also specify the cursor type as in the `cursor-type' variable.
-Use Custom to set this variable and update the display." */);
+Use Custom to set this variable and update the display. */);
DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions,
doc: /* List of functions called with no args to query before killing a buffer.