1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

(vis-mode): New function.

(saved-buffer-invisibility-spec): New variable.
This commit is contained in:
Luc Teirlinck 2003-06-17 02:35:46 +00:00
parent 1a036ae0f7
commit 4e57881d89

View File

@ -4480,8 +4480,31 @@ wait this many seconds after Emacs becomes idle before doing an update."
:type 'number
:group 'display
:version "21.4")
(make-variable-buffer-local 'saved-buffer-invisibility-spec)
(defvar saved-buffer-invisibility-spec nil
"Saved value of buffer-invisibility-spec when `vis-mode' is on.")
(define-minor-mode vis-mode
"Toggle vis-mode.
With argument ARG turn vis-mode on iff ARG is positive..
Enabling vis-mode sets `buffer-invisibility-spec' to nil, after
saving the old value in the variable
`saved-buffer-invisibility-spec', making all invisible text in
the buffer visible.
Disabling vis-mode restores the saved value of
`buffer-invisibility-spec'."
:lighter " Vis"
(if vis-mode
(progn
(setq saved-buffer-invisibility-spec buffer-invisibility-spec
buffer-invisibility-spec nil))
(setq buffer-invisibility-spec saved-buffer-invisibility-spec
saved-buffer-invisibility-spec nil)))
;; Minibuffer prompt stuff.
;(defun minibuffer-prompt-modification (start end)