When indenting a line, point is moved synchronously to keep the current position
relative to the surrounding text. This works well when the indentation level is
increased (point is moved to the right then), but when the indentation level is
decreased (point is moved to the left), it might happen that point is moved
beyond the beginning of the current line, positioning it somewhere on the
previous line or even before that. This commit fixes this undesired behavior by
never moving point before the beginning of the current line.
- make end indent regexp symmetrical to being regexp allowing for selective
change (e.g., disactivation via non-matching regexp) what is leads to
indentation
Signed-off-by: Michael Steiner <michael.steiner@intel.com>
Giving a default value to `plantuml-exec-mode` local var at startup time
is wrong. This change keeps the local var to `nil` and resorts to the
customizable `plantuml-default-exec-mode`. The local var can be set by users
at will on a buffer local level, but without such an explicit opt-in then the
default value is always used
It is now possible to support many execution modes, currently available are:
- `jar`: the traditional way of running PlantUML from `plantuml-mode`
- `server`: ask a [`plantuml-server`](https://github.com/plantuml/plantuml-server) instance to run the preview (defaults to https://www.plantuml.com/plantuml)
* Added capability to automatically download the PlantUML jar path
As an effort to ease the first user setup, a new function is added to download the latest
PlantUML JAR release into `plantuml-jar-path` from Maven central.
Fixes#73
Now the latest version of PlantUML is downloaded as part of the CI script. This has two consequences:
we always test against the latest and greatest PlantUML version.
PlantUML evolves at a much higher pace than plantuml-mode. This allows for some sanity check of our code with the upstream project.
builds are not reproducible
As a side effect of always downloading a (potentially) new PlantUML version, re-running the build for an old commit can lead to different outcomes. This is usually a big no-no but given the limited efforts currently spent on plantuml-mode I find it more convenient to immediately raise a flag if a new version of PlantUML causes issues.
* Improving preview functionality. No buffer switch.
- Using temp buffer instead of new buffer.
- Windows layout is retained. No need to switch buffer after every preview
* fix version
* split indentation rexgexs
Split the regexs as a preparation for improvement and enhancement.
No explicit enhancement was intended, although the
`plantuml-indent-regexp-block-start' covers more blocks now.
* enhance and test regexs for groups
Changed `plantuml-indent-regexp-group-start' to cover all cases
mentioned on sequence diagram page of the plantuml website. Added
tests for all elements-with and without label (text following the
keyword).
* add support and test for box/end box blocks
* indentation test for a nested interface block
* correction of () at end of file
* indentation test for deployment diagram
* file “Cask”: added dependency to dash
* indentation tests for diagram commons
* add indentation tests for component diagrams
* regex corrections and added indentation tests for class diagrams
correct indentation regexs found by tests for class diagrams
* add indentation tests for object diagrams
* add indentation tests for state diagrams
* enhance indentation class diagram test: abstract class and interface
* move indentation tests to diagram test files
* mv test/plantuml-indentation-test.el -> test/plantuml-indentation-basics-test.el
* add indentation sequence diagram tests and mv basics tests to diagram tests
* add indentation for ref-groups
* improved indentation for ref-groups
* support indentation for activity diagrams - current/old style
* indentation support for notes
* rm not used regexs
* indentation support for plantuml macros
* correction: … → etc.
* fixed indentation code and added de-/activate to indentation
* added tests for indentation changes
* changed indentation code and tests
- more changes to plantuml-indent-regexs
- added more test
- changed function to determine indentation level and tests accordingly
- changed plantuml-indent-line and tests accordingly
- changed test names and doc strings to be more consistent
* more indentation tests, corrected regex for par block
- the par block usually does not have any label
- added database to start regex and added a test
- added block tests
Wrapping the defcustoms in eval-and-compile made the code compileable
but not customizable for the user.
Rewriting the start-process into a function instead of a macro makes it
possible to remove the eval-and-compiles.