aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-03-11 23:55:24 +0000
committerKarl Heuer1997-03-11 23:55:24 +0000
commit31aa282eeb71c48ebf9ad41e7a2bbb1c36662c3f (patch)
treed1af456644f5ad5700ae665a58a13c5be57f460c
parentbc2e0aaed9a742ca006a6416371c6fa7fb034048 (diff)
downloademacs-31aa282eeb71c48ebf9ad41e7a2bbb1c36662c3f.tar.gz
emacs-31aa282eeb71c48ebf9ad41e7a2bbb1c36662c3f.zip
(combine-after-change-calls): Doc fix.
(add-to-invisibility-spec, remove-from-invisibility-spec): New functions.
-rw-r--r--lisp/subr.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index b674f364e46..0c72ed1538e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -792,7 +792,7 @@ See also `with-temp-file' and `with-output-to-string'."
792If BODY makes changes in the buffer, they are recorded 792If BODY makes changes in the buffer, they are recorded
793and the functions on `after-change-functions' are called several times 793and the functions on `after-change-functions' are called several times
794when BODY is finished. 794when BODY is finished.
795The return value is rthe value of the last form in BODY. 795The return value is the value of the last form in BODY.
796 796
797If `before-change-functions' is non-nil, then calls to the after-change 797If `before-change-functions' is non-nil, then calls to the after-change
798functions can't be deferred, so in that case this macro has no effect. 798functions can't be deferred, so in that case this macro has no effect.
@@ -892,6 +892,22 @@ syntax table; other characters are copied from the standard syntax table."
892 (aset table i nil) 892 (aset table i nil)
893 (setq i (1+ i))) 893 (setq i (1+ i)))
894 table))) 894 table)))
895
896(defun add-to-invisibility-spec (arg)
897 "Add elements to `buffer-invisibility-spec'.
898See documentation for `buffer-invisibility-spec' for the kind of elements
899that can be added."
900 (cond
901 ((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t))
902 (setq buffer-invisibility-spec (list arg)))
903 (t
904 (setq buffer-invisibility-spec
905 (nconc buffer-invisibility-spec (list arg))))))
906
907(defun remove-from-invisibility-spec (arg)
908 "Remove elements from `buffer-invisibility-spec'."
909 (if buffer-invisibility-spec
910 (setq buffer-invisibility-spec (delete* arg buffer-invisibility-spec))))
895 911
896(defun global-set-key (key command) 912(defun global-set-key (key command)
897 "Give KEY a global binding as COMMAND. 913 "Give KEY a global binding as COMMAND.
@@ -968,4 +984,3 @@ configuration."
968; alist) 984; alist)
969 985
970;;; subr.el ends here 986;;; subr.el ends here
971