Due to error "max-lisp-eval-depth" exceeded hiding comment subtreed

disabled.

Some renaming and refactoring.
master
tj 12 years ago
parent fa1a585498
commit 9409c5ce5b
  1. 14
      outshine.el

@ -1060,7 +1060,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
;;;;; Functions for hiding comment-subtrees ;;;;; Functions for hiding comment-subtrees
(defun outshine--hide-comment-subtrees (beg end) (defun outshine-hide-comment-subtrees-in-region (beg end)
"Re-hide all comment subtrees after a visibility state change." "Re-hide all comment subtrees after a visibility state change."
(save-excursion (save-excursion
(let* ((re (concat ":" outshine-comment-tag ":"))) (let* ((re (concat ":" outshine-comment-tag ":")))
@ -1068,7 +1068,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(while (re-search-forward re end t) (while (re-search-forward re end t)
(outline-hide-more))))) (outline-hide-more)))))
(defun outshine-hide-archived-subtrees () (defun outshine-hide-comment-subtrees ()
"Re-hide all comment subtrees after a visibility state change." "Re-hide all comment subtrees after a visibility state change."
(let ((state outshine-current-buffer-visibility-state)) (let ((state outshine-current-buffer-visibility-state))
(when (and (not outshine-open-comment-trees) (when (and (not outshine-open-comment-trees)
@ -1078,7 +1078,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(beg (if globalp (point-min) (point))) (beg (if globalp (point-min) (point)))
(end (if globalp (point-max) (end (if globalp (point-max)
(outline-end-of-subtree)))) (outline-end-of-subtree))))
(outshine--hide-comment-subtrees beg end) (outshine-hide-comment-subtrees-in-region beg end)
(goto-char beg) (goto-char beg)
(if (looking-at (concat ".*:" outshine-comment-tag ":")) (if (looking-at (concat ".*:" outshine-comment-tag ":"))
(message "%s" (substitute-command-keys (message "%s" (substitute-command-keys
@ -1087,8 +1087,8 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
\\[outshine-force-cycle-comment] to \\[outshine-force-cycle-comment] to
cycle it anyway.")))))))) cycle it anyway."))))))))
(add-hook 'outline-view-change-hook ;; (add-hook 'outline-view-change-hook
'outshine-hide-archived-subtrees) ;; 'outshine-hide-comment-subtrees)
;;;;; Hook function ;;;;; Hook function
@ -1503,8 +1503,8 @@ may have changed."
(unless outshine-cycle-silently (unless outshine-cycle-silently
(message "CHILDREN")) (message "CHILDREN"))
(setq (setq
this-command 'outline-cycle-children this-command 'outline-cycle-children))
outshine-current-buffer-visibility-state 'children)) ;; outshine-current-buffer-visibility-state 'children))
((eq last-command 'outline-cycle-children) ((eq last-command 'outline-cycle-children)
;; We just showed the children, now show everything. ;; We just showed the children, now show everything.
(show-subtree) (show-subtree)

Loading…
Cancel
Save