]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months ago; Silence warning
Stefan Kangas [Sat, 23 Dec 2023 06:16:53 +0000 (07:16 +0100)]
; Silence warning

12 months agoUse new safe_calln on NS
Gerd Möllmann [Sat, 23 Dec 2023 06:06:06 +0000 (07:06 +0100)]
Use new safe_calln on NS

* src/nsterm.m (ns_in_echo_area_1): Use safe_calln.
([EmacsView draggingUpdated:]): Use safe_calln.

12 months agoSplit safe_call between redisplay and non-redisplay versions
Stefan Monnier [Sat, 23 Dec 2023 05:25:46 +0000 (00:25 -0500)]
Split safe_call between redisplay and non-redisplay versions

The `safe_call/eval` family of functions started its life in `xdisp.c`
for the needs of redisplay but quickly became popular outside of it.
This is not ideal because despite their name, they are somewhat
specific to the needs of redisplay.

So we split them into `safe_call/eval` (in `eval.c`) and `dsafe_call/eval`
(in `xdisp.c`).  We took this opportunity to slightly change their
calling convention to be friendly to the CALLN-style macros.
While at it, we introduce a new `calln` macro as well which does
all that `call[1-8]` used to do.

* src/eval.c (safe_eval_handler, safe_funcall, safe_eval): New functions,
Copied from `xdisp.c`.  Don't obey `inhibit_eval_during_redisplay` any more.
Adjust error message to not claim it happened during redisplay.

* src/lisp.h (calln): New macro.
(call1, call2, call3, call4, call5, call6, call7, call8): Turn them
into aliases of `calln`.
(safe_funcall): Declare.
(safe_calln): New macro.
(safe_call1, safe_call2): Redefine as compatibility macros.
(safe_call, safe_call1, safe_call2): Delete.
Replace all callers with calls to `safe_calln`.

* src/xdisp.c (dsafe_eval_handler): Rename from `safe_eval_handler`.
Adjust all users.
(dsafe__call): Rename from `safe_call` and change calling convention to
work with something like CALLMANY.  Adjust all users.
(safe_call, safe__call1, safe_call2): Delete functions.
(SAFE_CALLMANY, dsafe_calln): New macros.
(dsafe_call1, dsafe_eval): Rename from `safe_call1` and `safe_eval`,
and rewrite using them.  Adjust all users.
(clear_message, prepare_menu_bars, redisplay_window): Use `dsafe_calln`.
(run_window_scroll_functions): Don't let-bind `Qinhibit_quit`
since `safe_run_hooks_2` does it for us.

12 months agoRespect glyph metrics modified by instruction code
Po Lu [Sat, 23 Dec 2023 03:22:21 +0000 (11:22 +0800)]
Respect glyph metrics modified by instruction code

* src/sfnt.c (sfnt_read_glyph): Clear advance and origin
distortion returning an empty glyph.
(sfnt_build_instructed_outline): New parameter *ADVANCE_WIDTH,
in which the glyph's advance width is saved.
(sfnt_interpret_compound_glyph_1): Refine commentary.
(sfnt_verbose, main): Adjust tests.

* src/sfnt.h: Update prototypes correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): If an instructed
outline is available, derive the advance and lbearing from the
measurements within.
(sfntfont_probe_widths): Call sfntfont_measure_pcm to establish
average widths.
(sfntfont_open): Do so after instruction code initialization
completes.
(sfntfont_measure_pcm): Revise commentary.

12 months agoDrop footer line warning for packages requiring Emacs 30.1
Stefan Kangas [Sat, 23 Dec 2023 00:50:18 +0000 (01:50 +0100)]
Drop footer line warning for packages requiring Emacs 30.1

The reason for warning about a missing footer line (";;; foo.el ends
here") is that package.el up until version 27.1 would refuse to
install a package without it.  Emacs 27.1 or later will install such
packages, but will issue a warning, the purpose of which is to
encourage package authors not to break backwards-compatibility.

However, if the minimum required Emacs version for a package is 30.1,
we do not need to worry about compatibility with earlier versions of
Emacs -- the package author has already explicitly said that the
package will not work on earlier versions.  For such packages, there
is no need to warn about a missing footer line.

In the future, this warning could be removed, but it is premature to
do that now.  (See Bug#26490.)  Thus, for packages that does not
specify a minimum version of Emacs, we continue to issue the warning.
We will also continue to warn for packages requiring Emacs 27 to 29,
since those versions will themselves warn if the footer is missing.

* lisp/emacs-lisp/package.el (package-buffer-info): Don't warn if the
footer line is missing for packages requiring Emacs 30.1 or later.

12 months agoIntroduce new function lm-package-requires
Stefan Kangas [Fri, 22 Dec 2023 22:41:36 +0000 (23:41 +0100)]
Introduce new function lm-package-requires

* lisp/emacs-lisp/package.el (package--prepare-dependencies): Move
from here...
* lisp/emacs-lisp/lisp-mnt.el (lm--prepare-package-dependencies):
...to here.
(lm-package-requires): New function.
(package-buffer-info): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm--tests-lm-package-requires): New test.

12 months agoEglot: declare eglot-lsp-context bound to non-nil
João Távora [Fri, 22 Dec 2023 23:53:23 +0000 (17:53 -0600)]
Eglot: declare eglot-lsp-context bound to non-nil

Otherwise, it'll be really hard to use it in the recommended fashion:

  (defun my/project-find-function (dir)
    (when-let ((match
                (and (bound-and-true-p eglot-lsp-context)
                     (locate-dominating-file dir "some-marker-file"))))
      `(transient . ,match)))

  (add-hook 'project-find-functions #'my/project-find-function)

because 'bound-and-true-p' will never return t even when the hook is called
from eglot--current-project.

Github-reference: https://github.com/joaotavora/eglot/discussions/1336
Github-reference: https://github.com/joaotavora/eglot/discussions/1337

* lisp/progmodes/eglot.el (eglot-lsp-context): Declare normally.

12 months agoTramp's direct asynchronous processes use 'tramp-remote-path'
Michael Albinus [Fri, 22 Dec 2023 18:58:32 +0000 (19:58 +0100)]
Tramp's direct asynchronous processes use 'tramp-remote-path'

* doc/misc/tramp.texi (Remote processes): Remove item about
tramp-remote-path.

* etc/NEWS: Direct asynchronous processes use 'tramp-remote-path'.

* lisp/net/tramp-sh.el (tramp-get-remote-pipe-buf): New defun.
(tramp-set-remote-path): Use it.
(tramp-get-remote-path): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-handle-make-process):
Use `tramp-remote-path' for setting PATH environment.

* test/lisp/net/tramp-tests.el (tramp-test35-exec-path-direct-async)
(tramp-test35-remote-path-direct-async): New tests.

12 months agoJsonrpc: clean up previous change
João Távora [Fri, 22 Dec 2023 13:44:39 +0000 (07:44 -0600)]
Jsonrpc: clean up previous change

* lisp/jsonrpc.el (jsonrpc-connection): Rework slot names.
(jsonrpc-connection-receive): Rework.
(jsonrpc--call-deferred): Fix typo.
(jsonrpc--process-sentinel)
(jsonrpc--remove): Use new slot names.
(jsonrpc--continue): Rework.
(jsonrpc--async-request-1): Rework.
(jsonrpc--event): Remember to remove :jsonrpc-json from
foreign-message
(jsonrpc--connection-receive): Revamp.
(jsonrpc--connection-send)
(jsonrpc--connection-reply): Rework.
(jsonrpc--log-event): Revamp.
(jsonrpc-continuation-count): Use new slot name.

12 months ago; Fix typos
Stefan Kangas [Fri, 22 Dec 2023 16:14:09 +0000 (17:14 +0100)]
; Fix typos

12 months agoRemove byte-compile-form-stack backstop
Mattias Engdegård [Fri, 22 Dec 2023 14:46:45 +0000 (15:46 +0100)]
Remove byte-compile-form-stack backstop

* lisp/emacs-lisp/cconv.el (cconv-closure-convert):
Eliminate a binding that probably isn't useful after all.

12 months ago* lisp/emacs-lisp/byte-opt.el (byte-compile-nilconstp): Extend list.
Mattias Engdegård [Fri, 22 Dec 2023 13:53:04 +0000 (14:53 +0100)]
* lisp/emacs-lisp/byte-opt.el (byte-compile-nilconstp): Extend list.

12 months agoSlight funcall_subr optimisation
Mattias Engdegård [Tue, 21 Nov 2023 10:23:57 +0000 (11:23 +0100)]
Slight funcall_subr optimisation

* src/eval.c (funcall_subr): Help the compiler by reducing aliasing
problems, and compensate for a missed-optimisation bug in LLVM where
switches sometimes forget to use variable range information (reported
in https://github.com/llvm/llvm-project/issues/76085).

12 months agoEnsure proper mode of *Compile-Log* buffer (bug#67920)
Mattias Engdegård [Thu, 21 Dec 2023 17:56:04 +0000 (18:56 +0100)]
Ensure proper mode of *Compile-Log* buffer (bug#67920)

Reported by OGAWA Hirofumi.

* lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings):
Move most of the innards to...
(bytecomp--displaying-warnings): ...this new function, for ease
of maintenance.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Wrap early warning about missing lexbind declaration in
`displaying-byte-compile-warnings` so that it doesn't cause the
creation of a compile-log buffer with the wrong mode.

12 months agoEncapsulate byte-compile-form-stack maintenance
Mattias Engdegård [Thu, 21 Dec 2023 12:33:27 +0000 (13:33 +0100)]
Encapsulate byte-compile-form-stack maintenance

* lisp/emacs-lisp/bytecomp.el (byte-compile-toplevel-file-form)
(byte-compile-form):
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Use `macroexp--with-extended-form-stack` instead of explicit
push and pop.

12 months agoProperly instruct compound glyphs with compound components
Po Lu [Fri, 22 Dec 2023 02:25:36 +0000 (10:25 +0800)]
Properly instruct compound glyphs with compound components

* src/sfnt.c (sfnt_interpret_compound_glyph_2): Don't grow the
compound decomposition context for saving compound points into,
since the space for them already exists.

12 months agoJsonrpc: overhaul logging mechanics
João Távora [Thu, 21 Dec 2023 20:49:02 +0000 (14:49 -0600)]
Jsonrpc: overhaul logging mechanics

* lisp/jsonrpc.el (jsonrpc-connection): Rework.
(initialize-instance :after jsonrpc-connection): New method.
(slot-missing jsonrpc-connection :events-buffer-scrollback-size oset):
New hack.
(jsonrpc-connection-receive): Rework.
(initialize-instance :after jsonrpc-process-connection): Rework
from non-after version.
(jsonrpc-connection-send)
(jsonrpc--call-deferred)
(jsonrpc--process-sentinel)
(jsonrpc--async-request-1, jsonrpc--debug, jsonrpc--log-event)
(jsonrpc--forwarding-buffer): Rework.
(jsonrpc--run-event-hook): New helper.
(jsonrpc-event-hook): New hook.

* lisp/progmodes/eglot.el (eglot-lsp-server): Fix project slot
initform.
(eglot--connect): Use new jsonrpc-connection initarg.

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Use
jsonrpc-event-hook.
(eglot-test-basic-completions): Fix test.

12 months agoJsonrpc: fix destructuring bug
João Távora [Thu, 21 Dec 2023 15:08:13 +0000 (09:08 -0600)]
Jsonrpc: fix destructuring bug

* lisp/jsonrpc.el (jsonrpc--process-sentinel): Fix destructuring bug.
(Version): Bump to 1.0.22

12 months agoMerge branch 'no-ls-lisp-advice'
Stefan Monnier [Thu, 21 Dec 2023 14:37:12 +0000 (09:37 -0500)]
Merge branch 'no-ls-lisp-advice'

12 months ago* test/lisp/ls-lisp-tests.el (ls-lisp-unload): Delete test
Stefan Monnier [Thu, 21 Dec 2023 14:27:53 +0000 (09:27 -0500)]
* test/lisp/ls-lisp-tests.el (ls-lisp-unload): Delete test

We don't use such advice any more.

12 months ago; * etc/NEWS: Fix markings (bug#67249).
Eli Zaretskii [Thu, 21 Dec 2023 13:21:21 +0000 (15:21 +0200)]
; * etc/NEWS: Fix markings (bug#67249).

12 months ago; * lisp/emacs-lisp/cconv.el (cconv-convert): Reindent.
Mattias Engdegård [Wed, 20 Dec 2023 16:08:41 +0000 (17:08 +0100)]
; * lisp/emacs-lisp/cconv.el (cconv-convert): Reindent.

12 months agoMaintain byte-compile-form-stack in cconv-convert (bug#67483)
Mattias Engdegård [Wed, 20 Dec 2023 12:21:36 +0000 (13:21 +0100)]
Maintain byte-compile-form-stack in cconv-convert (bug#67483)

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
New.
* lisp/emacs-lisp/cconv.el (cconv-closure-convert, cconv-convert):
Push forms onto byte-compile-form-stack.

12 months agoNon-delayed warning for malformed function (bug#67483)
Mattias Engdegård [Wed, 20 Dec 2023 13:15:59 +0000 (14:15 +0100)]
Non-delayed warning for malformed function (bug#67483)

* lisp/emacs-lisp/cconv.el (cconv-convert): Use an immediate warning;
a delayed one made little sense as it's a matter of well-formedness.

12 months ago; * lisp/progmodes/gdb-mi.el (gdb-load-history): Add doc string.
Eli Zaretskii [Thu, 21 Dec 2023 11:57:00 +0000 (13:57 +0200)]
; * lisp/progmodes/gdb-mi.el (gdb-load-history): Add doc string.

12 months agoFunction to load GDB history
Manuel Giraud [Wed, 20 Dec 2023 11:08:30 +0000 (12:08 +0100)]
Function to load GDB history

* lisp/progmodes/gdb-mi.el (gud-gdb-load-history): New function to
load GDB history, code factored out of 'gdb'.
(gdb): Call it.  (Bug#67928)

12 months agoImprove and update documentation of registers
Eli Zaretskii [Thu, 21 Dec 2023 11:45:58 +0000 (13:45 +0200)]
Improve and update documentation of registers

* lisp/register.el (register-use-preview)
(register--read-with-preview-function)
(register-preview-function, register-preview-default-1)
(register-preview-default, register--preview-function)
(register-preview-info, register-command-info)
(register-preview-forward-line, register-preview-next)
(register-preview-previous, set-register, register-type)
(register--type, register-preview, register-preview-1)
(register-preview-get-defaults, register-read-with-preview)
(register-read-with-preview-traditional)
(register-read-with-preview-fancy, register-preview-delay): Doc
fixes.

* doc/emacs/regs.texi (Registers): Describe the new preview modes.

* etc/NEWS: Move the registers entry to its correct place, and
document the modified behavior.

(Bug#66394)

12 months agoImplement an undocumented TrueType "feature"
Po Lu [Thu, 21 Dec 2023 08:31:30 +0000 (16:31 +0800)]
Implement an undocumented TrueType "feature"

* src/sfnt.c (sfnt_move): Correct commentary.
(sfnt_interpret_control_value_program): Reset dual projection,
freedom and projection vectors, in addition to the reference
points, zone pointers and loop counter.

12 months ago* src/sfnt.c (GETINFO): Implement undocumented selector bit 5.
Po Lu [Thu, 21 Dec 2023 06:35:18 +0000 (14:35 +0800)]
* src/sfnt.c (GETINFO): Implement undocumented selector bit 5.

12 months agoAccept empty contours in glyphs
Po Lu [Thu, 21 Dec 2023 05:34:54 +0000 (13:34 +0800)]
Accept empty contours in glyphs

* src/sfnt.c (sfnt_decompose_glyph_1, sfnt_decompose_glyph_2):
Accept empty contours, for they are not invalid, just redundant.

12 months ago* lisp/register.el (register-read-with-preview-fancy): Fit in 80 columns
Stefan Monnier [Thu, 21 Dec 2023 03:38:35 +0000 (22:38 -0500)]
* lisp/register.el (register-read-with-preview-fancy): Fit in 80 columns

12 months agoCorrect defcustoms in register.el
Po Lu [Thu, 21 Dec 2023 01:37:04 +0000 (09:37 +0800)]
Correct defcustoms in register.el

* lisp/register.el (register-preview-default-keys)
(register-use-preview): Render :version tags strings.

12 months agoJsonrpc: deal with nested synchronous jsonrpc-request
João Távora [Wed, 20 Dec 2023 22:25:28 +0000 (16:25 -0600)]
Jsonrpc: deal with nested synchronous jsonrpc-request

See bug#67945

* lisp/jsonrpc.el (jsonrpc-connection): Add -sync-request-alist
(jsonrpc-connection-receive): Rework.
(jsonrpc-request): Rework.  Pass SYNC-REQUEST to
jsonrpc-async-request-1.
(jsonrpc--process-sentinel): Simplify.
(jsonrpc--schedule): New helper.
(jsonrpc--continue): New helper.
(jsonrpc--async-request-1): Rework.
(jsonrpc--process-sentinel): Also cancel deferred action timers.
(Version): Bump to 1.0.21

12 months agoJsonrpc: rework implementation of continuations
João Távora [Wed, 20 Dec 2023 16:28:52 +0000 (10:28 -0600)]
Jsonrpc: rework implementation of continuations

Preparatory work for fix of bug#67945

* lisp/jsonrpc.el (jsonrpc-connection): Change slots.
(jsonrpc--remove): New helper
(jsonrpc-forget-pending-continuations)
(jsonrpc-connection-receive)
(jsonrpc-request)
(jsonrpc--process-sentinel)
(jsonrpc--async-request-1)
(jsonrpc--async-request-1): Rework.
(jsonrpc-continuation-count): New convenience helper.

* lisp/progmodes/eglot.el (eglot--mode-line-format): Stop using
jsonrpc--request-continuations.

12 months agotrace.el: use cl-print
João Távora [Wed, 20 Dec 2023 18:11:53 +0000 (12:11 -0600)]
trace.el: use cl-print

Any non-trivial EIEO object in particular is impossible to read in the
*trace-output* buffer without this.  Functions, hash-tables, etc now
print as they do in backtrace buffers.

* lisp/emacs-lisp/trace.el (cl-print): Require it
(trace-entry-message, trace-exit-message): Use cl-prin1-to-string

12 months agoMerge commit 'new-fix-for-bug-60819'
Stefan Monnier [Wed, 20 Dec 2023 23:34:57 +0000 (18:34 -0500)]
Merge commit 'new-fix-for-bug-60819'

12 months ago* lisp/cedet/semantic/db.el (semanticdb-create-database): Remove obsolete arg
Stefan Monnier [Wed, 20 Dec 2023 22:50:48 +0000 (17:50 -0500)]
* lisp/cedet/semantic/db.el (semanticdb-create-database): Remove obsolete arg

12 months ago* lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1
Stefan Monnier [Wed, 20 Dec 2023 22:50:09 +0000 (17:50 -0500)]
* lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1

12 months ago(bibtex-font-lock-keywords): Expose a lambda to the compiler
Stefan Monnier [Wed, 20 Dec 2023 22:49:21 +0000 (17:49 -0500)]
(bibtex-font-lock-keywords): Expose a lambda to the compiler

Also use #' to quote function names.

* lisp/textmodes/bibtex.el (bibtex-font-lock-keywords): Expose a
lambda to the compiler.

12 months agoSpecific rcirc log file time stamp format
Matto Fransen [Tue, 19 Dec 2023 12:14:33 +0000 (13:14 +0100)]
Specific rcirc log file time stamp format

The time stamp format in the chat buffer may now
differ from the format in the log files.
* doc/misc/rcirc.texi: Document new variable
* lisp/net/rcirc.el (rcirc-log-time-format):
Custom variable for the format.  (bug#67597)

Copyright-paperwork-exempt: yes

12 months agoRename *basic symbols and words to traditional in register
Thierry Volpiatto [Wed, 20 Dec 2023 17:08:03 +0000 (18:08 +0100)]
Rename *basic symbols and words to traditional in register

* lisp/register.el (register-use-preview): Do it.
(register-read-with-preview-traditional): Renamed from
register-read-with-preview-basic.

12 months agoFix condition in register-read-with-preview-fancy
Thierry Volpiatto [Tue, 19 Dec 2023 16:45:22 +0000 (17:45 +0100)]
Fix condition in register-read-with-preview-fancy

Now with have :noconfirm no need to check for '(set modify) otherwise
we fail as well in kmacros when register-use-preview is t.
The conditions should not be hard coded in
register-read-with-preview-fancy but in the cl-defmethod
register-command-info for each command.

* lisp/register.el (register-read-with-preview-fancy): Remove now
unneeded condition.

12 months agoFix issue with register commands in kmacro
Stefan Monnier [Mon, 18 Dec 2023 06:11:42 +0000 (07:11 +0100)]
Fix issue with register commands in kmacro

Using post-command-hook in minibuffer-setup-hook instead of a timer
allow running exit-minibuffer without delay and ensure the serie of
commands used in a kmacro run synchronously.

* lisp/register.el (register-read-with-preview-fancy): Do it.

12 months agoProvide emacs-29 behavior for register-preview
Thierry Volpiatto [Tue, 12 Dec 2023 06:24:32 +0000 (07:24 +0100)]
Provide emacs-29 behavior for register-preview

It is now the default with a value of register-use-preview eq to
basic.
To change this one have now to customize register-use-preview to
another value.

* lisp/register.el (register-preview-delay): Remove obsolescence.
(register--read-with-preview-function): New.
(register-use-preview): New option basic, it is now the default.
(register-preview-default-1): New the register-preview-default used by
`register-read-with-preview-fancy`.
(register-preview-default): Restored (same as Emacs-29).
(register--preview-function): Generic fn that return the right
function for register--preview-function.
(register-preview): Restored (same behavior as Emacs-29).
(register-preview-1): Used by `register-read-with-preview-fancy'.
(register-read-with-preview-basic): The old
register-read-with-preview.
(register-read-with-preview-fancy): The new
register-read-with-preview.

12 months agoDon't confirm with RET even when overwriting in register commands
Thierry Volpiatto [Mon, 11 Dec 2023 06:02:40 +0000 (07:02 +0100)]
Don't confirm with RET even when overwriting in register commands

This happen when register-use-preview is nil or never.
This reproduce what we had previously in 29.1 but with filtering in
the preview and default registers are provided for the commands of
type 'set'.

This is implemented with cl-defmethod to keep the code as much as
possible configurable.

* lisp/register.el (register-preview-info): New slot.
(register-command-info): Add new methods for copy-to-register,
point-to-register, number-to-register,
window-configuration-to-register, frameset-to-register and
copy-rectangle-to-register.
(register-read-with-preview): Bind noconfirm.

12 months agoproject--read-file-cpd-relative: Don't abbreviate at all
Dmitry Gutov [Wed, 20 Dec 2023 15:34:12 +0000 (17:34 +0200)]
project--read-file-cpd-relative: Don't abbreviate at all

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Don't abbreviate at all, only suffixes are shown anyway.
And expand-file-name is slightly faster.

12 months agoFix project-find-file history (with project--read-file-cpd-relative)
Dmitry Gutov [Wed, 20 Dec 2023 15:20:26 +0000 (17:20 +0200)]
Fix project-find-file history (with project--read-file-cpd-relative)

* lisp/progmodes/project.el (project--transplant-file-name):
Don't abbreviate here (bug#67901, bug#63829).
(project--read-file-cpd-relative): Do it here instead.  The reader
functions should decide on the preferred format themselves.

12 months agoAdd "back" button on top of the pre-rename vc-print-log buffer
Dmitry Gutov [Tue, 19 Dec 2023 22:22:47 +0000 (00:22 +0200)]
Add "back" button on top of the pre-rename vc-print-log buffer

* lisp/vc/vc.el (log-view-vc-prev-revision)
(log-view-vc-prev-fileset): New dynamic variables (bug#55871).
(vc-print-log-renamed-add-button): Extract from
'vc-print-log-setup-buttons'.  Bind the above variables to convey
the current revision and fileset to 'vc-print-log-internal'.
(vc-print-log-internal): Use it also here, to print a "back"
button above the log when 'log-view-vc-prev-fileset' is set.

12 months agoCalc: speed up math-read-preprocess-string (bug#67536)
Mattias Engdegård [Tue, 19 Dec 2023 16:10:42 +0000 (17:10 +0100)]
Calc: speed up math-read-preprocess-string (bug#67536)

`math-read-preprocess-string` is one of the bottlenecks of `calc-eval`
and was unnecessarily slow even with no substitutions made.
This affected org-mode in particular, where `calc-eval` is called
repeatedly to recalculate tables.

Reported by Raffael Stocker who also wrote the unit tests here.

* lisp/calc/calc-aent.el (math--read-preprocess-re-cache): New.
(math-read-preprocess-string):
Use math--read-preprocess-re-cache, first computing it if necessary.
* test/lisp/calc/calc-tests.el (calc-math-read-preprocess-string):
New test.

12 months ago; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp.
Mattias Engdegård [Tue, 19 Dec 2023 16:07:24 +0000 (17:07 +0100)]
; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp.

12 months ago; * src/eval.c (syms_of_eval) <debugger>: Doc fix.
Eli Zaretskii [Tue, 19 Dec 2023 12:20:24 +0000 (14:20 +0200)]
; * src/eval.c (syms_of_eval) <debugger>: Doc fix.

12 months agoFido-mode: don't error if case-fold-search is globally nil
João Távora [Tue, 19 Dec 2023 10:06:45 +0000 (04:06 -0600)]
Fido-mode: don't error if case-fold-search is globally nil

bug#67884

To prevent errors, the same case-fold-search setting used for
originally selecting the candidate should be used when scoring it.

* lisp/minibuffer.el (completion--flex-score): Fix

12 months agoImprove efficiency of operations involving font interpreter scale
Po Lu [Tue, 19 Dec 2023 08:42:38 +0000 (16:42 +0800)]
Improve efficiency of operations involving font interpreter scale

* src/sfnt.c (sfnt_mul_f26dot6_fixed): Correct rounding
constant.
(sfnt_make_interpreter, SSW, WCVTF, sfnt_compute_phantom_points)
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_1)
(sfnt_vary_interpreter, sfnt_check_ssw): Account for the
fractional bits in a f26dot6 when computing the interpreter
scale factor.

12 months agoProperly sign-extend freedom and projection vector values
Po Lu [Tue, 19 Dec 2023 06:39:28 +0000 (14:39 +0800)]
Properly sign-extend freedom and projection vector values

* src/sfnt.c (GPV, GFV): Cast versors to int32_t.

12 months agoFurther corrections to font scaling
Po Lu [Tue, 19 Dec 2023 05:41:16 +0000 (13:41 +0800)]
Further corrections to font scaling

* src/sfnt.c (sfnt_dot_fix_14): Correct typo in final division.
(sfnt_compute_phantom_points): New parameters S1 and S2, into
which unrounded phantom point coordinates are saved.
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2)
(sfnt_interpret_compound_glyph_1): Adjust correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): Delete redundant
branch.

12 months ago; Small copyedits to doc/misc/eglot.texi
João Távora [Mon, 18 Dec 2023 23:59:29 +0000 (17:59 -0600)]
; Small copyedits to doc/misc/eglot.texi

Motivated in part by bug#67870 and bug#67609.

* doc/misc/eglot.texi (Quick Start): Reword
(Eglot Features): Reword.
(Eglot Commands): Fix typo.

12 months agodebug.el: Straighten the code that find the "base" of the backtrace
Stefan Monnier [Mon, 18 Dec 2023 22:42:37 +0000 (17:42 -0500)]
debug.el: Straighten the code that find the "base" of the backtrace

Let the caller tell us clearly where is the base of the backtrace,
if it's not `debug`.  This is done by passing a new `:backtrace-base`
keyword argument to `debug`.

Then use this info systematically in all the places where we access
the real C-level backtrace, to try and avoid inconsistencies and brittle
code that tries to enumerate the expected frames we're in.

* src/eval.c (get_backtrace_starting_at): Add support for offsets in the
`base` argument.
(Fbacktrace_debug): Add optional `base` argument.

* lisp/emacs-lisp/debug.el (debug, debugger-frame, debugger-frame-clear):
Use `debugger--backtrace-base` when calling `backtrace-debug`.
(debugger-setup-buffer): Use `debugger--backtrace-base`
when calling `backtrace-get-frames`.
(debugger-frame-number): Drop `skip-base` arg, assume it's never nil.
Add sanity check.
(debugger--backtrace-base): Use the `:backtrace-base` info
in `debugger-args`.
(debugger-eval-expression): Adjust call to `debugger-frame-number`.
(debug--implement-debug-on-entry): Pass appropriate `:backtrace-base`.

12 months agoFurther fixes for problems uncovered by the previous fix
Po Lu [Mon, 18 Dec 2023 14:14:22 +0000 (22:14 +0800)]
Further fixes for problems uncovered by the previous fix

* src/sfnt.c (sfnt_deltap): Enable deltap instructions again,
since they now serve a purpose.
(sfnt_compute_phantom_points): Round phantom points to match the
behavior of other TrueType scalers.

12 months ago; * src/sfnt.c: Fix typo.
Po Lu [Mon, 18 Dec 2023 12:58:53 +0000 (20:58 +0800)]
; * src/sfnt.c: Fix typo.

12 months ago* src/sfnt.c (sfnt_interpret_mdap): Correct MDAP opcode.
Po Lu [Mon, 18 Dec 2023 12:57:24 +0000 (20:57 +0800)]
* src/sfnt.c (sfnt_interpret_mdap): Correct MDAP opcode.

12 months agoFix typo in earlier changes
Po Lu [Mon, 18 Dec 2023 05:32:56 +0000 (13:32 +0800)]
Fix typo in earlier changes

* src/sfnt.c (sfnt_poly_edges_exact): Don't overwrite the
remainder of an ascending edge with its covered height.
(main): Adjust tests.

12 months agoAdd erc-track integration to erc-nicks
F. Jason Park [Tue, 12 Dec 2023 04:24:17 +0000 (20:24 -0800)]
Add erc-track integration to erc-nicks

* lisp/erc/erc-button.el (erc-button--nick): Add `face-cache' slot.
(erc-button-add-nickname-buttons): Pass `erc-button--nick' object, if
created', as the boolean NICK-P parameter when calling
`erc-button-add-button'.  Keeping the latter function ignorant of
`erc-button--nick' is of course preferable, but some coordination is
now required to convey and use the "face cache".  We can introduce an
abstraction, like a local variable, if this becomes an issue.
(erc-button-add-button): Use `erc--merge-prop' instead of
`erc-button-add-face' to apply button faces.  Hold off on deprecating
the latter because it provides unique functionality for nesting faces.
Also, consult NICK-P if it's an `erc-button--nick' object for the
various overriding faces it knows about.
* lisp/erc/erc-nicks.el (erc-nicks-track-faces): New option.
(erc-nicks--get-face): Make generated face `:inherit' from
`erc-nicks-backing-face'.
(erc-nicks--highlight): Just return the generated face instead of
combining it with `erc-nicks-backing-face'.
(erc-nicks--highlight-button): Set the `face-cache' slot of the
`erc-button--nick' object when `track' is loaded and initialized.
(erc-nicks-mode, erc-nicks-enable, erc-nicks-disable): Add and remove
`track' integration.
(erc-nicks--reject-uninterned-faces): New function to remove faces
created by `nicks' from buttonized speakers and mentions.  Conform
to `erc-track--face-reject-function' interface.
(erc-nicks--ourps, erc-nicks--check-normals): New function and helper
for `erc-track--alt-normals-function' interface.
(erc-nicks--setup-track-integration): New function.
(erc-nicks--remember-face-for-track): New function to cache
nick faces owned by this module.
* lisp/erc/erc.el (erc--merge-prop): Add new optional parameter
`cache-fn', and when non-nil, call it, assigning the returned value to
that of the merged property.
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-list-faces): Skip
the "Inherit: " button.  (Bug#67767)

12 months agoCache shortened channel names in erc-track
F. Jason Park [Mon, 13 Jun 2022 07:26:22 +0000 (00:26 -0700)]
Cache shortened channel names in erc-track

* lisp/erc/erc-track.el (erc-track--shortened-names): New variable to
stash both the latest inputs and most recent result of
`erc-track-shorten-function'.
(erc-track--shortened-names-current-hash,
erc-track--shortened-names-set, erc-track--shortened-names-get): New
pair of generalized-variable functions and helper variable for
accessing and mutating `erc-track--shorten-prefixes'.
(erc-modified-channels-display): Avoid redundant calls to
`erc-track-shorten-function'.  Mainly for use during batch processing.
* test/lisp/erc/erc-track-tests.el (erc-track--shortened-names): New
test.  (Bug#67767)

12 months agoPromote "normal" faces in erc-track
F. Jason Park [Sun, 10 Dec 2023 13:33:48 +0000 (05:33 -0800)]
Promote "normal" faces in erc-track

* etc/ERC-NEWS: Add entry for new behavior involving the option
`erc-track-faces-normal-list'.
* lisp/erc/erc-button.el (erc-button-nick-default-face): New face to
serve as default for `erc-button-nickname-face'.
(erc-button-nickname-face): Change default value to
`erc-button-nick-default-face'.
* lisp/erc/erc-track.el (erc-track--massage-nick-button-faces): New
function to serve as Custom :set function for priority and "normal"
face-list options.
(erc-track-faces-normal-list): Fix Custom :type by loading
`erc-button' during validation so Customize chooses the correct UI
instead of a generic form field with "(mismatch)" printed alongside
the "STATE" button.
(erc-track-faces-priority-list, erc-track-faces-normal-list): Remove
values for "buttonized" `match' module faces that, if retained, would
need updating to feature `erc-button-nick-default-face' instead of
`erc-nick-default-face'.  However, as noted in the NEWS entry, this
ordering of button face atop match face is not possible.  Use :set
function to massage saved user values.
(erc-track-ignore-normal-contenders-p): New compatibility switch to
access pre-5.6 behavior, in which faces in
`erc-track-faces-normal-list' were only considered for promotion to
the mode line if the current face occupying that pole position wasn't
present.
(erc-track-mode, erc-track-enable, erc-track-disable): Add comments
regarding perceived futility of hooking on `erc-server-001-functions'
and likely unneeded hook removal.  Run common buffer-local setup and
teardown.
(erc-track--normal-faces): New local variable, a snapshot of
`erc-track-faces-normal-list'.
(erc-track--setup): New function to stash
`erc-track-faces-normal-list' on init.
(erc-track-select-mode-line-face): Offer alternate explanation of
certain particulars in doc string.
(erc-track--alt-normals-function): New function-valued variable to
allow other modules to intervene in deciding whether to pursue and
promote a "normal" contending face.
(erc-track--select-mode-line-face): New function similar to its public
namesake except that it considers other viable candidates among the
"normal" alternatives.
(erc-track-modified-channels): Only run face selection portion when
faces are actually found.  Use `erc-track--select-mode-line-face'
instead of `erc-track-select-mode-line-face'.
* test/lisp/erc/erc-track-tests.el
(erc-track-select-mode-line-face): New test.
(erc-track-tests--select-mode-line-face): New fixture function.
(erc-track--select-mode-line-face): New test.  (Bug#67767)

12 months agoForgo excess nick buttonizing on JOINs and QUITs
F. Jason Park [Wed, 13 Dec 2023 03:06:52 +0000 (19:06 -0800)]
Forgo excess nick buttonizing on JOINs and QUITs

* etc/ERC-NEWS: Mention nick-button deduping.
* lisp/erc/erc-button.el (erc-button-highlight-nick-once): New
variable to specify commands and numerics for messages that ERC should
forgo redundant buttonizing atop, assuming the presence of a
"userhost".
(erc-button--fallback-cmem-function): Change default value to
`erc-button--get-user-from-spkr-prop'.
(erc-button--get-user-from-spkr-prop): New function to derive user
object from `erc--spkr' "msg prop".  The point is to allow
`erc-speaker-from-channel-member-function' to return a display name
that differs from the speaker's actual nick as recorded by its
`erc-server-user' object.
(erc-button--get-phantom-cmem): Add `count' parameter.
(erc-button-add-nickname-buttons): Stop after first turn if the
current command appears in `erc-button-highlight-nick-once'.  Pass
iteration count to `erc-button--fallback-cmem-function'.  (Bug#67677)

12 months agoRename erc-channel-users to erc-channel-members
F. Jason Park [Sun, 30 Apr 2023 15:09:29 +0000 (08:09 -0700)]
Rename erc-channel-users to erc-channel-members

* etc/ERC-NEWS: Mention name change.
* lisp/erc/erc-backend.el (erc-process-sentinel): Don't create an
empty `erc-channel-users' hash table in server buffers.  This is
arguably a bug fix as well as a minor breaking change.
* lisp/erc/erc-common.el (erc-get-channel-user,
erc-get-channel-member): Rename and alias former to latter.
* lisp/erc/erc.el (erc-channel-users, erc-channel-members): Rename
former to latter.  The old name invited much confusion because the
table's values are not mere `erc-channel-user' instances but cons
cells that include them and their corresponding server users.

12 months agoConsolidate status-prefix slots of erc-channel-user
F. Jason Park [Sun, 30 Apr 2023 14:45:01 +0000 (07:45 -0700)]
Consolidate status-prefix slots of erc-channel-user

* etc/ERC-NEWS: Mention change even though the API remains
undisturbed.
* lisp/erc/erc-common.el (erc-channel-user): "Encode" status prefix
slots `voice', `halfop', `op', `admin', and `owner' as single `status'
slot.  Add backward-compatible constructor.  Although the old layout
was overly sparse, since the vast majority of users have no membership
status at all, the point here is not to trade time for space but
rather to improve human readability of ERC buffer substrings
containing text props that reference `erc-channel-user' objects.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Helper macro for declaring compat-oriented "getters" for status-prefix
slots of `erc-channel-user'.
(erc-channel-user-voice, erc-channel-user-halfop, erc-channel-user-op,
erc-channel-user-admin, erc-channel-user-owner): Add compat getters.
These are not new functions.  They were previously defined by the
`erc-channel-user' `cl-defstruct' in erc-common.el.
(erc--update-cusr-status-if-changed): New helper macro to make
`erc-update-current-channel-member' more readable.
(erc-update-current-channel-member): Collapse some overly verbose
"unrolled" forms using helper macro and more compact expressions.
* test/lisp/erc/erc-tests.el (erc-channel-user): New test.

12 months agoDemote erc-fill-line-spacing to a normal variable
F. Jason Park [Thu, 14 Dec 2023 06:45:06 +0000 (22:45 -0800)]
Demote erc-fill-line-spacing to a normal variable

* etc/ERC-NEWS: Remove section from 5.6 announcing user option
`erc-fill-line-spacing'.
* lisp/erc/erc-fill.el (erc-fill-line-spacing): Change from an option
to a variable and note unfortunate UX hiccups.
(erc-fill-wrap-merge, erc-fill-wrap-merge-indicator, fill-wrap):
Remove mention of the option, now variable, `erc-fill-line-spacing'.
(Bug#60936)

12 months agoUse templates for formatting chat messages in ERC
F. Jason Park [Mon, 27 Nov 2023 02:24:48 +0000 (18:24 -0800)]
Use templates for formatting chat messages in ERC

* doc/misc/erc.texi: Replace option `erc-format-nick-function' with
`erc-show-speaker-membership-status'.
* etc/ERC-NEWS: Mention shift to template-based speaker formatting.
Also mention in-buffer STATUSMSG support and various name changes and
new formatting-related options.
* lisp/erc/erc-backend.el (erc-format-privmessage): Remove forward
declaration.
(erc--determine-speaker-message-format-args): Add forward declaration.
(erc--statusmsg-target): New utility function for detecting whether
the current target is status-prefixed.
(erc-current-message-catalog): Move here from lisp/erc/erc.el.
(erc--message-speaker-catalog): New variable.
(erc--speaker-status-prefix-wanted-p): New variable specifically for
the function `erc-format-@nick' to signal it wants status-prefixes
prepended to the displayed nick.
(erc-server-PRIVMSG): Initialize `let'-bound value of
`erc--msg-prop-overrides' to a dummy `erc--tmp' property with a null
value that `erc-display-message' will "strip" before calling its
hooks.  Move away from the rather blunt symbol `msg' as a useful value
for `erc--msg'.  Instead, allow `erc-display-message' to assign the
most appropriate value based on context.  Also, bind the variable
`erc-current-message-catalog' to whatever the buffer's
`erc--message-speaker-catalog' happens to be.  Future internal modules
can set this to alternative catalogs as needed.  Additionally, detect
STATUSMSG prefixes on targets and inform the formatting logic of the
verdict.  Lastly, and most importantly, use the function
`erc--determine-speaker-message-format-args' instead of
`erc-format-privmessage' for message formatting.  Pass along the
returned "catalog key" and spec parameters to `erc-display-message'.
However, for NOTICEs, continue to render the string, as before, for
the two "echo notice" hooks.
* lisp/erc/erc-common.el (erc--ctcp-response): New "subsclass" of
`erc-response' for smuggling extra information to CTCP query handlers
in a mostly backwards-compatible way.  The same approach could be
taken with the "echo notice" hooks mentioned above.
* lisp/erc/erc-dcc.el (erc-dcc-chat-filter): Add `erc--spkr' and
`erc--speaker' properties even though these chat buffers are not
`erc-mode' buffers.
* lisp/erc/erc-fill.el (erc-fill--wrap-last-msg,
erc-fill--wrap-max-lull): Add doc strings.
(erc-fill--wrap-continued-message-p): Rework to look for `erc--spkr'-
`erc--msg' combinations as indicators of speaker continuity.
(erc-fill--wrap-rejigger-region): Remove reference to the no longer
relevant `erc-stamp-type'.  Instead, use the `erc--msg' property
combined with the `erc-timestamp' field to detect date stamps because
all are currently left-sided.
* lisp/erc/erc-stamp.el (erc-stamp--propertize-left-date-stamp): Don't
add superfluous `erc-stamp-type' property.
* lisp/erc/erc.el (erc--msg-props): Revise purpose and meaning of
`erc--msg' by removing possible value `msg', which was previously
meant to indicate that a message had a "speaker".  Instead, rely on
the separate `erc--spkr' property to convey this information, with
`erc--msg' now expressing a "type" or "role".
(erc--use-language-catalog-for-ctcp-action-p): New variable, a
compatibility switch to help transition from the `ACTION' entry of the
language catalog to the `ctcp-action' family of entries in the new
`-speaker' catalog.
(erc--ensure-spkr-prop): Update to include any passed-in environmental
overrides.
(erc--send-action-display): Restore pre-5.6 behavior when
compatibility flag enabled.  Otherwise, use new `-speaker' catalog for
formatting inserted message.
(erc--send-message-external): Overhaul to behave more faithfully in
mimicking a line submitted at the prompt of the current target buffer.
(erc--own-property-names): Remove `erc-stamp-type'.
(erc-ensure-target-buffer-on-privmsg): Add new choice variant for old
default behavior and change meaning of default to mean "except for
STATUSMSGs".  This option is newly revived for ERC 5.6.
(erc--message-speaker-statusmsg, erc--message-speaker-statusmsg-input,
erc--message-speaker-input, erc--message-speaker-input-chan-privmsg,
erc--message-speaker-input-chan-notice,
erc--message-speaker-input-query-privmsg,
erc--message-speaker-input-query-notice,
erc--message-speaker-chan-privmsg, erc--message-speaker-query-privmsg,
erc--message-speaker-chan-notice, erc--message-speaker-query-notice,
erc--message-speaker-ctcp-action,
erc--message-speaker-ctcp-action-input,
erc--message-speaker-ctcp-action-statusmsg,
erc--message-speaker-ctcp-action-statusmsg-input): New variables for
new `speaker' format-template catalog.
(erc--speakerize-nick): New helper function.
(erc--determine-speaker-message-format-args): New function to find the
appropriate format key from various contextual parameters.  Could
become the default of a function-valued variable for internal use.
(erc-show-speaker-membership-status): New option.
(erc-format-nick-function, erc-speaker-from-channel-member-function):
Declare former as an obsolete alias for the latter, and redefine
purpose slightly.
(erc-format-nick-function, erc-determine-speaker-from-user): Rename
former to latter and obsolete the old name.
(erc-format-nick, erc-determine-speaker-from-user): Rename former to
latter and obsolete old name.
(erc-format-@nick): Deprecate and adapt for use with new
template-based formatting paradigm.
(erc-format-my-nick): Move `erc-speaker' text prop toward head of
list, meaning it will end up beneath `font-lock-face' in the final
output.
(erc--format-speaker-input-message): New function to replace
`erc-format-my-nick' in-tree.
(erc-process-ctcp-query): Don't bind `erc--msg' to `msg'.  Instead,
rely on `erc-display-message' to set it to the current template key.
(erc-ctcp-query-ACTION): Prefer using formatting template, but attempt
to simulate pre-5.6 behavior when compatibility flag enabled.
(erc-display-msg): Use `erc--format-speaker-input-message' instead of
`erc-format-my-nick'.  Ignore `erc--msg-prop-overrides' with null
values.
(erc-current-message-catalog): Move to erc-backend.el.
* test/lisp/erc/erc-scenarios-base-statusmsg.el: New file.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--left/display-margin-mode): Expect format catalog
key instead of unhelpful `msg' as value of `erc--msg' prop.
* test/lisp/erc/erc-tests.el (erc-message): Render format template in
mock function and expect string in assertions.
(erc-tests--format-privmessage): New function, a helper for the
following test.
(erc-format-privmessage, erc--determine-speaker-message-format-args):
Rename former to latter and suppress deprecation warning.
(erc--determine-speaker-message-format-args/queries,
erc--determine-speaker-message-format-args/queries-as-channel): New
tests.
(erc-tests--format-my-nick): New helper function for the following
test.
(erc--format-speaker-input-message): New test.
* test/lisp/erc/resources/base/display-message/statusmsg.eld: New
file.  (Bug#67677)
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Update.

12 months agoAdd erc--spkr text property to chat messages
F. Jason Park [Tue, 5 Dec 2023 06:13:02 +0000 (22:13 -0800)]
Add erc--spkr text property to chat messages

* etc/ERC-NEWS: Mention combined face ordering for "/me" messages.
* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Bind
`erc--msg-prop-overrides' for the extent of this function's execution,
which means a large amount of code will see this variable as being
non-nil.  However, no calls to `erc-display-message' or
`erc-display-msg' should occur other than the one handling the final
insertion.  Code needing to influence the current message's "msg
props" can push new pairs onto this value, which will override any
existing collisions.
* lisp/erc/erc-fill.el (erc-fill): Switch to `erc--spkr' as sentinel
property.
(erc-fill--wrap-continued-message-p): Look for `erc--spkr' property
instead of `erc-speaker'.
* lisp/erc/erc.el (erc--msg-props): Mention `erc--spkr' in doc.
(erc--send-action-perform-ctcp): Add `erc--spkr' property.  Fix bug in
which `erc-my-nick-face' appeared below `erc-input-face' in the
speaker portion.
(erc--ensure-spkr-prop): New helper function to propagate speaker
metadata.
(erc--ranked-properties): Add `erc--spkr', `erc--ctcp', and
`erc--ephemeral'.
(erc-display-message): Use default hash table size when initializing.
Remove unnecessary assignment of `msg' to `erc--msg' for PRIVMSG and
NOTICE commands.  Bind `string' below `erc--msg-props' so that
implementers of the function form of the `erc-format-message'
templating interface can read and write the current context's "msg
props".
(erc--own-property-names): Add all `erc--msg-props' props by
subsumation.
(erc--get-speaker-bounds): Use `erc--spkr' instead of `erc--msg' as a
sentinel to detect a chat message guaranteed to have an `erc--speaker'
text-property interval.
(erc-format-privmessage, erc-format-my-nick, erc-ctcp-query-ACTION):
Add `erc--spkr' to `erc--msg-prop-overrides' when available.
* test/lisp/erc/erc-fill-tests.el: (erc-fill-tests--insert-privmsg):
Bind `erc--msg-prop-overrides'.
(erc-fill-tests--compare): Require environment variable value to match
current test name exactly when saving snapshots.  Add `erc--msg-props'
individually to white list.
* test/lisp/erc/erc-tests.el (erc--order-text-properties-from-hash):
Include `erc--spkr'.  (Bug#60936)  (Bug#67677)
; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update.

12 months agoSkip erc-ignored-user-p when erc-ignore-list is empty
F. Jason Park [Tue, 12 Sep 2023 04:21:42 +0000 (21:21 -0700)]
Skip erc-ignored-user-p when erc-ignore-list is empty

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't bother running
`erc-ignored-user-p' and `erc-ignored-reply-p' when their associated
options are null.  The option `erc-ignore-list' is buffer-local when
set, and `erc-ignored-user-p' looks for it in the server buffer.
Moreover, all functions that set it, like `erc-cmd-IGNORE' and
`erc-cmd-UNIGNORE', do so in the server buffer.  And the response
handler in question only runs in server buffers, so this shouldn't
break anything.  Also, remove stray call to reassign trailing response
contents.
* lisp/erc/erc-common.el (erc-get-server-user): Rearrange so
`erc-with-server-buffer' doesn't have to switch to the server buffer
because `erc-downcase' can run in channels as well.
* lisp/erc/erc.el (erc-ignored-user-p): Add comment.  (Bug#67677)

12 months agoMake erc-get-user-mode-prefix more flexible
F. Jason Park [Tue, 28 Nov 2023 06:53:00 +0000 (22:53 -0800)]
Make erc-get-user-mode-prefix more flexible

* etc/ERC-NEWS: Mention renaming of `erc-get-user-mode-prefix'.
* lisp/erc/erc-speedbar.el (erc-speedbar-insert-user): Use
`erc-get-channel-membership-prefix' so that nicks in the nickbar can
have prefixes beyond just those for "voice" and "op".
* lisp/erc/erc.el (erc-get-user-mode-prefix,
erc-get-channel-membership-prefix): Rename former to latter because
"user mode" suggests the function somehow involves user modes, but it
exclusively concerns channel modes.  Also, overload the only parameter
in order to avoid redundantly looking up `erc-channel-user' object
with every predicate call.  In the near future, ERC will likely need
to offer an alternate version of this function that returns multiple
prefixes instead of just one.
(erc-format-@nick): Actually use the `channel-data' parameter.
(erc-format-my-nick, erc--format-channel-status-prefix): Use new name
for function `erc-get-user-mode-prefix'.  (Bug#63595)  (Bug#67677)

12 months agoClarify warning for process-dependent input in ERC
F. Jason Park [Tue, 28 Nov 2023 03:41:09 +0000 (19:41 -0800)]
Clarify warning for process-dependent input in ERC

* lisp/erc/erc.el (erc--check-prompt-input-for-running-process):
Resolve dissonance between content of ancient `user-error' message and
condition that triggered it by favoring the former because it's
supported by the underlying mechanism, which revolves around the
`process-not-needed' symbol property.
* test/lisp/erc/erc-tests.el (erc--check-prompt-input-functions):
Revise expected output for error assertion.  (Bug#66073, originally
from bug#54536, and included for discussion in bug#67677)

12 months agoAdd erc-server-396 response handler
F. Jason Park [Sat, 19 Aug 2023 01:04:22 +0000 (18:04 -0700)]
Add erc-server-396 response handler

* lisp/erc/erc-backend.el (erc-server-396, erc-server-396-functions):
Define response handler for 396 numeric.  For now, always display the
message in the active buffer rather than bother with something like
`erc-once-with-server-event' to try and suss out when this is a
response to something client-initiated, like a /VHOST.  Do this
despite most users probably wanting the message to appear in the
server buffer alone when the response is server-initiated.  The
`labeled-response' extension will hopefully make dealing with such
matters less of a crapshoot.
* lisp/erc/erc.el (erc--parse-user-regexp-pedantic): Tweak slightly to
allow null groups and favor host.
(erc--parse-user-regexp-legacy, erc--parse-user-regexp): Remove the
first variable but preserve its value as that of the second.
(erc--parse-nuh): New function.  The behavior is nuanced and complex
and so not easily described in a doc string.
(erc-message-english-396): Define format template for 396 response.
* test/lisp/erc/erc-scenarios-misc-commands.el
(erc-scenarios-misc-commands--VHOST): New test.
* test/lisp/erc/erc-tests.el (erc-parse-user): Move "pedantic" section
to new test.
(erc--parse-nuh): New test.
* test/lisp/erc/resources/commands/vhost.eld: New test data file.
(Bug#67677)

12 months agoMake erc-input's refoldp slot conditionally available
F. Jason Park [Fri, 1 Dec 2023 21:54:12 +0000 (13:54 -0800)]
Make erc-input's refoldp slot conditionally available

* etc/ERC-NEWS: Fix entry regarding `erc-input-refoldp'.
* lisp/erc/erc-common.el (erc-input): Remove `refoldp' slot, which was
to be new in 5.6, in order to reduce churn in the extremely unlikely
event that third-party code uses the read-syntax of these objects or
ones subclassed from it for some other purpose, outside of
`erc-pre-send-functions'.
(erc--input-split) Add `refoldp' slot here instead.
* lisp/erc/erc.el (erc-pre-send-functions): Amend doc string to stress
that `refoldp' is not a real slot.
(erc--input-ensure-hook-context, erc-input-refoldp): New function, an
impostor accessor for the nonexistent `refoldp' slot of `erc-input',
and a helper function for asserting a valid context at runtime.
(erc--run-send-hooks): Don't copy over `refoldp' from the
`erc--input-lines' object to the working `erc-insert' object.  Check
the insertion context's `erc--input-split' object instead of the
hook's `erc-insert' object when deciding whether to resplit.
* test/lisp/erc/erc-tests.el: Adjust test environment to satisfy
assertion.  (Bug#62947)

12 months agoAdd utility for iterating over arrays in ERC
F. Jason Park [Mon, 4 Dec 2023 03:19:37 +0000 (19:19 -0800)]
Add utility for iterating over arrays in ERC

* lisp/erc/erc-common.el (erc--doarray): Add macro for mapping over
arrays.  ERC has the uncommon requirement of having to repeatedly
traverse strings that contain flags for advertised server features.
It doesn't make sense to translate these meanings into enums or
dynamically generate variables for each flag.  Hash tables and lists
require additional setup and aren't as compact to inspect.
* lisp/erc/erc-dcc.el (erc-dcc-handle-ctcp-send): Use `string-search'
instead of `seq-contains-p' even though performance doesn't matter
here.
* lisp/erc/erc.el (erc--channel-mode-types): Use `erc--doarray'
instead of `dolist'.
(erc--process-channel-modes): Use `erc--doarray' instead of `dolist',
and don't create a string from current char until needed.
(erc--parse-user-modes): Use `erc--doarray' instead of `dolist'.
* test/lisp/erc/erc-tests.el (erc--doarray): New test.  (Bug#67677)

12 months agoDouble hyphenate internal ERC 5.6 text props
F. Jason Park [Sat, 2 Dec 2023 06:30:04 +0000 (22:30 -0800)]
Double hyphenate internal ERC 5.6 text props

* lisp/erc/erc-fill.el (erc-fill, erc-fill-static,
erc-fill--wrap-continued-message-p, erc-fill-wrap,
erc-fill--wrap-rejigger-region): Add second hyphen to "msg prop" text
properties.  Rename `erc-speaker' to `erc--speaker'.
* lisp/erc/erc-goodies.el (erc--command-indicator-display): Rename
`erc-msg' to `erc--msg'.
* lisp/erc/erc-stamp.el (erc-stamp--current-time, erc-add-timestamp,
erc-stamp-prefix-log-filter, erc-stamp--lr-date-on-pre-modify,
erc-munge-invisibility-spec, erc-stamp--add-csf-on-post-modify,
erc-stamp--on-clear-message, erc-echo-timestamp, erc--echo-ts-csf):
Rename "msg props" with second hyphen.
* lisp/erc/erc-track.el (erc-track--skipped-msgs,
erc-track-modified-channels): Rename "msg prop" text properties with
second hyphen.
* lisp/erc/erc.el (erc--msg-props): Update doc with double-hyphenated
"msg prop" names.
(erc--send-action-display erc--get-inserted-msg-bounds,
erc--traverse-inserted, erc-insert-line, erc-display-line,
erc--ranked-properties, erc-display-message, erc--get-speaker-bounds,
erc-process-ctcp-query, erc-display-msg): Update all "msg prop" names
to have two hyphens.
(erc--send-action-display, erc--own-property-names,
erc--get-speaker-bounds, erc-format-privmessage, erc-format-my-nick,
erc-ctcp-query-ACTION): Rename `erc-speaker' to `erc--speaker'.
* test/lisp/erc/erc-scenarios-display-message.el
(erc-scenarios-display-message--multibuf): Double hyphenate "msg prop"
text properties.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--hide-fools/stamp-both/fill-wrap,
erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak,
erc-scenarios-match--stamp-both-invisible-fill-static): Update "msg
prop" names.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--on-post-modify,
erc-scenarios-stamp--left/display-margin-mode,
erc-scenarios-stamp--legacy-date-stamps,
erc-scenarios-stamp--on-insert-modify,
erc-scenarios-stamp--date-mode/left-and-right): Add second hyphen to
all "msg props". Rename `erc-speaker' to `erc--speaker'.
* test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp): Rename "msg
prop".
* test/lisp/erc/erc-tests.el (erc--get-inserted-msg-bounds,
erc--delete-inserted-message, erc--order-text-properties-from-hash,
erc--route-insertion): Rename "msg props" with second hyphen.
(erc-format-privmessage): Rename `erc-speaker' to `erc--speaker'.
(Bug#60936)  (Bug#67677)
; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld:
; Add second hyphen to msg props.
; * test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld:
; Add second hyphen to msg props.

12 months agoSequester some special-variable declarations in ERC
F. Jason Park [Mon, 27 Nov 2023 02:24:48 +0000 (18:24 -0800)]
Sequester some special-variable declarations in ERC

* lisp/erc/erc-backend.el (erc-log-p): Remove declaration entirely.
(erc-server-reconnect): Move declaration for `erc-reuse-buffers' here.
(erc-process-sentinel-1): Move `erc-kill-server-buffer-on-quit'
declaration here.
(erc--conceal-prompt): Move `erc-prompt-hidden' declaration here.
(erc-server-INVITE): Move `erc-invitation' declaration here.
(erc-server-PART): Move `erc-kill-buffer-on-part' declaration here.
(erc-server-PRIVMSG): Move declarations for `erc-minibuffer-ignored',
`erc-receive-query-display', `erc-receive-query-display-defer',
`erc--cmem-from-nick-function', `erc-format-nick-function', and
`erc-format-query-as-channel-p' here.
(erc-server-401): Move `erc-whowas-on-nosuchnick' declaration here.
(erc-server-475): Move `erc--called-as-input-p' and
`erc-prompt-for-channel-key' declarations here.
* lisp/erc/erc-common.el (erc-log-p): Remove declaration for
`erc-log-p' and replace with actual definition.
(erc-log-aux): Move `erc-dbuf' declaration from top level into
function body.
* lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Note in
the doc string that this function produces side effects.
* lisp/erc/erc-networks.el (erc-determine-network,
erc-networks--copy-server-buffer-functions): Move some variable
declarations to function body.
(erc-settings, erc-get): Deprecate for now and explain why in doc
strings.  We could deprecate them unconditionally, but they never
provided usable code, and their names are short and valuable.
* lisp/erc/erc.el (tabbar--local-hlf, motif-version-string,
gtk-version-string): Prefer moving these single-serving declarations
to function bodies, if only to make closures from this library less
cluttered when debugging.  This should also help avoid stray
declarations.
(erc-hooks, erc-timer-hook): Revise doc strings.
(erc-log-p): Move definition to erc-common.el.
(erc-cmd-SV): Mimic `emacs-version' and stick with `featurep', here in
combination with special-variable declarations, instead of `boundp' or
similar.
(erc-header-line-uses-tabbar-p): Explain that this has nothing to do
with `tab-bar'.
(erc-update-mode-line-buffer): Only assign when bound.  This has been
verified to work with version 2.0 on EmacsWiki.
* test/lisp/erc/erc-scenarios-base-reconnect.el: Timeouts.
* test/lisp/erc/erc-scenarios-base-renick.el: Timeouts.
* test/lisp/erc/resources/join/network-id/foonet-again.eld: Timeouts.

12 months agoDefine ERC message-formatting templates with defvar
F. Jason Park [Wed, 29 Nov 2023 00:51:36 +0000 (16:51 -0800)]
Define ERC message-formatting templates with defvar

* etc/ERC-NEWS: Mention convenience macro being preferred means of
defining message templates.  Mention renaming of `notify' formatting
templates.
* lisp/erc/erc-common.el (erc--define-catalog,
erc-define-message-format-catalog): New macro and internal variant to
replace `erc-define-catalog-entry'.  The internal variant allows us to
defer reindenting existing definitions until meaningfully edited.
* lisp/erc/erc-dcc.el (erc-message-english-dcc-chat-discarded,
erc-message-english-dcc-chat-ended,
erc-message-english-dcc-chat-no-request,
erc-message-english-dcc-chat-offered,
erc-message-english-dcc-chat-offer,
erc-message-english-dcc-chat-accept,
erc-message-english-dcc-chat-privmsg, erc-message-english-dcc-closed,
erc-message-english-dcc-command-undefined,
erc-message-english-dcc-ctcp-errmsg,
erc-message-english-dcc-ctcp-unknown,
erc-message-english-dcc-get-bytes-received,
erc-message-english-dcc-get-complete,
erc-message-english-dcc-get-failed,
erc-message-english-dcc-get-cmd-aborted,
erc-message-english-dcc-get-file-too-long,
erc-message-english-dcc-get-notfound,
erc-message-english-dcc-list-head, erc-message-english-dcc-list-line,
erc-message-english-dcc-list-item, erc-message-english-dcc-list-end,
erc-message-english-dcc-malformed,
erc-message-english-dcc-privileged-port,
erc-message-english-dcc-request-bogus,
erc-message-english-dcc-send-finished,
erc-message-english-dcc-send-offered,
erc-message-english-dcc-send-offer): Define at top level using
`defvar'.
* lisp/erc/erc-netsplit.el (erc-netsplit-mode, erc-netsplit-enable):
Don't call `erc-netsplit-install-message-catalogs'.
(erc-netsplit-install-message-catalogs): Deprecate function.
(erc-message-english-netsplit, erc-message-english-netjoin,
erc-message-english-netjoin-done, erc-message-english-netsplit-none,
erc-message-english-netsplit-wholeft): Define at top level using
`defvar'.
* lisp/erc/erc-notify.el (erc-notify-install-message-catalogs):
Deprecate, and rename all format templates with hyphens instead of
underscores.
(erc-notify-timer, erc-notify-JOIN, erc-notify-NICK, erc-notify-QUIT):
Use hyphenated template names.
(erc-cmd-NOTIFY): Use hyphenated template names.  Load the module when
necessary and emit a warning.  Otherwise, people who discover this
autoloaded command without being aware of the module's existence may
think it's "broken".
(pcomplete/erc-mode/NOTIFY): Replace top-level autoload with `require'
in function body.  Include `erc-notify-list' in list of completions,
which makes removal easier if you don't share any channels with a
person, and they're not in `erc-server-users'.  A better long-term
solution might be to WHOIS folks we're unsure about when they're
listed in a 303.
(erc-message-english-notify_current, erc-message-english-notify_list,
erc-message-english-notify_on, erc-message-english-notify_off): Define
at top level using `defvar'.  Replace nonstandard underscores with
hyphens.  Alias obsolete names.
* lisp/erc/erc-page.el (erc-message-english-CTCP-PAGE): Define at top
level using `defvar'.
* lisp/erc/erc-sasl.el (erc-message-english-s902,
erc-message-english-s904, erc-message-english-s905,
erc-message-english-s906, erc-message-english-s907,
erc-message-english-s908): Define at top level using `defvar'.
* lisp/erc/erc-sound.el (erc-message-english-CTCP-SOUND): Define using
`defvar'.
* lisp/erc/erc.el (erc--make-message-variable-name): New function to
replace `erc-make-message-variable-name' internally, where most uses
previously checked whether the returned variable was bound.  This
helper now does that conditionally, when asked.
(erc-make-message-variable-name): Defer to internal variant,
`erc--make-message-variable-name'.
(erc-define-catalog-entry, erc-define-catalog): Deprecate.
(erc-retrieve-catalog-entry): Refactor to favor
`default-toplevel-value' of `erc-current-message-catalog' before
falling back to `english'.  Not doing this was arguably a bug.
(erc-message-english-bad-ping-response,
erc-message-english-bad-syntax, erc-message-english-incorrect-args,
erc-message-english-cannot-find-file,
erc-message-english-cannot-read-file, erc-message-english-connect,
erc-message-english-country, erc-message-english-country-unknown,
erc-message-english-ctcp-empty, erc-message-english-ctcp-request,
erc-message-english-ctcp-request-to,
erc-message-english-ctcp-too-many, erc-message-english-flood-ctcp-off,
erc-message-english-flood-strict-mode,
erc-message-english-disconnected,
erc-message-english-disconnected-noreconnect,
erc-message-english-reconnecting,
erc-message-english-reconnect-canceled, erc-message-english-finished,
erc-message-english-terminated, erc-message-english-login,
erc-message-english-nick-in-use, erc-message-english-nick-too-long,
erc-message-english-no-default-channel,
erc-message-english-no-invitation, erc-message-english-no-target,
erc-message-english-ops, erc-message-english-ops-none,
erc-message-english-undefined-ctcp,
erc-message-english-user-mode-redundant-add,
erc-message-english-user-mode-redundant-drop,
erc-message-english-variable-not-bound, erc-message-english-ACTION,
erc-message-english-CTCP-CLIENTINFO, erc-message-english-CTCP-ECHO,
erc-message-english-CTCP-FINGER, erc-message-english-CTCP-PING,
erc-message-english-CTCP-TIME, erc-message-english-CTCP-UNKNOWN,
erc-message-english-CTCP-VERSION, erc-message-english-ERROR,
erc-message-english-INVITE, erc-message-english-JOIN,
erc-message-english-JOIN-you, erc-message-english-KICK,
erc-message-english-KICK-you, erc-message-english-KICK-by-you,
erc-message-english-MODE, erc-message-english-MODE-nick,
erc-message-english-NICK, erc-message-english-NICK-you,
erc-message-english-PART, erc-message-english-PING,
erc-message-english-PONG, erc-message-english-QUIT,
erc-message-english-TOPIC, erc-message-english-WALLOPS,
erc-message-english-s004, erc-message-english-s221,
erc-message-english-s252, erc-message-english-s253,
erc-message-english-s254, erc-message-english-s275,
erc-message-english-s301, erc-message-english-s303,
erc-message-english-s305, erc-message-english-s306,
erc-message-english-s307, erc-message-english-s311,
erc-message-english-s312, erc-message-english-s313,
erc-message-english-s314, erc-message-english-s317,
erc-message-english-s317-on-since, erc-message-english-s319,
erc-message-english-s320, erc-message-english-s321,
erc-message-english-s322, erc-message-english-s324,
erc-message-english-s328, erc-message-english-s329,
erc-message-english-s330, erc-message-english-s331,
erc-message-english-s332, erc-message-english-s333,
erc-message-english-s341, erc-message-english-s352,
erc-message-english-s353, erc-message-english-s367,
erc-message-english-s367-set-by, erc-message-english-s368,
erc-message-english-s379, erc-message-english-s391,
erc-message-english-s396, erc-message-english-s401,
erc-message-english-s402, erc-message-english-s403,
erc-message-english-s404, erc-message-english-s405,
erc-message-english-s406, erc-message-english-s412,
erc-message-english-s421, erc-message-english-s431,
erc-message-english-s432, erc-message-english-s442,
erc-message-english-s445, erc-message-english-s446,
erc-message-english-s451, erc-message-english-s461,
erc-message-english-s462, erc-message-english-s463,
erc-message-english-s464, erc-message-english-s465,
erc-message-english-s471, erc-message-english-s473,
erc-message-english-s474, erc-message-english-s475,
erc-message-english-s481, erc-message-english-s482,
erc-message-english-s483, erc-message-english-s484,
erc-message-english-s485, erc-message-english-s491,
erc-message-english-s501, erc-message-english-s502,
erc-message-english-s671): Define at top level using `defvar'.
* test/lisp/erc/erc-tests.el (erc-tests--string-to-propertized-parts,
erc-tests-pp-propertized-parts, erc--make-message-variable-name,
erc-retrieve-catalog-entry): New tests along with utility functions
and a convenience command for manipulating catalogs.  (Bug#67677)

12 months agoRemove module from suggested lineup in ERC's manual
F. Jason Park [Sat, 9 Dec 2023 15:15:32 +0000 (07:15 -0800)]
Remove module from suggested lineup in ERC's manual

* doc/misc/erc.texi (Sample Configuration): Remove `irccontrols' from
`erc-modules' because it's already enabled by default.  Add
`erc-scrolltobottom-all'.

12 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Mon, 18 Dec 2023 03:11:35 +0000 (11:11 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

12 months agoEnable the new font scaler
Po Lu [Mon, 18 Dec 2023 03:10:40 +0000 (11:10 +0800)]
Enable the new font scaler

* src/sfnt.c (sfnt_curve_is_flat): Tighten threshold for flat
curves.
(sfnt_insert_raster_step): Rewrite loop for clarity.
(sfnt_poly_set_steps): New function; fill small spans with a
plain unexceptional loop rather than memset.
(sfnt_poly_steps): Call that function.
(sfnt_verbose, main): Adjust tests such that the scaler can be
selected at runtime.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_glyph_raster)
(syms_of_sfntfont) <sfnt_raster_glyphs_exactly>: New variable.

12 months ago; Improve a recent NEWS entry
Dmitry Gutov [Mon, 18 Dec 2023 02:43:21 +0000 (04:43 +0200)]
; Improve a recent NEWS entry

12 months ago; Document sending extra HTTP headers in NEWS
Stefan Kangas [Sun, 17 Dec 2023 17:59:38 +0000 (18:59 +0100)]
; Document sending extra HTTP headers in NEWS

* etc/NEWS: Note how to send email address in HTTP requests.
This change was requested in:
https://lists.gnu.org/r/emacs-devel/2023-12/msg00500.html

12 months ago* src/sfnt.h (sfnt_coerce_fixed): New macro.
Po Lu [Sun, 17 Dec 2023 12:55:23 +0000 (20:55 +0800)]
* src/sfnt.h (sfnt_coerce_fixed): New macro.

12 months ago; * src/sfnt.c: Fix typos.
Po Lu [Sun, 17 Dec 2023 12:54:56 +0000 (20:54 +0800)]
; * src/sfnt.c: Fix typos.

12 months agoIntroduce the rudiments of a new font rasterizer
Po Lu [Sun, 17 Dec 2023 12:51:54 +0000 (20:51 +0800)]
Introduce the rudiments of a new font rasterizer

* src/sfnt.c (xzalloc): New function.
(sfnt_poly_edges): Remove redundant statement.
(sfnt_add, sfnt_sub, sfnt_mul): Move macro definitions above the
new scaler.
(sfnt_build_outline_fedges, sfnt_insert_raster_step)
(sfnt_fedge_sort, sfnt_poly_edges_exact, sfnt_compute_fill)
(sfnt_poly_steps, sfnt_raster_steps, sfnt_raster_edges_exact)
(sfnt_raster_glyph_outline_exact): New functions, presently
disabled.
(sfnt_x_raster, main): Introduce new tests.

12 months agoAdd slashes to 'thing-at-point-email-regexp'
Philip Kaludercic [Sun, 3 Dec 2023 12:49:07 +0000 (13:49 +0100)]
Add slashes to 'thing-at-point-email-regexp'

* lisp/thingatpt.el (thing-at-point-email-regexp): Allow for
a (thing-at-point 'email) query to match addresses with slashes, as
used by Sourcehut.  (Bug#67600)

12 months ago; Move NEWS item to "Incomatible Changes" section
Stefan Kangas [Sun, 17 Dec 2023 11:14:04 +0000 (12:14 +0100)]
; Move NEWS item to "Incomatible Changes" section

12 months agoSilence warning in print.c
Stefan Kangas [Sun, 17 Dec 2023 10:58:24 +0000 (11:58 +0100)]
Silence warning in print.c

* src/print.c (print_bool_vector): Silence warning.

12 months agoNever send user email address in HTTP requests
Stefan Kangas [Sun, 17 Dec 2023 08:45:05 +0000 (09:45 +0100)]
Never send user email address in HTTP requests

It used to be possible to customize 'url-privacy-level' so that the
user's email address was sent along in HTTP requests.  Since
'url-privacy-level' is also a blocklist, rather than an allowlist,
this meant that a mere misconfiguration of Emacs risked exposing the
user's email address.  This is a serious privacy risk, and it is thus
better if we remove this dangerous feature altogether.

* lisp/url/url-http.el (url-http-create-request): Never send the
user email address.
* lisp/url/url-vars.el (url-personal-mail-address): Make obsolete.
* lisp/url/url-privacy.el (url-setup-privacy-info): Don't set
above obsolete variable.
* doc/misc/url.texi (Customization):
* lisp/url/url-vars.el (url-privacy-level): Update documentation
to reflect the above changes.

12 months ago; Remove out-of-date documentation about Gnus delayed articles
Eric Abrahamsen [Fri, 15 Dec 2023 14:59:38 +0000 (06:59 -0800)]
; Remove out-of-date documentation about Gnus delayed articles

* doc/misc/gnus.texi (Delayed Articles): As of commit 7725fbc5b this
paragraph is no longer true; the "Date" header is not included in
`message-draft-headers' by default.

12 months ago; Fix typo
Stefan Kangas [Sat, 16 Dec 2023 23:14:43 +0000 (00:14 +0100)]
; Fix typo

* java/org/gnu/emacs/EmacsSafThread.java
(cacheDirectoryFromCursor): Fix typo.

12 months agoUsing remap for binding of log-edit-beginning-of-line.
Jared Finder [Sat, 16 Dec 2023 17:06:22 +0000 (09:06 -0800)]
Using remap for binding of log-edit-beginning-of-line.

* lisp/vc/log-edit.el (log-edit-mode-map): Change binding.

12 months agoMerge branch 'same-frame'
Stefan Monnier [Sat, 16 Dec 2023 18:13:23 +0000 (13:13 -0500)]
Merge branch 'same-frame'

12 months ago(display-buffer): New `pop-up-frames` action alist entry
Stefan Monnier [Sat, 9 Dec 2023 23:38:35 +0000 (18:38 -0500)]
(display-buffer): New `pop-up-frames` action alist entry

Allow overriding the `pop-up-frames` variable from `display-buffer-alist`
so as to provide a worthy replacement for the old `same-frame`
parameter of `special-display-*` (bug#67249).

* lisp/window.el (special-display-popup-frame): Declare obsolete;
that was apparently forgotten back when `special-display-*` variables
were declared obsolete.
Use the new `pop-up-frames` action alist entry instead of the variable.
(display-buffer): Document new alist entry.
(window--pop-up-frames): New function.
(display-buffer--maybe-pop-up-frame, display-buffer-in-previous-window)
(display-buffer-reuse-window, display-buffer-reuse-mode-window): Use it.

* doc/lispref/windows.texi (Choosing Window Options): Mention that
`pop-up-frames` is also an action alist entry.
(Buffer Display Action Alists): Add `pop-up-frames` entry.

12 months ago* lisp/subr.el (derived-mode-p): Disable warnings for old convention
Stefan Monnier [Sat, 16 Dec 2023 18:03:46 +0000 (13:03 -0500)]
* lisp/subr.el (derived-mode-p): Disable warnings for old convention

12 months ago; * lisp/startup.el (normal-top-level): Avoid byte-compiler warning.
Eli Zaretskii [Sat, 16 Dec 2023 14:26:26 +0000 (16:26 +0200)]
; * lisp/startup.el (normal-top-level): Avoid byte-compiler warning.

12 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 16 Dec 2023 14:17:51 +0000 (09:17 -0500)]
Merge from origin/emacs-29

bf4ccb0be07 ; * lisp/term.el (term--xterm-paste): Fix last change.
0d9e2e448d9 ; * doc/lispref/functions.texi (Function Documentation): ...
791cc5065da Fix shaping of Sinhala text
efcbf0b5abf Add use cases of (fn) documentation facility.
c3331cb3659 Fix pasting into terminal-mode on term.el
5be94e2bce5 Fix opening directory trees from Filesets menu
6b6e770a1f5 Eglot: Add ruff-lsp as an alternative Python server
ed8a8a5ba16 Fix symbol name in Multisession Variables examples
400ef15bdc3 js-ts-mode: Fix font-lock rules conflict
c165247c300 Add indentation rules for bracketless statements in js-ts...
7f1bd69cd19 Fix c-ts-mode bracketless indentation for BSD style (bug#...
e23068cb9a1 Add missing indent rules in c-ts-mode (bug#66152)
d2c4b926ac2 Fix treesit-default-defun-skipper (bug#66711)
9874561f39e Fix treesit-node-field-name and friends (bug#66674)
eace9e11226 python-ts-mode: Highlight default parameters
23c06c7c308 Update to Org 9.6.13

12 months ago; * lisp/term.el (term--xterm-paste): Fix last change.
Eli Zaretskii [Sat, 16 Dec 2023 14:08:52 +0000 (16:08 +0200)]
; * lisp/term.el (term--xterm-paste): Fix last change.