[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode ea7e35c 321/468: Escape tabs in lua-make-lua-stri
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode ea7e35c 321/468: Escape tabs in lua-make-lua-string |
Date: |
Thu, 5 Aug 2021 04:59:01 -0400 (EDT) |
branch: elpa/lua-mode
commit ea7e35cc71efa0acda7e6f6c53fe3adc6951bc1a
Author: Robert Cochran <robert-git@cochranmail.com>
Commit: Robert Cochran <robert-git@cochranmail.com>
Escape tabs in lua-make-lua-string
Doing so prevents comint from intercepting the tabs and passing them to
the underlying shell process, which inserts shell tab completion text
into the code string, mangling it so that it can't run.
---
lua-mode.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index 3126d21..0223be1 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1708,10 +1708,14 @@ This function just searches for a `end' at the
beginning of a line."
(with-temp-buffer
(insert str)
(goto-char (point-min))
- (while (re-search-forward "[\"'\\\n]" nil t)
- (if (string= (match-string 0) "\n")
- (replace-match "\\\\n")
- (replace-match "\\\\\\&" t)))
+ (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
+ (replace-match "\\\\\\&" t))))
(concat "'" (buffer-string) "'"))))
;;;###autoload
- [nongnu] elpa/lua-mode 6315591 265/468: indentation-test: extend unary op test cases, (continued)
- [nongnu] elpa/lua-mode 6315591 265/468: indentation-test: extend unary op test cases, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6c4f7cb 251/468: lua-default-command-switches: declare buffer-local with make-variable-buffer-local, not make-local-variable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9117cfc 269/468: Makefile: add tryout target to start editing test.lua, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2453e37 272/468: Makefile: account EMACS env variable in 'tryout' target, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3e8d475 275/468: Fixed broken local variable assignments, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1d804f6 279/468: Drop pre-Emacs23 support macros, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d6f7e0b 287/468: lua-documentation-function: New custom variable., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f2e5c4b 299/468: Merge pull request #90 from Schnouki/lua53, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 625ed2f 281/468: Move credits to AUTHORS, cleanup Commentary section a bit, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0b41d44 319/468: Merge master into stable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ea7e35c 321/468: Escape tabs in lua-make-lua-string,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 33097fe 329/468: Merge pull request #123 from zonuexe/fix/auto-mode-alist, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e6faecc 328/468: Use \\' instead of $, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5640afe 332/468: Merge pull request #128 from immerrr/update-makefile-and-travis-yml, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 56691b8 338/468: Add tests for preserving point location when filling, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6daec31 342/468: utils: update to new buttercup matcher definition logic (#138), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a80d912 350/468: Fix a minor bug in lua-kill-process, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5a90655 355/468: correct spelling mistake, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aca4014 356/468: utils: update to new buttercup matcher definition logic (#138), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e8281dc 362/468: Fix a minor bug in lua-kill-process, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1f04654 379/468: travis: enable testing on osx, Philip Kaludercic, 2021/08/05