[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 345ebfc 425/468: Merge pull request #174 from imm
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 345ebfc 425/468: Merge pull request #174 from immerrr/assorted-fixes |
Date: |
Thu, 5 Aug 2021 04:59:22 -0400 (EDT) |
branch: elpa/lua-mode
commit 345ebfc1e236d9676e7e9f7364493785e7756348
Merge: 5bfdea5 9d46ad3
Author: immerrr again <immerrr+lua@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #174 from immerrr/assorted-fixes
Assorted fixes
---
README.md | 33 ++++++++++++++++++++++++++++++---
lua-mode.el | 32 ++++++++++++++++++--------------
2 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 5ede768..d7a22bd 100644
--- a/README.md
+++ b/README.md
@@ -9,17 +9,44 @@ If you have a problem or a suggestion about **lua-mode**,
please, let me know ab
## INSTALLATION
+### MELPA INSTALLATION
+
+**lua-mode**'s officially supported installation method is from
[MELPA](https://melpa.org/#/) archive.
+
+To get started, enable installing packages from MELPA:
+
+```lisp
+(require 'package)
+(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
+(package-initialize)
+```
+
+To fetch the list of packages you can do
+
+```
+ <M-x> package-refresh-contents
+```
+
+And after that **lua-mode** can be installed with
+
+```
+ <M-x> package-install "lua-mode"
+```
+
+Please, refer to [MELPA documentation](https://melpa.org/#/getting-started)
and [Emacs documentation on
+packages](https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html)
for further information.
+
### EL-GET INSTALLATION
[El-get](https://github.com/dimitri/el-get) is a package manager which greatly
simplifies adding
-modules to your Emacs and keeping them up-to-date. Once you have **el-get**
set up, installing
-**lua-mode** can be done with
+modules to your Emacs and keeping them up-to-date. Once you have **el-get**
set up,
+**lua-mode** can also be installed with
<M-x> el-get-install "lua-mode"
and updating is no more than
- <M-x> el-get-update "lua-mode"`
+ <M-x> el-get-update "lua-mode"
Please, consult with [el-get
documentation](https://github.com/dimitri/el-get/blob/master/README.md) for
further information.
diff --git a/lua-mode.el b/lua-mode.el
index 4b682d6..a5f5d6a 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -269,7 +269,11 @@ element is itself expanded with `lua-rx-to-string'. "
:group 'lua)
(defcustom lua-default-application "lua"
- "Default application to run in Lua process."
+ "Default application to run in Lua process.
+
+Can be a string, where it denotes a command to be executed to
+start Lua process, or a (HOST . PORT) cons, that can be used to
+connect to Lua process running remotely."
:type '(choice (string)
(cons string integer))
:group 'lua)
@@ -1836,11 +1840,11 @@ This function just searches for a `end' at the
beginning of a line."
(goto-char (point-min))
(while (re-search-forward "[\"'\\\t\\\n]" nil t)
(cond
- ((string= (match-string 0) "\n")
- (replace-match "\\\\n"))
- ((string= (match-string 0) "\t")
- (replace-match "\\\\t"))
- (t
+ ((string= (match-string 0) "\n")
+ (replace-match "\\\\n"))
+ ((string= (match-string 0) "\t")
+ (replace-match "\\\\t"))
+ (t
(replace-match "\\\\\\&" t))))
(concat "'" (buffer-string) "'"))))
@@ -1863,13 +1867,6 @@ When called interactively, switch to the process buffer."
(setq lua-process (get-buffer-process lua-process-buffer))
(set-process-query-on-exit-flag lua-process nil)
(with-current-buffer lua-process-buffer
- ;; wait for prompt
- (while (not (lua-prompt-line))
- (accept-process-output (get-buffer-process (current-buffer)))
- (goto-char (point-max)))
- ;; send initialization code
- (lua-send-string lua-process-init-code)
-
;; enable error highlighting in stack traces
(require 'compile)
(setq lua--repl-buffer-p t)
@@ -1878,7 +1875,14 @@ When called interactively, switch to the process buffer."
(cons (list lua-traceback-line-re 1 2)
compilation-error-regexp-alist))
(compilation-shell-minor-mode 1)
- (setq-local comint-prompt-regexp lua-prompt-regexp))
+ (setq-local comint-prompt-regexp lua-prompt-regexp)
+
+ ;; Don't send initialization code until seeing the prompt to ensure that
+ ;; the interpreter is ready.
+ (while (not (lua-prompt-line))
+ (accept-process-output (get-buffer-process (current-buffer)))
+ (goto-char (point-max)))
+ (lua-send-string lua-process-init-code))
;; when called interactively, switch to process buffer
(if (called-interactively-p 'any)
- [nongnu] elpa/lua-mode 0e6813a 405/468: Refactor indentation tests to use test cases defined in *.lua files, (continued)
- [nongnu] elpa/lua-mode 0e6813a 405/468: Refactor indentation tests to use test cases defined in *.lua files, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode acbcdc9 407/468: Don't prevent "block starter" tokens from starting continuation lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4a45c6d 410/468: lua-make-indentation-info-pair: optimize "same-line" checks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8270df5 411/468: lua-is-continuing-statement-p: remove N^2 complexity on openers/closers, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bf80b7e 414/468: Enable continuation after comma outside of parens/braces/brackets, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode afd5aa3 415/468: test-indentation: remove unused subr-x dependency, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b170500 416/468: Add backport of string-trim not available in Emacs 24, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5bfdea5 420/468: Merge pull request #177 from immerrr/refactor-variable-list-fontification, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0546418 423/468: Extend lua-default-application doc a bit, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9d46ad3 424/468: Update readme, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 345ebfc 425/468: Merge pull request #174 from immerrr/assorted-fixes,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 85d01e9 429/468: `lua-funcname-at-point': fix regexes, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b647537 428/468: `lua-start-proces': don't hang if already running, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 853b040 432/468: `lua-start-process': start a new process sometimes, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fbdbf05 439/468: Merge pull request #181 from immerrr/treat-comment-delimiters-as-comments-too, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d63f2af 441/468: Merge pull request #183 from immerrr/add-lua-skip-ws-comment-functions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e81d0f2 442/468: Merge pull request #179 from nbfalcon/code-cleanup/fix-fixmes, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7ff9c0 444/468: Fix lua-goto-matching-block for when point is at the beginning of keyword, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1f74cd5 453/468: Remove backward-up-list for "for" continuation lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4e346d4 457/468: Add COPYING file, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cf076a6 460/468: Replace funcall-interactively -> call-interactively (for Emacs-24.3), Philip Kaludercic, 2021/08/05