Mercurial > emacs
changeset 51597:9b14210f4740
(vis-mode): New function.
(saved-buffer-invisibility-spec): New variable.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Tue, 17 Jun 2003 02:35:46 +0000 |
parents | 1e29218d0fc8 |
children | 8e404f2a6715 |
files | lisp/simple.el |
diffstat | 1 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Tue Jun 17 02:31:08 2003 +0000 +++ b/lisp/simple.el Tue Jun 17 02:35:46 2003 +0000 @@ -4480,8 +4480,31 @@ :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)