[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 8c28ed5 095/468: Add utility funcs lua-inside-mul
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 8c28ed5 095/468: Add utility funcs lua-inside-multiline-p and lua-get-multiline-start |
Date: |
Thu, 5 Aug 2021 04:58:14 -0400 (EDT) |
branch: elpa/lua-mode
commit 8c28ed53ec64977e56116f7e2834eebc97090c49
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Add utility funcs lua-inside-multiline-p and lua-get-multiline-start
---
lua-mode.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lua-mode.el b/lua-mode.el
index b54a5b2..f050f2a 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1191,6 +1191,16 @@ mark char as comment delimiter. Otherwise, remove the
mark if any."
(lua-put-char-syntax-table pos (lua-get-multiline-delim-syntax type))
(set-buffer-modified-p old-modified-p))))
+(defsubst lua-inside-multiline-p (&optional pos)
+ (let ((status (syntax-ppss pos)))
+ (or (eq (elt status 3) t) ;; inside generic string
+ (eq (elt status 7) 'syntax-table)))) ;; inside generic comment
+
+(defun lua-get-multiline-start (&optional pos)
+ (interactive)
+ (when (lua-inside-multiline-p pos) ;; return string/comment start
+ (elt (syntax-ppss pos) 8)))
+
(defun lua-unmark-multiline-literals (&optional begin end)
"Clears all Lua multiline construct markers in region
- [nongnu] elpa/lua-mode 4b407cc 203/468: Print 'Prefix key set to ...' only when setting via interactive function, (continued)
- [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, 2021/08/05
- [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 <=
- [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
- [nongnu] elpa/lua-mode 37f51cb 152/468: Fix multiline literal highlighting for long strings (#20), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b33f255 154/468: Make lua-mode-hook customizable., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec26ea4 155/468: Fix: Single-line conditionals can confuse indenting (#22), Philip Kaludercic, 2021/08/05