]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoMake Emacs build with some other XLib implementations
Po Lu [Fri, 4 Feb 2022 03:28:05 +0000 (03:28 +0000)]
Make Emacs build with some other XLib implementations

* configure.ac (HAVE_XKB): Check for functions that aren't
always implemented by various XLib implementations.

* src/xfns.c (select_visual): Handle NULL values of vinfo.
(XkbRefreshKeyboardMapping):
(XkbFreeNames):
(XDisplayCells):
(XDestroySubwindows): Define replacement functions where they
aren't available.

* src/xterm.c (x_find_modifier_meanings): Handle NULL values of
various fields.

3 years ago* src/xfns.c (Fx_internal_focus_input_context): Fix typo.
Po Lu [Fri, 4 Feb 2022 02:16:14 +0000 (10:16 +0800)]
* src/xfns.c (Fx_internal_focus_input_context): Fix typo.

3 years agoMake `x-gtk-use-native-input' take effect immediately
Po Lu [Fri, 4 Feb 2022 02:11:31 +0000 (10:11 +0800)]
Make `x-gtk-use-native-input' take effect immediately

* lisp/term/x-win.el (x-internal-focus-input-context): New
declaration.
(x-gtk-use-native-input-watcher): New variable watcher.
* src/xfns.c (Fx_internal_focus_input_context): New function.
(syms_of_xfns): Define new subr.

3 years agoTry to fix input method flicker on GTK builds
Po Lu [Fri, 4 Feb 2022 01:04:06 +0000 (09:04 +0800)]
Try to fix input method flicker on GTK builds

* src/xterm.c (x_focus_changed): Only focus GTK context if
native input is on.  (bug#53698)

3 years agoImprove compression of article lists in gnus/nnselect
Andrew G Cohen [Fri, 4 Feb 2022 00:30:32 +0000 (08:30 +0800)]
Improve compression of article lists in gnus/nnselect

* lisp/gnus/nnselect.el (nnselect-compress-artlist): Allow compressed list.
nnselect-uncompress-artlist): Properly loop over rsv values.

3 years agoImprove image depth handling
Po Lu [Fri, 4 Feb 2022 00:51:24 +0000 (08:51 +0800)]
Improve image depth handling

Emacs defaults to a 32-bit TrueColor visual, but if that happens
on a display which defaults to 16-bit TrueColor, yet happens to
have 32-bit color, and doesn't have the X Render Extension, an
error will occur in x_composite_image as libXpm will load
pixmaps of depth 16 instead of depth 32.

* src/image.c (x_create_x_image_and_pixmap): Explictly specify
display depth.
(x_create_xrender_picture):
(xpm_load):
(gs_load): Use dpyinfo->n_planes instead of
DefaultDepthOfScreen.

3 years agoImprove the bookmark-default-handler doc string
Lars Ingebrigtsen [Thu, 3 Feb 2022 21:16:14 +0000 (22:16 +0100)]
Improve the bookmark-default-handler doc string

* lisp/bookmark.el (bookmark-default-handler): Document the
`buffer' property (bug#20845).

3 years agoRemove tarball instructions from gnus-faq.texi
Lars Ingebrigtsen [Thu, 3 Feb 2022 19:54:17 +0000 (20:54 +0100)]
Remove tarball instructions from gnus-faq.texi

3 years agoMake sort-numeric-fields resilient towards blank lines
Lars Ingebrigtsen [Thu, 3 Feb 2022 19:33:58 +0000 (20:33 +0100)]
Make sort-numeric-fields resilient towards blank lines

* lisp/sort.el (sort-numeric-fields): Don't signal an error on
blank lines (bug#31800).

3 years agoUse 'require' to load eshell-tests-helpers
Jim Porter [Thu, 3 Feb 2022 02:26:50 +0000 (18:26 -0800)]
Use 'require' to load eshell-tests-helpers

* test/lisp/eshell/eshell-tests.el
* test/lisp/eshell/em-extpipe-tests.el: Load eshell-tests-helpers with
'require'.

* test/lisp/eshell/eshell-tests-helpers.el (eshell-history-file-name):
Define this here so individual test files don't have to.

3 years agoWhen executing an Eshell pipeline, send input to the first process
Jim Porter [Mon, 31 Jan 2022 02:53:53 +0000 (18:53 -0800)]
When executing an Eshell pipeline, send input to the first process

Previously, input was sent to the last process in the pipeline,
resulting in unexpected behavior when running commands like
'tr a-z A-Z | rev'.

* lisp/eshell/esh-util.el (eshell-process-pair-p)
(eshell-make-process-pair): New functions.

* lisp/eshell/esh-cmd.el (eshell-last-async-proc): Rename to...
(eshell-last-async-procs): ... this, and store a pair of processes.
(eshell-interactive-process): Replace with...
(eshell-interactive-process-p, eshell-head-process)
(eshell-tail-process): ... these.
(eshell-cmd-initialize): Set 'eshell-last-async-procs'.
(eshell-do-pipelines): Set 'headproc'.
(eshell-execute-pipeline): Return 'headproc' and 'tailproc'.
(eshell-resume-eval): Use 'eshell-last-async-procs'.
(eshell-do-eval): Make sure we work with a pair of processes.

* lisp/eshell/esh-proc.el (eshell-send-eof-to-process): Move from
here...
* lisp/eshell/esh-mode.el (eshell-send-eof-to-process): ... to here,
and only send EOF to the head process.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments)
* lisp/eshell/esh-mode.el (eshell-intercept-commands)
(eshell-watch-for-password-prompt):
Use 'eshell-interactive-process-p'.

* lisp/eshell/em-rebind.el (eshell-delchar-or-maybe-eof)
* lisp/eshell/em-term.el (eshell-term-send-raw-string)
* lisp/eshell/esh-mode.el (eshell-self-insert-command)
(eshell-send-input, eshell-send-invisible):
Use 'eshell-head-process'.

* lisp/eshell/esh-cmd.el (eshell-as-subcommand):
Use 'eshell-tail-process'.

* lisp/eshell/eshell.el (eshell-command):
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-wait-for-subprocess):
Use 'eshell-interactive-process-p' and 'eshell-tail-process'.

* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-headproc-stdin):
New test.

3 years agoEnsure that tailproc is set for the last process in an Eshell pipeline
Jim Porter [Fri, 28 Jan 2022 07:13:36 +0000 (23:13 -0800)]
Ensure that tailproc is set for the last process in an Eshell pipeline

In particular, this used to fail for pipelines where the last process
in the pipeline came from the first element of the pipeline. This
could happen when a process was piped to an ordinary Lisp function,
like in '*echo hi | echo bye'.

* lisp/eshell/esh-cmd.el (eshell-do-pipelines): Set the tailproc even
for the first process in the pipeline.

* test/lisp/eshell/eshell-tests.el (eshell-test/pipe-tailproc): New
test.

3 years agoAllow ensuring that a window's starting point is never invisible
Eli Zaretskii [Thu, 3 Feb 2022 17:36:43 +0000 (19:36 +0200)]
Allow ensuring that a window's starting point is never invisible

* src/xdisp.c (syms_of_xdisp) <make-window-start-visible>: New
buffer-local variable.
(redisplay_window): If 'make-window-start-visible' is non-nil,
don't accept window-start position that is in invisible text or is
covered by a "replacing" 'display' property.  (Bug#14582)

3 years agosoap-client: Add minimum supported Emacs version
Thomas Fitzsimmons [Thu, 3 Feb 2022 14:19:03 +0000 (09:19 -0500)]
soap-client: Add minimum supported Emacs version

* lisp/net/soap-client.el: Add Emacs 24.1 to Package-Requires.
Bump version to 3.2.1.

3 years agoImplement file modification check in Tramp
Michael Albinus [Thu, 3 Feb 2022 13:21:23 +0000 (14:21 +0100)]
Implement file modification check in Tramp

* lisp/net/tramp.el (tramp-handle-lock-file): Check, whether FILE
is modified.

* test/lisp/net/tramp-tests.el (tramp-test39-detect-external-change):
New test.

3 years agoDon't use `string-replace` in soap-client (bug#53744)
Mattias Engdegård [Thu, 3 Feb 2022 11:25:53 +0000 (12:25 +0100)]
Don't use `string-replace` in soap-client (bug#53744)

* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Cease using `string-replace` since it requires Emacs 28.

3 years agoDon't use `string-search` in soap-client (bug#53744)
Mattias Engdegård [Thu, 3 Feb 2022 11:15:06 +0000 (12:15 +0100)]
Don't use `string-search` in soap-client (bug#53744)

* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Since soap-client is a core ELPA package and may be used with
Emacs versions older than 28, it cannot use `string-search`;
revert to `string-match`.

3 years agoFix "Buffers->Frames" submenu in daemon sessions
Eli Zaretskii [Thu, 3 Feb 2022 11:00:47 +0000 (13:00 +0200)]
Fix "Buffers->Frames" submenu in daemon sessions

* lisp/menu-bar.el (menu-bar-update-buffers): Detect the initial
frame by its special terminal's name.  (Bug#53740)

* src/terminal.c (init_initial_terminal): Add comment about using
the initial-terminal's name in menu-bar.el.

3 years ago* src/haikufont.c (haikufont_draw): Allocate string buffer on stack.
Po Lu [Thu, 3 Feb 2022 10:34:50 +0000 (10:34 +0000)]
* src/haikufont.c (haikufont_draw): Allocate string buffer on stack.

3 years agoStop creating cairo contexts in haiku_begin_cr_clip
Po Lu [Thu, 3 Feb 2022 07:50:36 +0000 (07:50 +0000)]
Stop creating cairo contexts in haiku_begin_cr_clip

* src/haikufont.c (haikufont_draw):
* src/ftcrfont.c (ftcrfont_draw): Stop holding the draw lock.
* src/haiku_support.cc (class EmacsView): New field
`cairo_context'.
(DetachCairoSurface): Destroy cairo_context.
(AttachCairoSurface): Create cairo_context from the surface.
(EmacsView_cairo_surface): Delete function.
(EmacsView_cairo_context): New function.
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_begin_cr_clip):
(haiku_end_cr_clip): Retrieve the existing cairo context instead
of creating a new one.
* src/haikuterm.h (FRAME_CR_CONTEXT): New macro.

3 years agoObtain draw lock outside haiku_start_clip
Po Lu [Thu, 3 Feb 2022 07:14:59 +0000 (07:14 +0000)]
Obtain draw lock outside haiku_start_clip

* src/haikuterm.c (haiku_start_clip):
(haiku_end_clip): Stop obtaining the draw lock.
(haiku_draw_glyph_string): Set draw lock here instead.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 3 Feb 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-28

ab2f275422 Improve documentation of 'emacs-version'

3 years ago* src/haikuterm.c (haiku_draw_text_decoration): Don't lock for draws.
Po Lu [Thu, 3 Feb 2022 05:21:33 +0000 (05:21 +0000)]
* src/haikuterm.c (haiku_draw_text_decoration): Don't lock for draws.

3 years agoSimplify box display code on Haiku
Po Lu [Thu, 3 Feb 2022 05:16:35 +0000 (05:16 +0000)]
Simplify box display code on Haiku

* src/haikuterm.c (haiku_calculate_relief_colors): Remove
`rgbout_c' parameter.
(haiku_draw_relief_rect): Push state if performing additional
clipping.
(haiku_draw_string_box): Stop passing clip rects to the relief
drawing functions.
(haiku_draw_glyph_string): Fix calls to haiku_draw_string_box
for new parameters.

3 years agoFix display of text decorations with defaulted foreground on Haiku
Po Lu [Thu, 3 Feb 2022 01:57:00 +0000 (01:57 +0000)]
Fix display of text decorations with defaulted foreground on Haiku

* src/haikuterm.c (haiku_draw_text_decoration): Remove parameter
`dcol' and use face->foreground instead.  All callers changed.

3 years agoFix background daemon on Haiku
Po Lu [Thu, 3 Feb 2022 01:47:29 +0000 (01:47 +0000)]
Fix background daemon on Haiku

* src/emacs.c (DAEMON_MUST_EXEC): Define when using the Haiku
application kit.

3 years agoPrevent the initial frame from showing up in the frame menu
Po Lu [Thu, 3 Feb 2022 01:28:43 +0000 (09:28 +0800)]
Prevent the initial frame from showing up in the frame menu

* lisp/menu-bar.el (menu-bar-update-buffers): Ignore initial
frame when generating frame list.  (bug#53740)

3 years agoNew theme leuven-dark (Bug#53032)
Stefan Kangas [Wed, 2 Feb 2022 19:56:56 +0000 (20:56 +0100)]
New theme leuven-dark (Bug#53032)

* etc/themes/leuven-dark-theme.el: New file, written by
Fabrice Niessen and Thibault Polge.

3 years ago* test/lisp/cedet/semantic/bovine/gcc-tests.el (ert-x): Require.
Stefan Kangas [Wed, 2 Feb 2022 00:41:13 +0000 (01:41 +0100)]
* test/lisp/cedet/semantic/bovine/gcc-tests.el (ert-x): Require.

3 years agoAdjust test to adjusted code
Lars Ingebrigtsen [Thu, 3 Feb 2022 00:25:42 +0000 (01:25 +0100)]
Adjust test to adjusted code

3 years ago; cperl-mode.el: Detect prototypes in anonymous subroutines
Harald Jörg [Wed, 2 Feb 2022 21:30:09 +0000 (22:30 +0100)]
; cperl-mode.el: Detect prototypes in anonymous subroutines

My commit 3d49ad73e5a from 2021-09-143 had a flaw causing bad
fontification and indentation after anonymous subroutines with
a prototype.
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Correctly
process prototypes in anonymous subroutines
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-attrs-and-signatures): new tests for various
combinations of attributes, prototypes, and signatures
* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: new
test source

3 years agoNew file lisp/emacs-lisp/debug-early.el for backtraces in early bootstrap
Alan Mackenzie [Wed, 2 Feb 2022 20:35:39 +0000 (20:35 +0000)]
New file lisp/emacs-lisp/debug-early.el for backtraces in early bootstrap

This is also used in batch mode in general.

* lisp/debug-early.el (debug-early-backtrace, debug-early): New functions.

* lisp/loadup.el (top level): Load debug-early.el as first file.

* src/eval.c (signal_or_quit): Remove the condition in the batch mode section
of not being in dumping or bootstrap, since it is no longer needed.  Test that
'debug-early's symbol-function is bound.  Ensure there is enough working space
in specpdl and eval_depth.
(syms_of_eval): New DEFSYM for Qdebug_early.  Initialise Vdebugger to
Qdebug_early rather than Qnil.

3 years ago* lisp/replace.el (query-replace-read-from): Use default for empty input.
Juri Linkov [Wed, 2 Feb 2022 19:50:41 +0000 (21:50 +0200)]
* lisp/replace.el (query-replace-read-from): Use default for empty input.

Set 'default' from non-empty 'query-replace-read-from-default'.
Use the default in non-regexp prompt and return it for empty input.
https://lists.gnu.org/archive/html/emacs-devel/2022-02/msg00044.html

3 years agoImprove the describe-key doc string
Lars Ingebrigtsen [Wed, 2 Feb 2022 19:16:04 +0000 (20:16 +0100)]
Improve the describe-key doc string

* lisp/help.el (describe-key): Say something about prefix keys
(bug#33320).

3 years agoAdd some indexing for "compiler macro"
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:55:19 +0000 (19:55 +0100)]
Add some indexing for "compiler macro"

* doc/lispref/functions.texi (Inline Functions): Add a link to
where compiler macros are defined.
(Declare Form): Add a concept index.

3 years agoMark vt-control and vc100-led obsolete since Emacs 29.1
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:40:48 +0000 (19:40 +0100)]
Mark vt-control and vc100-led obsolete since Emacs 29.1

3 years agoMove vt-control and vt100-led to obsolete (bug#37562)
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:39:29 +0000 (19:39 +0100)]
Move vt-control and vt100-led to obsolete (bug#37562)

3 years agoFix decoding error in ietf-drums-parse-address
Lars Ingebrigtsen [Wed, 2 Feb 2022 18:07:01 +0000 (19:07 +0100)]
Fix decoding error in ietf-drums-parse-address

* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't try to
decode the name if there is no name (bug#53716).

3 years agoFix bug with M-x compile-defun in a defconst/defvar
Alan Mackenzie [Wed, 2 Feb 2022 18:03:00 +0000 (18:03 +0000)]
Fix bug with M-x compile-defun in a defconst/defvar

* lisp/emacs-lisp/bytecomp.el (compile-defun): Have symbols-with-pos-enabled
bound to non-nil when the eval takes place.

3 years agoImprove documentation of 'emacs-version'
Eli Zaretskii [Wed, 2 Feb 2022 17:38:56 +0000 (19:38 +0200)]
Improve documentation of 'emacs-version'

* doc/emacs/trouble.texi (Checklist): Mention the possibility of
invoking 'emacs-version' with a prefix argument.

* lisp/version.el (emacs-version): Improve doc string.  (Bug#53720)

3 years ago; * etc/NEWS: Fix wording of a recently-added entry.
Eli Zaretskii [Wed, 2 Feb 2022 17:23:07 +0000 (19:23 +0200)]
; * etc/NEWS: Fix wording of a recently-added entry.

3 years agoImprove correctness of generated xwidget events
Po Lu [Wed, 2 Feb 2022 11:05:54 +0000 (19:05 +0800)]
Improve correctness of generated xwidget events

* src/xwidget.c (xw_maybe_synthesize_crossing): Add new
parameters for controlling the crossing mode.  Also improve the
accuracy of generated crossing events when the mouse pointer
moves outside the toplevel from an inferior of it.  All callers
changed.
(xw_notify_virtual_upwards_until):
(xw_notify_virtual_downwards_until): New parameters for crossing
mode.  All callers changed.

3 years agoSend button events before setting xwidget passive grab
Po Lu [Wed, 2 Feb 2022 07:33:48 +0000 (15:33 +0800)]
Send button events before setting xwidget passive grab

* src/xwidget.c (xwidget_button_1): Send button event before
any grab processing.

3 years ago* src/nsselect.m (ns_get_foreign_selection): Fix GCC warning.
Po Lu [Wed, 2 Feb 2022 07:18:12 +0000 (15:18 +0800)]
* src/nsselect.m (ns_get_foreign_selection): Fix GCC warning.

3 years agoMake behaviour of `mouse-autoselect-window' consistent with X on NS
Po Lu [Wed, 2 Feb 2022 07:17:20 +0000 (15:17 +0800)]
Make behaviour of `mouse-autoselect-window' consistent with X on NS

* src/nsterm.m ([EmacsView mouseMoved:]): Ignore if
`selected_window' is a minibuffer window.

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 2 Feb 2022 05:30:32 +0000 (06:30 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

1bb5553619 ; Auto-commit of loaddefs files.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 2 Feb 2022 05:30:32 +0000 (06:30 +0100)]
Merge from origin/emacs-28

9ab0b43a72 * etc/NEWS: Apply final fixes after proofreading.

# Conflicts:
# etc/NEWS

3 years agoImprove behaviour of `mouse-autoselect-window' on Haiku
Po Lu [Wed, 2 Feb 2022 04:56:55 +0000 (04:56 +0000)]
Improve behaviour of `mouse-autoselect-window' on Haiku

* src/haikuterm.c (haiku_read_socket): Don't select windows if
the selected window is a minibuffer window or a popup is
activated.

3 years agoFix display of vertical window dividers on Haiku
Po Lu [Wed, 2 Feb 2022 02:25:00 +0000 (02:25 +0000)]
Fix display of vertical window dividers on Haiku

* src/haikuterm.c (haiku_draw_window_divider): Make drawing
consistent with X.

3 years agoDon't use XRender to fill rectangles unless an alpha channel exists
Po Lu [Wed, 2 Feb 2022 01:17:31 +0000 (09:17 +0800)]
Don't use XRender to fill rectangles unless an alpha channel exists

* src/xterm.c (x_clear_area): Don't use XRender unless
`alpha_bits' is set.

3 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Tue, 1 Feb 2022 23:59:28 +0000 (00:59 +0100)]
; Auto-commit of loaddefs files.

3 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Tue, 1 Feb 2022 23:57:27 +0000 (00:57 +0100)]
; Auto-commit of loaddefs files.

3 years ago* lisp/replace.el (query-replace-read-from-default): New variable.
Juri Linkov [Tue, 1 Feb 2022 20:07:20 +0000 (22:07 +0200)]
* lisp/replace.el (query-replace-read-from-default): New variable.

(query-replace-read-from-regexp-default): New variable.
(query-replace-read-from): Use new variables.

* lisp/progmodes/project.el (project-query-replace-regexp):
Let-bind query-replace-read-from-regexp-default to find-tag-default-as-regexp.

* lisp/progmodes/xref.el (xref-find-references-and-replace):
Let-bind query-replace-read-from-default to find-tag-default.

https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01909.html

3 years ago; * src/eval.c (funcall_subr): Fix last change
Mattias Engdegård [Tue, 1 Feb 2022 19:43:15 +0000 (20:43 +0100)]
; * src/eval.c (funcall_subr): Fix last change

3 years ago* lisp/tab-line.el: Support non-buffer tabs in some tab face functions.
Juri Linkov [Tue, 1 Feb 2022 19:42:51 +0000 (21:42 +0200)]
* lisp/tab-line.el: Support non-buffer tabs in some tab face functions.

(tab-line-tab-face-special, tab-line-tab-face-modified): For non-buffer tabs
when 'tab-line-tabs-function' is e.g. 'tab-line-tabs-buffer-groups',
try to get the buffer from the property 'buffer'.
https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01923.html

3 years ago* Improve 'maybe_defer_native_compilation'
Andrea Corallo [Tue, 1 Feb 2022 16:58:47 +0000 (17:58 +0100)]
* Improve 'maybe_defer_native_compilation'

* src/comp.c (maybe_defer_native_compilation): Always store the
function name in Vcomp_deferred_pending_h if pending for deferred
compilation.

3 years ago* lisp/startup.el (startup--require-comp-safely): Fix typo in a92c6191b0
Andrea Corallo [Tue, 1 Feb 2022 15:32:09 +0000 (16:32 +0100)]
* lisp/startup.el (startup--require-comp-safely): Fix typo in a92c6191b0

3 years agoSpeed up calls to C primitives
Mattias Engdegård [Tue, 1 Feb 2022 15:18:47 +0000 (16:18 +0100)]
Speed up calls to C primitives

* src/eval.c (funcall_subr): Test most likely cases first (conforming
calls to finite-arity or n-adic SUBRs), and the error cases last,
instead of doing it the other way around.  Simplify.

3 years ago* etc/NEWS: Apply final fixes after proofreading.
Michael Albinus [Tue, 1 Feb 2022 13:17:32 +0000 (14:17 +0100)]
* etc/NEWS: Apply final fixes after proofreading.

3 years ago* src/pgtkterm.c (pgtk_draw_rectangle): Fix trivial typo. (bug#53677)
Po Lu [Tue, 1 Feb 2022 12:15:37 +0000 (20:15 +0800)]
* src/pgtkterm.c (pgtk_draw_rectangle): Fix trivial typo.  (bug#53677)

3 years agoRemove extra \= from obsoletion message
Andreas Schwab [Tue, 1 Feb 2022 10:59:43 +0000 (11:59 +0100)]
Remove extra \= from obsoletion message

* lisp/emacs-lisp/eieio.el (defclass): Remove \= from obsoletion
message.
* lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload)
(eieio-defclass-internal): Likewise.

3 years agoRename `comp--loadable' into `comp--compilable'
Andrea Corallo [Tue, 1 Feb 2022 09:46:51 +0000 (10:46 +0100)]
Rename `comp--loadable' into `comp--compilable'

* lisp/startup.el (comp--compilable): Rename from `comp--loadable'.
(startup--require-comp-safely): Update accordingly.
(startup--honor-delayed-native-compilations): Likewise.
* src/comp.c (syms_of_comp): Update.
(maybe_defer_native_compilation): Likewise.

3 years ago* Fix `startup--require-comp-safely' (bug#53675)
Andrea Corallo [Tue, 1 Feb 2022 09:24:12 +0000 (10:24 +0100)]
* Fix `startup--require-comp-safely' (bug#53675)

* lisp/startup.el (startup--require-comp-safely): Remove unnecessary
check.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 1 Feb 2022 05:57:16 +0000 (06:57 +0100)]
Merge from origin/emacs-28

31ef751f94 Clarify documentation of a "face's font"
29bdedf12f Bind Qdebugger to Qdebug in signal_or_quit.

3 years agoClean up Haiku display structures
Po Lu [Tue, 1 Feb 2022 05:39:28 +0000 (05:39 +0000)]
Clean up Haiku display structures

* src/haikufns.c (haiku_set_parent_frame): Set `parent_desc'
correctly.

* src/haikuterm.h (C_FRAME, C_FONT, C_TERMINAL):
(struct haiku_display_info):
(struct haiku_output): Get rid of C_* preprocessor defines,
since these files are no longer included in any way by C++ files.

3 years ago; * lisp/select.el (gui--selection-value-internal): Fix comment.
Po Lu [Tue, 1 Feb 2022 05:24:31 +0000 (13:24 +0800)]
; * lisp/select.el (gui--selection-value-internal): Fix comment.

3 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Tue, 1 Feb 2022 05:11:36 +0000 (06:11 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-01-27 20:16:15 UTC.

3 years agoDisplay images with a mask correctly when `alpha-background' is set
Po Lu [Tue, 1 Feb 2022 04:58:00 +0000 (12:58 +0800)]
Display images with a mask correctly when `alpha-background' is set

* src/xterm.c (x_query_frame_background_color): Return value
adjusted for background alpha.
(x_draw_image_glyph_string): Respect `alpha-background' when
generating background pixmap.

3 years agoOnly apply last change to the clipboard
Po Lu [Tue, 1 Feb 2022 02:13:15 +0000 (10:13 +0800)]
Only apply last change to the clipboard

* lisp/select.el (gui--selection-value-internal): Only return
nil if we own the clipboard.

3 years agoAvoid extraneous selection querying if we own the selection
Po Lu [Tue, 1 Feb 2022 02:03:05 +0000 (02:03 +0000)]
Avoid extraneous selection querying if we own the selection

* lisp/select.el (gui--selection-value-internal): Return nil if
`gui-backend-selection-owner-p' on window systems where it is
reliable.

3 years agoMake fringe bitmaps respect alpha-background
Po Lu [Tue, 1 Feb 2022 01:38:26 +0000 (09:38 +0800)]
Make fringe bitmaps respect alpha-background

* src/xterm.c (x_draw_fringe_bitmap): Respect alpha-background
on non-overlay fringe bitmaps.
* src/xterm.h (struct x_display_info): New field `alpha_mask'.

3 years agoFix nnregistry byte compilation warning
Lars Ingebrigtsen [Mon, 31 Jan 2022 21:36:25 +0000 (22:36 +0100)]
Fix nnregistry byte compilation warning

* lisp/gnus/nnregistry.el (nnregistry-server-opened)
(nnregistry-open-server): Fix byte compilation warning.

3 years ago(byte-compile-eval): Adjust to changes in `load-history`
Stefan Monnier [Mon, 31 Jan 2022 21:25:09 +0000 (16:25 -0500)]
(byte-compile-eval): Adjust to changes in `load-history`

The `function-history` patch introduced a regression which caused
spurious compiler warnings.  Fix it.
The new code also fixes a bug in the old code, thus causing some
new non-spurious warnings.  Fix them as well.

* lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to changes in
`load-history`.

* lisp/gnus/gnus-group.el (nnrss-discover-feed)
(nnrss-save-server-data): Use `declare-function`.

* lisp/cedet/semantic/wisent/comp.el (wisent-defcontext)
(wisent-with-context):
* lisp/emacs-lisp/comp.el (comp-op-case): Silence compiler warning.

3 years agoEnlarge max-specpdl-size for generation of files in .../admin/grammars
Alan Mackenzie [Mon, 31 Jan 2022 19:46:27 +0000 (19:46 +0000)]
Enlarge max-specpdl-size for generation of files in .../admin/grammars

* admin/grammars/Makefile.in: Add a --eval clause to set max-specpdl-size to
5000 (previously 2500) for these targets.

3 years agoDon't remove dummy.group from gnus-newsrc-alist on Gnus save
Eric Abrahamsen [Tue, 25 Jan 2022 00:24:10 +0000 (16:24 -0800)]
Don't remove dummy.group from gnus-newsrc-alist on Gnus save

bug#53352

* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): This
function was removing dummy.group from the global value of
`gnus-newsrc-alist' on save; we only wanted to remove it temporarily.

3 years agoObsolete gnus-registry-enabled in favor of checking gnus-registry-db
Eric Abrahamsen [Tue, 25 Jan 2022 00:20:44 +0000 (16:20 -0800)]
Obsolete gnus-registry-enabled in favor of checking gnus-registry-db

* lisp/gnus/gnus-registry.el (gnus-registry-enabled): Obsolete this
variable; recommend using `gnus-registry-db' as a boolean instead.
(gnus-registry-load, gnus-registry-register-message-ids,
gnus-registry-article-marks-to-chars,
gnus-registry-article-marks-to-names, gnus-registry-clear,
gnus-registry-install-p): In all these functions, test
`gnus-registry-db' instead of `gnus-registry-enabled'. We no longer
set or clear that variable.

3 years ago* lisp/vc/vc.el (vc-diff-internal): Assume revert-buffer is in current buffer.
Juri Linkov [Mon, 31 Jan 2022 18:46:06 +0000 (20:46 +0200)]
* lisp/vc/vc.el (vc-diff-internal): Assume revert-buffer is in current buffer.

Support the case when reverting is in the buffer with a name other than
the default name "*vc-diff*".  Then don't try to switch to the buffer
"*vc-diff*" with an assumption that revert-buffer is always performed
in the current buffer (bug#28852).

3 years ago* lisp/progmodes/cc-mode.el (c-common-init): Bind case-fold-search to nil
Alan Mackenzie [Mon, 31 Jan 2022 17:44:59 +0000 (17:44 +0000)]
* lisp/progmodes/cc-mode.el (c-common-init): Bind case-fold-search to nil

This fixes bug #53605.

3 years agoAdjust toggle-menu-bar-mode-from-frame doc string
Lars Ingebrigtsen [Mon, 31 Jan 2022 17:28:41 +0000 (18:28 +0100)]
Adjust toggle-menu-bar-mode-from-frame doc string

* lisp/menu-bar.el (toggle-menu-bar-mode-from-frame): Adjust the
doc string to reflect what it does (bug#43383).

3 years agoClarify documentation of a "face's font"
Eli Zaretskii [Mon, 31 Jan 2022 17:29:54 +0000 (19:29 +0200)]
Clarify documentation of a "face's font"

* doc/lispref/display.texi (Attribute Functions)
(Face Attributes): Clarify that the :font attribute of a face and
the font returned by 'face-font' are by default for ASCII
characters.  (Bug#53664)

3 years agoBind Qdebugger to Qdebug in signal_or_quit.
Alan Mackenzie [Mon, 31 Jan 2022 17:20:45 +0000 (17:20 +0000)]
Bind Qdebugger to Qdebug in signal_or_quit.

* src/eval.c (signal_or_quit): Bind the correct variable, Qdebugger (not
Vdebugger) to Qdebug in the section for errors in batch jobs.
(syms_of_eval): New DEFSYM for Qdebugger.

3 years agoMinor copyedits of 'function-history' documentation
Eli Zaretskii [Mon, 31 Jan 2022 16:59:43 +0000 (18:59 +0200)]
Minor copyedits of 'function-history' documentation

* doc/lispref/loading.texi (Where Defined): Fix indexing and
punctuation.

3 years agoFix misplaced braces in loading.texi
Lars Ingebrigtsen [Mon, 31 Jan 2022 16:34:03 +0000 (17:34 +0100)]
Fix misplaced braces in loading.texi

* doc/lispref/loading.texi (Where Defined): Fix misplaced braces.

3 years agoMake more ranges sort properly in describe-keymap
Lars Ingebrigtsen [Mon, 31 Jan 2022 16:31:09 +0000 (17:31 +0100)]
Make more ranges sort properly in describe-keymap

* lisp/subr.el (keymap-canonicalize): Don't consider two-character
ranges as a range (bug#11325).

3 years ago(function-history): New symbol property (bug#53632)
Stefan Monnier [Mon, 31 Jan 2022 16:07:06 +0000 (11:07 -0500)]
(function-history): New symbol property (bug#53632)

Rework the code we have in Fdefalias that tries to keep track
of definitions so as to be able to undo them later.

We used to store in `load-history` when an autoload is redefined as
a non-autoload and in the `autoload` symbol property we used to store
the autoload data that used to be used before it got overriden.

Instead, store the history of the function definition of
a symbol in its `function-history` symbol property.
To make this list cheap in the default case, the latest value is not stored
in the list (since it's in the `symbol-function`) and neither is the first
file.  So if there's only been a single definition (the most common case),
the list is empty and the property is just not present at all.

The patch also gets rid of the `autoload` vs `defun` distinction in
`load-history` which seems unnecessary (a significant part of the
motivation for this patch was to get rid of the special handling of
autoloads in this part of the code).

* src/data.c (add_to_function_history): New function.
(defalias): Use it.  Don't add the `t` entries for autoloads and always
use `defun` regardless of the kind of definition.
Change `Vautoload_queue` to only hold the function
symbols since the rest is now available from `function-history`.
* src/eval.c (un_autoload): Adjust accordingly.

* src/lread.c (load-history): Udate docstring.

* lisp/loadhist.el (loadhist-unload-filename): New var.
(unload-feature): Bind it.
(loadhist-unload-element): Document its availability.
(loadhist--restore-autoload): Delete var.
(loadhist--unload-function): Delete function.
(loadhist-unload-element): Delete the `t` and `autoload` methods.
Rewrite the `defun` method using `function-history`.

* lisp/help-fns.el: Require `seq`.
(help-fns--autoloaded-p): Rewrite.
(help-fns-function-description-header): Adjust call accordingly.

* doc/lispref/loading.texi (Where Defined): Remove `autoload` and `t`
entries from `load-history` since we don't generate them any more.
Document the `function-history` which replaces the `autoload` property.
(Unloading): Adjust symbol property name accordingly.

* test/lisp/loadhist-resources/loadhist--bar.el:
* test/lisp/loadhist-resources/loadhist--foo.el: New files.
* test/lisp/loadhist-tests.el (loadhist-tests-unload-feature-nested)
(loadhist-tests-unload-feature-notnested): New tests.

3 years agoMake Gnus address checking more resilient
Lars Ingebrigtsen [Mon, 31 Jan 2022 15:41:32 +0000 (16:41 +0100)]
Make Gnus address checking more resilient

* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Check that we have an email address before checking the validity
(bug#53651).

3 years agoClarify that INSTALL isn't for Git checkouts (bug#53627)
Lars Ingebrigtsen [Mon, 31 Jan 2022 15:24:25 +0000 (16:24 +0100)]
Clarify that INSTALL isn't for Git checkouts (bug#53627)

3 years agoExtend filelock-tests.el for bug#53207
Michael Albinus [Mon, 31 Jan 2022 14:26:06 +0000 (15:26 +0100)]
Extend filelock-tests.el for bug#53207

* test/src/filelock-tests.el (filelock-tests--fixture): Make it a
defmacro.  Adapt callees.
(filelock-tests-unlock-spoiled, filelock-tests-kill-buffer-spoiled):
Simplify.
(filelock-tests-detect-external-change): New test

3 years agoFix artifacting on PGTK when bits are copied with an alpha channel
Po Lu [Mon, 31 Jan 2022 13:12:14 +0000 (21:12 +0800)]
Fix artifacting on PGTK when bits are copied with an alpha channel

* src/pgtkterm.c (x_draw_stretch_glyph_string): Draw background
respecting `alpha-background'.
(pgtk_copy_bits): Use CAIRO_OPERATOR_SOURCE to draw onto the
destination surface.

3 years agoImprove 'latin1-display-ucs-per-lynx'
Eli Zaretskii [Mon, 31 Jan 2022 13:08:08 +0000 (15:08 +0200)]
Improve 'latin1-display-ucs-per-lynx'

* lisp/international/latin1-disp.el (latin1-display-ucs-per-lynx):
Don't judge display-ability of all the characters by testing just
one of them.  Instead, install an ASCII equivalent of every
character that the terminal cannot display.

3 years ago; * src/gtkutil.c (xg_create_frame_widgets): Avoid private GTK symbol.
Po Lu [Mon, 31 Jan 2022 13:01:45 +0000 (21:01 +0800)]
; * src/gtkutil.c (xg_create_frame_widgets): Avoid private GTK symbol.

3 years agoImplement `alpha-background' on PGTK
Po Lu [Mon, 31 Jan 2022 12:21:04 +0000 (20:21 +0800)]
Implement `alpha-background' on PGTK

* src/ftcrfont.c (ftcrfont_draw): Respect alpha-background where
appropriate.
* src/gtkutil.c (xg_create_frame_widgets): Swap some
conditionals around to get the right visual and signal handlers
on PGTK.
(xg_widget_style_updated): Likewise.
* src/pgtkfns.c (pgtk_set_alpha_background): New function.
(pgtk_frame_parm_handlers): Add it instead of the generic param
handler.
(Fx_create_frame): Fix typo.
* src/pgtkterm.c (pgtk_fill_rectangle):
(pgtk_set_cr_source_with_gc_foreground):
(pgtk_set_cr_source_with_gc_background):
(pgtk_set_cr_source_with_color): New argument
`respect_alpha_backend'.  All callers changed.
* src/pgtkterm.h: Update function prototypes.

3 years agoFix accesses to GTK structures on tooltip frames
Po Lu [Mon, 31 Jan 2022 10:37:09 +0000 (18:37 +0800)]
Fix accesses to GTK structures on tooltip frames

* src/xfns.c (xic_set_preeditarea): Don't set the GTK context on
tooltip frames.
(x_set_alpha_background): Don't make tooltip frames paintable.
* src/xterm.c (x_xr_ensure_picture): Get rid of GDK visual code.
This is now done in a better way inside xg_create_frame_widgets.
(bug#53654)

3 years ago* src/haikufns.c (Fx_display_visual_class): Return correct values.
Po Lu [Mon, 31 Jan 2022 10:14:52 +0000 (10:14 +0000)]
* src/haikufns.c (Fx_display_visual_class): Return correct values.

3 years agoImprove portability of GDK visual code
Po Lu [Mon, 31 Jan 2022 10:13:19 +0000 (18:13 +0800)]
Improve portability of GDK visual code

* src/gtkutil.c (xg_create_frame_widgets): Look up the visual
instead of assuming it based on the depth.

3 years ago* src/xterm.c (x_term_init): Avoid freeze with 24-bit visuals.
Po Lu [Mon, 31 Jan 2022 10:08:07 +0000 (18:08 +0800)]
* src/xterm.c (x_term_init): Avoid freeze with 24-bit visuals.

3 years agoImprove portability of alpha channel handling on TrueColor visuals
Po Lu [Mon, 31 Jan 2022 09:59:12 +0000 (17:59 +0800)]
Improve portability of alpha channel handling on TrueColor visuals

* src/xfns.c (select_visual): Always ask for a TrueColor visual.
* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_draw): Test `alpha_bits' instead of
n_planes.
* src/xterm.c (x_fill_rectangle, x_clear_rectangle): Likewise.
(x_query_colors, x_alloc_nearest_color): Remove code that
hard-coded alpha mask.
(x_term_init): Calculate alpha bits and offset and populate
field appropriately.
* src/xterm.h (struct x_display_info): New fields `alpha_bits'
and `alpha_offset'.
(x_make_truecolor_pixel): Stop hardcoding the value of the alpha
mask.

3 years agoFactor out function to check for clang in tests
Stefan Kangas [Mon, 31 Jan 2022 06:42:50 +0000 (07:42 +0100)]
Factor out function to check for clang in tests

This also stops a flymake test from failing on my machine.

* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): New function
factored out from ...
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang):
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): ... here.

* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types)
(included-c-header-files):
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Use above new function.

3 years ago* lisp/image.el (image-map): Use defvar-keymap.
Stefan Kangas [Sun, 30 Jan 2022 23:10:58 +0000 (00:10 +0100)]
* lisp/image.el (image-map): Use defvar-keymap.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 31 Jan 2022 05:58:23 +0000 (06:58 +0100)]
Merge from origin/emacs-28

6f282b31ad Update to Org 9.5.2-13-gdd6486
6636231b2c ; * lisp/international/latin1-disp.el: Update commentary.
f22e9ba9ac Fix regression in Occur Edit mode