aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2018-04-24 17:20:15 +0200
committerLars Ingebrigtsen2018-04-24 17:20:15 +0200
commit400153f0850aff8c96b2da6768d53dc5885c3243 (patch)
treecc89a69b93bd794722ad4a5041751b74c964f207
parenta29677a0317dd68fd4a54fbccca73b1e6f178f95 (diff)
downloademacs-400153f0850aff8c96b2da6768d53dc5885c3243.tar.gz
emacs-400153f0850aff8c96b2da6768d53dc5885c3243.zip
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).
-rw-r--r--lisp/subr.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 74d4a7f427a..208535f00bb 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4328,14 +4328,23 @@ to `display-warning'."
4328(defun add-to-invisibility-spec (element) 4328(defun add-to-invisibility-spec (element)
4329 "Add ELEMENT to `buffer-invisibility-spec'. 4329 "Add ELEMENT to `buffer-invisibility-spec'.
4330See documentation for `buffer-invisibility-spec' for the kind of elements 4330See documentation for `buffer-invisibility-spec' for the kind of elements
4331that can be added." 4331that can be added.
4332
4333If `buffer-invisibility-spec' isn't a list before calling this
4334function, `buffer-invisibility-spec' will afterwards be a list
4335with the value `(t ELEMENT)'. This means that if text exists
4336with non-`t' invisibility values, that text will become visible."
4332 (if (eq buffer-invisibility-spec t) 4337 (if (eq buffer-invisibility-spec t)
4333 (setq buffer-invisibility-spec (list t))) 4338 (setq buffer-invisibility-spec (list t)))
4334 (setq buffer-invisibility-spec 4339 (setq buffer-invisibility-spec
4335 (cons element buffer-invisibility-spec))) 4340 (cons element buffer-invisibility-spec)))
4336 4341
4337(defun remove-from-invisibility-spec (element) 4342(defun remove-from-invisibility-spec (element)
4338 "Remove ELEMENT from `buffer-invisibility-spec'." 4343 "Remove ELEMENT from `buffer-invisibility-spec'.
4344If `buffer-invisibility-spec' isn't a list before calling this
4345function, it will be made into a list containing just `t' as the
4346only list member. This means that if text exists with non-`t'
4347invisibility values, that text will become visible."
4339 (setq buffer-invisibility-spec 4348 (setq buffer-invisibility-spec
4340 (if (consp buffer-invisibility-spec) 4349 (if (consp buffer-invisibility-spec)
4341 (delete element buffer-invisibility-spec) 4350 (delete element buffer-invisibility-spec)