[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode fc0a1e3 036/468: Changes/Fixes by Reuben Thomas:
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode fc0a1e3 036/468: Changes/Fixes by Reuben Thomas: |
Date: |
Thu, 5 Aug 2021 04:58:03 -0400 (EDT) |
branch: elpa/lua-mode
commit fc0a1e33f8fc76f1950ad79a7fa7a12e1d690841
Author: juergen <juergen>
Commit: juergen <juergen>
Changes/Fixes by Reuben Thomas:
Remove mention of global font-lock, as this is on by default these
days.
Reduce amount we say about Hide Show, instead referring user to its
own documentation.
For lua-mode.el:
Correct some typos in comments. (closes Debian bug #546465)
Use string-to-number instead of obsolete string-to-int.
Define standard key shortcuts for lua-{beginning,end}-of-proc (closes #2076)
Use the commented out regex-opt (closes Debian bug #546463)
Remove Version: line from comment, just use lua-version defconst.
---
install.rst | 8 +-------
lua-mode.el | 44 ++++++++++++++++++++------------------------
2 files changed, 21 insertions(+), 31 deletions(-)
diff --git a/install.rst b/install.rst
index 41acc55..68d3166 100755
--- a/install.rst
+++ b/install.rst
@@ -18,13 +18,7 @@ Emacs) or ``~/.xemacs/init.el`` file (XEmacs)::
(setq auto-mode-alist (cons '("\\.lua$" . lua-mode) auto-mode-alist))
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
-If you want colorization, turn on ``global-font-lock`` or add this::
-
-(add-hook 'lua-mode-hook 'turn-on-font-lock)
-
-If you want to use hideshow, turn on ``hs-minor-mode`` or add this::
-
-(add-hook 'lua-mode-hook 'hs-minor-mode)
+lua-mode works with Hide Show minor mode (see ``hs-minor-mode``).
DOWNLOAD
------------
diff --git a/lua-mode.el b/lua-mode.el
index bf52b4f..bb26ba1 100755
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1,8 +1,9 @@
;;; lua-mode.el --- a major-mode for editing Lua scripts
-;; Copyright (C) 1997, 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001, 2004, 2006, 2007, 2010 Free Software Foundation,
Inc.
-;; Author: 2006 Juergen Hoetzel <juergen@hoetzel.info>
+;; Author: 2010 Reuben Thomas <rrt@sc3d.org>
+;; 2006 Juergen Hoetzel <juergen@hoetzel.info>
;; 2004 various (support for Lua 5 and byte compilation)
;; 2001 Christian Vogler <cvogler@gradient.cis.upenn.edu>
;; 1997 Bret Mogilefsky <mogul-lua@gelatinous.com> starting from
@@ -11,7 +12,6 @@
;; Paul Du Bois <pld-lua@gelatinous.com> and
;; Aaron Smith <aaron-lua@gelatinous.com>.
;; URL: http://lua-mode.luaforge.net/
-;; Version: 20070703
;; This file is NOT part of Emacs.
;;
;; This program is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
;; MA 02110-1301, USA.
-(defconst lua-version "20071122"
+(defconst lua-version "20100318"
"Lua Mode version number.")
;; Keywords: languages, processes, tools
@@ -136,7 +136,7 @@ Should be a list of strings."
"Keymap used with lua-mode.")
(defvar lua-electric-flag t
-"If t, electric actions (like automatic reindentation) will happen when an
electric
+"If t, electric actions (like automatic reindentation) will happen when an
electric
key like `{' is pressed")
(make-variable-buffer-local 'lua-electric-flag)
@@ -222,17 +222,12 @@ traceback location."
;;
;; Keywords.
- ;; (concat "\\<"
- ;; (regexp-opt '("and" "break" "do" "else" "elseif" "end" "false"
- ;; "for" "function" "if" "in" "local" "nil" "not"
- ;; "or" "repeat" "return" "then" "true" "until"
- ;; "while") t)
- ;; "\\>")
-
- ; Insert expanded regexp-opt here for the benefit of those who
- ; don't have regexp-opt available.
-
-
"\\<\\(and\\|break\\|do\\|e\\(lse\\(if\\)?\\|nd\\)\\|f\\(alse\\|or\\|unction\\)\\|i[fn]\\|local\\|n\\(il\\|ot\\)\\|or\\|re\\(peat\\|turn\\)\\|t\\(hen\\|rue\\)\\|until\\|while\\)\\>"
+ (concat "\\<"
+ (regexp-opt '("and" "break" "do" "else" "elseif" "end" "false"
+ "for" "function" "if" "in" "local" "nil" "not"
+ "or" "repeat" "return" "then" "true" "until"
+ "while") t)
+ "\\>")
"Default expressions to highlight in Lua mode.")))
@@ -344,7 +339,7 @@ The following keys are bound:
(unless (assq 'lua-mode hs-special-modes-alist)
(add-to-list 'hs-special-modes-alist
`(lua-mode
- ,(regexp-opt (mapcar 'car lua-sexp-alist) 'words);start
+ ,(regexp-opt (mapcar 'car lua-sexp-alist) 'words) ;start
,(regexp-opt (mapcar 'cdr lua-sexp-alist) 'words) ;end
nil lua-forward-sexp)))
(run-hooks 'lua-mode-hook)))
@@ -365,14 +360,15 @@ to `lua-mode-map', otherwise they are prefixed with
`lua-prefix-key'."
(define-key lua-mode-map "}" 'lua-electric-match)
(define-key lua-mode-map "]" 'lua-electric-match)
(define-key lua-mode-map ")" 'lua-electric-match)
+ (define-key lua-mode-map (kbd "C-M-a") 'lua-beginning-of-proc)
+ (define-key lua-mode-map (kbd "C-M-e") 'lua-end-of-proc)
+ (define-key lua-mode-map (kbd "C-M-<home>") 'lua-beginning-of-proc)
+ (define-key lua-mode-map (kbd "C-M-<end>") 'lua-end-of-proc)
(let ((map (if lua-prefix-key
(make-sparse-keymap)
lua-mode-map)))
;; communication
- (define-key map "\M-[" 'lua-beginning-of-proc)
- (define-key map "\M-]" 'lua-end-of-proc)
- (define-key map "\C-c" 'comment-region)
(define-key map "\C-l" 'lua-send-buffer)
(define-key map "\C-f" 'lua-search-documentation)
(if lua-prefix-key
@@ -637,7 +633,7 @@ Returns the point, or nil if it reached the end of the
buffer"
"-+*/^.=<>~"))
;;}}}
-;;{{{ var. constans
+;;{{{ var. constants
(defconst lua-cont-eol-regexp
(eval-when-compile
@@ -705,7 +701,7 @@ Returns the point, or nil if it reached the end of the
buffer"
;;{{{ lua-is-continuing-statement-p
(defun lua-is-continuing-statement-p (&optional parse-start)
- "Return nonnil if the line continues a statement.
+ "Return non-nil if the line continues a statement.
More specifically, return the point in the line that is continued.
The criteria for a continuing statement are:
@@ -732,7 +728,7 @@ use standalone."
(cond ((string-equal found-token "function")
;; this is the location where we need to start searching for the
;; matching opening token, when we encounter the next closing token.
- ;; It is primarily an optimization to save some searchingt ime.
+ ;; It is primarily an optimization to save some searching time.
(cons 'absolute (+ (save-excursion (goto-char found-pos)
(current-column))
lua-indent-level)))
@@ -1119,7 +1115,7 @@ t, otherwise return nil. BUF must exist."
(beginning-of-line)
(if (re-search-forward lua-traceback-line-re nil t)
(setq file (match-string 1)
- line (string-to-int (match-string 2)))))
+ line (string-to-number (match-string 2)))))
(when (and lua-jump-on-traceback line)
(beep)
;; TODO: highlight
- [nongnu] elpa/lua-mode 5fa9b81 077/468: lua-indent-line: don't change the indent if inside multiline string literal, (continued)
- [nongnu] elpa/lua-mode 5fa9b81 077/468: lua-indent-line: don't change the indent if inside multiline string literal, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode aedf8a5 018/468: Documentation in restructured text, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 85fda70 039/468: Add patch from Olivier Andrieu for rudimentary long bracket support, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cf9de96 031/468: Reverted invalid changes for Bug #620, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 04fb034 009/468: lua-jump-to-traceback: Issue warnings about truncated traceback, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0ae7e3e 016/468: Handle function names in assignments, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 89dbb80 020/468: imenu fix for local functions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bdf4bab 025/468: support for hideshow, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7c462a 030/468: Fix bug #620: Wrong identation with tables, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode eebb50c 035/468: Fix #1913: Indenting: "(" like "{", Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fc0a1e3 036/468: Changes/Fixes by Reuben Thomas:,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode de08e4b 028/468: Added version comment for Tom Tromeys package.el, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 676f0a6 045/468: Sync with reality., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 239783b 046/468: Bump version., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a5f8e7b 048/468: Fix generation and use of VERSION, and ignore release notes files., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 14300f1 049/468: Specify branch to pull from., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 60073cc 050/468: Change https to http in URL., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7af5dec 057/468: Use line-beginning(-end)-position when possible, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3ba5bf1 059/468: Redo lua-toggle-electric-state, remove extra function lua-calculate-state, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e610db4 060/468: lua-make-indentation-info-pair: readability refactoring, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode cc46763 061/468: Add some comments, Philip Kaludercic, 2021/08/05