Christoph Badura [Sun, 26 Jan 2025 21:48:11 +0000 (22:48 +0100)]
VC: New hook to strip CVS template lines when committing
Add a hook function to strip all lines beginning with "CVS:" from the
commit message as CVS does. Do this only if 'log-edit-vc-backend' is
'CVS'. (Bug#72341)
* lisp/vc/log-edit.el
(log-edit-done-strip-cvs-lines): New command.
(log-edit-done-hook): Add it as an option.
* test/lisp/vc/log-edit-tests.el
(log-edit-done-strip-cvs-lines-helper): New function.
(log-edit-done-strip-cvs-lines-cvs)
(log-edit-done-strip-cvs-lines-non-cvs)
(log-edit-done-strip-cvs-lines-only-cvs-colon-blank)
(log-edit-done-strip-cvs-lines-only-cvs-colon): New test cases.
Po Lu [Sat, 8 Mar 2025 13:58:19 +0000 (21:58 +0800)]
; Enable pdumper on some buggy versions of Sun C
* src/pdumper.c (dump_sort_copied_objects, drain_reloc_list)
(dump_do_fixups, dump_do_dump_relocation): Do not expand
Fnreverse multiple times in CALLN. Sun C 5.12 evaluates the
arguments to array initializers to which it expands, which
clobbers the lists being reversed.
João Távora [Sat, 8 Mar 2025 04:42:21 +0000 (04:42 +0000)]
Eglot: tests must work on 26.3
;; IMPORTANT: Since Eglot is a :core ELPA package, these tests are
;; supposed to run on Emacsen down to 26.3. Do not use bleeding-edge
;; functionality not compatible with that Emacs version.
* test/lisp/progmodes/eglot-tests.el (eglot--call-with-timeout):
Back to cl-gensym.
* lisp/emacs-lisp/ert-font-lock.el: Remove redundant requires.
(ert-font-lock--parse-macro-args): First return value 'doc' being
nil already indicates omission of a docstring, so remove redundant
second return value doc-p. All users updated. Fix error
messages (bug#76372).
(ert-font-lock--check-faces): Simplify with ensure-list.
Stefan Monnier [Fri, 7 Mar 2025 04:23:08 +0000 (23:23 -0500)]
(python-base-mode-map): Use it!
Rather than use `copy-keymap` between `python-mode-map` and
`python-ts-mode-map`, move the shared bindings to `python-base-mode-map`.
* lisp/progmodes/python.el (python-base-mode-map): Define it explicitly.
Move all the bindings of `python-mode-map` to it.
(python-mode-map, python-ts-mode-map): Inherit from it.
* lisp/tab-bar.el
(tab-bar-tab-highlight): New face.
(tab-bar-tab-name-format-mouse-face): New function adds the 'mouse-face'
'tab-bar-tab-highlight' to the tab name.
(tab-bar-tab-name-format-functions): Add
'tab-bar-tab-name-format-mouse-face'.
Juri Linkov [Thu, 6 Mar 2025 18:22:50 +0000 (20:22 +0200)]
Improve treesit settings for js/typescript/ruby-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-list-nodes):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--list-nodes):
Replace leaf "string" with "template_string" and "template_substitution"
that can contain more nodes.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add the 'sentence' thing to treesit-thing-settings.
Stefan Monnier [Thu, 6 Mar 2025 18:02:37 +0000 (13:02 -0500)]
(debug): Don't `kill-emacs` upon exit when in batch mode
AFAICT this is a left over code from many years ago before
the `debug` special case was added to `condition-case` and
at a time where exiting from `debug` did not proceed to handle
remaining handlers.
In the usual case where we indeed want to kill Emacs,
`signal_or_quit` does it for us.
* lisp/emacs-lisp/debug.el (debug): Don't `kill-emacs` upon exit
when in batch mode (bug#76786)
Kazuhiro Ito [Sun, 23 Feb 2025 13:47:00 +0000 (22:47 +0900)]
Avoid defining unneeded variables on Cygw32
lisp/term/w32-win.el contained definitions of variables which
were not used on Cygw32. It is now to split into two files,
common part and Windows native build specific part. The latter
is a new file, lisp/term/w32-nt.el.
* src/image.c (Qlibpng_version, Qlibgif_version)
(Qlibjpeg_version): Don't define on Cygw32 build.
* src/treesit.c (Qtree_sitter__library_abi): Ditto.
* lisp/term/w32-win.el (dynamic-library-alist, libpng-version)
(libgif-version, libjpeg-version, libgnutls-version)
(tree-sitter--library-abi, gui-backend-set-selection)
(gui-backend-get-selection, gui-backend-selection-owner-p)
(gui-selection-exists-p): Moved to lisp/term/w32-nt.el.
* lisp/term/w32-nt.el: New file, separated Windows native build
specific part from lisp/term/w32-win.el.
* lisp/loadup.el: Load term/w32-nt.el on Windows native build.
(Bug#75926)
Visuwesh [Mon, 3 Mar 2025 08:26:04 +0000 (13:56 +0530)]
Add new user option to exclude projects from being remembered
* lisp/progmodes/project.el (project-list-exclude): Add new user
option to exclude projects from being remembered.
(project-remember-project): Consider the user option above.
(project-switch-project): Use 'project-remember-project' instead.
* doc/emacs/maintaining.texi (Managing Projects): Mention the new user option.
* etc/NEWS: Announce the change. (Bug#76587)
Stefan Kangas [Wed, 5 Mar 2025 23:33:21 +0000 (00:33 +0100)]
New user option checkdoc-arguments-missing-flag
* lisp/emacs-lisp/checkdoc.el
(checkdoc-arguments-missing-flag): New user option.
(checkdoc-this-string-valid-engine): Use above new option.
(checkdoc--argument-missing-flag): Make into obsolete variable alias for
above new option.
Juri Linkov [Wed, 5 Mar 2025 17:44:44 +0000 (19:44 +0200)]
Improve treesit settings for typescript/tsx-ts-mode (bug#73404)
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Add @font-lock-type-face
for 'internal_module' with 'identifier'.
(typescript-ts-mode--defun-type-regexp): New variable with
"internal_module" and "interface_declaration".
(typescript-ts-mode--defun-name): New function that uses
'js--treesit-defun-name' and adds "internal_module" and
"interface_declaration".
(typescript-ts-mode--simple-imenu-settings): New variable
like in 'js-ts-mode' with "Namespace" and "Interface" sections.
(typescript-ts-mode--outline-predicate): New variable.
(typescript-ts-base-mode): Set treesit-defun-type-regexp to
typescript-ts-mode--defun-type-regexp, treesit-defun-name-function
to typescript-ts-mode--defun-name, treesit-simple-imenu-settings
to typescript-ts-mode--simple-imenu-settings,
treesit-outline-predicate to typescript-ts-mode--outline-predicate.
Use js--regexp-opt-symbol for treesit-thing-settings.
(tsx-ts-mode): For 'sentence' thing use the same nodes as
js--treesit-sentence-nodes. Use js--regexp-opt-symbol for
treesit-thing-settings.
* lisp/progmodes/js.el (js--treesit-sentence-nodes): Add
"jsx_opening_element" and "jsx_closing_element" like in html.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate): Add
outline headings for C++ "namespace_definition" and "class_specifier".
Peter Oliver [Mon, 27 Jan 2025 10:59:19 +0000 (10:59 +0000)]
Provide an Android version code derived from the Emacs version
The version code is intended to be an integer that increments
for each Android package release
(https://developer.android.com/studio/publish/versioning#versioningsettings).
If we keep this updated under version control, then F-Droid (a
third-party Android package repository), can watch for that, and
use it to automatically build Emacs packages for Android each
time a new Emacs release is tagged
(https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckData).
* admin/admin.el (set-version): Update version code in
java/incrementing-version-code
* java/incrementing-version-code: New file containing an Android
version code corresponding to the current Emacs version.
(bug#75809)
Stefan Kangas [Wed, 5 Mar 2025 02:36:04 +0000 (03:36 +0100)]
Make byte-compile-cond-use-jump-table obsolete
This user option was introduced in 2017, with the rationale:
"This is a workaround for when `byte-compile-cond-jump-table'
accidentally generates wrong code (hasn't happened so far in my
tests), and should be removed once we're sure there are no issues
with it." https://lists.gnu.org/r/emacs-devel/2017-02/msg00223.html
There hasn't been any bugs in this area within the last 6 years, and the
few we did see before that were quickly resolved. Let's declare this
variable obsolete now, while keeping its behavior when set to nil. We
can always revert the obsoletion if it turns out to be needed after all.
Stefan Kangas [Wed, 5 Mar 2025 01:42:10 +0000 (02:42 +0100)]
Clean up 'cl-' prefixes for local variables
The 'cl-' prefixes used for let-bound variables and argument names is a
holdover from the dynbind days. They are no longer necessary, and make
the code hard to read. This was partially cleaned up in the past; let's
finish the job now.
Stefan Kangas [Tue, 4 Mar 2025 21:47:59 +0000 (22:47 +0100)]
Avoid rare warning when byte-compiling cl-loaddefs.el
* lisp/emacs-lisp/cl-extra.el: Add autoloaded declare-function to avoid
rare byte-compilation warning.
Problem reported by Eli Zaretskii <eliz@gnu.org>.
With -std=c11, GCC doesn't recognize 'asm' as a keyword, see
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html and
https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html. Use __asm__
instead.
* src/lisp.h (flush_stack_call_func): Use __asm__ instead of asm.
Eli Zaretskii [Tue, 4 Mar 2025 13:45:33 +0000 (15:45 +0200)]
Fix 'etc/DOC' for a few functions/variables
* src/term.c (Ftty_frame_at):
* src/menu.c (syms_of_menu) <x-popup-menu-function>:
* src/dispnew.c (Fredisplay): Fix "doc:". The extra blank was
preventing 'make-docfile' from recognizing the functions and
variables and extracting their documentation to 'etc/DOC'.
(Bug#76722)
Ben Simms [Sun, 5 Jan 2025 19:03:53 +0000 (20:03 +0100)]
Support colored stipples on Cocoa NS (Bug#73384)
On Cocoa builds of NS Emacs, stipples are now rendered
using masked CGImages instead of patterned NSColors so that
stipples now render with color.
* src/nsimage.m ([EmacsImage stippleMask:]): Use a CGImageMask to
store the stipple mask when building for Cocoa.
* src/nsterm.m (ns_maybe_dumpglyphs_background): Perform a masked
fill to draw stipples when building for Cocoa.
(ns_draw_stretch_glyph_string): Perform a masked fill to draw
stipples when building for Cocoa.
Po Lu [Tue, 4 Mar 2025 06:24:56 +0000 (14:24 +0800)]
Document requirements respecting XDG MIME databases on Android
* doc/emacs/android.texi (Android Software): State that librsvg
requires a MIME database to display embedded images, and how to
acquire such a database.
Paul Eggert [Tue, 4 Mar 2025 06:20:08 +0000 (22:20 -0800)]
Revert “Avoid some union buffered_input_event uses”
Revert my commit 29a9fd4f4ba17822eca0f00c2037da3868bd874e
and the following commit 1ec0889e7b786d79351cee3ed4964d82295f059f.
This fixes a bug where ‘emacs -nw’ would sometimes freeze when Emacs is
configured with ‘--with-pgtk --enable-link-time-optimization
--disable-gc-mark-trace’ on GNU/Linux x86-64 (Bug#76729).
As it is not yet clear whether this freeze is due to an Emacs bug that
I introduced, or due to GCC bug 117423
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423>,
play it safe for now and revert to the previous state.
Stefan Monnier [Tue, 4 Mar 2025 03:18:02 +0000 (22:18 -0500)]
(advice--make-nadvice-docstring): Rename
* lisp/emacs-lisp/nadvice.el (advice--make-nadvice-docstring): Rename
from `nadvice--make-docstring`, to stick to the `advice-` namespace.
Update all callers.
Stefan Kangas [Tue, 4 Mar 2025 01:59:03 +0000 (02:59 +0100)]
Update Makefile and docs for new Spanish refcards
* etc/refcards/Makefile (PDF_SPANISH, PS_SPANISH): New variables.
(PDF_TARGETS): Use above new variables.
(spanish, spanish-ps): New targets for Spanish translation. (Bug#76300)
* admin/release-process:
* etc/refcards/README: Document new Spanish translation.