emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vis-mode


From: Luc Teirlinck
Subject: vis-mode
Date: Sun, 15 Jun 2003 21:16:23 -0500 (CDT)

I have started to rewrite info.texi.  (I had to familiarize myself
with texinfo first, as I had never used it before.)

I would like to check in vis-mode, discussed before, with all changes
suggested by Richard.  I will not give it any binding, whether in info
or elsewhere.  I would want to know in which file I am supposed to put
it, however.


===File ~/vis-mode.el=======================================
(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)))

  
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]