comparison lisp/reveal.el @ 90054:f2ebccfa87d4

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-74 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-709 Update from CVS: src/indent.c (Fvertical_motion): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-710 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-715 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 08 Dec 2004 05:02:30 +0000
parents e24e2e78deda 180297c18beb
children e4694597cbf4
comparison
equal deleted inserted replaced
90053:fff5f1a61d92 90054:f2ebccfa87d4
149 (funcall open ol t) 149 (funcall open ol t)
150 (error (message "!!Reveal-hide: %s !!" err))) 150 (error (message "!!Reveal-hide: %s !!" err)))
151 (overlay-put ol 'invisible inv)))))))) 151 (overlay-put ol 'invisible inv))))))))
152 (error (message "Reveal: %s" err))))) 152 (error (message "Reveal: %s" err)))))
153 153
154 (defvar reveal-mode-map
155 (let ((map (make-sparse-keymap)))
156 ;; Override the default move-end-of-line which skips valuable
157 ;; invisible text.
158 (define-key map [?\C-e] 'end-of-line)
159 map))
160
154 ;;;###autoload 161 ;;;###autoload
155 (define-minor-mode reveal-mode 162 (define-minor-mode reveal-mode
156 "Toggle Reveal mode on or off. 163 "Toggle Reveal mode on or off.
157 Reveal mode renders invisible text around point visible again. 164 Reveal mode renders invisible text around point visible again.
158 165
159 Interactively, with no prefix argument, toggle the mode. 166 Interactively, with no prefix argument, toggle the mode.
160 With universal prefix ARG (or if ARG is nil) turn mode on. 167 With universal prefix ARG (or if ARG is nil) turn mode on.
161 With zero or negative ARG turn mode off." 168 With zero or negative ARG turn mode off."
162 :lighter (global-reveal-mode nil " Reveal") 169 :lighter (global-reveal-mode nil " Reveal")
170 :keymap reveal-mode-map
163 (if reveal-mode 171 (if reveal-mode
164 (progn 172 (progn
165 (set (make-local-variable 'search-invisible) t) 173 (set (make-local-variable 'search-invisible) t)
166 (add-hook 'post-command-hook 'reveal-post-command nil t)) 174 (add-hook 'post-command-hook 'reveal-post-command nil t))
167 (kill-local-variable 'search-invisible) 175 (kill-local-variable 'search-invisible)