1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-25 07:40:40 -07:00
Commit graph

154782 commits

Author SHA1 Message Date
Po Lu
76d79e1576 Prevent some NoExpose events from being generated
* src/xterm.c (x_scroll_run): Use the rendering extension if
available to avoid NoExpose events.
2022-03-05 10:05:14 +08:00
Po Lu
6efed75ff3 Implement `pre_activate' callbacks for Motif menus
* lwlib/lwlib-Xm.c (make_menu_in_widget): Add
xm_pop_up_callback as the popup callback.
(xm_pop_up_callback): New function.
2022-03-05 09:35:44 +08:00
Po Lu
08221a58b7 Fix the MS-DOS build
* msdos/sedlibmk.inp: Update for gnulib merge.
2022-03-05 08:15:25 +08:00
Stefan Monnier
6ad223fa9f trace.el: Preserve the line structure
Print newlines appearing inside values (i.e. inside strings) as \n
rather than actual newlines so as to avoid messing up the main
structure of the trace buffer.

* lisp/emacs-lisp/trace.el (trace-entry-message)
(trace-exit-message, trace--read-args): Quote newlines
2022-03-04 12:18:41 -05:00
Lars Ingebrigtsen
5f7db63a93 Avoid statting directories on startup for Info
* doc/misc/efaq.texi (File-name conventions) Mention
Info-directory-list instead.

* doc/misc/info.texi (Emacs Info Variables): Mention
Info--default-directory-list.

* lisp/info.el (Info-default-directory-list): Default to nil to
avoid statting directories on Emacs startup (bug#27933).
(Info--default-directory-list): Factored out into own function.
(Info-default-dirs): Append value of Info-default-directory-list
to the value returned from Info--default-directory-list.
2022-03-04 17:36:20 +01:00
Lars Ingebrigtsen
18e25c198f Improve scroll-bar-mode/default-frame-alist interaction docs
* lisp/scroll-bar.el (scroll-bar-mode): Mention
default-frame-alist (bug#54237).

* src/frame.c (syms_of_frame): Clarify further that setting this
variable may have unintended consequences.
2022-03-04 16:55:57 +01:00
Lars Ingebrigtsen
cdbc2f9d27 Add some sleeps to gnutls_try_handshake
* admin/merge-gnulib (GNULIB_MODULES): Add the nanosleep module.
* m4/gnulib-comp.m4 (gl_EARLY):
* lib/gnulib.mk.in: Automatic update.

* m4/nanosleep.m4:
* lib/nanosleep.c: New module.

* nt/mingw-cfg.site (gl_cv_func_free_preserves_errno):
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_nanosleep): Omit nanosleep,
since mingw has it.

* src/gnutls.c (gnutls_try_handshake): Add some sleeping to the
busy-wait loop so that we don't use 100% CPU here (bug#32452).
2022-03-04 16:27:10 +01:00
Po Lu
345c4c6532 Add a few warnings about special event structures on X
* xterm.c (x_construct_mouse_click)
(x_note_mouse_movement): Add comments explaining the nature of
some special event structures.
2022-03-04 20:54:02 +08:00
Po Lu
f685bcb65d Fix some errors in stretch glyphs code on PGTK
* src/pgtkterm.c (x_draw_stretch_glyph_string): Remove
unnecessary code.  Reported by Eli Zaretskii <eliz@gnu.org>.
2022-03-04 20:39:31 +08:00
Eli Zaretskii
33958bcd3d Fix wording and punctuation in recent Gnus documentation changes
* lisp/gnus/nnselect.el (nnselect-allow-ephemeral-expiry): Make
the first sentence of the doc string be a single line.

* doc/misc/gnus.texi (Creating Search Groups): Fix space between
sentences.
2022-03-04 13:52:09 +02:00
Po Lu
f9f6c67181 Initialize time inside motion and button events converted from XI events
* src/xterm.c (handle_one_xevent): Make sure time is initialized
in artificial events passed to functions that use it.
2022-03-04 18:34:57 +08:00
Andrew G Cohen
62d97d4afd Turn expiry on for nnselect groups
Articles in (persistent) groups from the gnus/nnselect backend will
now be run through the expiry process upon exit, like other persistent
groups. Expiry is not on by default for ephemeral nnselect groups but
may be turned on with nnselect-allow-ephemeral-expiry set to t.

* lisp/gnus/nnselect.el (nnselect-request-expire-articles): Make
article expiry work.
(nnselect-allow-ephemeral-expiry): New variable.
* doc/misc/gnus.texi (Creating Search Groups): Document
nnselect-allow-ephemeral-expiry.
2022-03-04 16:20:01 +08:00
Andrew G Cohen
4f6583ab8a ; Fetch the nnselect-rescan parameter from the topic or group
* lisp/gnus/nnselect.el (nnselect-request-scan-group): Allow the
nnselect-rescan parameter to be set in the topic or the group.
2022-03-04 16:08:32 +08:00
Po Lu
b305f5a3ab Correctly process legacy XI wheel events on top of scroll bars
* src/xterm.c (handle_one_xevent): Handle XI button events
generated by scroll wheels on top of scroll bars.
2022-03-04 14:16:15 +08:00
Po Lu
6058daedf7 Pass core scroll wheel events outside the edit widget to Emacs on GTK
* src/xterm.c (x_construct_mouse_click): Translate coordinates
if the event window is not the edit widget window.
(handle_one_xevent): Treat core scroll wheel events specially,
if mouse_or_wdesc_frame did not find the frame.
2022-03-04 09:43:52 +08:00
Po Lu
4df7bb9c01 Fix display of stretch glyphs when hscrolled on PGTK
* pgtkterm.c (x_draw_stretch_glyph_string): Use correct box
dimensions.
2022-03-04 09:13:08 +08:00
Po Lu
cba88c275b * src/pgtkterm.c (pgtk_draw_fringe_bitmap): Synchronize logic with X. 2022-03-04 09:11:36 +08:00
Po Lu
848e96acdd ; * src/nsterm.m (ns_draw_fringe_bitmap): Fix typo in last change. 2022-03-04 09:08:33 +08:00
Po Lu
a421f40d87 Synchronize NS fringe bitmap code with X
* nsterm.m (ns_draw_fringe_bitmap): Redefine bitmap if it does
not already exist.
2022-03-04 09:06:20 +08:00
Po Lu
77483ac881 Synchronize Haiku fringe bitmap code with X
* haikuterm.c (haiku_draw_fringe_bitmap):
(haiku_define_fringe_bitmap):
(haiku_destroy_fringe_bitmap): Synchronize logic with X.
2022-03-04 01:01:07 +00:00
Po Lu
18868de463 Merge from origin/emacs-28
29ff903bb0 Avoid crashes when fringe bitmaps are defined in daemon mode
92e2d19fe7 One more fix of the BPA implementation
cd51d9c7ab Fix handling of brackets in BPA
2022-03-04 00:52:18 +00:00
Philipp Stephani
aeb25f9d3d Teach Edebug about the special '&whole' syntax for compiler macros.
* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro-list): New
Edebug element specification.
(cl-define-compiler-macro): Use it.

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-define-compiler-macro/edebug): New unit test.
2022-03-03 19:57:00 +01:00
Eli Zaretskii
29ff903bb0 Avoid crashes when fringe bitmaps are defined in daemon mode
* src/dispextern.h (gui_define_fringe_bitmap): Add prototype.
(max_used_fringe_bitmap): Add declaration.
* src/fringe.c (gui_define_fringe_bitmap): New function.
* src/w32term.c (w32_draw_fringe_bitmap):
* src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]: Call
'gui_define_fringe_bitmap' if the terminal-specific bitmap data is
not available when a fringe bitmap is about to be drawn.  Don't
try to draw a bitmap that is not known to fringe.c.  (Bug#54183)
2022-03-03 20:31:33 +02:00
Stefan Monnier
dc8a692f97 (with-demoted-errors): Fix bug#54225
* lisp/subr.el (with-demoted-errors): Adjust to argument order of
`macroexp-warn-and-return` changed in f262a6af36.
2022-03-03 10:12:44 -05:00
Lars Ingebrigtsen
b6587090bf Fix clobbering of match data in executable-set-magic
* lisp/progmodes/executable.el (executable-set-magic): Switching
buffers may clobber match data, so save the match data first
(bug#54218).
2022-03-03 15:43:35 +01:00
Jim Porter
d72cd4a2b7 Allow splitting strings in Eshell expansions with "plain" strings
Since '$var[hello 0]' doesn't make sense when 'var' is a string, the
previous restriction was unnecessary.

* lisp/eshell/esh-var.el (Commentary): Update documentation.
(eshell-apply-indices): Allow "plain" strings to split strings.

* test/lisp/eshell/esh-var-test.el
(esh-var-test/interp-var-string-split-indices)
(esh-var-test/quoted-interp-var-string-split-indices): Update tests.

* doc/misc/eshell.texi (Dollars expansion): Update documentation.
2022-03-03 14:59:33 +01:00
Jim Porter
990f36fa10 Fix parsing of indices in Eshell expansions
Previously, more-complex index expansions, like '$var[":" 0]' or
'$var[$(expr) 0]' failed to parse correctly.

* lisp/eshell/esh-var.el (Commentary): Clarify indexing and length
expansions.
(eshell-parse-indices): Expand docstring and support parsing inside
double-quotes.
(eshell-eval-indices): New function.
(eshell-parse-variable): Use it.

* test/lisp/eshell/esh-var-tests.el (eshell-test-value): New defvar.
(esh-var-test/interp-var-indices,
(esh-var-test/interp-var-split-indices)
(esh-var-test/interp-var-string-split-indices)
(esh-var-test/interp-var-regexp-split-indices)
(esh-var-test/interp-var-assoc, esh-var-test/interp-var-length-list)
(esh-var-test/interp-var-length-string)
(esh-var-test/interp-var-length-alist)
(esh-var-test/quoted-interp-var-indices)
(esh-var-test/quoted-interp-var-split-indices)
(esh-var-test/quoted-interp-var-string-split-indices)
(esh-var-test/quoted-interp-var-regexp-split-indices)
(esh-var-test/quoted-interp-var-assoc)
(esh-var-test/quoted-interp-var-length-list)
(esh-var-test/quoted-interp-var-length-string)
(esh-var-test/quoted-interp-var-length-alist): New tests.

* doc/misc/eshell.texi (Dollars Expansion): Expand and reword
documentation for indexing and length expansions.
2022-03-03 14:59:33 +01:00
Jim Porter
cccee7e840 Fix Eshell dollar interpolation inside of double-quotes
For example,

  echo "${echo hi}"

previously tried to run the program named 'echo hi', instead of 'echo'
with the argument 'hi'.

* lisp/eshell/esh-arg.el (eshell-parse-inner-double-quote):
New function.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Support parsing
when wrapped in double-quiotes.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var)
(esh-var-test/interp-quoted-var)
(esh-var-test/interp-quoted-var-concat)
(esh-var-test/quoted-interp-var)
(esh-var-test/quoted-interp-quoted-var)
(esh-var-test/quoted-interp-lisp, esh-var-test/quoted-interp-cmd)
(esh-var-test/quoted-interp-temp-cmd): New tests.
2022-03-03 14:59:33 +01:00
Jim Porter
ae1acb6017 Add a new macro to simplify parsing temporary Eshell command strings
This abstracts out the somewhat-unusual "insert&delete" logic in
'eshell-parse-command' so that it can be used elsewhere, and also
ensures that the deletion occurs even if an an error occurs.

* lisp/eshell/esh-cmd.el (eshell-with-temp-command): New macro.
(eshell-parse-command): Use it.
2022-03-03 14:59:33 +01:00
Jim Porter
7c7a4c26cb Move Eshell variable interpolation tests to their own file
* test/lisp/eshell/eshell-tests.el (eshell-test/interp-cmd)
(eshell-test/interp-lisp, eshell-test/interp-temp-cmd)
(eshell-test/interp-concat, eshell-test/interp-concat-lisp)
(eshell-test/interp-concat2, eshell-test/interp-concat-lisp2)
(eshell-test/interp-cmd-external)
(eshell-test/interp-cmd-external-concat, eshell-test/window-height)
(eshell-test/window-width, eshell-test/last-result-var)
(eshell-test/last-result-var2, eshell-test/last-arg-var):
Move from here...

* test/lisp/eshell/esh-var-test.el (esh-var-test/interp-lisp)
(esh-var-test/interp-cmd, esh-var-test/interp-cmd-external)
(esh-var-test/interp-temp-cmd, esh-var-test/interp-concat-lisp)
(esh-var-test/interp-concat-lisp2, esh-var-test/interp-concat-cmd)
(esh-var-test/interp-concat-cmd2)
(esh-var-test/interp-concat-cmd-external, esh-var-test/window-height)
(esh-var-test/window-width, esh-var-test/last-result-var)
(esh-var-test/last-result-var2, esh-var-test/last-arg-var):
... to here.
2022-03-03 14:59:33 +01:00
Eli Zaretskii
92e2d19fe7 One more fix of the BPA implementation
* src/bidi.c (bidi_find_bracket_pairs): Disable BPA optimization
when there are no strong directional characters inside the
bracketed pair.  (Bug#54219)
2022-03-03 15:53:04 +02:00
Eli Zaretskii
cd51d9c7ab Fix handling of brackets in BPA
* src/bidi.c (bidi_resolve_brackets): Fix implementation of UBA's
N0 rule when there are no strong directional characters inside the
bracketed pair.  (Bug#54219)
2022-03-03 14:46:20 +02:00
Stefan Kangas
ca8f4ebc49 Merge from origin/emacs-28
225e0d6047 Correct etc/NEWS entry about bitmapped fonts

# Conflicts:
#	etc/NEWS
2022-03-03 06:30:34 +01:00
Dmitry Gutov
86969f9658 Cache the backend value together with the project root
* lisp/progmodes/project.el (project-try-vc):
Cache the backend value together with the root.
(project-root, project-files, project-ignores):
Update to access the new data structure.
2022-03-03 05:41:46 +02:00
Po Lu
d845ccb7cf * src/xterm.c: Fix commentary on GTK client side windows. 2022-03-03 11:39:55 +08:00
Po Lu
39aac09940 Fix Motif build without toolkit scroll bars
* src/xterm.c: Always include Xm.h on Motif.
2022-03-03 11:17:53 +08:00
Dmitry Gutov
890b08e415 * lisp/progmodes/xref.el: Bump the version. 2022-03-03 04:55:23 +02:00
Po Lu
b727d6ebeb Don't calculate any frame for extension events
* src/xterm.c (handle_one_xevent): If event is not a core event,
don't try to calculate any from event.xany.window.
2022-03-03 10:50:30 +08:00
Po Lu
5436406286 Implement `toolkit_position_hook' on PGTK
* src/pgtkterm.c (pgtk_toolkit_position): New function.
(pgtk_create_terminal): Set it as the toolkit position hook.
2022-03-03 09:05:00 +08:00
Po Lu
8c8093aa6f ; * src/termhooks.h (struct terminal): Fix typo in comment. 2022-03-02 19:16:53 +08:00
Po Lu
596d36f8cf Fix menu bar position reporting on Haiku as well
* src/haikuterm.c (haiku_toolkit_position): New function.
(haiku_create_terminal): Register new hook.
2022-03-02 11:10:00 +00:00
Po Lu
68e293c81d Fix reporting of imaginary key prefixes on toolkit tool and menu bars
* src/keyboard.c (make_lispy_position): Set imaginary prefix if
the terminal says what widget the position is on top of.
* src/termhooks.h (struct terminal): New field
`toolkit_position_hook'.
* src/xterm.c (x_toolkit_position): New function.
(x_create_terminal): Register hook.
2022-03-02 19:02:14 +08:00
Po Lu
225e0d6047 Correct etc/NEWS entry about bitmapped fonts
* etc/NEWS: Don't say that bitmap font issues are due to Pango, that's
not accurate.
2022-03-02 09:24:21 +01:00
Stefan Kangas
6d78321ce8 Merge from origin/emacs-28
9dadcbe429 ; * doc/misc/eshell.texi (Dollars Expansion): Fix markup.
2c3d1b6bf4 Improve/correct documentation about Eshell variable expansion
9e257aecc9 Partially revert b03f74e0f2
2022-03-02 06:33:19 +01:00
Stefan Kangas
2b130bd944 ; Merge from origin/emacs-28
The following commit was skipped:

b8bc359bbf Backport: Port pre-commit hook to Git 2.35.0
2022-03-02 06:33:19 +01:00
Po Lu
67af072204 Fix some bugs with multiple terminals on Haiku
* src/haikuterm.c (haiku_mouse_position): Only clear
`mouse_moved' for Haiku frames.
2022-03-02 05:21:20 +00:00
Po Lu
ae00f07d88 Fix persistent help text on disabled menu items
* oldXMenu/Activate.c (XMenuActivate): Always deactivate help
echo upon leaving a menu item.
2022-03-02 11:12:09 +08:00
Po Lu
84695d439a * src/msdos.c (dos_rawgetc): Handle tab bar clicks correctly. 2022-03-02 10:07:59 +08:00
Po Lu
689a34e215 Dismiss help text when item becomes unactivated on oldXMenu
* oldXMenu/Activate.c (XMenuActivate): Dismiss help text when
leaving an item.
2022-03-02 09:46:44 +08:00
Po Lu
6b71b80fdc Fix odd scrolling bugs on LessTif
* src/xterm.c (handle_one_xevent): Give emulated button events
to Motif.
2022-03-02 09:38:58 +08:00