Skip to content

Commit

Permalink
When called with a C-u prefix argument, outline-cycle makes a sub-
Browse files Browse the repository at this point in the history
call to (outline-cycle nil). The intention is presumably to
call outline-cycle without a prefix argument, but unfortunately
the current-prefix-argument persists in the subcall. This can
cause errors later in determining how many sub-levels should be
hidden. In particular, this can cause an error when folding elisp.

This patch provides one way of fixing the behaviour so that
current-prefix-arg does not persist in the subcall.
  • Loading branch information
ghferrari committed Jun 17, 2018
1 parent 5689436 commit be4e3c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion outline-magic.el
Expand Up @@ -237,7 +237,8 @@ them set by set, separated by a nil element. See the example for
; Run `outline-cycle' as if at the top of the buffer.
(save-excursion
(goto-char (point-min))
(outline-cycle nil)))
(let ((current-prefix-argument nil))
(outline-cycle nil))))

(t
(cond
Expand Down

0 comments on commit be4e3c9

Please sign in to comment.