]> git.eshelyaron.com Git - emacs.git/commitdiff
Doc fix for `*-*-invisibility-spec'
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 24 Apr 2018 15:20:15 +0000 (17:20 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 24 Apr 2018 15:20:15 +0000 (17:20 +0200)
* 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

index 74d4a7f427ac7342e319f2fe581de0504d4c94e7..208535f00bb214445f5c1b2e2048f1768b4c7218 100644 (file)
@@ -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)