Mercurial > emacs
comparison lisp/subr.el @ 48935:6047d93c991e
(add-to-invisibility-spec): If it was t, start it out at (t).
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 22 Dec 2002 22:05:52 +0000 |
parents | 4bdcb09d9f25 |
children | 50cb245b2072 |
comparison
equal
deleted
inserted
replaced
48934:48b3aae63381 | 48935:6047d93c991e |
---|---|
1879 | 1879 |
1880 (defun add-to-invisibility-spec (arg) | 1880 (defun add-to-invisibility-spec (arg) |
1881 "Add elements to `buffer-invisibility-spec'. | 1881 "Add elements to `buffer-invisibility-spec'. |
1882 See documentation for `buffer-invisibility-spec' for the kind of elements | 1882 See documentation for `buffer-invisibility-spec' for the kind of elements |
1883 that can be added." | 1883 that can be added." |
1884 (cond | 1884 (if (eq buffer-invisibility-spec t) |
1885 ((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t)) | 1885 (setq buffer-invisibility-spec (list t))) |
1886 (setq buffer-invisibility-spec (list arg))) | 1886 (setq buffer-invisibility-spec |
1887 (t | 1887 (cons arg buffer-invisibility-spec))) |
1888 (setq buffer-invisibility-spec | |
1889 (cons arg buffer-invisibility-spec))))) | |
1890 | 1888 |
1891 (defun remove-from-invisibility-spec (arg) | 1889 (defun remove-from-invisibility-spec (arg) |
1892 "Remove elements from `buffer-invisibility-spec'." | 1890 "Remove elements from `buffer-invisibility-spec'." |
1893 (if (consp buffer-invisibility-spec) | 1891 (if (consp buffer-invisibility-spec) |
1894 (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec)))) | 1892 (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec)))) |