aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 4587b1132b1..6dec2d468c0 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2661,6 +2661,8 @@ DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
2661This allows the buffer's full text to be seen and edited. */) 2661This allows the buffer's full text to be seen and edited. */)
2662 (void) 2662 (void)
2663{ 2663{
2664 if (!NILP (Vinhibit_widen))
2665 return Qnil;
2664 if (BEG != BEGV || Z != ZV) 2666 if (BEG != BEGV || Z != ZV)
2665 current_buffer->clip_changed = 1; 2667 current_buffer->clip_changed = 1;
2666 BEGV = BEG; 2668 BEGV = BEG;
@@ -4457,6 +4459,7 @@ syms_of_editfns (void)
4457 DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions"); 4459 DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions");
4458 DEFSYM (Qwall, "wall"); 4460 DEFSYM (Qwall, "wall");
4459 DEFSYM (Qpropertize, "propertize"); 4461 DEFSYM (Qpropertize, "propertize");
4462 DEFSYM (Qinhibit_widen, "inhibit-widen");
4460 4463
4461 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion, 4464 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion,
4462 doc: /* Non-nil means text motion commands don't notice fields. */); 4465 doc: /* Non-nil means text motion commands don't notice fields. */);
@@ -4517,6 +4520,15 @@ This variable is experimental; email 32252@debbugs.gnu.org if you need
4517it to be non-nil. */); 4520it to be non-nil. */);
4518 binary_as_unsigned = false; 4521 binary_as_unsigned = false;
4519 4522
4523 DEFVAR_LISP ("inhibit-widen", Vinhibit_widen,
4524 doc: /* Non-nil inhibits the `widen' function.
4525
4526Do NOT set this globally to a non-nil value, as doing that will
4527disable the `widen' function everywhere, including the \\[widen\]
4528command. This variable is intended to be let-bound around code
4529that needs to disable `widen' temporarily. */);
4530 Vinhibit_widen = Qnil;
4531
4520 defsubr (&Spropertize); 4532 defsubr (&Spropertize);
4521 defsubr (&Schar_equal); 4533 defsubr (&Schar_equal);
4522 defsubr (&Sgoto_char); 4534 defsubr (&Sgoto_char);