# HG changeset patch # User james # Date 1076000099 0 # Node ID 124ce9dc008bdef68bf62a6f908c7608456dc33a # Parent 2279a7ce5f9854cae01fae211c082b01e7581439 [xemacs-hg @ 2004-02-05 16:54:57 by james] Add invisibility spec from Emacs 21.3. diff -r 2279a7ce5f98 -r 124ce9dc008b lisp/ChangeLog --- a/lisp/ChangeLog Wed Feb 04 22:50:33 2004 +0000 +++ b/lisp/ChangeLog Thu Feb 05 16:54:59 2004 +0000 @@ -1,3 +1,8 @@ +2004-01-28 Jerry James + + * subr.el (add-to-invisibility-spec): New, from Emacs 21.3. + * subr.el (remove-from-invisibility-spec): Ditto. + 2004-01-29 Stephen J. Turnbull * mule/japanese.el (paragraph-start, paragraph-separate): diff -r 2279a7ce5f98 -r 124ce9dc008b lisp/subr.el --- a/lisp/subr.el Wed Feb 04 22:50:33 2004 +0000 +++ b/lisp/subr.el Thu Feb 05 16:54:59 2004 +0000 @@ -777,6 +777,25 @@ ;; END SYNCHED WITH FSF 21.2 +;; BEGIN SYNCHED WITH FSF 21.3 + +(defun add-to-invisibility-spec (arg) + "Add elements to `buffer-invisibility-spec'. +See documentation for `buffer-invisibility-spec' for the kind of elements +that can be added." + (if (eq buffer-invisibility-spec t) + (setq buffer-invisibility-spec (list t))) + (setq buffer-invisibility-spec + (cons arg buffer-invisibility-spec))) + +(defun remove-from-invisibility-spec (arg) + "Remove elements from `buffer-invisibility-spec'." + (if (consp buffer-invisibility-spec) + (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec)))) + +;; END SYNCHED WITH FSF 21.3 + + ;;; Basic string functions ;; XEmacs