Mercurial > emacs
comparison lisp/subr.el @ 17146:b8536e42d4ef
(combine-after-change-calls): Doc fix.
(add-to-invisibility-spec, remove-from-invisibility-spec):
New functions.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 11 Mar 1997 23:55:24 +0000 |
parents | adc714dc8e3c |
children | 3c55ec545afb |
comparison
equal
deleted
inserted
replaced
17145:d342009009c7 | 17146:b8536e42d4ef |
---|---|
790 (defmacro combine-after-change-calls (&rest body) | 790 (defmacro combine-after-change-calls (&rest body) |
791 "Execute BODY, but don't call the after-change functions till the end. | 791 "Execute BODY, but don't call the after-change functions till the end. |
792 If BODY makes changes in the buffer, they are recorded | 792 If BODY makes changes in the buffer, they are recorded |
793 and the functions on `after-change-functions' are called several times | 793 and the functions on `after-change-functions' are called several times |
794 when BODY is finished. | 794 when BODY is finished. |
795 The return value is rthe value of the last form in BODY. | 795 The return value is the value of the last form in BODY. |
796 | 796 |
797 If `before-change-functions' is non-nil, then calls to the after-change | 797 If `before-change-functions' is non-nil, then calls to the after-change |
798 functions can't be deferred, so in that case this macro has no effect. | 798 functions can't be deferred, so in that case this macro has no effect. |
799 | 799 |
800 Do not alter `after-change-functions' or `before-change-functions' | 800 Do not alter `after-change-functions' or `before-change-functions' |
890 (setq i 128) | 890 (setq i 128) |
891 (while (<= i 255) | 891 (while (<= i 255) |
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'. | |
898 See documentation for `buffer-invisibility-spec' for the kind of elements | |
899 that 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. |
898 COMMAND is a symbol naming an interactively-callable function. | 914 COMMAND is a symbol naming an interactively-callable function. |
899 KEY is a key sequence (a string or vector of characters or event types). | 915 KEY is a key sequence (a string or vector of characters or event types). |
966 ; (setcar tail (cons (car (car tail)) (cdr (car tail))))) | 982 ; (setcar tail (cons (car (car tail)) (cdr (car tail))))) |
967 ; (setq tail (cdr tail)))) | 983 ; (setq tail (cdr tail)))) |
968 ; alist) | 984 ; alist) |
969 | 985 |
970 ;;; subr.el ends here | 986 ;;; subr.el ends here |
971 |