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
Mattias Engdegård [Tue, 1 Feb 2022 19:43:15 +0000 (20:43 +0100)]
; * src/eval.c (funcall_subr): Fix last change
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
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.
Andrea Corallo [Tue, 1 Feb 2022 15:32:09 +0000 (16:32 +0100)]
* lisp/startup.el (startup--require-comp-safely): Fix typo in
a92c6191b0
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.
Po Lu [Tue, 1 Feb 2022 12:15:37 +0000 (20:15 +0800)]
* src/pgtkterm.c (pgtk_draw_rectangle): Fix trivial typo. (bug#53677)
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.
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.
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.
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.
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.
Po Lu [Tue, 1 Feb 2022 05:24:31 +0000 (13:24 +0800)]
; * lisp/select.el (gui--selection-value-internal): Fix comment.
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.
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.
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.
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.
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'.
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.
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.
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.
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.
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.
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).
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.
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).
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)
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.
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.
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.
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).
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.
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).
Lars Ingebrigtsen [Mon, 31 Jan 2022 15:24:25 +0000 (16:24 +0100)]
Clarify that INSTALL isn't for Git checkouts (bug#53627)
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
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.
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.
Po Lu [Mon, 31 Jan 2022 13:01:45 +0000 (21:01 +0800)]
; * src/gtkutil.c (xg_create_frame_widgets): Avoid private GTK symbol.
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.
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)
Po Lu [Mon, 31 Jan 2022 10:14:52 +0000 (10:14 +0000)]
* src/haikufns.c (Fx_display_visual_class): Return correct values.
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.
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.
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.
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.
Stefan Kangas [Sun, 30 Jan 2022 23:10:58 +0000 (00:10 +0100)]
* lisp/image.el (image-map): Use defvar-keymap.
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
Po Lu [Mon, 31 Jan 2022 05:45:48 +0000 (13:45 +0800)]
Fix motion not being reported on GTK when mouse moves over toolbar
* src/gtkutil.c (xg_event_is_for_scrollbar): Make code
consistent between XI2 and Core Input.
Po Lu [Mon, 31 Jan 2022 05:06:14 +0000 (13:06 +0800)]
Make cursor alpha consistent with a transparent background
* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_shape):
* src/xterm.c (x_clear_glyph_string_rect): Don't respect
background alpha when drawing the cursor.
Po Lu [Mon, 31 Jan 2022 04:58:11 +0000 (12:58 +0800)]
* src/xterm.c (x_xrender_color_from_gc_foreground): Fix omission error.
Po Lu [Mon, 31 Jan 2022 03:59:52 +0000 (11:59 +0800)]
Fix the X toolkit build
* src/xterm.c (x_after_update_window_line): Update calls to
`x_fill_rectangle'.
Po Lu [Mon, 31 Jan 2022 03:53:10 +0000 (11:53 +0800)]
Fix tooltip frame creation with 32-bit visuals
* src/xfns.c (x_create_tip_frame): Define CWColormap and
CWBorderPixel to use a 32-bit visual if available.
Po Lu [Mon, 31 Jan 2022 02:39:12 +0000 (10:39 +0800)]
* etc/NEWS: Announce the 'alpha-background' frame parameter.
Po Lu [Mon, 31 Jan 2022 02:34:50 +0000 (10:34 +0800)]
Fix the no toolkit build.
* src/xfns.c (x_window): Use n_planes instead of CopyFromParent
for depth.
Lars Ingebrigtsen [Mon, 31 Jan 2022 02:31:01 +0000 (03:31 +0100)]
Fix with-suppressed-warnings edebug spec
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Fix
edebug spec.
Po Lu [Mon, 31 Jan 2022 02:30:24 +0000 (10:30 +0800)]
Fix builds without GTK
* src/xfns.c (x_set_alpha_background): Don't call
gtk_widget_set_app_paintable without GTK.
Po Lu [Mon, 31 Jan 2022 02:15:47 +0000 (10:15 +0800)]
Implement `alpha-background' on non-Cairo builds
* src/frame.c (gui_set_alpha_background): Recompute basic faces
so xft face ext info gets reset.
* src/gtkutil.c (xg_create_frame_widgets): Attach to style
updated signal.
(xg_update_frame_menubar): Set menu bar visual correctly.
(xg_widget_style_updated): New function.
* src/xfns.c (x_set_alpha_background): New function.
(x_frame_parm_handlers): Use x_set_alpha_background instead.
* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_draw): Handle `alpha-background'
parameter.
* src/xterm.c (x_xr_ensure_picture): Export function.
(x_update_opaque_region): New function.
(x_fill_rectangle): New parameter `respect_alpha_background'.
All callers changed.
(handle_one_xevent): Set opaque region on ConfigureNotify.
(x_drop_xrender_surfaces): Set opaque region.
(x_xrender_color_from_gc_foreground):
(x_xrender_color_from_gc_background): Premultiply alpha with
components if asked for.
* src/xterm.h (struct x_display_info): New atom
`Xatom_net_wm_opaque_region'.
Kyle Meyer [Mon, 31 Jan 2022 01:38:01 +0000 (20:38 -0500)]
Update to Org 9.5.2-13-gdd6486
Juri Linkov [Sun, 30 Jan 2022 16:38:24 +0000 (18:38 +0200)]
* lisp/frame.el (undelete-frame--save-deleted-frame): Handle initial frame.
The function undelete-frame--save-deleted-frame is renamed
from undelete-frame--handle-delete-frame (bug#51883).
Juri Linkov [Sun, 30 Jan 2022 16:35:33 +0000 (18:35 +0200)]
* lisp/frame.el: Don't require 'frameset.el' (bug#51883).
(clone-frame): Use frame-internal-parameters.
(undelete-frame--handle-delete-frame): Instead of using frameset-save,
save frame-parameters except frame-internal-parameters and 'display'
on non-graphic display. Also save window-state from window-state-get.
(undelete-frame): Instead of using frameset-restore,
set default-frame-alist for make-frame (like in clone-frame),
and restore window-state with window-state-put.
* lisp/frameset.el (frameset-session-filter-alist): Append
parameters from frame-internal-parameters with the filter :never.
Remove :name that is now in frame-internal-parameters.
(frameset-persistent-filter-alist): Remove outer-window-id,
parent-id, window-id that are now in frame-internal-parameters,
included here via frameset-session-filter-alist.
* src/frame.c (frame-internal-parameters): New variable.
Alan Mackenzie [Sun, 30 Jan 2022 16:32:21 +0000 (16:32 +0000)]
Enlarge max-specpdl-size for generation of leim-list.el in bootstrap
* leim/Makefile.in (${leimdir}/leim-list.el): Add a --eval clause to set
max-specpdl-size to 5000 (previously 2500) for this target.
Po Lu [Sun, 30 Jan 2022 13:23:52 +0000 (13:23 +0000)]
Handle correctly errors during frame creation on Haiku
* src/haikufns.c (haiku_create_frame): Only block input where
required.
* src/haiku_support.cc (BCursor_delete): Accept NULL values of
`cursor'.
Po Lu [Sun, 30 Jan 2022 08:02:58 +0000 (16:02 +0800)]
Use XRender to composite fringe bitmaps
This will allow us to apply transforms such as scaling in the
future.
* src/xterm.c (x_draw_fringe_bitmap): Composite fringe bitmaps
with XRender if available.
Eli Zaretskii [Sun, 30 Jan 2022 07:40:12 +0000 (09:40 +0200)]
; * lisp/international/latin1-disp.el: Update commentary.
Eli Zaretskii [Sun, 30 Jan 2022 06:49:34 +0000 (08:49 +0200)]
Fix regression in Occur Edit mode
* lisp/replace.el (occur-after-change-function): Fix the algorithm
to find the smallest change in some corner cases. (Bug#53598)
Po Lu [Sun, 30 Jan 2022 06:02:40 +0000 (14:02 +0800)]
Fix some problems with inconsistent visuals on GDK
* src/xterm.c (x_xr_ensure_picture): Use the visual GDK used
instead of our own.
Stefan Kangas [Sun, 30 Jan 2022 05:31:11 +0000 (06:31 +0100)]
Merge from origin/emacs-28
e81e375539 ; Yet another minor fix of Malayalam composition rules.
94f38cbec4 Fix last change of Malayalam composition rules
ed3bbeb80d Fix rendering of Malayalam script
5ef3a52342 Improve documentation of Occur mode
Po Lu [Sun, 30 Jan 2022 05:20:15 +0000 (05:20 +0000)]
Use consistent font when displaying menu equivalent keys on Haiku
* src/haiku_support.cc (DrawContent): Set plain font when
drawing key text.
Po Lu [Sun, 30 Jan 2022 01:23:40 +0000 (09:23 +0800)]
Add support for ARGB visuals on non-Xt builds
* src/gtkutil.c (xg_create_frame_widgets): Enable RGBA visual
on non-PGTK builds.
* src/xfns.c (select_visual): Select 32-bit visuals on non-Xt
builds.
* src/xterm.c (x_draw_fringe_bitmap):
(x_draw_image_glyph_string): Stop using DefaultDepthOfScreen.
(x_query_colors):
* src/xterm.h (x_make_truecolor_pixel): Make colors opaque on
32-bit visuals.
Po Lu [Sun, 30 Jan 2022 00:51:13 +0000 (08:51 +0800)]
Some adjustments to last change
* src/gtkutil.c (xg_set_undecorated): Only set ARGB visual on
Cairo builds wtihout PGTK.
* src/xfns.c (select_visual): Likewise.
Håkon Flatval [Sat, 29 Jan 2022 15:13:06 +0000 (16:13 +0100)]
Add background transparency support for GTK+Cairo
Stefan Monnier [Sat, 29 Jan 2022 22:50:02 +0000 (17:50 -0500)]
package.el: Fix bug#53529
* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Enforce Unix EOLs.
Eli Zaretskii [Sat, 29 Jan 2022 20:14:30 +0000 (22:14 +0200)]
; Yet another minor fix of Malayalam composition rules.
Eli Zaretskii [Sat, 29 Jan 2022 19:56:53 +0000 (21:56 +0200)]
Fix last change of Malayalam composition rules
* lisp/language/indian.el (malayalam-composable-pattern):
Reinstate. Instead of removing it, add any sequence of
Malayalam characters to the existing patterns, so as not
to lose the patterns that use ZWJ and ZWNJ. (Bug#53625)
Eli Zaretskii [Sat, 29 Jan 2022 19:22:02 +0000 (21:22 +0200)]
Fix rendering of Malayalam script
* lisp/language/indian.el (malayalam-composable-pattern): Remove.
(script-regexp-alist): Remove 'malayalam-composable-pattern'.
Instead, pass any sequence of Malayalam codepoints to the shaping
engine. (Bug#53625)
Juri Linkov [Sat, 29 Jan 2022 19:05:55 +0000 (21:05 +0200)]
* lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).
(tab-bar-format-menu-bar): Use it.
Juri Linkov [Sat, 29 Jan 2022 18:55:17 +0000 (20:55 +0200)]
* lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.
Put 'isearch-scroll' property on new commands 'recenter-other-window'
and 'context-menu-open'.
Eli Zaretskii [Sat, 29 Jan 2022 17:18:26 +0000 (19:18 +0200)]
; * lisp/subr.el (use-dialog-box-p): Fix typo.
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:49:52 +0000 (17:49 +0100)]
Modernise the security section in the efaq a bit
* doc/misc/efaq.texi (Security risks with Emacs): Remove the X
bit, and add a bit about browsing the web (bug#24489).
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:23:48 +0000 (17:23 +0100)]
Allow redirecting `message' output to a different buffer
* doc/lispref/display.texi (Logging Messages): Document it.
* src/xdisp.c (message_dolog): Add sanity checking.
(syms_of_xdisp): Make Vmessages_buffer_name into a defvar
(bug#27170).
Eli Zaretskii [Sat, 29 Jan 2022 15:56:30 +0000 (17:56 +0200)]
; Fix formatting of last change.
Eli Zaretskii [Sat, 29 Jan 2022 15:54:43 +0000 (17:54 +0200)]
Don't require mouse for prompting via dialog boxes
* lisp/subr.el (use-dialog-box-p): Don't require mouse support,
and allow dialog boxes when invoked via the TTY menus without a
mouse.
(from--tty-menu-p): New internal variable.
* lisp/menu-bar.el (popup-menu): Bind 'from--tty-menu-p' when
invoking a command from the menu.
Charles A. Roelli [Sat, 29 Jan 2022 15:47:52 +0000 (16:47 +0100)]
Make revert-buffer ('g') keep point in VC diff buffers
* lisp/vc/vc.el (vc-diff-restore-buffer): New function.
(vc-diff-finish): Update its calling convention to include an
optional 'oldbuf' parameter, and handle it.
(vc-diff-internal): Pass a clone of the incumbent vc-diff
buffer to 'vc-diff-finish' (bug#28852).
Lars Ingebrigtsen [Sat, 29 Jan 2022 15:39:48 +0000 (16:39 +0100)]
Clarify Fmatch_data doc string
* src/search.c (Fmatch_data): Note quirk about non-matching
optional groups in the doc string (bug#29343).
Eli Zaretskii [Sat, 29 Jan 2022 14:51:30 +0000 (16:51 +0200)]
Improve documentation of Occur mode
* doc/emacs/search.texi (Other Repeating Search): Improve wording
and document Occur Edit mode better.
Jae-hyeon Park [Sat, 29 Jan 2022 14:44:44 +0000 (15:44 +0100)]
Make gnus-icalendar-with-decoded-handle more DWIM
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Assume that calendars with
no charset is utf-8.
Copyright-paperwork-exempt: yes
Po Lu [Sat, 29 Jan 2022 12:38:13 +0000 (20:38 +0800)]
Fix error after merge
* src/filelock.c (lock_file): Fix test against I_OWN_IT.
Po Lu [Sat, 29 Jan 2022 12:37:24 +0000 (20:37 +0800)]
Merge from origin/emacs-28
611736f3bc Remove debug logging
ddba3c3dba Fix error in filelock.c
# Conflicts:
# src/filelock.c
Alan Third [Thu, 28 Oct 2021 10:21:00 +0000 (11:21 +0100)]
Remove debug logging
* src/nsterm.m ([EmacsView copyRect:to:]): Remove logging as it's no
longer required.
Po Lu [Sat, 29 Jan 2022 11:08:52 +0000 (19:08 +0800)]
Fix error at startup with recent change
* lisp/startup.el (normal-top-level): Don't access
`native-comp-eln-load-path' if not (featurep 'native-compile).
Po Lu [Sat, 29 Jan 2022 10:53:28 +0000 (18:53 +0800)]
Fix unrelated help text tooltips if a popup is shown during the delay
* doc/lispref/frames.texi (Pop-Up Menus): Document new hook.
* etc/NEWS: Announce `x-pre-popup-menu-hook'.
* lisp/tooltip.el (tooltip-mode): Make sure `tooltip-hide' is
run before any popup menu is displayed to prevent unrelated help
text from obscuring the popup menu if it pops up during the
tooltip delay.
* src/menu.c (x_popup_menu_1): Run said hook right before the
popup menu is displayed.
(syms_of_menu): New hook `x-pre-popup-menu-hook'.
Michael Albinus [Sat, 29 Jan 2022 10:45:38 +0000 (11:45 +0100)]
Fix error in filelock.c
* src/filelock.c (lock_file): Move call of file name handler to
`Flock_file'. Determine lock_filename only in case
create_lockfiles is non-nil. Adapt the rest of the function accordingly.
(Flock_file): Do not check for create_lockfiles. Call file name
handler if appropriate. (Bug#53207)
Eli Zaretskii [Sat, 29 Jan 2022 10:19:23 +0000 (12:19 +0200)]
Allow <Delete> key to delete entire grapheme clusters
* lisp/simple.el (delete-forward-char): If deleting forward,
delete complete grapheme clusters as single units.
* etc/NEWS: Announce the change.
Eli Zaretskii [Sat, 29 Jan 2022 09:55:02 +0000 (11:55 +0200)]
Fix native-compilation at startup
* lisp/startup.el (normal-top-level): Set up the initial value of
'native-comp-eln-load-path' early into startup, then amend it
after calling 'command-line'. (Bug#53497)
Po Lu [Sat, 29 Jan 2022 07:35:48 +0000 (07:35 +0000)]
Write a dummy event on each popup menu event
* src/haiku_io.c (haiku_len): Add new event.
* src/haiku_support.cc (be_popup_menu_thread_entry):
(Highlight): Write a dummy event to the event port.
* src/haiku_support.h (enum haiku_event_type): New `DUMMY_EVENT'
type.
(struct haiku_dummy_event): New structure.
* src/haikuterm.c (haiku_read_socket): Handle dummy events.
Eli Zaretskii [Sat, 29 Jan 2022 07:12:30 +0000 (09:12 +0200)]
Fix compiler warning due to a recent change
* src/data.c (Ffset): Avoid compiler warning about 'function'.
Po Lu [Sat, 29 Jan 2022 06:05:49 +0000 (14:05 +0800)]
Fix a default value of the `:underline' face attribute
* lisp/cus-face.el (custom-face-attributes): Add `:position' t
default value of "On" for underlines.
Po Lu [Sat, 29 Jan 2022 05:50:32 +0000 (05:50 +0000)]
Improve menu drag tracking on Haiku
* src/haikuterm.c (haiku_read_socket): Ignore all button events
when popup_activated_p.
Po Lu [Sat, 29 Jan 2022 05:24:04 +0000 (05:24 +0000)]
Make menus on Haiku work better
* src/haikuterm.c (haiku_read_socket): Don't send up events for
ungrabbed buttons.
Po Lu [Sat, 29 Jan 2022 05:06:02 +0000 (05:06 +0000)]
Implement real menu help-echo text on Haiku
* lisp/tooltip.el (tooltip-show-help): Remove Haiku-specific
conditional since that's now taken care of by C code.
* src/haiku_io.c (haiku_read_size):
(haiku_read_with_timeout):
(haiku_write_without_signal): Add parameter `popup_p'. All
callers changed.
(port_popup_menu_to_emacs): New variable.
* src/haiku_support.cc (struct be_popup_menu_data): New
structure.
(be_popup_menu_thread_entry): New function.
(class EmacsMenuItem): New field `menu_ptr'.
(Highlight): Send help text to the popup port if this item
isn't for a menu bar.
(BMenu_add_item): Set menu_ptr appropriately.
(BMenu_run): Complete rewrite that allows to read help text from
the menu bar port.
* src/haiku_support.h (struct haiku_menu_bar_help_event): New
fields for popup menus.
* src/haikumenu.c (digest_menu_items): Only set help tooltip on
popup menus when system tooltips are enabled.
(haiku_menu_show_help):
(haiku_process_pending_signals_for_menu): New functions.
(haiku_menu_show): Pass new callbacks.