>>>>> "Holger" == Holger Wilken <[EMAIL PROTECTED]> writes:

  Holger> Hi!

  Holger> I've discovered your jde-cflow.el and I really like it. But
  Holger> as a starter, there is one question left:

  Holger> How do I change the indentation of the brackets?

  Holger> For example, your "if " produces: if (xy) { some text }

  Holger> I would prefer if the brackets are on the same level as the
  Holger> if, making it: if (xy) { some text }

  Holger> Ive tried to change some > and n in the jde-cflow.el, but it
  Holger> still doesnt work. Can you tell me, how to change it?

  
        I think that I have seen this problem before. There seems 
to be some problem with the "indent" function in tempo. Essentially
the solution is to stick a few more "'>" into the templates (> means
"indent according to mode".

        You might also find of use a "cc-tempo-electric-support"
package from  Klaus Berndl <[EMAIL PROTECTED]>, which allows you to
use electric characters. From the documentation for instance here is a
template for a "for" command. The (i ?\;) commands insert for instance
a ";" and a new line, and indent according to mode, if you use the
electric characters of cc-mode. Similarly (i ?{) will insert a "{" on
a new line as it would if were newly typed. 


;; new-version with electric characters processing
;;(tempo-define-template "c-for-i"
;;      '(> "for " (i ?\() (p "variable: " var) " = 0" (i ?\;) " " (s var)
;;          " < " (p "upper bound: " ub) (i ?\;) " " (s var) "++"
;;          (i ?\)) " " >
;;          (i ?{) r> n>
;;          (i ?})
;;          )
;;      "fori"
;;      "Insert a C for loop: for (x = 0; x < ..; x++)"
;;      'c-tempo-tags)



        Anyway this package is available from my website at
http://www.bioinf.man.ac.uk/~lord/home.html

        Cheers

        Phil

Reply via email to