aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/lua-mode.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fontify 'table.create' in 'lua-mode'john muhl2026-01-031-2/+2
| | | | | * lisp/progmodes/lua-mode.el (lua--builtins): Add 'create' to list of built-in methods. (Bug#80057)
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* December 2025 spelling fixesPaul Eggert2025-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
* Fix non-interactive use of 'lua-start-process'john muhl2025-11-221-12/+23
| | | | | | | | | | * lisp/progmodes/lua-mode.el (lua-process-init-code): Add newline. (lua-start-process): Use 'process-send-string' to avoid starting two processes. Flatten 'switches' argument since rest arguments get added to a list. Replace 'switch-to-buffer' with 'pop-to-buffer' so that the process window behavior can be customized with 'display-buffer-alist'. Expand docstring and update it to match the code. (Bug#79853)
* hideshow: Rework previous changesElías Gabriel Pérez2025-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/hideshow.el: Set default values of buffer-local variables. (hs-inside-comment-p): Restore. (hs--set-variable): Rename from 'hs--get-mode-value'. (hs-grok-mode-type): Rework. * lisp/nxml/nxml-mode.el: * lisp/progmodes/f90.el: * lisp/progmodes/fortran.el: * lisp/progmodes/icon.el: * lisp/progmodes/lua-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/verilog-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/mhtml-mode.el: * lisp/textmodes/sgml-mode.el: * lisp/treesit.el (treesit-major-mode-setup): Rename 'hs-forward-sexp-func' to 'hs-forward-sexp-function', 'hs-adjust-block-beginning' to 'hs-adjust-block-beginning-function', 'hs-find-block-beginning-func' to 'hs-find-block-beginning-function', 'hs-find-next-block-func' to 'hs-find-next-block-function', 'hs-looking-at-block-start-p-func' to 'hs-looking-at-block-start-predicate', 'hs-inside-comment-p-func' to 'hs-inside-comment-predicate'.
* hideshow: Rework previous changesElías Gabriel Pérez2025-11-061-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/programs.texi (Hideshow): * etc/NEWS: Fix doc. * lisp/progmodes/hideshow.el: Update Commentary Header. (hs-modes-alist): Remove. (hs--get-mode-value, hs-grok-mode-type): Rework. * lisp/treesit.el (treesit-major-mode-setup): * lisp/emacs-lisp/lisp-mode.el: * lisp/nxml/nxml-mode.el: * lisp/progmodes/cc-mode.el: * lisp/progmodes/f90.el: * lisp/progmodes/fortran.el: * lisp/progmodes/hideshow.el: * lisp/progmodes/icon.el: * lisp/progmodes/js.el: * lisp/progmodes/lua-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/verilog-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/mhtml-mode.el: * lisp/textmodes/sgml-mode.el: * lisp/treesit.el: Fix and rework previous changes.
* hideshow: Rewrite 'hs-special-modes-alist'Elías Gabriel Pérez2025-11-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the format in 'hs-special-modes-alist' to make easier to exclude some values, add support for settings inheritance according to current major mode and parents, and support string hiding for lisp modes. Bug#79671 * lisp/progmodes/hideshow.el (hs-modes-alist): New variable. (hs-special-modes-alist): Mark as obsolete. (hs-forward-sexp-func, hs-adjust-block-beginning) (hs-find-block-beginning-func, hs-find-next-block-func) (hs-looking-at-block-start-p-func): Set default values to nil. (hs-inside-comment-p): Remove function. (hs-adjust-block-end, hs-treesit-things): New buffer-local variables. (hs-block-positions): Minor updates. (hs--get-mode-value): New function. (hs-grok-mode-type): Rewrite. * lisp/progmodes/f90.el (hs-special-modes-alist): * lisp/progmodes/fortran.el (hs-special-modes-alist): * lisp/progmodes/icon.el (icon-mode): * lisp/progmodes/lua-mode.el (lua-mode): * lisp/progmodes/python.el (python-base-mode): * lisp/progmodes/verilog-mode.el (verilog-mode): * lisp/progmodes/vhdl-mode.el (vhdl-hs-minor-mode): Rewrite settings. * lisp/progmodes/python.el (python-ts-hs-adjust-block-end-fn): New function. * lisp/treesit.el (treesit-hs-block-end) (treesit-hs-find-block-beginning, treesit-hs-find-next-block) (treesit-hs-looking-at-block-start-p): Minor updates. * doc/emacs/programs.texi (Hideshow): * etc/NEWS: Document changes.
* New 'lua-mode' inferior process command & optionsjohn muhl2025-10-181-29/+57
| | | | | | | | * lisp/progmodes/lua-mode.el (lua-process-buffer-name) (lua-process-history-file, lua-process-startfile): New options. (lua-start-process): Use new options. (lua-send-file): New command. (lua--repl-buffer-p): Remove unused internal variable. (Bug#79573)
* Make 'lua-prefix-key' option a 'key-sequence'john muhl2025-08-291-32/+31
| | | | | | | | | | | | This fixes a failure in 'test-custom-opts' caused by both strings and integers being used for 'lua-prefix-key'. * lisp/progmodes/lua-mode.el (lua-prefix-key): Convert option to 'key-sequence' type. (lua-mode-map, lua-prefix-key-update-bindings, lua-set-prefix-key) (lua--customize-set-prefix-key): Adjust to the change of type for 'lua-prefix-key'. (lua-prefix-mode-map): Use 'defvar-keymap'. (Bug#79335)
* ; Various code cleanup in 'lua-mode' (Bug#79309)john muhl2025-08-271-56/+54
| | | | | | | | | | | | | | | | | | * lisp/progmodes/lua-mode.el (lua-indent-level): Contemporary Lua style guides no longer recommend 3 as default. Change type to 'natnum'. (lua-always-show, lua-get-block-token-info) (lua--backward-up-list-noerror, lua-make-indentation-info-pair) (lua-accumulate-indentation-info) (lua-calculate-indentation-block-modifier): Quote function names. (lua-toggle-electric-state): Re-format to avoid confusion. (lua-is-continuing-statement-p-1): Fix typo. (lua--builtins): Move docstring to correct location. (lua-is-continuing-statement-p-1): Remove unnecessary 'or'. (lua-make-lua-string): Remove excessive backslashes and unnecessary use of a temporary buffer. (lua-find-matching-token-word): Make it clear that 'goto-char' is only used only for its side-effect.
* Add warn to 'lua-mode' builtinsjohn muhl2025-08-251-1/+1
| | | | * lisp/progmodes/lua-mode.el (lua--builtins): Include warn.
* ; Improve compliance of 'lua-mode'john muhl2025-08-251-389/+472
| | | | | * lisp/progmodes/lua-mode.el: Fix byte-compiler warnings, placate checkdoc and improve consistency of comment formatting.
* ; Update comments & requires in 'lua-mode'john muhl2025-08-251-32/+27
|
* Remove trivial cl-* stuff from 'lua-mode'john muhl2025-08-251-5/+5
| | | | | | | * lisp/progmodes/lua-mode.el (lua-process-buffer, lua--signum): Replace 'cl-assert'. (lua-accumulate-indentation-info): Replace 'cl-dolist' with 'dolist'.
* Replace big regexps w/ rx expressions in 'lua-mode'john muhl2025-08-251-41/+38
| | | | | | * lisp/progmodes/lua-mode.el (lua-block-regexp) (lua-indentation-modifier-regexp, lua-cont-eol-regexp) (lua-cont-bol-regexp): Use rx.
* ; Adjust code style in 'lua-mode'john muhl2025-08-251-86/+76
| | | | | | | | | | | | | | | * lisp/progmodes/lua-mode.el (lua-prefix-key) (lua-goto-matching-block): Replace 'let...if' with 'if-let*'. (lua--fill-paragraph, lua-goto-matching-block-token): Replace 'let...when' with 'when-let*'. (lua-comment-start-pos): Replace 'unless..and' with 'if-let*'. (lua-skip-ws-and-comments-backward) (lua-skip-ws-and-comments-forward): Remove unnecessary 'setq'. (lua-indent-line): Replace 'when...not' with 'unless'. (lua-calculate-string-or-comment-indentation): Formatting. (lua-find-matching-token-word): Remove a level of 'let' nesting, replace 'when...not' with 'unless'. (lua-indent-line): Combine 'setq's.
* Remove unnecessary 'progn' in 'lua-mode'john muhl2025-08-251-8/+7
| | | | | * lisp/progmodes/lua-mode.el (lua-accumulate-indentation-info) (lua--goto-line-beginning-rightmost-closer): Delete.
* Replace 1-armed 'if' with 'when' in 'lua-mode'john muhl2025-08-251-63/+63
| | | | | | | | | | * lisp/progmodes/lua-mode.el (lua--customize-set-prefix-key) (lua-electric-match, lua-prefix-key-update-bindings) (lua-indent-line, lua-find-matching-token-word) (lua-goto-matching-block-token, lua-last-token-continues-p) (lua-is-continuing-statement-p) (lua--goto-line-beginning-rightmost-closer, lua-start-process) (lua-prompt-line): Replace.
* Prefer 'defvar-local' in 'lua-mode'john muhl2025-08-251-6/+3
| | | | | | * lisp/progmodes/lua-mode.el (lua-default-command-switches) (lua-electric-flag, lua--repl-buffer-p): Replace 'make-variable-buffer-local' with 'defvar-local'.
* Remove unnecessary 'setq' from 'lua-mode'john muhl2025-08-251-38/+35
| | | | | * lisp/progmodes/lua-mode.el (lua--rx-bindings): Combine variable definition and assignment.
* Cleanup whitespace in 'lua-mode'john muhl2025-08-251-29/+0
|
* Cleanup defcustoms in 'lua-mode'john muhl2025-08-251-19/+22
| | | | | | | | | | | | | * lisp/progmodes/lua-mode.el (lua-mode-hook): Add options. (lua-indent-level, lua-comment-start, lua-comment-start-skip) (lua-default-application, lua-default-command-switches) (lua-always-show, lua-documentation-function) (lua-documentation-url, lua-prefix-key, lua-prompt-regexp) (lua-indent-string-contents) (lua-indent-nested-block-content-align) (lua-indent-close-paren-align, lua-jump-on-traceback) (lua-mode-hook, lua-mode, lua-luacheck-program): Delete group, add version.
* Remove unnecessary code from 'lua-mode'john muhl2025-08-251-20/+2
| | | | | * lisp/progmodes/lua-mode.el (lua-traceback-line-re) (lua-start-process): compile.el has Lua support now.
* Remove advice from 'lua-mode'john muhl2025-08-251-29/+0
| | | | | | * lisp/progmodes/lua-mode.el (lua--compilation-find-file) (compilation-find-file, lua--compilation-goto-locus) (compilation-goto-locus): Delete.
* Use easy-menu in 'lua-mode'john muhl2025-08-251-37/+17
| | | | | * lisp/progmodes/lua-mode.el (lua-mode-menu): Delete. (lua-mode-map): Use 'easy-menu-define'.
* Remove obsolete code from 'lua-mode'john muhl2025-08-251-166/+44
| | | | | * lisp/progmodes/lua-mode.el: Remove Emacs<27 compatibility code. (lua-emacs-menu): Remove XEmacs compatibility code.
* * lisp/progmodes/lua-mode.el: Import lua-mode.Juergen Hoetzel2025-08-251-0/+2291