aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2003-06-17 02:35:46 +0000
committerLuc Teirlinck2003-06-17 02:35:46 +0000
commit4e57881d89e8d323dbdca9798a7d14549a2d2a36 (patch)
treefda544633972edd11dd1883c87f95c558cc3d2b5
parent1a036ae0f74f40542d08964e21f3d7ccd332ffca (diff)
downloademacs-4e57881d89e8d323dbdca9798a7d14549a2d2a36.tar.gz
emacs-4e57881d89e8d323dbdca9798a7d14549a2d2a36.zip
(vis-mode): New function.
(saved-buffer-invisibility-spec): New variable.
-rw-r--r--lisp/simple.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 3cabbae2d76..49701183ba5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4480,8 +4480,31 @@ wait this many seconds after Emacs becomes idle before doing an update."
4480 :type 'number 4480 :type 'number
4481 :group 'display 4481 :group 'display
4482 :version "21.4") 4482 :version "21.4")
4483
4484(make-variable-buffer-local 'saved-buffer-invisibility-spec)
4485
4486(defvar saved-buffer-invisibility-spec nil
4487 "Saved value of buffer-invisibility-spec when `vis-mode' is on.")
4488
4489(define-minor-mode vis-mode
4490 "Toggle vis-mode.
4491With argument ARG turn vis-mode on iff ARG is positive..
4483 4492
4493Enabling vis-mode sets `buffer-invisibility-spec' to nil, after
4494saving the old value in the variable
4495`saved-buffer-invisibility-spec', making all invisible text in
4496the buffer visible.
4484 4497
4498Disabling vis-mode restores the saved value of
4499`buffer-invisibility-spec'."
4500 :lighter " Vis"
4501 (if vis-mode
4502 (progn
4503 (setq saved-buffer-invisibility-spec buffer-invisibility-spec
4504 buffer-invisibility-spec nil))
4505 (setq buffer-invisibility-spec saved-buffer-invisibility-spec
4506 saved-buffer-invisibility-spec nil)))
4507
4485;; Minibuffer prompt stuff. 4508;; Minibuffer prompt stuff.
4486 4509
4487;(defun minibuffer-prompt-modification (start end) 4510;(defun minibuffer-prompt-modification (start end)