Loading ...
Sorry, an error occurred while loading the content.

2679Re: [jasspa] folding bash functions

Expand Messages
  • Jon Green
    Mar 14, 2012
      Hi Detlef,

      Your myshell.emf is fine. The problem is that your folding state is
      saved in the registry and you need to enable it now that you have
      changed the mode, by default this is turned off because you have added a
      new mode.

      From within a .sh buffer (i.e. when editing file example.sh) then do

      M-x major-mode-setup

      Check the "Setup Folding"box. Then it should all be working,

      Regards
      Jon.

      On 13/03/2012 11:58, Dr. Detlef wrote:
      > Hello,
      >
      > I tried to use foldable Bash functions. Item list is working but folding not.
      >
      > example shell-file example.sh:
      >
      > function echoerr {
      > echo "$@" 1>&2;
      > }
      >
      >
      > Here is myshell.emf
      >
      > ; adding an f to the original setup-mask (for folding, collapse)
      > set-variable .fhook-shell.setup-mask "aefghikmoptux"
      >
      > set-variable .fhook-shell.collapse-open "^function"
      > set-variable .fhook-shell.collapse-close "^}"
      > set-variable .fhook-shell.collapse-mclose "1"
      > set-variable .fhook-shell.collapse-mnext "-1"
      >
      >
      > set-variable .fhook-shell.item-list-s1 "^function \\(\\w+\\)"
      > set-variable .fhook-shell.item-list-r1 "Func \ecB\\1\ecA"
      >
      > ;Any ideas to get folding support in bash-files?
      > ; regards,
      > ; Detlef
      >
    • Show all 3 messages in this topic