emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 400153f: Doc fix for `*-*-invisibility-spec'


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 400153f: Doc fix for `*-*-invisibility-spec'
Date: Tue, 24 Apr 2018 11:20:47 -0400 (EDT)

branch: master
commit 400153f0850aff8c96b2da6768d53dc5885c3243
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Doc fix for `*-*-invisibility-spec'
    
    * lisp/subr.el (add-to-invisibility-spec)
    (remove-from-invisibility-spec): Make the doc string say what
    happens if `buffer-invisibility-spec' is an atom (bug#30171).
---
 lisp/subr.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 74d4a7f..208535f 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4328,14 +4328,23 @@ to `display-warning'."
 (defun add-to-invisibility-spec (element)
   "Add ELEMENT to `buffer-invisibility-spec'.
 See documentation for `buffer-invisibility-spec' for the kind of elements
-that can be added."
+that can be added.
+
+If `buffer-invisibility-spec' isn't a list before calling this
+function, `buffer-invisibility-spec' will afterwards be a list
+with the value `(t ELEMENT)'.  This means that if text exists
+with non-`t' invisibility values, that text will become visible."
   (if (eq buffer-invisibility-spec t)
       (setq buffer-invisibility-spec (list t)))
   (setq buffer-invisibility-spec
        (cons element buffer-invisibility-spec)))
 
 (defun remove-from-invisibility-spec (element)
-  "Remove ELEMENT from `buffer-invisibility-spec'."
+  "Remove ELEMENT from `buffer-invisibility-spec'.
+If `buffer-invisibility-spec' isn't a list before calling this
+function, it will be made into a list containing just `t' as the
+only list member.  This means that if text exists with non-`t'
+invisibility values, that text will become visible."
   (setq buffer-invisibility-spec
         (if (consp buffer-invisibility-spec)
            (delete element buffer-invisibility-spec)



reply via email to

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