]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agoUse key-translate instead of keyboard-translate
Robert Pluim [Thu, 7 Sep 2023 14:56:06 +0000 (16:56 +0200)]
Use key-translate instead of keyboard-translate

As a consequence of the discussions in Bug#65735, move to using the
new key-translate function instead of the deprecated
keyboard-translate.

For future maintainers: ?\C-? or ?\177 do not mean "DEL" with
key-translate, you have to use "DEL".

* lisp/simple.el (normal-erase-is-backspace-mode): Use key-translate.
* lisp/term/bobcat.el (terminal-init-bobcat): Use key-translate.

14 months agoOmit the `omake` compilation-mode rule by default
Mattias Engdegård [Wed, 4 Oct 2023 17:27:49 +0000 (19:27 +0200)]
Omit the `omake` compilation-mode rule by default

It keeps interfering with other rules, slowing everything down a
little bit and makes it harder to add or change other rules.  The rule
is still there and can easily be re-enabled by those who need it.

* etc/NEWS: Announce.
* lisp/progmodes/compile.el (compilation-error-regexp-alist):
Exclude `omake`.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data):
Actually test the `cucumber` rule. Remove the `omake` test case.
(compile-test-error-regexps):
Test `omake` here.  Test other rules without `omake` included.

14 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Thu, 5 Oct 2023 08:37:21 +0000 (08:37 +0000)]
; * admin/git-bisect-start: Update failing commits

14 months agoMake newly-created smerge-diff-buffers read-only
Spencer Baugh [Wed, 28 Jun 2023 12:48:01 +0000 (08:48 -0400)]
Make newly-created smerge-diff-buffers read-only

Buffers name *vc-diff* are usually created by vc, which makes them
read-only.  If we create such a buffer, let's make it read-only too.
If the buffer already exists, though, don't change that since the user
might have deliberately made it writable.

* lisp/vc/smerge-mode.el (smerge-diff): Make newly-created
smerge-diff-buffers read-only. (bug#64071)

14 months ago' Improve wording of compilation-error messages
Eli Zaretskii [Thu, 5 Oct 2023 08:01:41 +0000 (11:01 +0300)]
' Improve wording of compilation-error messages

* lisp/progmodes/compile.el (compilation-next-error): Improve
wording of user-error text.  (Bug#65713)

14 months agoImprove find-sibling-rules option type
Paul W. Rankin [Tue, 3 Oct 2023 10:27:38 +0000 (07:27 -0300)]
Improve find-sibling-rules option type

* lisp/files.el (find-sibling-rules): More helpful rules.

14 months agoNontext mouse cursor as default on {tab|tool}-bar
Manuel Giraud [Wed, 27 Sep 2023 17:05:10 +0000 (19:05 +0200)]
Nontext mouse cursor as default on {tab|tool}-bar

* src/xdisp.c (note_mouse_highlight): Always set the mouse cursor to
nontext when entering tab-bar and tool-bar.  (Bug#66243)

14 months agoIntroduce an input method callback required by Android 34
Po Lu [Thu, 5 Oct 2023 06:23:20 +0000 (14:23 +0800)]
Introduce an input method callback required by Android 34

* java/org/gnu/emacs/EmacsInputConnection.java (replaceText):
New function.

* java/org/gnu/emacs/EmacsNative.java (replaceText): Declare
native function.

* src/androidgui.h (enum android_ime_operation): New operation
ANDROID_IME_REPLACE_TEXT.

* src/androidterm.c (android_handle_ime_event): Decode text when
encountering an ANDROID_IME_REPLACE_TEXT operation.  Return if
decoding overflowed rather than presenting Qnil to textconv
functions.
(replaceText): New JNI function.

* src/frame.h (enum text_conversion_operation): New operation
TEXTCONV_REPLACE_TEXT.

* src/textconv.c (really_commit_text): Move point to start if
the composing region is set.
(really_replace_text): New function.
(handle_pending_conversion_events_1) <TEXTCONV_REPLACE_TEXT>:
New case.
(replace_text): New function.

* src/textconv.h: Update prototypes.

14 months agoPort Emacs to Android 34
Po Lu [Thu, 5 Oct 2023 03:57:26 +0000 (11:57 +0800)]
Port Emacs to Android 34

* configure.ac: Detect and require Android 34 headers.

* doc/emacs/android.texi (Android Environment): Mention new
permissions mandated by Android 34.

* java/AndroidManifest.xml.in: Introduce new permissions and
foreground service types prerequisite for background execution under
Android 34.

* java/INSTALL: Update installation documentation.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity)
(Sdk7FontObject):

* java/org/gnu/emacs/EmacsService.java (onCreate): Silence deprecation
warnings.

* src/android.c: Update documentation.

14 months ago; * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Typo.
Eli Zaretskii [Wed, 4 Oct 2023 17:04:53 +0000 (20:04 +0300)]
; * lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit): Typo.

14 months agoCorrect local reference leaks
Po Lu [Wed, 4 Oct 2023 08:33:05 +0000 (16:33 +0800)]
Correct local reference leaks

* src/android.c (android_build_string): Accept a list of local
references to destroy upon an allocation failure, facilitating
the proper deallocation of local references in such situations.
(android_browse_url): Revise for new calling convention.

* src/android.h (android_build_string): Update declaration
correspondingly.

* src/androidmenu.c (android_menu_show, android_dialog_show):
Revise for new calling convention.

* src/androidselect.c (android_notifications_notify_1): Supply
each successive local reference to android_build_string as
notification text is being encoded.

* src/androidvfs.c (android_saf_exception_check): Introduce
absent va_end.

14 months ago* lisp/menu-bar.el (menu-bar-project-menu): Improve menu items.
Juri Linkov [Tue, 3 Oct 2023 17:13:58 +0000 (20:13 +0300)]
* lisp/menu-bar.el (menu-bar-project-menu): Improve menu items.

Remove ellipsis from menu items that don't read arguments from the minibuffer.

14 months agoregex.c: Fix recent regression with mutually_exclusive_p
Stefan Monnier [Tue, 3 Oct 2023 14:10:57 +0000 (10:10 -0400)]
regex.c: Fix recent regression with mutually_exclusive_p

The new analysis code ended up increasing the scope of an optimization
a bit too far.  Reign it in.

* src/regex-emacs.c (struct mutexcl_data): Add `unconstrained` field.
(mutually_exclusive_one): Use and set it.
(mutually_exclusive_p): Initialize it.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add test.

14 months agoCorrect the `cond' forms in cl-print-string-with-limit
Alan Mackenzie [Tue, 3 Oct 2023 10:22:26 +0000 (10:22 +0000)]
Correct the `cond' forms in cl-print-string-with-limit

In this function, calling with limit bound to t will cause an
error in any of the cond forms which set print-length, etc.
Correct them!

* lisp/emacs-lisp/cl-print.el (cl-print-string-with-limit):
Amend the doc string.  In the cond forms in the bindings for
print-length, etc., test the value t first.  Amend those for
print-length and print-level also to test for a zero value of
limit.

14 months agoEnsure, that Tramp uses GNU style emulation when calling ls-lisp
Michael Albinus [Tue, 3 Oct 2023 08:02:52 +0000 (10:02 +0200)]
Ensure, that Tramp uses GNU style emulation when calling ls-lisp

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Reorganize.

* lisp/net/tramp.el (ls-lisp-dirs-first, ls-lisp-emulation)
(ls-lisp-ignore-case, ls-lisp-verbosity): Declare.
(tramp-handle-insert-directory): Bind `ls-lisp-*' options.  Call
`ls-lisp-set-options'.

14 months agoSupport Eshell iterative evaluation in the background
Jim Porter [Sat, 23 Sep 2023 18:36:11 +0000 (11:36 -0700)]
Support Eshell iterative evaluation in the background

This really just generalizes Eshell's previous support for iterative
evaluation of a single current command to a list of multiple commands,
of which at most one can be in the foreground (bug#66066).

* lisp/eshell/esh-cmd.el (eshell-last-async-procs)
(eshell-current-command): Make obsolete in favor of...
(eshell-foreground-command): ... this
(eshell-background-commands): New variable.
(eshell-interactive-process-p): Make obsolete.
(eshell-head-process, eshell-tail-process): Use
'eshell-foreground-command'.
(eshell-cmd-initialize): Initialize new variables.
(eshell-add-command, eshell-remove-command)
(eshell-commands-for-process): New functions.
(eshell-parse-command): Make 'eshell-do-subjob' the outermost call.
(eshell-do-subjob): Call 'eshell-resume-eval' to split this command
off from its parent forms.
(eshell-eval-command): Use 'eshell-add-command'.
(eshell-resume-command): Use 'eshell-commands-for-process'.
(eshell-resume-eval): Take a COMMAND argument.  Return
':eshell-background' form for deferred background commands.
(eshell-do-eval): Remove check for 'eshell-current-subjob-p'.  This is
handled differently now.

* lisp/eshell/eshell.el (eshell-command): Wait for all processes to
exit when running synchronously.

* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments):
* lisp/eshell/em-smart.el (eshell-smart-display-move): Use
'eshell-foreground-command'.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/background/simple-command)
(esh-cmd-test/background/subcommand): New tests.
(esh-cmd-test/throw): Use 'eshell-foreground-command'.

* test/lisp/eshell/eshell-tests.el (eshell-test/queue-input): Use
'eshell-foreground-command'.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/background): Make the test script more
complex.

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/pipeline-wait): New test.

* doc/misc/eshell.texi (Bugs and ideas): Remove implemented feature.

14 months agoDon't print subjob messages when running an Eshell script in the background
Jim Porter [Sat, 23 Sep 2023 06:03:45 +0000 (23:03 -0700)]
Don't print subjob messages when running an Eshell script in the background

* lisp/eshell/esh-proc.el (eshell-subjob-messages): New variable...
(eshell-record-process-object)
(eshell-remove-process-entry): ... check it.

* lisp/eshell/em-script.el (eshell-source-file): Set
'eshell-subjob-messages' to nil.

* lisp/eshell/esh-cmd.el (eshell-do-subjob): Set
'eshell-subjob-messages' to t.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/background): New test.

14 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Tue, 3 Oct 2023 00:59:31 +0000 (08:59 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

14 months agoUpdate Android port
Po Lu [Tue, 3 Oct 2023 00:55:57 +0000 (08:55 +0800)]
Update Android port

* src/androidvfs.c (android_afs_open, android_asset_fstat):
Return proper mtime within file descriptors incorporating asset
data and within android_asset_fstat.

* src/xterm.c (handle_one_xevent)
<KeyPress, XI_KeyPress>: Verify presence of a quit keysym
prior to registering it.

14 months agoInhibit slash commands in erc--input-review-functions
F. Jason Park [Sat, 10 Jun 2023 04:00:03 +0000 (21:00 -0700)]
Inhibit slash commands in erc--input-review-functions

* lisp/erc/erc.el (erc--input-review-functions): Add new review
function `erc--inhibit-slash-cmd-insertion'.
(erc--check-prompt-input-functions): Move
`erc--check-prompt-input-for-multiline-command' above
`erc--check-prompt-input-for-multiline-blanks'.
(erc--inhibit-slash-cmd-insertion): New "review" function to suppress
insertion of prompt input for slash commands.  Doesn't affect "meta"
slash commands like /SAY.
(erc--send-input-lines): Don't bother checking whether message is a
command.  Instead, trust verdict handed down by message-prep and
review functions.  This opens the door to optional insertion for
debugging purposes or when echoing command lines in a shell-like
fashion.
* test/lisp/erc/erc-tests.el (erc-send-whitespace-lines): clean up
portion dealing with trimming slash commands.  (Bug#66073)

14 months agoImprove erc-warn-about-blank-lines behavior
F. Jason Park [Fri, 15 Sep 2023 13:08:55 +0000 (06:08 -0700)]
Improve erc-warn-about-blank-lines behavior

* etc/ERC-NEWS: Mention more detailed feedback when option
`erc-warn-about-blank-lines' is non-nil.
* lisp/erc/erc-common.el (erc--input-split): Add `abortp' slot to
allow a premature exit while validating prompt input.
* lisp/erc/erc.el (erc-warn-about-blank-lines): Clarify meaning of
"blank lines" in doc string, and mention interaction with
companion option `erc-send-whitespace-lines'.
(erc-inhibit-multiline-input): Fix inaccurate description in doc
string.
(erc--input-review-functions): Move
`erc--discard-trailing-multiline-nulls' to end of list, after
`erc--run-input-validation-checks' so that the latter doesn't have to
resplit the original input string in order to issue feedback.
(erc--blank-in-multiline-input-p): Remove unused internal function
originally slated to be part of ERC 5.6.
(erc--check-prompt-input-for-something): New trivial validation
function to check if the input is empty.
(erc--count-blank-lines): New function that tallies up the number of
blank and whitespace-only lines in the current input.  One downside of
this design is that this function's conclusions aren't shared with
`erc--discard-trailing-multiline-nulls', which must decide on its own
how many lines to strip.
(erc--check-prompt-explanation): New variable.
(erc--check-prompt-input-for-multiline-blanks): Rework significantly
to provide more informative messages and more sensible behavior for
common cases with respect to relevant option values.
(erc--check-prompt-input-functions): Add new validation function
`erc--check-prompt-for-something'.
(erc--run-input-validation-checks): Set `abortp' slot of
`erc--input-split' when hooks return a non-string, rather than
generate an unhelpful fallback message.  Also print a message when
the variable `erc--check-prompt-explanation' is non-nil.
(erc-send-current-line): When the `abortp' slot of the current
`erc--input-split' object is non-nil, forgo normal input processing.
This fixes a regression in 5.6-git, which previously emitted an error
message when it should have just exited the command.
(erc--discard-trailing-multiline-nulls): Always run, regardless of
`erc-send-whitespace-lines', and leave a blank line behind when
stripping a message consisting of only blank lines.
(erc--run-send-hooks): Always run hooks and surrounding logic rather
than only when hooks are populated.
* test/lisp/erc/erc-tests.el (erc--refresh-prompt): Add assertion and
use default value for `erc--input-review-functions'.
(erc-ring-previous-command): Use default value for
`erc--input-review-functions' and ensure `erc-current-nick' does not
error.
(erc--blank-in-multiline-input-p): Remove obsolete test.
(erc--check-prompt-input-functions): Update expected message.
(erc--discard-trailing-multiline-nulls, erc--count-blank-lines): New
tests.
(erc-tests--check-prompt-input--expect,
erc-tests--check-prompt-input-messages): New helper variables.
(erc--check-prompt-input-for-multiline-blanks,
erc--check-prompt-input-for-multiline-blanks/explanations): New tests.
(erc-send-whitespace-lines): Expect hook-processing logic to pad empty
lines instead of deferring to `erc-send-input-line-function'.
(Bug#66073)

14 months agoPrefer ticks/hz pairs for some ERC timestamps on 29+
F. Jason Park [Tue, 19 Sep 2023 05:50:28 +0000 (22:50 -0700)]
Prefer ticks/hz pairs for some ERC timestamps on 29+

* lisp/erc/erc-compat.el (erc-compat--current-lisp-time): New macro to
prefer ticks/hz pairs on newer Emacs versions because stamps of this
form are easier to compare at a glance when used as values for text
properties.
* lisp/erc/erc-stamp.el (erc-stamp--current-time): Use compat macro.
(Bug#60936)

14 months agoExempt text-scale-mode from erc-scrolltobottom-all
F. Jason Park [Thu, 21 Sep 2023 04:40:36 +0000 (21:40 -0700)]
Exempt text-scale-mode from erc-scrolltobottom-all

* lisp/erc/erc-goodies.el (erc--scrolltobottom-post-ignore-commands):
New variable, a list of commands that should not trigger a re-scroll.
(erc--scrolltobottom-on-post-command): Don't `recenter' when the
current command appears in `erc--scrolltobottom-post-ignore-commands'.
This fixes a bug that prevented managed recentering when disabling
`text-scale-mode'.  Thanks to Corwin Brust for reporting this.  Note
that this doesn't address any fill-related alignment issues involving
`text-scale-mode'.  Nor does it address likely problems involving the
erroneous restoration of point after the insertion of invisible lines.
(erc-keep-place-enable, erc-keep-place-mode): Adjust hook depth to
fall within reserved interval.
(erc-keep-place-indicator-enable, erc-keep-place-indicator-mode,
erc--keep-place-indicator-on-global-module): Lower hook depth to fall
within reserved interval.  Note that this hook has a buffer-local
value, so all members run after their global counterparts.
(Bug#66073)

14 months ago; Increase ERC test server queue size
F. Jason Park [Tue, 19 Sep 2023 05:50:28 +0000 (22:50 -0700)]
; Increase ERC test server queue size

* test/lisp/erc/erc-scenarios-scrolltobottom.el
(erc-scenarios-scrolltobottom--normal,
erc-scenarios-scrolltobottom--all): Use updated name for test fixture.
* test/lisp/erc/resources/erc-d/erc-d.el
(erc-d--initialize-client): For lengthy batches, `erc-d--filter' may
run multiple times before `erc-d--on-request' can pull from the queue,
which results in discarded incoming messages and match failures.
(erc-d--m, erc-d--log): Convert to ordinary functions.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-scrolltobottom--normal,
erc-scenarios-common-scrolltobottom--normal): Rename test fixture from
former to latter and attempt to fix intermittent failure re
`count-screen-lines'.

14 months agoFix wrong "User" column count in erc-ibuffer
F. Jason Park [Mon, 25 Sep 2023 13:06:13 +0000 (06:06 -0700)]
Fix wrong "User" column count in erc-ibuffer

(ibuffer-make-column-erc-members): Show tally of all server users for
non-target buffers, and show correct count for targets.  Thanks to
Mattias Engdegård for reporting this.
(erc-ibuffer-limit-map): Use "new" `define-ibuffer-filter'
API.  (Bug#66191)

14 months agoRemove newline from erc-fill regexp
F. Jason Park [Mon, 2 Oct 2023 23:29:28 +0000 (16:29 -0700)]
Remove newline from erc-fill regexp

* lisp/erc/erc-fill.el (erc-fill): Remove newline from character
alternative in pattern for skipping past blank and whitespace-only
lines.  It seems that as of e61a0398 "regex.c: Consolidate the two
analysis functions", Emacs no longer sees a newline-dollar sequence as
matching an empty line.  Also lose `save-match-data', which doesn't
appear to serve any purpose here.

14 months agoProperly translate touch screen events into mouse drag ones
Po Lu [Mon, 2 Oct 2023 07:38:30 +0000 (15:38 +0800)]
Properly translate touch screen events into mouse drag ones

* doc/lispref/commands.texi (Drag Events): Correct misleading
example form and reword subsequent elaboration.

* lisp/touch-screen.el (touch-screen-handle-point-up)
<mouse-drag>: Set posns representing drag start and terminus to
mouse position lists, in lieu of pairs between windows and posns
employed previously.

14 months agoUpdate Android port
Po Lu [Mon, 2 Oct 2023 03:00:39 +0000 (11:00 +0800)]
Update Android port

* java/AndroidManifest.xml.in: Exclude non-files from opening in
Emacs.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Avert
crash should scheme be NULL.

14 months ago; Adjust Eshell regression tests to avoid SIGPIPE
Jim Porter [Mon, 25 Sep 2023 05:30:34 +0000 (22:30 -0700)]
; Adjust Eshell regression tests to avoid SIGPIPE

In batch mode, SIGPIPEs can cause Emacs to abort (bug#66186).

* lisp/eshell/esh-io.el (eshell-output-object-to-target): Update
comment.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): Use '(ignore)', since
that causes no output when called with no arguments, thus avoiding a
risky 'process-send-string'.

14 months ago; Add several "duplicate value in `cond`" FIXMEs
Stefan Kangas [Sun, 1 Oct 2023 17:00:26 +0000 (19:00 +0200)]
; Add several "duplicate value in `cond`" FIXMEs

* lisp/gnus/gnus-cloud.el (gnus-cloud-decode-data):
* lisp/org/org.el (org-read-date-analyze):
* lisp/org/ox-html.el (org-html-latex-fragment):
Add several "duplicate value in `cond`" FIXMEs.
Found by Mattias Engdegård <mattias.engdegard@gmail.com>.
Ref: https://debbugs.gnu.org/51368#51

14 months agoExclude current buffer from eww-switch-to-buffer
James Thomas [Sat, 16 Sep 2023 00:20:58 +0000 (05:50 +0530)]
Exclude current buffer from eww-switch-to-buffer

* lisp/net/eww.el (eww-switch-to-buffer): Exclude current buffer from
the completion list to avoid an extra cycling keystroke.  (Bug#65914)

14 months ago; Simplify recent change in cl-defstruct
Stefan Kangas [Sun, 1 Oct 2023 16:34:41 +0000 (18:34 +0200)]
; Simplify recent change in cl-defstruct

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use bound-and-true-p.
Suggested by Robert Pluim <rpluim@gmail.com>.

14 months ago; Fix mistyped --enable-checking in docs.
Basil L. Contovounesios [Sun, 1 Oct 2023 16:42:52 +0000 (18:42 +0200)]
; Fix mistyped --enable-checking in docs.

14 months agoFix doc-view conversion indicator for svg images
Visuwesh [Fri, 29 Sep 2023 14:53:56 +0000 (20:23 +0530)]
Fix doc-view conversion indicator for svg images

* lisp/doc-view.el (doc-view-pdf->png-converter-mupdf): Show the
correct pdf->svg indicator when producing svg images.  (Bug#62713)

14 months agoSort package-selected-packages on save
Ivan Sokolov [Fri, 24 Mar 2023 20:27:13 +0000 (23:27 +0300)]
Sort package-selected-packages on save

14 months agoSome tramp-tests.el fixes
Michael Albinus [Sun, 1 Oct 2023 09:28:20 +0000 (11:28 +0200)]
Some tramp-tests.el fixes

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Improve check.
(tramp--test-check-files): Don't err out when "printenv" doesn't
exist on remote side.
(tramp-test47-read-password): Remove :unstable tag.
(tramp-test47-read-otp-password): Rename.

14 months agoImprove handling of "--dired" in Tramp
Michael Albinus [Sun, 1 Oct 2023 09:27:41 +0000 (11:27 +0200)]
Improve handling of "--dired" in Tramp

* lisp/net/tramp-sh.el (tramp-bsd-unames): New defconst.
(tramp-sh-handle-file-ownership-preserved-p)
(tramp-open-connection-setup-interactive-shell)
(tramp-get-ls-command): Use it.
(tramp-sh-handle-insert-directory): Improve handling of "--dired".

14 months ago; Add missing GNU ELPA :core package statement
Michael Albinus [Sun, 1 Oct 2023 09:27:01 +0000 (11:27 +0200)]
; Add missing GNU ELPA :core package statement

14 months agoUpdate Android port
Po Lu [Sun, 1 Oct 2023 09:07:58 +0000 (17:07 +0800)]
Update Android port

* doc/emacs/input.texi (On-Screen Keyboards): Revise
documentation to reflect changes.

* src/keyboard.c (lispy_function_keys) <KEYCODE_DPAD_CENTER>:
Define select key absent out of negligence.

* src/xterm.c (syms_of_xterm) <x-quit-keysym>: Default to nil.
(bug#66040)

14 months agoFix indentation in perl-mode (Bug#35925)
Mauro Aranda [Sat, 16 Sep 2023 21:15:40 +0000 (18:15 -0300)]
Fix indentation in perl-mode (Bug#35925)

* lisp/progmodes/perl-mode.el (perl--format-regexp): New defconst.
(perl--end-of-format-p): New function.
(perl-continuation-line-p): Use it.
(perl-calculate-indent): Use it.  Make the lines of the formlist stay
at column 0.

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-35925.pl: New
test file.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-35925): New
test.

14 months agoVarious fixes to lua-ts-mode font-locking
john muhl [Fri, 22 Sep 2023 23:36:18 +0000 (18:36 -0500)]
Various fixes to lua-ts-mode font-locking

* lisp/progmodes/lua-ts-mode.el (lua-ts--font-lock-settings):
Identify functions and assignments in more places.  Use constant
face for goto/labels.  (Bug#66162)

14 months agoBump buffers-menu-max-size to 15 on graphical displays
Stefan Kangas [Sat, 30 Sep 2023 23:08:17 +0000 (01:08 +0200)]
Bump buffers-menu-max-size to 15 on graphical displays

* lisp/menu-bar.el (buffers-menu-max-size): Bump default to 15 on
graphical displays.  (Bug#64398)

14 months ago; Add missing GNU ELPA :core package statements
Stefan Kangas [Sat, 30 Sep 2023 22:06:16 +0000 (00:06 +0200)]
; Add missing GNU ELPA :core package statements

* lisp/bind-key.el:
* lisp/emacs-lisp/map.el:
* lisp/erc/erc.el:
* lisp/external-completion.el:
* lisp/net/ntlm.el:
* lisp/net/soap-client.el:
* lisp/progmodes/python.el:
* lisp/svg.el:
* lisp/use-package/use-package.el: Add GNU ELPA :core package
statements.

14 months agoMerge etc/NEWS from origin/emacs-29
Eli Zaretskii [Sat, 30 Sep 2023 17:54:42 +0000 (13:54 -0400)]
Merge etc/NEWS from origin/emacs-29

14 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 30 Sep 2023 17:50:07 +0000 (13:50 -0400)]
Merge from origin/emacs-29

4776d90c31b Add new Tramp test
ca5b48fd76d Fix tmm-mid-prompt :type (Bug#66179)
7447d3df94e Fix tree-sitter indentation conflict with multiple languages
bee18e52737 Fix bug#66093 in Tramp
7d5fee0feaa Support regeneration of ja-dic.el under '--with-small-ja-...

Conflicts:
make-dist

14 months ago; * lisp/progmodes/elixir-ts-mode.el (treesit-node-p): Declare.
Eli Zaretskii [Sat, 30 Sep 2023 17:39:09 +0000 (20:39 +0300)]
; * lisp/progmodes/elixir-ts-mode.el (treesit-node-p): Declare.

14 months ago; * src/regex-emacs.c (forall_firstchar_1): Fix compilation error.
Eli Zaretskii [Sat, 30 Sep 2023 17:16:40 +0000 (20:16 +0300)]
; * src/regex-emacs.c (forall_firstchar_1): Fix compilation error.

14 months agoComplete yesterday's commit for cl-print.el
Alan Mackenzie [Sat, 30 Sep 2023 14:32:50 +0000 (14:32 +0000)]
Complete yesterday's commit for cl-print.el

I.e. commit the needed change to the test suite.

* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print-tests-ellipsis-string): Bind cl-print-string-length.
Only bind print-length and print-level where they are
specifically needed.

14 months agoMerge remote-tracking branch 'refs/remotes/origin/master'
Stefan Monnier [Sat, 30 Sep 2023 13:42:02 +0000 (09:42 -0400)]
Merge remote-tracking branch 'refs/remotes/origin/master'

14 months ago* configure.ca (open_memstream): New checked function
Stefan Monnier [Sat, 30 Sep 2023 13:41:35 +0000 (09:41 -0400)]
* configure.ca (open_memstream): New checked function

14 months agoEschew non-portable constructs in configure.ac
Po Lu [Sat, 30 Sep 2023 11:39:54 +0000 (19:39 +0800)]
Eschew non-portable constructs in configure.ac

* configure.ac (gl_gcc_warnings): Delete `test -o' and simplify
long test condition correspondingly.

14 months ago; Make configure work on Solaris after last change
Mattias Engdegård [Sat, 30 Sep 2023 08:38:48 +0000 (10:38 +0200)]
; Make configure work on Solaris after last change

* configure.ac: Solaris /bin/sh doesn't have `test -e`.

14 months agoUpdate Android port
Po Lu [Sat, 30 Sep 2023 07:36:49 +0000 (15:36 +0800)]
Update Android port

* src/androidmenu.c (android_menu_show): Properly encode pane
names before deriving Java strings from them.

* src/sfntfont.c (sfnt_parse_style, sfntfont_list_1): Intern
adstyles.

14 months ago; Fix a glob in .clangd
Gerd Möllmann [Sat, 30 Sep 2023 05:41:19 +0000 (07:41 +0200)]
; Fix a glob in .clangd

14 months agoFix last change
Po Lu [Sat, 30 Sep 2023 00:30:59 +0000 (08:30 +0800)]
Fix last change

* src/search.c (Fre__describe_compiled): Correct typos and
pointer signedness missmatch.

14 months agoregex.c: Remove the old analyzes functions
Stefan Monnier [Fri, 29 Sep 2023 21:46:20 +0000 (17:46 -0400)]
regex.c: Remove the old analyzes functions

After testing and checking that the changes brought by the new
consolidated analysis function (which are all cases of improved
optimizations) are indeed safe, remove the old code.

* src/regex-emacs.c (analyze_first_old): Delete function.
(analyze_first): Don't call it any more.
(skip_noops): Delete function.
(mutually_exclusive_aux): Delete function.
(mutually_exclusive_p): Don't call it any more.

14 months agoregex.c: Consolidate the two analysis functions
Stefan Monnier [Fri, 29 Sep 2023 21:39:10 +0000 (17:39 -0400)]
regex.c: Consolidate the two analysis functions

We currently have two functions that analyze the bytecode
to try and apply optimizations: `analyze_first` and `mutually_exclusive_p`.
Extract the common code between them into a new function `forall_firstchar`,
and then rewrite the old ones on top of that one.

Along the way, we get slightly better analyses that reverts
the recent de-optimizations but without re-introducing the
corresponding bugs.

* src/regex-emacs.c (forall_firstchar_1, forall_firstchar): New functions.
(analyze_first_old): Rename from `analyze_first`.
(struct anafirst_data): New struct.
(analyze_first_fastmap, analyze_first_null): New functions.
(analyze_first): Rewrite to use `forall_firstchar` with those two functions.
Take a `bufp` rather than a `multibyte` arg.
(regex_compile, re_compile_fastmap): Adjust calls accordingly.
(struct mutexcl_data): New struct.
(mutually_exclusive_one): New function.
(mutually_exclusive_p): Rewrite to use `forall_firstchar` with that function.

14 months agoregex.c: Various cosmetic changes
Stefan Monnier [Fri, 29 Sep 2023 20:41:37 +0000 (16:41 -0400)]
regex.c: Various cosmetic changes

* src/regex-emacs.c (extract_address): New function.
(skip_noops, mutually_exclusive_aux, re_match_2_internal): Use it.
(regex_compile): Fix oversight in last commit.
(analyze_first): Return a bool rather than an int.
(re_compile_fastmap): Simplify accordingly.
(re_match_2_internal): Share the common code between the fail and
success exit paths.

14 months ago* src/regex-emacs.c (STORE_NUMBER): Make it a plain function
Stefan Monnier [Fri, 29 Sep 2023 19:22:06 +0000 (15:22 -0400)]
* src/regex-emacs.c (STORE_NUMBER): Make it a plain function

14 months agosearch.c (re--describe-compiled): New function (bug#66261)
Stefan Monnier [Fri, 29 Sep 2023 18:55:24 +0000 (14:55 -0400)]
search.c (re--describe-compiled): New function (bug#66261)

This provides a fairly primitive but handy way to see what
a regexp compiles to without having to enable REGEX_EMACS_DEBUG
and wade through tons of stderr output.

* doc/lispref/searching.texi (Regexp Problems): Mention
`re--describe-compiled`.

* src/regex-emacs.c (debug_putchar, print_fastmap)
(print_partial_compiled_pattern, print_compiled_pattern): Add `dest`
argument, and compile also when `ENABLE_CHECKING` is set.
(DEBUG_PRINT_COMPILED_PATTERN, print_double_string, regex_compile):
Adjust to additional argument.

* src/regex-emacs.h (print_compiled_pattern): Declare.

* src/search.c (Fre__describe_compiled): New function.
(syms_of_search): Defsubr it.

14 months agoStop truncating strings too much in cl-print-string-with-limit
Alan Mackenzie [Fri, 29 Sep 2023 16:14:04 +0000 (16:14 +0000)]
Stop truncating strings too much in cl-print-string-with-limit

This fixes bug#65680, by introducing a new variable limiting
the length of a printed string, rather than abusing
print-length for that purpose.

* lisp/emacs-lisp/cl-print.el (cl-print-string-length): New
variable.
(cl-print-object <string>, cl-print--string-props): Use
cl-print-string-length rather than print-length here.
(cl-print-string-with-limit): bind cl-print-string-length based
on argument `limit'.  Decrement it by a quarter at each trial
iteration of printing.

14 months agoSmall clean-up of byte-compile-docstring-style-warn
Mattias Engdegård [Fri, 29 Sep 2023 15:48:09 +0000 (17:48 +0200)]
Small clean-up of byte-compile-docstring-style-warn

* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Make the code slightly cheaper.  It's still dominated by the
huge cost of `byte-compile--wide-docstring-p`, though.

14 months agoInclude `all` in `byte-compile-warnings` defcustom type
Mattias Engdegård [Fri, 29 Sep 2023 13:00:45 +0000 (15:00 +0200)]
Include `all` in `byte-compile-warnings` defcustom type

* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
Let "All" mean `all`, not `t`.

14 months agoDetect developer builds in git worktrees as well
Mattias Engdegård [Fri, 29 Sep 2023 10:43:10 +0000 (12:43 +0200)]
Detect developer builds in git worktrees as well

* configure.ac (gcc-warnings): Don't require .git to be a directory.
If you wondered why you didn't get any warnings, this may have been
the reason.

14 months ago; cperl-mode-tests.el: Avoid using skip-when
Harald Jörg [Fri, 29 Sep 2023 14:46:23 +0000 (16:46 +0200)]
; cperl-mode-tests.el: Avoid using skip-when

* test/lisp/progmodes/cperl-mode-tests.el: Add a hint to the
commentary that the tests are intended to run on older Emacsen.
(cperl-test-bug-10483): Replace skip-when by skip-unless followed
by a negation.
(cperl-test-bug-37127): Replace skip-when by skip-unless followed
by a negation.

14 months agoCC Mode: Fix bug in whitespace scanning functions
Alan Mackenzie [Fri, 29 Sep 2023 12:07:32 +0000 (12:07 +0000)]
CC Mode: Fix bug in whitespace scanning functions

c-forward-sws and c-backward-sws were scanning over spaces and
linefeeds marked with the string-fence syntax-table text
property.  Fix this by (i) removing the WS text properties
c-in-sws and c-is-sws from characters when setting the
string-fence on them; (ii) checking the syntax of "space"
characters when scanning over them.

* lisp/progmodes/cc-defs.el (c-skip-ws-chars-forward)
c-skip-ws-chars-backward, c-put-string-fence): New macros.

* lisp/progmodes/cc-awk.el
(c-awk-set-string-regexp-syntax-table-properties): Use
c-put-string-fence.

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1):
Correct the determination of macro-start.
(c-forward-sws, c-backward-sws): Replace skip-chars-forward by
c-skip-ws-chars-forward and skip-chars-backward by
c-skip-ws-chars-backward.
(c-unmark-<>-around-region, c-after-change-unmark-ml-strings)
(c-propertize-ml-string-opener): Use c-put-string-fence.

* lisp/progmodes/cc-mode.el (c-put-syn-tab): Use
c-put-string-fence when appropriate.

14 months ago; Mention 64-bit first in FAQ on large files
Stefan Kangas [Thu, 28 Sep 2023 10:59:43 +0000 (12:59 +0200)]
; Mention 64-bit first in FAQ on large files

* doc/misc/efaq.texi (Problems with very large files): Mention
64-bit machines before 32-bit ones, as they are more common.

14 months ago; Substitute quotes in obsoletion notice in 'C-h f'
Eshel Yaron [Wed, 27 Sep 2023 16:27:12 +0000 (18:27 +0200)]
; Substitute quotes in obsoletion notice in 'C-h f'

* lisp/help-fns.el (help-fns--obsolete): Substitute quotes in string
arguments to 'obsolete' declarations.

* lisp/emacs-lisp/advice.el (defadvice): Markup symbols in 'obsolete'
declaration.  (Bug#66240)

14 months agoSimplify alist lookups in align-region
Stefan Kangas [Tue, 26 Sep 2023 16:42:57 +0000 (18:42 +0200)]
Simplify alist lookups in align-region

* lisp/align.el (align-region): Simplify alist lookup caching.

14 months ago* lisp/tab-line.el: Move Touch screen support section to the better place.
Juri Linkov [Thu, 28 Sep 2023 17:13:22 +0000 (20:13 +0300)]
* lisp/tab-line.el: Move Touch screen support section to the better place.

14 months agoregex.c (mutually_exclusive_aux) <wordbound>: Remove optimization
Stefan Monnier [Thu, 28 Sep 2023 16:37:44 +0000 (12:37 -0400)]
regex.c (mutually_exclusive_aux) <wordbound>: Remove optimization

Another case that was too optimistic.  Better use \> or \< rather
than \b if you want your regexp to be handled efficiently.

* src/regex-emacs.c (mutually_exclusive_aux) <wordbound>: Cancel optimization.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
New test.

14 months ago; * etc/NEWS: Demote outline 'describe-bindings-outline-rules' under Help.
Juri Linkov [Thu, 28 Sep 2023 06:53:55 +0000 (09:53 +0300)]
; * etc/NEWS: Demote outline 'describe-bindings-outline-rules' under Help.

* lisp/menu-bar.el (kill-this-buffer): Fix typo in comments.

14 months agoUnquote #'project-uniquify-dirname-transform in uniquify-dirname-transform.
Juri Linkov [Thu, 28 Sep 2023 06:48:51 +0000 (09:48 +0300)]
Unquote #'project-uniquify-dirname-transform in uniquify-dirname-transform.

* lisp/uniquify.el (uniquify-dirname-transform): Use , on #'.

14 months ago; * admin/notes/tree-sitter/performance (Experiments): Update.
Yuan Fu [Thu, 28 Sep 2023 06:42:32 +0000 (23:42 -0700)]
; * admin/notes/tree-sitter/performance (Experiments): Update.

14 months ago; * lisp/treesit.el (treesit--read-major-mode): Use string-suffix-p.
Yuan Fu [Thu, 28 Sep 2023 00:17:48 +0000 (17:17 -0700)]
; * lisp/treesit.el (treesit--read-major-mode): Use string-suffix-p.

14 months agoThere are no file modes on windows and dos
Sam Steingold [Thu, 28 Sep 2023 02:33:26 +0000 (22:33 -0400)]
There are no file modes on windows and dos

* lisp/ls-lisp.el (ls-lisp-verbosity): Add `modes` on GNU & Unix
  (ls-lisp-format): When `modes` is not in `ls-lisp-verbosity',
   keep just the 1st character of `drwxrwxrwx`.

14 months agoUpdate Android port
Po Lu [Thu, 28 Sep 2023 00:46:35 +0000 (08:46 +0800)]
Update Android port

* doc/emacs/android.texi (Android Windowing): Document
`android-keyboard-bell-duration'.

* java/org/gnu/emacs/EmacsService.java (ringBell): New argument
DURATION.

* src/android.c (android_init_emacs_service): Adjust
correspondingly.
(android_bell): Provide the duration of the vibration.

* src/androidfns.c (syms_of_androidfns)
<android_keyboard_bell_duration>: New variable.

14 months ago* lisp/calendar/todo-mode.el: Let-bind `inhibit-read-only`
Stefan Monnier [Wed, 27 Sep 2023 22:52:00 +0000 (18:52 -0400)]
* lisp/calendar/todo-mode.el: Let-bind `inhibit-read-only`

rather than `buffer-read-only`.  Applied throughout the file.
(todo-date-pattern, todo-edit-item--header, todo-convert-legacy-date-time)
(todo-read-date): Remove redundant "" arg to `mapconcat`.

14 months ago* lisp/vc/diff-mode.el (diff-apply-buffer): New command (bug#66113).
Juri Linkov [Wed, 27 Sep 2023 17:36:07 +0000 (20:36 +0300)]
* lisp/vc/diff-mode.el (diff-apply-buffer): New command (bug#66113).

(diff-mode-map): Bind 'diff-apply-buffer' to 'C-c C-m a'.

14 months agoNew commands to show replacements as diffs (bug#65854)
Juri Linkov [Wed, 27 Sep 2023 17:21:28 +0000 (20:21 +0300)]
New commands to show replacements as diffs (bug#65854)

* lisp/dired-aux.el (dired-do-replace-regexp-as-diff): New command.

* lisp/misearch.el (multi-file-diff-unsaved): New user option.
(multi-file-replace-as-diff): New function.
(multi-file-replace-regexp-as-diff): New command.
(replace-regexp-as-diff): New command.
(multi-file-diff-no-select): New function.

14 months ago* src/regex-emacs.c (analyze_first): Fix incorrect optimization
Stefan Monnier [Wed, 27 Sep 2023 17:29:50 +0000 (13:29 -0400)]
* src/regex-emacs.c (analyze_first): Fix incorrect optimization

The optimization was incorrect in a particular corner case.
In this fix I just disable it conservatively for more cases because
it's not obvious how to fix it while preserving the "good" cases.

We may find a better fix by using an approach like the one
in `mutually_exhaustive_aux`, but for now this is good enough,
especially since \{..\} repetitions are not used very frequently.

* test/src/regex-resources/PTESTS: New test.

15 months ago; * test/src/regex-emacs-tests.el: suppress relint complaints
Mattias Engdegård [Wed, 27 Sep 2023 10:41:15 +0000 (12:41 +0200)]
; * test/src/regex-emacs-tests.el: suppress relint complaints

15 months agoRevert "Don't use ellipses while cl-printing strings."
Alan Mackenzie [Wed, 27 Sep 2023 09:54:33 +0000 (09:54 +0000)]
Revert "Don't use ellipses while cl-printing strings."

This reverts commit 761f8901fffdb155cbcc7f3b5a2329161c2c1826.

15 months agoDon't call font-lock-mode in treesit-major-mode-setup (bug#66223)
Yuan Fu [Wed, 27 Sep 2023 07:21:40 +0000 (00:21 -0700)]
Don't call font-lock-mode in treesit-major-mode-setup (bug#66223)

* lisp/treesit.el (treesit-major-mode-setup): Remove.

15 months agoFix treesit-langauge-at-point for elixir-ts-mode.
Wilhelm H Kirschbaum [Tue, 26 Sep 2023 19:32:40 +0000 (21:32 +0200)]
Fix treesit-langauge-at-point for elixir-ts-mode.

The treesit-language-at-point function is only suppose to query the
host language.

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--indent-rules): Add missing rules.
(elixir-ts--treesit-language-at-point): Update function to only query
the host language.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: Add test
for inline docs.

15 months ago; * lisp/treesit.el (treesit-language-at-point-function): Fix doc.
Yuan Fu [Wed, 27 Sep 2023 06:15:14 +0000 (23:15 -0700)]
; * lisp/treesit.el (treesit-language-at-point-function): Fix doc.

15 months agoExtract feature list of java-ts-mode to a variable
Yuan Fu [Wed, 27 Sep 2023 06:13:46 +0000 (23:13 -0700)]
Extract feature list of java-ts-mode to a variable

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--feature-list): New variable.
(java-ts-mode): Extract out.

15 months agoUse 'unwind-protect' in more places in Eshell
Jim Porter [Sat, 23 Sep 2023 01:22:34 +0000 (18:22 -0700)]
Use 'unwind-protect' in more places in Eshell

This lets us simplify the logic for how we reset
'eshell-current-command' and 'eshell-last-async-procs', as well as
improving correctness of Eshell command forms in a few esoteric
scenarios.  Additionally, this helps set the stage for better support
of background commands in Eshell (bug#66164).

* lisp/eshell/esh-cmd.el (eshell-cmd-initialize): Remove addition to
'eshell-post-command-hook'; this is handled in 'eshell-resume-command'
and 'eshell-resume-eval' now.
(eshell-resume-command): Handle resetting the prompt as needed.
(eshell-resume-eval): Use 'unwind-protect' to ensure that we set
'eshell-last-async-procs' and 'eshell-current-comment' at the right
times.
(eshell-parse-command, eshell-trap-errors, eshell-manipulate): Use
'unwind-protect'.
(eshell-do-eval): Allow 'eshell-defer' to pass through
'unwind-protect' forms without actually calling the unwinding forms
(yet).

* lisp/eshell/esh-proc.el (eshell-kill-process-function)
(eshell-reset-after-proc): Make obsolete.  The behavior is now handled
in 'eshell-resume-command'.
(eshell-gather-process-output, eshell-sentinel)
(eshell-interrupt-process, eshell-kill-process, eshell-quit-process)
(eshell-stop-process, eshell-continue-process): Run 'eshell-kill-hook'
directly.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/throw): New test.

15 months agoregex.c (mutually_exclusive_p): Fix initial value of `loop_beg`
Stefan Monnier [Tue, 26 Sep 2023 15:43:51 +0000 (11:43 -0400)]
regex.c (mutually_exclusive_p): Fix initial value of `loop_beg`

* src/regex-emacs.c (mutually_exclusive_p): Don't pretend that pattern
position 0 has been checked already.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add a corresponding regression test plus some other related tests
I had around.

15 months ago; checkdoc.el: remove unnecessary regexp groups
Mattias Engdegård [Tue, 26 Sep 2023 11:33:54 +0000 (13:33 +0200)]
; checkdoc.el: remove unnecessary regexp groups

* lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-next-string):
Remove remains from when the regexp was not written in rx.

15 months agovc-annotate.el: make a new face if it didn't exist
Mattias Engdegård [Tue, 26 Sep 2023 11:27:55 +0000 (13:27 +0200)]
vc-annotate.el: make a new face if it didn't exist

* lisp/vc/vc-annotate.el (vc-annotate-lines): Check whether a symbol
is a face, not just its existence.  Previously we would sometimes end
up using non-faces resulting in complaints from the display system.

15 months agoFix ediff-toggle-multiframe cond clauses
Basil L. Contovounesios [Tue, 26 Sep 2023 08:12:28 +0000 (10:12 +0200)]
Fix ediff-toggle-multiframe cond clauses

* lisp/vc/ediff-util.el (ediff-toggle-multiframe): Remove duplicate
cond clause.  Fix parentheses so that trailing 'message' is
contained in fallback clause.  Fix indentation.

15 months agoAddress defcustom :type warnings
Basil L. Contovounesios [Mon, 25 Sep 2023 18:38:23 +0000 (20:38 +0200)]
Address defcustom :type warnings

* lisp/calendar/diary-lib.el (diary-display-function):
* lisp/calendar/icalendar.el (icalendar-export-alarms):
* lisp/emacs-lisp/elint.el (elint-ignored-warnings):
* lisp/mail/sendmail.el (send-mail-function):
* lisp/net/gnutls.el (gnutls-verify-error):
* lisp/gnus/mm-decode.el (mm-text-html-renderer):
* lisp/gnus/message.el (message-send-mail-function): Fix misplaced
defcustom :tags (bug#66196).
(message-tool-bar): Remove duplicate, overwritten, and nonexistent
defcustom :type gmm-tool-bar-list-item.
* lisp/progmodes/idlwave.el (idlwave-begin-line-comment): Strip
excessive defcustom :type quoting.
* lisp/progmodes/ps-mode.el (ps-mode-paper-size): Consolidate paper
sizes with same dimensions into a single defcustom menu entry.
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Remove
duplicate defcustom :type choice.

15 months agoUpdate Android port
Po Lu [Tue, 26 Sep 2023 01:36:38 +0000 (09:36 +0800)]
Update Android port

* src/androidterm.c (android_draw_fringe_bitmap): Sync with
xterm.c.

15 months agoUpdate Android port
Po Lu [Tue, 26 Sep 2023 01:35:51 +0000 (09:35 +0800)]
Update Android port

* src/androidterm.c (android_clip_to_row)
(android_draw_fringe_bitmap, android_draw_hollow_cursor)
(android_draw_bar_cursor): Sync with xterm.c.

* src/xterm.c (x_draw_fringe_bitmap): Delete unused variables.

15 months agoProperly clip overlaid fringe bitmaps
Po Lu [Tue, 26 Sep 2023 01:30:04 +0000 (09:30 +0800)]
Properly clip overlaid fringe bitmaps

* src/xterm.c (x_draw_fringe_bitmap): Save clip rectangle from
x_clip_to_row, and draw only the intersection between it and the
fringe bitmap, for if the bitmap is overlaid, the clip mask will
override the clip rectangle.
(x_clip_to_row): New argument *RECT_RETURN.  All callers
changed.

15 months agoFix a couple of doc-view user options
Basil L. Contovounesios [Fri, 22 Sep 2023 10:01:32 +0000 (12:01 +0200)]
Fix a couple of doc-view user options

* lisp/doc-view.el (doc-view-pdf->png-converter-function): Fix
placement and formatting of function-item :doc strings.
(doc-view-odf->pdf-converter-program): Ditto.  Tweak initialization
logic to ensure initial value is non-nil and matches :type.  Mention
preferred executable soffice first.
(doc-view-mode-p): Assume doc-view-odf->pdf-converter-program is
always non-nil.

15 months agoUse heuristic to speed up allocation of small vectors (bug#65491)
Mattias Engdegård [Mon, 25 Sep 2023 15:19:00 +0000 (17:19 +0200)]
Use heuristic to speed up allocation of small vectors (bug#65491)

Instead of scanning vector_free_lists from the appropriate size until
we find a nonempty bucket, start at the last bucket where we last put
something in.  This may favour splitting larger vectors than necessary
but in general saves a lot of time in the allocation of small vectors.

Original patch by Ihor Radchenko.

* src/alloc.c (last_inserted_vector_free_idx): New variable.
(setup_on_free_list): Set it.
(allocate_vector_from_block): Use it.
(sweep_vectors): Reset it.

15 months agoRemove useless half of vector_free_lists array (bug#65491)
Mattias Engdegård [Mon, 25 Sep 2023 14:49:29 +0000 (16:49 +0200)]
Remove useless half of vector_free_lists array (bug#65491)

The latter half of vector_free_lists was never used in any meaningful
way but it did require traversal during allocation and GC.  Reduce it
to sizes we actually allocate, with a bucket for bigger ones.

* src/alloc.c (VECTOR_MAX_FREE_LIST_INDEX): Rename to...
(VECTOR_FREE_LIST_ARRAY_SIZE): ... this and adjust its value.
(vector_free_lists): Use new, smaller size.
(setup_on_free_list, allocate_vector_from_block):
Adapt to new vector_free_lists size.
(pseudovector_nbytes): New function extracted from...
(vectorlike_nbytes): ...here.

15 months ago; flymake-proc.el: move variable declarations
Mattias Engdegård [Mon, 25 Sep 2023 13:16:31 +0000 (15:16 +0200)]
; flymake-proc.el: move variable declarations

* lisp/progmodes/flymake-proc.el (flymake-proc--temp-source-file-name)
(flymake-proc--temp-master-file-name): Move to before first use.