Writing predicates with long identifiers, I often prefer (A) to (B) for readablity. However, with default behavior of Emacs in prolog-mode for <Return> key, codes on the buffer looks like (B). Is there any simple setting for (A). Or do I need to write an emacs-lisp function for (A) ?
(A)
pred :- call_with_time_limit(setup-call_cleanup(
longlonglonglong_arg_A,
longlonglonglong_arg_B,
longlonglonglong_arg_C)).
(B)
pred :- call_with_time_limit(
setup-call_cleanup(
longlonglonglongargA,
longlonglonglongargB,
longlonglonglongargC)).
The only option to this is that you can set the indentation in the last version (default 4). I don’t think I’ve ever seen your (B). It is probably not that hard to add, but it would conflict with the 3rd option above. I think it is up to you If I recall well the source is in xpce/prolog/lib/emacs/language_mode.pl, probably called something like ->indent_line.
I loads into Emacs.app many lisp packages without reading documents. Now I suspect there is conflict between lisp-mode and prolog-mode. (B) seems a lisp way. I should check it. Anyway also I like PceEmacs way. Thanks.
In stead of reading doc, I have defined a shortcut to insert “\n\t” or “\n” into the emacs buffer depending on whether prolog-mode or not. It is informal, I know, but informal is normal with my use of Emacs.