Commit graph

27 commits

Author SHA1 Message Date
john muhl
e29d398399 Fontify 'table.create' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--builtins): Add 'create' to list
of built-in methods.  (Bug#80057)
2026-01-03 13:19:27 +02:00
Sean Whitton
c31f6adc31 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
Paul Eggert
481ad70d5c December 2025 spelling fixes
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.
2025-12-26 10:22:12 -08:00
john muhl
959e67ec4f Fix non-interactive use of 'lua-start-process'
* 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)
2025-11-22 13:03:24 +02:00
Elías Gabriel Pérez
ef2584585b hideshow: Rework previous changes
* 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'.
2025-11-08 20:04:30 +02:00
Elías Gabriel Pérez
cc589d7003 hideshow: Rework previous changes
* 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.
2025-11-06 09:41:12 +02:00
Elías Gabriel Pérez
959345f602 hideshow: Rewrite 'hs-special-modes-alist'
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.
2025-11-04 19:15:10 +02:00
john muhl
81bc83c1a5 New 'lua-mode' inferior process command & options
* 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)
2025-10-18 11:22:43 +03:00
john muhl
bba28b744c Make 'lua-prefix-key' option a 'key-sequence'
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)
2025-08-29 09:47:24 +02:00
john muhl
f908d854d6 ; Various code cleanup in 'lua-mode' (Bug#79309)
* 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.
2025-08-27 10:05:49 +02:00
john muhl
c042611106 Add warn to 'lua-mode' builtins
* lisp/progmodes/lua-mode.el (lua--builtins): Include warn.
2025-08-25 09:59:04 +08:00
john muhl
22e3ba30fa ; Improve compliance of 'lua-mode'
* lisp/progmodes/lua-mode.el: Fix byte-compiler warnings, placate
checkdoc and improve consistency of comment formatting.
2025-08-25 09:59:04 +08:00
john muhl
7fabc65484 ; Update comments & requires in 'lua-mode' 2025-08-25 09:59:04 +08:00
john muhl
8af0064a74 Remove trivial cl-* stuff from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-process-buffer, lua--signum):
Replace 'cl-assert'.
(lua-accumulate-indentation-info): Replace 'cl-dolist' with
'dolist'.
2025-08-25 09:59:04 +08:00
john muhl
426167a8f3 Replace big regexps w/ rx expressions in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-block-regexp)
(lua-indentation-modifier-regexp, lua-cont-eol-regexp)
(lua-cont-bol-regexp): Use rx.
2025-08-25 09:59:04 +08:00
john muhl
2e454bea03 ; Adjust code style in 'lua-mode'
* 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.
2025-08-25 09:59:04 +08:00
john muhl
bf9e502e70 Remove unnecessary 'progn' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-accumulate-indentation-info)
(lua--goto-line-beginning-rightmost-closer): Delete.
2025-08-25 09:59:04 +08:00
john muhl
142f1b2a9b Replace 1-armed 'if' with 'when' in 'lua-mode'
* 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.
2025-08-25 09:59:04 +08:00
john muhl
ee36cac7ba Prefer 'defvar-local' in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-default-command-switches)
(lua-electric-flag, lua--repl-buffer-p): Replace
'make-variable-buffer-local' with 'defvar-local'.
2025-08-25 09:59:04 +08:00
john muhl
fd6d5b65b5 Remove unnecessary 'setq' from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--rx-bindings): Combine variable
definition and assignment.
2025-08-25 09:59:04 +08:00
john muhl
2fe72d48d3 Cleanup whitespace in 'lua-mode' 2025-08-25 09:59:04 +08:00
john muhl
6465b3cbec Cleanup defcustoms in 'lua-mode'
* 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.
2025-08-25 09:59:04 +08:00
john muhl
b7d13f0de0 Remove unnecessary code from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-traceback-line-re)
(lua-start-process): compile.el has Lua support now.
2025-08-25 09:59:04 +08:00
john muhl
509c1af9fc Remove advice from 'lua-mode'
* lisp/progmodes/lua-mode.el (lua--compilation-find-file)
(compilation-find-file, lua--compilation-goto-locus)
(compilation-goto-locus): Delete.
2025-08-25 09:59:04 +08:00
john muhl
3fa5aa47be Use easy-menu in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-mode-menu): Delete.
(lua-mode-map): Use 'easy-menu-define'.
2025-08-25 09:59:04 +08:00
john muhl
0b1b967781 Remove obsolete code from 'lua-mode'
* lisp/progmodes/lua-mode.el: Remove Emacs<27 compatibility code.
(lua-emacs-menu): Remove XEmacs compatibility code.
2025-08-25 09:59:04 +08:00
Juergen Hoetzel
0d3504227a * lisp/progmodes/lua-mode.el: Import lua-mode. 2025-08-25 09:58:34 +08:00