branch: elpa/lua-mode
commit a57e25ec8fc2c7a764644129f64c79f63c09adb4
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
Update documentation
---
README.md | 28 +++++++++++++++++++++++-----
lua-mode.el | 40 +++++++++++++++++++++++++++++++++++-----
2 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index a682f7b..12abf8a 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,26 @@ hash-bang line (`#!/usr/bin/lua`). Putting this snippet to
`.emacs` should be en
The following variables are available for customization (see more via `M-x
customize-group lua`):
-- `lua-indent-level` (default `3`): indentation offset in spaces
-- `lua-default-application` (default `"lua"`): command to start up the
interpreter
-- `lua-default-command-switches` (default `"-i"`): arguments to pass to the
interpreter on startup (make sure `-i` is there if you expect working with REPL)
-- `lua-search-url-prefix` (default
`"http://www.lua.org/manual/5.1/manual.html#pdf-"`): base URL for documentation
lookup
-- `lua-indent-string-contents` (default `nil`): set to `t` if you like to have
contents of multiline strings to be indented like comments
+- Var `lua-indent-level` (default `3`): indentation offset in spaces
+- Var `lua-indent-string-contents` (default `nil`): set to `t` if you like to
have contents of multiline strings to be indented like comments
+- Var `lua-mode-hook`: list of functions to execute when lua-mode is
initialized
+- Var `lua-documentation-url` (default
`"http://www.lua.org/manual/5.1/manual.html#pdf-"`): base URL for documentation
lookup
+- Var `lua-documentation-function` (default `browse-url`): function used to
show documentation (`eww` is a viable alternative for Emacs 25)
+
+## LUA SUBPROCESS CREATION
+
+- Var `lua-default-application` (default `"lua"`): command to start up the
subprocess (REPL)
+- Var `lua-default-command-switches` (default `"-i"`): arguments to pass to
the subprocess on startup (make sure `-i` is there if you expect working with
Lua shell interactively)
+- Cmd `lua-start-process`: start new REPL process, usually happens
automatically
+- Cmd `lua-kill-process`: kill current REPL process
+
+## LUA SUBPROCESS INTERACTION
+
+- Cmd `lua-show-process-buffer`: switch to REPL buffer
+- Cmd `lua-hide-process-buffer`: hide window showing REPL buffer
+- Var `lua-always-show`: show REPL buffer after sending something
+- Cmd `lua-send-buffer`: send whole buffer
+- Cmd `lua-send-current-line`: send current line
+- Cmd `lua-send-defun`: send current top-level function
+- Cmd `lua-send-region`: send active region
+- Cmd `lua-restart-with-whole-file`: restart REPL and send whole buffer
diff --git a/lua-mode.el b/lua-mode.el
index 122a51e..8216d1f 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -44,11 +44,41 @@
;; indentation, syntactical font-locking, running interactive shell,
;; interacting with `hs-minor-mode' and online documentation lookup.
-;; Interesting variables:
-;; - `lua-indent-level': indentation offset
-;; - `lua-default-application': command to use as the interpreter
-;; - `lua-default-command-switches': arguments to the interpreter
-;; - `lua-search-url-prefix': url to use for documentation lookup
+;; The following variables are available for customization (see more via
+;; `M-x customize-group lua`):
+
+;; - Var `lua-indent-level':
+;; indentation offset in spaces
+;; - Var `lua-indent-string-contents':
+;; set to `t` if you like to have contents of multiline strings to be
+;; indented like comments
+;; - Var `lua-mode-hook':
+;; list of functions to execute when lua-mode is initialized
+;; - Var `lua-documentation-url':
+;; base URL for documentation lookup
+;; - Var `lua-documentation-function': function used to
+;; show documentation (`eww` is a viable alternative for Emacs 25)
+
+;; These are variables/commands that operate on Lua subprocess:
+
+;; - Var `lua-default-application':
+;; command to start up the subprocess (REPL)
+;; - Var `lua-default-command-switches':
+;; arguments to pass to the subprocess on startup (make sure `-i` is there
+;; if you expect working with Lua shell interactively)
+;; - Cmd `lua-start-process': start new REPL process, usually happens
automatically
+;; - Cmd `lua-kill-process': kill current REPL process
+
+;; These are variables/commands for interaction with Lua subprocess:
+
+;; - Cmd `lua-show-process-buffer': switch to REPL buffer
+;; - Cmd `lua-hide-process-buffer': hide window showing REPL buffer
+;; - Var `lua-always-show': show REPL buffer after sending something
+;; - Cmd `lua-send-buffer': send whole buffer
+;; - Cmd `lua-send-current-line': send current line
+;; - Cmd `lua-send-defun': send current top-level function
+;; - Cmd `lua-send-region': send active region
+;; - Cmd `lua-restart-with-whole-file': restart REPL and send whole buffer
;; See "M-x apropos-command ^lua-" for a list of commands.
;; See "M-x customize-group lua" for a list of customizable variables.