Commit 327652be authored by Thien-Thi Nguyen's avatar Thien-Thi Nguyen
Browse files

Update hideshow.el section.

parent 9b4a7800
...@@ -697,7 +697,8 @@ Default is 0.25. ...@@ -697,7 +697,8 @@ Default is 0.25.
** Changes to hideshow.el ** Changes to hideshow.el
Hideshow is now at version 5.x. It uses a new algorithms for block Hideshow is now at version 5.x. It uses a new algorithms for block
selection and traversal and includes more isearch support. selection and traversal, includes more isearch support, and has more
conventional keybindings.
*** Generalized block selection and traversal *** Generalized block selection and traversal
...@@ -728,6 +729,54 @@ something like this in your .emacs. ...@@ -728,6 +729,54 @@ something like this in your .emacs.
(lambda () (lambda ()
(add-to-list 'mode-line-format 'hs-headline))) (add-to-list 'mode-line-format 'hs-headline)))
*** New customization var: `hs-hide-all-non-comment-function'
Normally, `hs-hide-all' hides everything, leaving only the
header lines of top-level forms (and comments, unless var
`hs-hide-comments-when-hiding-all' is non-nil). It does this by
moving point to each top-level block beginning and hiding the
block there. In some major modes (for example, Java), this
behavior results in few blocks left visible, which may not be so
useful.
You can now set var `hs-hide-all-non-comment-function' to a
function to be called at each top-level block beginning, instead
of the normal block-hiding function. For example, the following
code defines a function to hide one level down and move point
appropriately, and then tells hideshow to use the new function.
(defun ttn-hs-hide-level-1 ()
(hs-hide-level 1)
(forward-sexp 1))
(setq hs-hide-all-non-comment-function 'ttn-hs-hide-level-1)
The name `hs-hide-all-non-comment-function' was chosen to
emphasize that this function is not called for comment blocks,
only for code blocks.
*** Command deleted: `hs-show-region'
Historical Note: This command was added to handle "unbalanced
parentheses" emergencies back when hideshow.el used selective
display for implementation.
*** Commands rebound to more conventional keys
The hideshow commands used to be bound to keys of the form "C-c
LETTER". This is contrary to the Emacs keybinding convention,
which reserves that space for user modification. Here are the
new bindings (which includes the addition of `hs-toggle-hiding'):
hs-hide-block C-c C-h
hs-show-block C-c C-s
hs-hide-all C-c C-M-h
hs-show-all C-c C-M-s
hs-hide-level C-c C-l
hs-toggle-hiding C-c C-c
hs-mouse-toggle-hiding [(shift button-2)]
These were chosen to roughly imitate those used by Outline mode.
** Changes to Change Log mode and Add-Log functions ** Changes to Change Log mode and Add-Log functions
+++ +++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment