emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/hard-narrow fda0eb0: Idem


From: Vitalie Spinu
Subject: [Emacs-diffs] scratch/hard-narrow fda0eb0: Idem
Date: Tue, 29 Mar 2016 21:15:04 +0000

branch: scratch/hard-narrow
commit fda0eb0b96f3be9cb46daa9d15ee5e142c8ada50
Author: Vitalie Spinu <address@hidden>
Commit: Vitalie Spinu <address@hidden>

    Idem
---
 src/buffer.h  |    3 ---
 src/editfns.c |   28 ++++++++++++++++++----------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/buffer.h b/src/buffer.h
index 3ac989f..5eeb3ce 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -774,9 +774,6 @@ struct buffer
      See `cursor-type' for other values.  */
   Lisp_Object cursor_in_non_selected_windows_;
 
-  /* Cons of hard widen limits */
-  Lisp_Object widen_limits_;
-
   /* No more Lisp_Object beyond this point.  Except undo_list,
      which is handled specially in Fgarbage_collect.  */
 
diff --git a/src/editfns.c b/src/editfns.c
index d4cafef..80f1117 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3484,8 +3484,9 @@ DEFUN ("delete-and-extract-region", 
Fdelete_and_extract_region,
 
 DEFUN ("widen", Fwiden, Swiden, 0, 1, "",
        doc: /* Remove restrictions (narrowing) from current buffer.
-This allows the buffer's full text to be seen and edited.
-If `buffer-widen-limits` is non-nil, widen only to those limits.  */)
+If HARD is non-nil, remove the hard restriction imposed by a previous
+call to \\[narrow-to-region].  If HARD is nil, remove visual
+restriction up to the previously imposed hard limit (if any).  */)
   (Lisp_Object hard)
 {
 
@@ -3509,14 +3510,21 @@ If `buffer-widen-limits` is non-nil, widen only to 
those limits.  */)
 }
 
 DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 3, "r",
-       doc: /* Restrict editing in this buffer to the current region.
-The rest of the text becomes temporarily invisible and untouchable
-but is not deleted; if you save the buffer in a file, the invisible
-text is included in the file.  \\[widen] makes all visible again.
-See also `save-restriction'.
-
-When calling from a program, pass two arguments; positions (integers
-or markers) bounding the text that should remain visible.  */)
+       doc: /* Restrict editing in this buffer to the current
+region. START and END are positions (integers or markers) bounding the
+text that should restricted. There can be two types of restrictions,
+visual and hard. If HARD is nil, impose visual restriction, otherwise
+a hard one.
+
+When visual restriction is in place, the rest of the text is invisible
+and untouchable but is not deleted; if you save the buffer in a file,
+the invisible text is included in the file. \\[widen] with nil
+optional argument makes it all visible again.
+
+When hard restriction is in place, invocations of (visual) \\[widen]
+with nil argument removes visual narrowing up to the hard
+restriction. In order to lift hard restriction,  call \\[widen] with
+non-nil HARD argument.  */)
   (register Lisp_Object start, Lisp_Object end, Lisp_Object hard)
 {
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]