[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 0f6048d 082/468: Implement lua-mark-all-multiline
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 0f6048d 082/468: Implement lua-mark-all-multiline-literals function |
Date: |
Thu, 5 Aug 2021 04:58:12 -0400 (EDT) |
branch: elpa/lua-mode
commit 0f6048dbfbbbceab31b8e2549ee52fa1a529a3f2
Author: immerrr <immerrr@gmail.com>
Commit: immerrr <immerrr@gmail.com>
Implement lua-mark-all-multiline-literals function
---
lua-mode.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lua-mode.el b/lua-mode.el
index f8dc2eb..4520258 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1195,6 +1195,23 @@ If END is nil, stop at `end-of-buffer'."
(remove-text-properties (or begin 1) (or end (buffer-size)) '(syntax-table
()))
(font-lock-fontify-buffer))
+(defun lua-mark-all-multiline-literals (&optional begin end)
+ "Marks all Lua multiline constructs in region
+
+If BEGIN is nil, start from `beginning-of-buffer'.
+If END is nil, stop at `end-of-buffer'."
+ (interactive)
+ (lua-clear-multiline-delims begin end)
+ (save-excursion
+ (if begin (goto-char begin))
+ (while (re-search-forward "\\[\\(=*\\)\\[" end 'noerror)
+ (unless (lua-comment-or-string-p)
+ (message "found %s" (match-string 0))
+ (lua-mark-char-multiline-delim (match-beginning 0) 'string)
+ (when (re-search-forward (format "\\]%s\\]" (or (match-string 1) ""))
end 'noerror)
+ (message "found match %s" (match-string 0))
+ (lua-mark-char-multiline-delim (1- (match-end 0)) 'string))))))
+
(provide 'lua-mode)
- [nongnu] elpa/lua-mode 7a3a5f6 169/468: Add script to facilitate indentation testing, (continued)
- [nongnu] elpa/lua-mode 7a3a5f6 169/468: Add script to facilitate indentation testing, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7f8e519 178/468: Add backward compatibility aliases for cl-assert & cl-labels functions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e6a46ee 182/468: Update README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4b407cc 203/468: Print 'Prefix key set to ...' only when setting via interactive function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 88b0ec3 209/468: Fix indentation for blocks starting on continued lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 32b5639 210/468: Fix wrong imenu generic expression, add one more regexp to match 'x = function(...)' definitions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 57d3e46 212/468: lua-mode.el: bump "Version:" field, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c7c8d0c 179/468: Fix bug with lua-mode-syntax-table initialization, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0b4ae97 184/468: Merge branch 'fix-36' of git://github.com/vhallac/lua-mode, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 562540e 073/468: Fix lua-calculate-indentation: indent to 0 when inside string literal, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0f6048d 082/468: Implement lua-mark-all-multiline-literals function,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 96eba74 085/468: lua-(comment/string)-p: add optional pos parameter, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aef55a6 091/468: Update contact info in README; bump version, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8c28ed5 095/468: Add utility funcs lua-inside-multiline-p and lua-get-multiline-start, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 79ff5d0 110/468: lua-postprocess-output-buffer: replace save-excursion/set-buffer with with-current-buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9b929d4 115/468: Reorder operations in release target so that no pushing/sending is done if master differs from remotes/origin/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9c94413 118/468: lua-comment/-string-p funcs: wrap into save-excursion because syntax-ppss alters point position, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e470943 131/468: lua-mode-abbrev-table: mark abbreviations as :system so that they're not counted as user-defined and are not saved automatically (issue #8), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f4ab885 144/468: lua-cont-eol-regexp: add "return" keyword too, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 01d0f38 146/468: Bump thanks section, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ded7566 151/468: Add lua-with-silent-modifications macro, use it to fix the undo history issue (#21), Philip Kaludercic, 2021/08/05