(let ((inv (overlay-get ol 'invisible)))
(and inv (symbolp inv)
(or (setq open (or (get inv 'reveal-toggle-invisible)
- (get ol 'isearch-open-invisible-temporary)))
+ (overlay-get ol 'isearch-open-invisible-temporary)))
(overlay-get ol 'isearch-open-invisible)
(and (consp buffer-invisibility-spec)
(assq inv buffer-invisibility-spec)))
(setq repeat t)
(condition-case err
(funcall open ol nil)
- (error (message "!!Reveal-show: %s !!" err))))))))
+ (error (message "!!Reveal-show: %s !!" err)
+ ;; Let's default to a meaningful behavior to avoid
+ ;; getting stuck in an infinite loop.
+ (setq repeat nil)
+ (overlay-put ol 'invisible nil))))))))
;; Close old overlays.
(dolist (ol old-ols)
(when (and (eq (current-buffer) (overlay-buffer ol))
(if (or open
(and (setq inv (overlay-get ol 'reveal-invisible))
(setq open (or (get inv 'reveal-toggle-invisible)
- (get ol 'isearch-open-invisible-temporary)))))
+ (overlay-get ol 'isearch-open-invisible-temporary)))))
(condition-case err
(funcall open ol t)
(error (message "!!Reveal-hide: %s !!" err)))
Interactively, with no prefix argument, toggle the mode.
With universal prefix ARG (or if ARG is nil) turn mode on.
With zero or negative ARG turn mode off."
- :global t
+ :global t :group 'reveal
(setq-default reveal-mode global-reveal-mode)
(if global-reveal-mode
(progn
(remove-hook 'post-command-hook 'reveal-post-command)))
(provide 'reveal)
+
;;; reveal.el ends here