diff options
Diffstat (limited to '.emacs.d')
| -rw-r--r-- | .emacs.d/lisp/lua-mode.el | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/.emacs.d/lisp/lua-mode.el b/.emacs.d/lisp/lua-mode.el index 6c524f5..be56111 100644 --- a/.emacs.d/lisp/lua-mode.el +++ b/.emacs.d/lisp/lua-mode.el | |||
| @@ -376,8 +376,8 @@ If the latter is nil, the keymap translates into `lua-mode-map' verbatim.") | |||
| 376 | "Keymap used in lua-mode buffers.") | 376 | "Keymap used in lua-mode buffers.") |
| 377 | 377 | ||
| 378 | (defvar lua-electric-flag t | 378 | (defvar lua-electric-flag t |
| 379 | "If t, electric actions (like automatic reindentation) will happen when an electric | 379 | "If t, electric actions will happen when an electric key like `{' is pressed. |
| 380 | key like `{' is pressed") | 380 | Automatic reindentation is an example of an electric action.") |
| 381 | (make-variable-buffer-local 'lua-electric-flag) | 381 | (make-variable-buffer-local 'lua-electric-flag) |
| 382 | 382 | ||
| 383 | (defcustom lua-prompt-regexp "[^\n]*\\(>[\t ]+\\)+$" | 383 | (defcustom lua-prompt-regexp "[^\n]*\\(>[\t ]+\\)+$" |
| @@ -1054,9 +1054,15 @@ found, returns point position, nil otherwise." | |||
| 1054 | Each token information entry is of the form: | 1054 | Each token information entry is of the form: |
| 1055 | KEYWORD FORWARD-MATCH-REGEXP BACKWARDS-MATCH-REGEXP TOKEN-TYPE | 1055 | KEYWORD FORWARD-MATCH-REGEXP BACKWARDS-MATCH-REGEXP TOKEN-TYPE |
| 1056 | KEYWORD is the token. | 1056 | KEYWORD is the token. |
| 1057 | FORWARD-MATCH-REGEXP is a regexp that matches all possible tokens when going forward. | 1057 | FORWARD-MATCH-REGEXP is a regexp that matches all possible tokens |
| 1058 | BACKWARDS-MATCH-REGEXP is a regexp that matches all possible tokens when going backwards. | 1058 | when going forward. |
| 1059 | TOKEN-TYPE determines where the token occurs on a statement. open indicates that the token appears at start, close indicates that it appears at end, middle indicates that it is a middle type token, and middle-or-open indicates that it can appear both as a middle or an open type.") | 1059 | BACKWARDS-MATCH-REGEXP is a regexp that matches all possible tokens |
| 1060 | when going backwards. | ||
| 1061 | TOKEN-TYPE determines where the token occurs on a statement. `open' | ||
| 1062 | indicates that the token appears at start, close indicates that it | ||
| 1063 | appears at end, `middle' indicates that it is a middle type token, | ||
| 1064 | and `middle-or-open' indicates that it can appear both as a middle | ||
| 1065 | or an open type.") | ||
| 1060 | 1066 | ||
| 1061 | (defconst lua-indentation-modifier-regexp | 1067 | (defconst lua-indentation-modifier-regexp |
| 1062 | ;; The absence of else is deliberate, since it does not modify the | 1068 | ;; The absence of else is deliberate, since it does not modify the |
| @@ -1442,14 +1448,12 @@ The criteria for a continuing statement are: | |||
| 1442 | 1448 | ||
| 1443 | 1449 | ||
| 1444 | (defun lua-is-continuing-statement-p (&optional parse-start) | 1450 | (defun lua-is-continuing-statement-p (&optional parse-start) |
| 1445 | "Returns non-nil if the line at PARSE-START should be indented as continuation line. | 1451 | "Return non-nil if line at PARSE-START is a continuation line. |
| 1446 | 1452 | ||
| 1447 | This true is when the line : | 1453 | This affects how it should be indented. A line is a continuation line if |
| 1448 | 1454 | - it is continuing a statement itself, or | |
| 1449 | * is continuing a statement itself | 1455 | - it starts with a 1+ block-closer tokens, an top-most block opener is on |
| 1450 | 1456 | a continuation line." | |
| 1451 | * starts with a 1+ block-closer tokens, an top-most block opener is on a continuation line | ||
| 1452 | " | ||
| 1453 | (save-excursion | 1457 | (save-excursion |
| 1454 | (if parse-start (goto-char parse-start)) | 1458 | (if parse-start (goto-char parse-start)) |
| 1455 | 1459 | ||
