Emacs: update Lua indentation for last version

master
Pierre Neidhardt 2014-11-06 10:02:35 +01:00
parent ff995e8faa
commit d091522e9d
2 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ Example: to assign some-function to C-i, use
;; Third-party modes
(when (require 'package nil t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
;; (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(setq package-user-dir (concat emacs-cache-folder "elpa"))
(package-initialize))

View File

@ -32,7 +32,7 @@ use standalone."
((member found-token (list "until" "elseif"))
(save-excursion
(let ((line (line-number-at-pos)))
(if (and (lua-goto-matching-block-token nil found-pos 'backward)
(if (and (lua-goto-matching-block-token found-pos 'backward)
(= line (line-number-at-pos)))
(cons 'remove-matching 0)
(cons 'relative 0)))))
@ -44,7 +44,7 @@ use standalone."
((string-equal found-token "else")
(save-excursion
(let ((line (line-number-at-pos)))
(if (and (lua-goto-matching-block-token nil found-pos 'backward)
(if (and (lua-goto-matching-block-token found-pos 'backward)
(= line (line-number-at-pos)))
(cons 'replace-matching (cons 'relative lua-indent-level))
(cons 'relative lua-indent-level)))))
@ -64,7 +64,7 @@ use standalone."
(back-to-indentation)
(let ((first-token-p (and (= (match-beginning 0) (point))
(= (lua-find-regexp 'forward lua-indentation-modifier-regexp (line-end-position)) cur-point))))
(lua-goto-matching-block-token nil found-pos 'backward)
(lua-goto-matching-block-token found-pos 'backward)
(if (and (/= line (line-number-at-pos)) (not first-token-p))
(cons 'relative (- lua-indent-level))
(cons 'remove-matching 0))))))