]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 1 Apr 2023 00:57:39 +0000 (08:57 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoMake string-lessp vectorisation safer
Mattias Engdegård [Fri, 31 Mar 2023 18:13:18 +0000 (20:13 +0200)]
Make string-lessp vectorisation safer

Use memcpy for loading unaligned words on platforms where this can be
done efficiently.  This guards against problems arising from future
compiler autovectorisation improvements that might cause instructions
that require aligned addresses to be emitted, and should also work
with an address sanitiser enabled.

* src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): Only define when optimising.
(load_unaligned_size_t): New.
(Fstring_lessp): Use load_unaligned_size_t.
* src/lisp.h (UNALIGNED_LOAD_SIZE): Remove now unused macro.

21 months agoAllow old input to include continuation lines in shell-mode
Bob Rogers [Fri, 31 Mar 2023 07:57:32 +0000 (09:57 +0200)]
Allow old input to include continuation lines in shell-mode

* lisp/shell.el (shell-get-old-input-include-continuation-lines): New
defcustom (default nil).
(shell-get-old-input): New function.  Like
'comint-get-old-input-default' but include all continuation lines if
'shell-get-old-input-include-continuation-lines' is non-nil.
(shell-mode): Install shell-get-old-input.  (Bug#61069)

* etc/NEWS: Advertise the new defcustom.

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Fri, 31 Mar 2023 12:17:54 +0000 (14:17 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months ago* lisp/net/tramp.el (tramp-accept-process-output): Use `with-local-quit'.
Michael Albinus [Fri, 31 Mar 2023 07:45:23 +0000 (09:45 +0200)]
* lisp/net/tramp.el (tramp-accept-process-output): Use `with-local-quit'.

21 months agoAdd treesit-node-get
Yuan Fu [Fri, 24 Mar 2023 20:13:05 +0000 (13:13 -0700)]
Add treesit-node-get

* doc/lispref/parsing.texi (Retrieving Nodes): Add manual entry.
* lisp/treesit.el (treesit-node--get): New function.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 31 Mar 2023 01:14:17 +0000 (09:14 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoTweak outline cache stuff
Po Lu [Thu, 30 Mar 2023 05:04:24 +0000 (13:04 +0800)]
Tweak outline cache stuff

* src/sfntfont.c: Adjust font cache size constants.

21 months ago; * src/sfnt.c (GETINFO): Fix typo.
Po Lu [Thu, 30 Mar 2023 03:25:15 +0000 (11:25 +0800)]
; * src/sfnt.c (GETINFO): Fix typo.

21 months ago; * src/sfnt.h: Fix typo.
Po Lu [Thu, 30 Mar 2023 03:22:11 +0000 (11:22 +0800)]
; * src/sfnt.h: Fix typo.

21 months agoUpdate Android port
Po Lu [Thu, 30 Mar 2023 03:18:51 +0000 (11:18 +0800)]
Update Android port

* src/sfnt.c (sfnt_make_interpreter): New argument `fvar'.  Set
axis count.
(SCANCTRL): Implement selector bit 8.
(GXAXIS): New instruction.
(SFVTPV): Validate graphics state after changing freedom vector.
(sfnt_line_to_vector): Implement `original'.
(sfnt_move): Remove redundant division.
(sfnt_interpret_run): Implement distortable font related GXAXIS
instruction (0x91).
(sfnt_vary_interpreter): Set naxis and norm_coords.
(sfnt_make_test_interpreter, pushb_test_args, pushw_test_args)
(sfnt_name_instruction, main): Adjust accordingly.
* src/sfnt.h (struct sfnt_interpreter, PROTOTYPE):
* src/sfntfont.c (sfntfont_setup_interpreter, sfntfont_open):
Set up distortion information.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 30 Mar 2023 01:14:02 +0000 (09:14 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months ago; * test/lisp/dired-aux-tests.el: remove mistaken unwind-protect
Mattias Engdegård [Wed, 29 Mar 2023 20:16:37 +0000 (22:16 +0200)]
; * test/lisp/dired-aux-tests.el: remove mistaken unwind-protect

21 months agoRework zeroconf integration into tramp-gvfs.el
Michael Albinus [Wed, 29 Mar 2023 18:22:04 +0000 (20:22 +0200)]
Rework zeroconf integration into tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Do not check for
:system bus.
(tramp-gvfs-mounttypes): New defconst.
(tramp-gvfs-maybe-open-connection): Use it.
(top): Call zeroconf only when :system bus is available.

21 months agoAvoid unwind-protect without unwind forms in cl-letf
Mattias Engdegård [Wed, 29 Mar 2023 15:03:31 +0000 (17:03 +0200)]
Avoid unwind-protect without unwind forms in cl-letf

* lisp/emacs-lisp/cl-macs.el (cl--letf): Use unwind-protect only if
necessary, avoiding a warning.

21 months agoWarn about unwind-protect without unwind forms
Mattias Engdegård [Wed, 29 Mar 2023 11:21:26 +0000 (13:21 +0200)]
Warn about unwind-protect without unwind forms

`unwind-protect` without unwind forms is not just pointless but often
indicates a mistake where the intended unwind part is misplaced, as in

    (unwind-protect (progn PROT-FORMS UNWIND-FORMS))   ; oops

or

    (unwind-protect PROT-FORM) UNWIND-FORMS            ; also oops

or entirely forgotten for that matter.  Warning about this makes
sense, and the warning can always be silenced by removing the
`unwind-protect` altogether if it shouldn't be there in the first
place.

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Implement
warning.
* etc/NEWS: Announce.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Add test case.

21 months agoFix D-Bus event loop when executing a keyboard macro
Michael Albinus [Wed, 29 Mar 2023 14:10:29 +0000 (16:10 +0200)]
Fix D-Bus event loop when executing a keyboard macro

* lisp/net/dbus.el (dbus-call-method): Don't loop for events when
`executing-kbd-macro' is non-nil.  (Bug#62018)

21 months agoImprove rules for enumerating user fonts
Po Lu [Wed, 29 Mar 2023 12:14:43 +0000 (20:14 +0800)]
Improve rules for enumerating user fonts

* doc/emacs/android.texi (Android Fonts): Document distortable
font replacement rules.
* src/sfntfont.c (sfnt_replace_fonts_p): New function.
(sfnt_enum_font_1): Call it.

21 months agoAdd clojure-ts-mode to eglot-server-programs
dannyfreeman [Sat, 25 Mar 2023 19:13:41 +0000 (15:13 -0400)]
Add clojure-ts-mode to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add
clojure-ts-mode.  (Bug#62449)

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Wed, 29 Mar 2023 11:18:15 +0000 (13:18 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoFix optimized move functions
Po Lu [Wed, 29 Mar 2023 06:50:55 +0000 (14:50 +0800)]
Fix optimized move functions

* src/sfnt.c (sfnt_move_x):
(sfnt_move_y):
(sfnt_move): Set N flags and don't forget to
set N points too.

21 months ago; * src/sfnt.c (sfnt_read_avar_table): Fix sequencing problem.
Po Lu [Wed, 29 Mar 2023 05:45:18 +0000 (13:45 +0800)]
; * src/sfnt.c (sfnt_read_avar_table): Fix sequencing problem.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 29 Mar 2023 05:24:34 +0000 (13:24 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Wed, 29 Mar 2023 05:23:32 +0000 (13:23 +0800)]
Update Android port

* src/sfntfont.c (sfntfont_setup_interpreter): Don't create
interpreter for blatently broken fonts.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Wed, 29 Mar 2023 04:30:09 +0000 (06:30 +0200)]
Merge from origin/emacs-29

3965c65d5e2 ; * lisp/subr.el (read-char-choice): Fix last change.
c1eac5b6586 Improve documentation of 'read-choice' and related symbols
a8c9283e170 Revert "Comp fix calls to redefined primtives with op-byt...
8b66d8abd01 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-sub...
4ec4f614c71 ; Fix incompatibility in 'display-buffer-assq-regexp'
ba3ade58f3b Skip ruby-ts-imenu-index test if needed
9133446db87 Fix Eglot Tramp tests on EMBA
5b351bc7fa9 * test/infra/Dockerfile.emba (emacs-gnustep): Instrument ...

21 months agoUpdate Android port
Po Lu [Wed, 29 Mar 2023 01:44:45 +0000 (09:44 +0800)]
Update Android port

* src/sfntfont.c (sfntfont_open): Avoid specifying redundant
blends.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 29 Mar 2023 00:42:19 +0000 (08:42 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Wed, 29 Mar 2023 00:33:43 +0000 (08:33 +0800)]
Update Android port

* src/sfnt.c (sfnt_validate_gs): Fix validation of projection
vector.

21 months agoruby-ts-mode: Rehash which nodes should be treated as sexps
Dmitry Gutov [Tue, 28 Mar 2023 22:08:55 +0000 (01:08 +0300)]
ruby-ts-mode: Rehash which nodes should be treated as sexps

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Recognize smaller
syntactic elements as sexps too (bug#62416).  Also do that for
heredocs, regexps and symbol arrays.  But drop binary expressions
(including assignments) since they led to non-intuitive behavior.

21 months agoAvoid parsing some Eshell forms when performing completion
Jim Porter [Tue, 21 Mar 2023 00:25:54 +0000 (17:25 -0700)]
Avoid parsing some Eshell forms when performing completion

During completion, we want to evaluate most Eshell forms
(e.g. variable references), but skip others (e.g. globbing,
subcommands).  For globbing, we want to pass the literal glob to
Pcomplete so it can use the glob for selecting completion candidates.
For subcommands (including Lisp forms), we especially want to avoid
evaluation, since they can produce arbitary side effects!  (Bug#50470)

* lisp/eshell/esh-cmd.el (eshell-allow-commands): New variable...
(eshell-commands-forbidden): New error...
(eshell-named-command, eshell-lisp-command): ... use them.

* lisp/eshell/em-cmpl.el (eshell-complete--eval-argument-form):
Disallow command forms and handle errors ourselves.
(eshell-complete-parse-arguments): Don't parse glob characters.

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/parse-arguments/unevaluated-subcommand)
(em-cmpl-test/parse-arguments/unevaluated-lisp-form)
(em-cmpl-test/parse-arguments/unevaluated-inner-subcommand)
(em-cmpl-test/file-completion/glob, em-cmpl-test/command-completion)
(em-cmpl-test/subcommand-completion): New tests.
(em-cmpl-test/parse-arguments/pipeline): Remove superfluous
let-binding.
(em-cmpl-test/file-completion/after-list): Use a list variable rather
than a subexpression; the latter is no longer evaluated during
completion.
(em-cmpl-test/lisp-function-completion): Check "$(func)" syntax.

21 months agoSimplify parsing subcommands slightly
Jim Porter [Tue, 21 Mar 2023 00:25:24 +0000 (17:25 -0700)]
Simplify parsing subcommands slightly

This mainly reduces some overly-deep indentation, but also fixes some
minor issues with the "$<subcmd>" form: it unnecessarily added " >
TEMP" (we already set this later via 'eshell-create-handles'), and it
didn't properly unescape inner double quotes.

* lisp/eshell/esh-cmd.el (eshell-parse-subcommand-argument): Simplify.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Simplify and
fix edge cases in "$<subcmd>".

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-temp-cmd): Adjust test to check behavior
of inner double quotes.

21 months ago; Fix an edge case in how 'eshell-do-eval' handles 'let' bodies
Jim Porter [Tue, 21 Mar 2023 00:24:28 +0000 (17:24 -0700)]
; Fix an edge case in how 'eshell-do-eval' handles 'let' bodies

* lisp/eshell/esh-cmd.el (ehell-do-eval): Use 'car-safe'; the object
in question might not be a cons cell.

21 months ago; * lisp/subr.el (read-char-choice): Fix last change.
Eli Zaretskii [Tue, 28 Mar 2023 18:31:51 +0000 (21:31 +0300)]
; * lisp/subr.el (read-char-choice): Fix last change.

21 months agoImprove documentation of 'read-choice' and related symbols
Eli Zaretskii [Tue, 28 Mar 2023 18:08:12 +0000 (21:08 +0300)]
Improve documentation of 'read-choice' and related symbols

* doc/lispref/commands.texi (Reading One Event):
* lisp/subr.el (read-char-choice-use-read-key, read-char-choice)
(read-char-choice-with-read-key, y-or-n-p-use-read-key): Improve
documentation of these functions and variables.

21 months agoRevert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"
Andrea Corallo [Tue, 28 Mar 2023 12:56:47 +0000 (14:56 +0200)]
Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"

This reverts commit 263d6c38539691c954f4c3057cbe8d5468499b91.

These patch series caused a number of regression and more analysis is
required.

21 months agoRevert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve..."
Andrea Corallo [Tue, 28 Mar 2023 12:56:37 +0000 (14:56 +0200)]
Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve..."

This reverts commit 4a7a0c9a9f521b04b23580901e9c0a662b504e32.

These patch series caused a number of regression and more analysis is
required.

21 months agoUpdate Android port
Po Lu [Tue, 28 Mar 2023 11:21:06 +0000 (19:21 +0800)]
Update Android port

* src/sfnt.c (sfnt_vary_compound_glyph):
* src/sfntfont.c (sfntfont_get_glyph)
(sfntfont_get_glyph_outline): Avoid clobbering offset size flag
when varying compound glyph.

21 months ago; Fix incompatibility in 'display-buffer-assq-regexp'
Eli Zaretskii [Tue, 28 Mar 2023 11:08:29 +0000 (14:08 +0300)]
; Fix incompatibility in 'display-buffer-assq-regexp'

* lisp/window.el (display-buffer-assq-regexp): Make it accept a
buffer's name again, as it did in Emacs 28.  This makes computing
the buffer's name inside the function unnecessary.
(display-buffer): Always pass the buffer's name to
'display-buffer-assq-regexp'.  (Bug#62417)

21 months agoSkip ruby-ts-imenu-index test if needed
Michael Albinus [Tue, 28 Mar 2023 11:04:09 +0000 (13:04 +0200)]
Skip ruby-ts-imenu-index test if needed

* test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-imenu-index):
Add check for treesitter.

21 months agoFix Eglot Tramp tests on EMBA
Michael Albinus [Tue, 28 Mar 2023 10:43:01 +0000 (12:43 +0200)]
Fix Eglot Tramp tests on EMBA

* test/lisp/progmodes/eglot-tests.el (eglot--call-with-tramp-test):
Bind `tramp-allow-unsafe-temporary-files' with t.  (Bug#62289)

21 months agoUpdate Android port
Po Lu [Tue, 28 Mar 2023 08:34:50 +0000 (16:34 +0800)]
Update Android port

* src/sfnt.c (sfnt_vary_simple_glyph, sfnt_vary_compound_glyph):
Fix application of intermediate tuples.
* src/sfntfont.c (sfntfont_open): Set xlfd name after applying
distortion.

21 months ago* test/infra/Dockerfile.emba (emacs-gnustep): Instrument "make V=1 ...".
Michael Albinus [Tue, 28 Mar 2023 07:38:07 +0000 (09:38 +0200)]
* test/infra/Dockerfile.emba (emacs-gnustep): Instrument "make V=1 ...".

21 months agoCorrectly round lbearing values
Po Lu [Tue, 28 Mar 2023 05:39:10 +0000 (13:39 +0800)]
Correctly round lbearing values

* src/sfnt.h (SFNT_ROUND_FIXED):
* src/sfntfont.c (sfntfont_probe_widths):
(sfntfont_measure_pcm): Round lbearing properly.

21 months agoFix expansion of globs that contain a ~USER reference
Jim Porter [Tue, 28 Mar 2023 03:58:55 +0000 (20:58 -0700)]
Fix expansion of globs that contain a ~USER reference

This regressed from the fix to bug#28064, and was discovered here:
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-03/msg01744.html>.

* lisp/eshell/em-dirs.el (eshell-expand-user-reference): Let FILE be a
list, and move the implementation to...
(eshell-expand-user-reference-1): ... here.

* lisp/eshell/em-glob.el (eshell-add-glob-modifier): Remove special
handling for expanding user references; it's better to keep it in
"em-dirs.el".

21 months agoUpdate Android port
Po Lu [Tue, 28 Mar 2023 04:03:47 +0000 (12:03 +0800)]
Update Android port

* src/sfntfont.c (sfnt_open_tables): Fix typos in non-HarfBuzz
code.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 28 Mar 2023 01:41:22 +0000 (09:41 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Tue, 28 Mar 2023 01:41:01 +0000 (09:41 +0800)]
Update Android port

* src/androidterm.c (android_draw_image_glyph_string): Restore
potentially clobbered GC clipping.
* src/sfnt.c (sfnt_large_integer_add, sfnt_multiply_divide_round)
(sfnt_mul_fixed_round): New functions.
(sfnt_build_glyph_outline): Take unscaled glyph metrics.
(sfnt_prepare_raster, sfnt_vary_simple_glyph)
(sfnt_vary_compound_glyph, sfnt_vary_interpreter): Use rounding
multiplication to scale deltas.
(main): Adjust tests.
* src/sfntfont.c (sfntfont_get_glyph_outline)
(sfntfont_probe_widths, sfntfont_open, sfntfont_measure_pcm)
(sfntfont_draw): More minor fixes to variable fonts.

21 months agoEnable ASLR for dynamic libraries on Cygwin
Ken Brown [Sun, 26 Mar 2023 19:02:30 +0000 (15:02 -0400)]
Enable ASLR for dynamic libraries on Cygwin

This seems to avoid the fork failures described in etc/PROBLEMS
("Fork failures in a build with native compilation").

* lisp/treesit.el (treesit--install-language-grammar-1):
* lisp/emacs-lisp/comp.el (native-comp-driver-options): Add the
linker flag "-Wl,-dynamicbase" on Cygwin.

21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:59 +0000 (17:16 -0400)]
Merge from origin/emacs-29

edc460e3b6c Fix accidental backward-incompatible change (bug#62417)
cbef1422fe3 ruby-ts-mode: Fix/simplify Imenu index generation
a0d5fba74a6 (ruby-ts--align-chain): Use 'equal' to check for an exact...

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:59 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

f631c90e791 ; Use string-search instead of string-match[-p] in ruby-t...

21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:59 +0000 (17:16 -0400)]
Merge from origin/emacs-29

0337131bfa1 Update to Transient v0.3.7-218-g3dbb22a
a8c23677d39 Update to Org 9.6.2
45b16bfb496 Skip failing tests on Cygwin with native compilation (bug...
8b4a494d8d4 Fix GNUSTEP tests on EMBA

# Conflicts:
# test/infra/gitlab-ci.yml

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

a952bdd6af0 Fix primary selection modification during `term-mouse-pas...

21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
Merge from origin/emacs-29

b08bf828605 ; Fix :version of the new defcustom
d941666d859 ; Fix last change
e19b7da7b09 Add 'eww-default-download-directory'.
564c26bdbeb ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

9107b2dec1f * doc/lispref/modes.texi: Improve docs for obsolete '%m' ...
59b7086838e Improve docs for global-mode-string / %M construct
207176e6b1c * src/buffer.c (mode-line-format): Document %o and %q con...
9cfae822fb3 * src/buffer.c (mode-line-format): Remove docs for obsole...

21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
Merge from origin/emacs-29

8f42db010d1 Improve indenting "case" in Python
c4d490490dc ; * test/src/fns-tests.el: Fix last change
875e77a66a6 * test/infra/Dockerfile.emba (emacs-native-comp): Add zli...
64a2b0d36fe Fix failure of fns-tests-collate-strings on Cygwin
90fc6b987ad * lisp/savehist.el (savehist-save): Preserve shared struc...
08fbc133756 Adapt Tramp manual
accb3871668 Fix system time sampling on MS-Windows
33d436eefa1 Fix treesit_ensure_parsed (bug#62333)
d93a439846f * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#...
be8147c53f9 Improve "Bugs" in the Emacs manual

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

82523dc621a Fix Eglot progress reporting

21 months agoMerge commit '1bc9dfc5bee'
Stefan Monnier [Mon, 27 Mar 2023 21:14:27 +0000 (17:14 -0400)]
Merge commit '1bc9dfc5bee'

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Mon, 27 Mar 2023 16:32:49 +0000 (18:32 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoFix Tramp error messages
Michael Albinus [Mon, 27 Mar 2023 13:46:44 +0000 (15:46 +0200)]
Fix Tramp error messages

* lisp/net/tramp.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el: Fix error messages.

21 months agoFix accidental backward-incompatible change (bug#62417)
João Távora [Mon, 27 Mar 2023 11:25:16 +0000 (12:25 +0100)]
Fix accidental backward-incompatible change (bug#62417)

This code used to work, but with the change of 59ecf25fc860 it stopped
working:

   (defun foop (buffer-name _alist) (string-match "foop" buffer-name))
   (add-to-list 'display-buffer-alist '(foop . display-buffer-other-frame))

This change makes it work again, restoring compatibility.

* lisp/subr.el (buffer-match-p): Fix and adjust docstring.
* lisp/window.el (display-buffer-alist): Adjust docstring.
(display-buffer-assq-regexp): Make good on promise of display-buffer-alist.

21 months agoUpdate Android port
Po Lu [Mon, 27 Mar 2023 10:22:23 +0000 (18:22 +0800)]
Update Android port

* src/sfnt.c (sfnt_normalize_blend): Don't crash when axis
variations are not present.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 27 Mar 2023 08:43:07 +0000 (16:43 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Mon, 27 Mar 2023 08:42:52 +0000 (16:42 +0800)]
Update Android port

* configure.ac (HAVE_OTF_GET_VARIATION_GLYPHS): Check for
`hb_font_set_var_named_instance'.
* src/sfnt.c (main): Update tests.
* src/sfntfont-android.c (Fandroid_enumerate_fonts): Blacklist
bad font.
* src/sfntfont.c (struct sfnt_font_tables, struct sfnt_font_desc)
(sfnt_decode_instance_name, sfnt_weight_descriptions)
(sfnt_enum_font_1, sfntfont_list_1, sfntfont_desc_to_entity)
(sfntfont_list, struct sfntfont_get_glyph_outline_dcontext)
(sfntfont_get_glyph, sfntfont_get_glyph_outline)
(struct sfnt_font_info, sfnt_close_tables, sfnt_open_tables)
(sfntfont_open, sfntfont_measure_pcm, sfntfont_close)
(sfntfont_draw, sfntfont_begin_hb_font, syms_of_sfntfont)
(mark_sfntfont): Handle variable fonts correctly.

21 months agoRefactor sfntfont.c
Po Lu [Mon, 27 Mar 2023 03:24:05 +0000 (11:24 +0800)]
Refactor sfntfont.c

* src/sfnt.c (sfnt_build_glyph_outline): Take scale, not head
and pixel size.
(sfnt_scale_metrics_to_pixel_size): Delete function.
(sfnt_get_scale): New function.
(main): Update tests.
* src/sfnt.h (PROTOTYPE): Update prototypes.
* src/sfntfont.c (struct sfnt_outline_cache)
(sfntfont_get_glyph_outline, struct sfnt_font_info)
(sfntfont_open): Save scale in font information and use it.
(sfntfont_measure_instructed_pcm): Delete function.
(sfntfont_measure_pcm): Make this the only ``measure pcm''
function.
(sfntfont_draw): Rely on sfntfont_get_glyph_outline for the
scale.

21 months agoRefactor sfntfont.c
Po Lu [Mon, 27 Mar 2023 01:58:42 +0000 (09:58 +0800)]
Refactor sfntfont.c

* src/sfntfont.c (struct sfnt_font_tables): New structure.
(struct sfnt_font_desc): New field `tables'.
(struct sfnt_font_info): New field `desc'.
(sfntfont_setup_interpreter): Drop fd arguments and don't try to
load interpreter tables.
(sfnt_open_tables, sfnt_close_tables): New functions.
(sfnt_reference_font_tables, sfnt_dereference_font_tables): New
functions.
(sfntfont_open, sfntfont_close): Implement in terms of those
functions in order to share tables.

21 months agoruby-ts-mode: Fix/simplify Imenu index generation
Dmitry Gutov [Mon, 27 Mar 2023 00:49:13 +0000 (03:49 +0300)]
ruby-ts-mode: Fix/simplify Imenu index generation

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--full-name): Drop '#'
from the end of resulting string when the node is not a method.
Support 'singleton_method' nodes.
(ruby-ts--imenu-helper): Simplify, to create a "flat" list of
entries, rather than a nested one.  The previous implementation
had problems (like producing a nested structure of full-qualified
names, thus creating a lot of textual repetition), seems easier to
just follow ruby-mode's example here, at least for Emacs 29's
release.

* test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-imenu-index):
New test.

21 months ago(ruby-ts--align-chain): Use 'equal' to check for an exact match
Dmitry Gutov [Sun, 26 Mar 2023 23:11:16 +0000 (02:11 +0300)]
(ruby-ts--align-chain): Use 'equal' to check for an exact match

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain): Use
'equal' to check for an exact match rather than substring.

21 months ago; Use string-search instead of string-match[-p] in ruby-ts-mode.el
Mattias Engdegård [Sun, 26 Mar 2023 10:09:41 +0000 (12:09 +0200)]
; Use string-search instead of string-match[-p] in ruby-ts-mode.el

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain):
Use the much faster string-search when just searching for a substring.

(cherry picked from commit 0724c6dbdaef2c549409836ba4f7999e05aa31fe)

21 months agoHave Xref inherit input method when reading identifiers
Philip Kaludercic [Sun, 26 Mar 2023 11:50:27 +0000 (13:50 +0200)]
Have Xref inherit input method when reading identifiers

* lisp/progmodes/xref.el (xref--read-identifier): Set
INHERIT-INPUT-METHOD flag to non-nil.  (Bug#61299)

21 months agoAdd option to register packages as projects
Philip Kaludercic [Tue, 14 Mar 2023 10:50:31 +0000 (11:50 +0100)]
Add option to register packages as projects

* lisp/emacs-lisp/package-vc.el (package-vc-register-as-project): Add
new option.
(project-remember-projects-under): Declare function for usage in
'package-vc--clone'.
(package-vc--clone): Respect 'package-vc-register-as-project'.
* etc/NEWS: Document the feature.

21 months agoUpdate to Transient v0.3.7-218-g3dbb22a
Jonas Bernoulli [Sun, 26 Mar 2023 21:53:03 +0000 (23:53 +0200)]
Update to Transient v0.3.7-218-g3dbb22a

21 months agoUpdate to Org 9.6.2
Kyle Meyer [Sun, 26 Mar 2023 21:01:14 +0000 (17:01 -0400)]
Update to Org 9.6.2

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Sun, 26 Mar 2023 18:47:25 +0000 (20:47 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoAdd sanity check in tramp-gvfs.el
Michael Albinus [Sun, 26 Mar 2023 18:47:12 +0000 (20:47 +0200)]
Add sanity check in tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-listmountableinfo)
(tramp-gvfs-listmounttypes): New defconst.
(tramp-gvfs-maybe-open-connection): Add sanity check whether GVFS
backend is available.

21 months agoImplement list-system-processes on Cygwin
Ken Brown [Sat, 25 Mar 2023 22:59:33 +0000 (18:59 -0400)]
Implement list-system-processes on Cygwin

* configure.ac (HAVE_PROCFS): Define to 1 on Cygwin.  (Bug#62462)

21 months agoSkip failing tests on Cygwin with native compilation (bug#62450)
Ken Brown [Sat, 25 Mar 2023 20:37:51 +0000 (16:37 -0400)]
Skip failing tests on Cygwin with native compilation (bug#62450)

* test/Makefile.in (TEST_NATIVE_COMP): New variable, used to
determine whether to run tests tagged with :nativecomp.  Set it to
"no" on Cygwin and to $(HAVE_NATIVE_COMP) otherwise.

* test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests): Skip
on Cygwin with native-compilation.

21 months agoFix GNUSTEP tests on EMBA
Michael Albinus [Sun, 26 Mar 2023 12:20:05 +0000 (14:20 +0200)]
Fix GNUSTEP tests on EMBA

* configure.ac (LIBS_GNUSTEP): Adapt CPPFLAGS and CFLAGS.  (Bug#62210)
Proposed by Po Lu <luangruo@yahoo.com>.

* test/infra/gitlab-ci.yml (build-image-gnustep)
(test-gnustep): Uncomment jobs.

21 months ago* lisp/term.el (term-mouse-paste) Do not treat as a yank command (bug#58608)
Phil Sainty [Sun, 26 Mar 2023 12:19:19 +0000 (01:19 +1300)]
* lisp/term.el (term-mouse-paste) Do not treat as a yank command (bug#58608)

This command sends the primary selection to the inferior process
rather than inserting it into the buffer, and it's entirely up to the
process as to whether anything at all gets inserted into the buffer as
a result, so this is not a `yank' as far as Emacs is concerned.

21 months agoFix primary selection modification during `term-mouse-paste' (bug#58608)
Phil Sainty [Sun, 26 Mar 2023 12:06:52 +0000 (01:06 +1300)]
Fix primary selection modification during `term-mouse-paste' (bug#58608)

* lisp/term.el (term-mouse-paste): Prevent the primary selection from
being changed in the process of sending it to the inferior process.

21 months agoFix primary selection modification during `term-mouse-paste' (bug#58608)
Phil Sainty [Sun, 26 Mar 2023 12:06:52 +0000 (01:06 +1300)]
Fix primary selection modification during `term-mouse-paste' (bug#58608)

* lisp/term.el (term-mouse-paste): Prevent the primary selection from
being changed in the process of sending it to the inferior process.

21 months agoFix 'go-ts-mode's incorrect docstring inserted for methods
Evgeni Kolev [Wed, 8 Feb 2023 15:16:02 +0000 (17:16 +0200)]
Fix 'go-ts-mode's incorrect docstring inserted for methods

The docstring inserted with go-ts-mode's C-c C-d was incorrectly
prefixed with the receiver "(myStruct).":

    // (myStruct).act
    func (m *myStruct) act () {...}

The above docstring is not correct because the receiver "myStruct"
should not be in the docstring.  This commit fixes the incorrect
behavior.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--defun-name): New
optional argument SKIP-PREFIX.
(go-ts-mode-docstring): Call (go-ts-mode--defun-name t)
instead of (treesit-defun-name).  (Bug#62371)

21 months ago; Fix :version of the new defcustom
Eli Zaretskii [Sun, 26 Mar 2023 11:58:40 +0000 (14:58 +0300)]
; Fix :version of the new defcustom

21 months ago; Fix last change
Eli Zaretskii [Sun, 26 Mar 2023 11:56:57 +0000 (14:56 +0300)]
; Fix last change

* lisp/net/eww.el (eww-download-directory): Rename from
'eww-default-download-directory'.  All users changed.  Change
:type to be a directory.  Doc fix.  (Bug#62435)

21 months agoAdd 'eww-default-download-directory'.
Xi Lu [Sat, 25 Mar 2023 13:38:48 +0000 (21:38 +0800)]
Add 'eww-default-download-directory'.

* lisp/net/eww.el (eww-default-download-directory): New defcustom.
(eww--download-directory): Use it.  (Bug#62435)

21 months ago; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)
Matus Goljer [Sun, 26 Mar 2023 11:20:19 +0000 (13:20 +0200)]
; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)

21 months ago* src/buffer.c (mode-line-format): Reorder and reformat %-construct docs
Phil Sainty [Sun, 14 Aug 2022 11:17:38 +0000 (23:17 +1200)]
* src/buffer.c (mode-line-format): Reorder and reformat %-construct docs

The original formatting dates back to the earliest commits.  It saved
a few lines but was harder to follow.  As windows are typically taller
now than the terminals of the time, this reformatting now makes better
sense for readabiity.  See bug#57080.

* doc/lispref/modes.texi: Order change for consistency.  Add index.

21 months ago* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct
Phil Sainty [Sun, 14 Aug 2022 11:16:48 +0000 (23:16 +1200)]
* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct

Bug #57080.

21 months agoImprove docs for global-mode-string / %M construct
Phil Sainty [Sun, 14 Aug 2022 11:14:51 +0000 (23:14 +1200)]
Improve docs for global-mode-string / %M construct

* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.

21 months ago* src/buffer.c (mode-line-format): Document %o and %q constructs
Phil Sainty [Sun, 14 Aug 2022 11:11:43 +0000 (23:11 +1200)]
* src/buffer.c (mode-line-format): Document %o and %q constructs

Missed from commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f.

21 months ago* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
Phil Sainty [Sun, 14 Aug 2022 10:34:41 +0000 (22:34 +1200)]
* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct

This documentation had been previously removed in 1999 in [1]
but was subsequently restored again in a different form in 2006
in [2] as the construct was still supported on some systems.
However it looks like it hasn't done what that documentation
indicated since [3] in 2011, and the final remnant of this
functionality was removed in [4] in 2013; so it seems clear that
it's no longer supported and shouldn't be documented now.

[1] commit 08de62001945d4dd32a3d6af44da05804cb296d5
[2] commit dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f
[3] commit 05c652517317d10690aaf0a6aa0bc876382b9d82
[4] commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d

21 months ago* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct
Phil Sainty [Sun, 14 Aug 2022 11:16:48 +0000 (23:16 +1200)]
* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct

Bug #57080.

21 months agoImprove docs for global-mode-string / %M construct
Phil Sainty [Sun, 14 Aug 2022 11:14:51 +0000 (23:14 +1200)]
Improve docs for global-mode-string / %M construct

* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.

21 months ago* src/buffer.c (mode-line-format): Document %o and %q constructs
Phil Sainty [Sun, 14 Aug 2022 11:11:43 +0000 (23:11 +1200)]
* src/buffer.c (mode-line-format): Document %o and %q constructs

Missed from commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f.

21 months ago* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
Phil Sainty [Sun, 14 Aug 2022 10:34:41 +0000 (22:34 +1200)]
* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct

This documentation had been previously removed in 1999 in [1]
but was subsequently restored again in a different form in 2006
in [2] as the construct was still supported on some systems.
However it looks like it hasn't done what that documentation
indicated since [3] in 2011, and the final remnant of this
functionality was removed in [4] in 2013; so it seems clear that
it's no longer supported and shouldn't be documented now.

[1] commit 08de62001945d4dd32a3d6af44da05804cb296d5
[2] commit dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f
[3] commit 05c652517317d10690aaf0a6aa0bc876382b9d82
[4] commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d

21 months agoUse string-search instead of string-match[-p] when possible
Mattias Engdegård [Sun, 26 Mar 2023 10:09:41 +0000 (12:09 +0200)]
Use string-search instead of string-match[-p] when possible

* lisp/progmodes/c-ts-mode.el
(c-ts-mode--standalone-parent-skip-preproc):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain):
* lisp/treesit.el (treesit-max-buffer-size)
(treesit--check-manual-coverage):
Use the much faster string-search when just searching for a substring.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 26 Mar 2023 06:09:56 +0000 (14:09 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Sun, 26 Mar 2023 06:09:15 +0000 (14:09 +0800)]
Update Android port

* src/sfnt.c (sfnt_table_names): Add avar.
(sfnt_read_glyph): Clear distortion fields.
(sfnt_build_glyph_outline): Calculate the outline origin point.
(sfnt_prepare_raster): Apply the origin point to the X axis
offset.
(sfnt_scale_metrics_to_pixel_size): New function.
(sfnt_build_instructed_outline): Use instructed origin phantom
point to determine the outline origin.
(sfnt_compute_phantom_points): Apply origin and advance
distortion.
(struct sfnt_variation_axis, struct sfnt_instance)
(struct sfnt_fvar_table, sfnt_read_fvar_table)
(struct sfnt_gvar_table, sfnt_read_gvar_table)
(sfnt_read_avar_table, struct sfnt_blend, sfnt_init_blend)
(sfnt_free_blend, sfnt_normalize_blend, struct sfnt_tuple_header)
(struct sfnt_gvar_glyph_header, sfnt_read_packed_deltas)
(sfnt_compute_tuple_scale, sfnt_read_cvar_table)
(sfnt_infer_deltas_1, sfnt_vary_simple_glyph, sfnt_infer_deltas)
(sfnt_vary_glyph, sfnt_vary_compound_glyph)
(sfnt_vary_interpreter): New functions.  Add structs to
sfntfont.h.
(struct sfnt_test_dcontext, sfnt_test_get_glyph, main): Test
distortable font handling.

* src/sfnt.h (SFNT_ENABLE_HINTING):
(enum sfnt_table):
(struct sfnt_glyph):
(struct sfnt_glyph_outline):
(struct sfnt_raster):
(struct sfnt_default_uvs_table):
(struct sfnt_unicode_value_range):
(struct sfnt_nondefault_uvs_table):
(struct sfnt_uvs_mapping):
(struct sfnt_mapped_variation_selector_record):
(struct sfnt_table_offset_rec):
(struct sfnt_uvs_context):
(struct sfnt_mapped_table):
(struct sfnt_variation_axis):
(struct sfnt_instance):
(struct sfnt_fvar_table):
(struct sfnt_short_frac_correspondence):
(struct sfnt_short_frac_segment):
(struct sfnt_avar_table):
(struct sfnt_tuple_variation):
(struct sfnt_cvar_table):
(struct sfnt_gvar_table):
(struct sfnt_blend):
(struct sfnt_metrics_distortion):
(PROTOTYPE): Update prototypes.

* src/sfntfont.c (sfntfont_get_glyph_outline):
(sfntfont_measure_pcm): Adjust calls.

21 months agoImprove indenting "case" in Python
kobarity [Sat, 25 Mar 2023 13:59:05 +0000 (22:59 +0900)]
Improve indenting "case" in Python

* lisp/progmodes/python.el (python-info-dedenter-statement-p): Do not
consider the first "case" in the block as dedenter.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-7)
(python-info-dedenter-statement-p-6): New tests. (Bug#62092)

21 months ago* lisp/gnus/nnselect.el (nnselect-request-thread): Correctly parse queries.
Andrew G Cohen [Sun, 26 Mar 2023 00:26:18 +0000 (08:26 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-thread): Correctly parse queries.

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Sat, 25 Mar 2023 17:29:25 +0000 (18:29 +0100)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.