Eli Zaretskii [Sun, 27 Oct 2024 11:16:36 +0000 (13:16 +0200)]
Update the documentation of void functions
* doc/lispref/functions.texi (Function Cells):
* src/data.c (Ffboundp, Ffmakunbound, Fsymbol_function): Update
documentation to the changes of how void functions are represented
since Emacs 24.5. (Bug#73886)
Sean Whitton [Sun, 27 Oct 2024 06:11:50 +0000 (14:11 +0800)]
vc-git-resolve-conflicts: Extend unstage-maybe to similar operations
* lisp/vc/vc-git.el (vc-git-resolve-when-done): When
vc-git-resolve-conflicts is unstage-maybe, don't clear the
staging area during a rebase, am, revert or cherry-pick.
(vc-git-resolve-conflicts): Update docstring in light of changes
to vc-git-resolve-when-done.
(vc-git--cmds-in-progress): Detect reverts and cherry-pick
operations in progress.
Jim Porter [Mon, 21 Oct 2024 04:37:55 +0000 (21:37 -0700)]
Fix Eshell incompatibility with "[" command when eshell-pred is disabled
* lisp/eshell/em-pred.el (eshell-pred-initialize): Ensure that
'eshell-parse-arg-modifier' is called before 'eshell-parse-glob-chars'.
* lisp/eshell/em-glob.el (eshell-glob-initialize): Use a number for hook
depth to be clearer.
(eshell-parse-glob-chars): Simplify; since eshell-pred's hook now runs
first, the extra code is no longer necessary.
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/test-command-without-pred): New test.
Earl Hyatt [Sun, 13 Oct 2024 00:28:25 +0000 (20:28 -0400)]
Add delete-selection-local-mode.
* lisp/delsel.el (delete-selection-local-mode): Add local version of
'delete-selection-mode'. The local mode sets the value of the variable
'delete-selection-mode' to maintain compatibility with packages and
features that consider the existing mode.
Alan Mackenzie [Fri, 25 Oct 2024 20:35:32 +0000 (20:35 +0000)]
CC Mode: correct handling of properties on #include <...>
In C, Pike, and IDL Modes, deleting and reinserting such a <
could create havoc with the category/syntax-table properties on
the < and >. Also the contents of <...> should only get paren
properties when the #include is present and correct.
* lisp/progmodes/cc-fonts.el (c-cpp-matchers): Replace the
c-make-font-lock-search-function which put properties on the
<...> with a simple matcher.
* lisp/progmodes/cc-langs.el
(c-get-state-before-change-functions)
(c-before-font-lock-functions): Add respectively
c-before-change-include-<> and c-after-change-include-<> in the
C, Pike and IDL entries of these variables.
* lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): New functions.
Cecilio Pardo [Wed, 9 Oct 2024 09:40:28 +0000 (11:40 +0200)]
Implement drawing text with DirectWrite on MS-Windows.
This adds support for color fonts.
* configure.ac: Add src/w32drite to W32_OBJ.
* src/w32dwrite.c: New file.
(w32-initialize-direct-write): New function, initialize the
DirectWrite library if it is available, and required global
variables.
(w32_use_direct_write): New function, check if DirectWrite
is available and activated by the user.
(w32_dwrite_encode_char): New function, replacement for HarfBuzz's
'encode_char'.
(w32_dwrite_text_extents): New function, replacement for w32font
text_extents.
(w32_dwrite_draw): New function, replacement for w32font draw.
(w32_dwrite_free_cached_face): New function, used in the font
deletion process to also delete DirectWrite data.
(verify_hr): New function, verify COM method results.
(release_com): New function, release a COM object.
(w32-dwrite-available): New function, returns true if DirectWrite
is available.
(w32-dwrite-reinit): New function, reinitialize DirectWrite,
optionally setting some rendering parameters.
* src/w32font.c (w32font_text_extents): If DirectWrite is enabled,
call 'w32_dwrite_text_extents'.
(w32font_draw): If DirectWrite is enabled, call 'w32_dwrite_draw'.
* src/w32uniscribe.c: (w32hb_encode_char): If DirectWrite is enabled,
call 'w32_dwrite_encode_char'.
(syms_of_w32uniscribe_for_pdumper): Initialize DirectWrite.
(uniscribe_close): Free DirectWrite data for the font.
vc-clone: Make interactive; call vc-guess-url-backend
* lisp/vc/vc.el (vc-clone): Make interactive. Call
vc-guess-url-backend. Always return DIRECTORY if it names a
directory. New optional argument OPEN-DIR.
(vc--remotes-history): New defvar.
* etc/NEWS: Announce these changes.
Move package-vc-heuristic-alist and related to vc.el
* lisp/emacs-lisp/package-vc.el (package-vc--backend-type)
(package-vc-heuristic-alist, package-vc--guess-backend): Rename
to vc-cloneable-backends-custom-type, vc-clone-heuristic-alist
and vc-guess-url-backend respectively, and move to
lisp/vc/vc.el. Make package-vc-heuristic-alist an obsolete
alias.
(package-vc--clone, package-vc--read-package-name)
(package-vc-install, package-vc-checkout): Use
vc-guess-url-backend.
* lisp/vc/vc.el (vc-cloneable-backends-custom-type)
(vc-clone-heuristic-alist, vc-guess-url-backend): New defconst,
defcustom and defun, respectively: renamed and moved here from
lisp/emacs-lisp/package-vc.el.
Sean Whitton [Thu, 24 Oct 2024 09:19:41 +0000 (17:19 +0800)]
; Drop two outdated calls to 'require'
* lisp/emacs-lisp/backtrace.el (require):
* lisp/wid-edit.el (require): Don't require subr-x. if-let,
when-let and friends have all been in subr.el for a while.
Sean Whitton [Thu, 24 Oct 2024 03:26:27 +0000 (11:26 +0800)]
vc-allow-rewriting-published-history: Use nil->ask->t
* lisp/vc/vc.el (vc-allow-rewriting-published-history): Use
increasingly permissive values nil->ask->t rather than
nil->t->no-ask. Recommend `ask' or nil.
* lisp/vc/vc-git.el (vc-git--assert-allowed-rewrite): Update
accordingly.
Alan Coopersmith [Wed, 23 Oct 2024 13:41:08 +0000 (15:41 +0200)]
configure.ac: Fix FIONREAD check with gcc-14 on Solaris
Before this fix, it would fail to build with gcc-14 with the error:
conftest.c: In function 'main':
conftest.c:265:11: error: implicit declaration of function 'ioctl'
[-Wimplicit-function-declaration]
265 | int foo = ioctl (0, FIONREAD, &foo);
| ^~~~~
Solaris documents ioctl() as being defined in <unistd.h>.
* configure.ac: Fix FIONREAD check with gcc-14 on Solaris.
Ref:
https://lists.gnu.org/r/emacs-devel/2024-10/msg00195.html
Sean Whitton [Wed, 23 Oct 2024 02:49:22 +0000 (10:49 +0800)]
vc-git-modify-change-comment: Check for other autosquashing
* lisp/vc/vc-git.el (vc-git-modify-change-comment): Check that a
rebase with --autosquash won't make any other changes and give
the user a chance to abort.
Jim Porter [Tue, 22 Oct 2024 16:43:00 +0000 (09:43 -0700)]
Fix error when splicing Eshell globs and a glob expands to itself
This could happen when 'eshell-extended-glob' determines that a "glob"
is not really a glob. This mainly happens for remote file names with a
"~" in them, like "/ssh:remote:~/file.txt".
* lisp/eshell/em-glob.el (eshell-extended-glob): Return a list when
'eshell-glob-splice-results' is non-nil.
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
em-glob-test/expand/no-splice-results): Extend tests.
Vincenzo Pupillo [Thu, 10 Oct 2024 14:06:37 +0000 (16:06 +0200)]
Fix 'php-ts-mode': better indentation and font locking
Incomplete compound_statement or colon_block (statement-group
without a closing brace or closing keyword) that are not inside
a function or method are not recognized as such by tree-sitter-php.
A new function 'php-ts-mode--open-statement-group-heuristic'
handles this case. Font locking of magic methods and better
support for alternative control structure syntax.
Support for latest grammar version.
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Updated grammar version.
(php-ts-mode--possibly-braceless-keyword-re): Regular expression
for braceless keyword.
(php-ts-mode--open-statement-group-heuristic): New function.
(php-ts-mode--parent-html-bol): Use the new function and doc fix.
(php-ts-mode--parent-html-heuristic): Use the new function and doc
fix.
(php-ts-mode--indent-styles): Use the new function and add
'colon_block' support.
(php-ts-mode--class-magic-methods): New predefined magic methods
list.
(php-ts-mode--test-namespace-name-as-prefix-p): Doc fix.
(php-ts-mode--test-namespace-aliasing-clause-p): Fix the test and
doc.
(php-ts-mode--test-namespace-use-group-clause-p): Doc fix.
(php-ts-mode--test-visibility-modifier-operation-clause-p): New
function for the new asymmetric property visibility feature of
PHP 8.4.
(php-ts-mode--font-lock-settings): Font lock for class magic methods
and alternative syntax. Better font lock for 'instanceof'. Use
'font-lock-function-call-face' for scoped and member call expression.
(bug#73779)
Sebastián Monía [Wed, 9 Oct 2024 03:26:42 +0000 (23:26 -0400)]
Add customization to let EWW guess content-type if needed
* lisp/net/eww.el (eww-guess-content-type-functions): New user option.
(eww--guess-content-type, eww--html-if-doctype): New functions.
(eww-render): Call 'eww--guess-content-type' (bug#73133).
Stephen Berman [Mon, 21 Oct 2024 10:50:53 +0000 (12:50 +0200)]
Let 'tex-view' show PDFs made without a DVI (bug#73854)
* lisp/textmodes/tex-mode.el (tex-print-file): Update doc string
to mention 'tex-compile'.
(tex-compile-commands): Add entries for 'evince' and 'mupdf'.
(tex-compile): Set 'tex-print-file'.