Juri Linkov writes: Thanks for your comments! >> +(autoload 'outline-minor-mode "outline") > > Actually, outline-minor-mode is already autoloaded, so no special > handling is needed for it. Ok, I'll improve this. > But the problem is that too many outline functions are used in > diff-mode.el in your patch. This is a clear indication that > some part should be moved to outline.el. You're right. > Note that the following function has no diff-specific code, so it could > be refactored and some generalized function added to outline.el. Such > function could be like `outline-map-region' to accept arguments `beg', `end' > and a predicate function that defines whether to hide or show the > body. Ok. I'll make a try. In the meantime, here is a new version that implements both: - Outline based on presence of long lines (using `so-long-detected-long-line-p' predicate) - Outline based on file names matching a regexp (well, truly file heading matching a regexp).