1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

156132 commits

Author SHA1 Message Date
Eli Zaretskii
1a72248901 ; Fix last change in doc string of 'with-buffer-unmodified-if-unchanged'. 2022-05-04 13:08:53 +03:00
Po Lu
54e5fc19e4 ; Fix typo in emacs-news-mode
* lisp/textmodes/emacs-news-mode.el
(emacs-news-count-untagged-entries): Fix typo in message when
there are a pural amount of untagged entries.
2022-05-04 17:16:26 +08:00
Eli Zaretskii
b8357cd50e ; * lisp/frameset.el: Fix a typo in a comment. 2022-05-04 12:06:10 +03:00
Eli Zaretskii
b4acb1807b Fix restoring desktop from TTY-saved sessions
* lisp/frameset.el (frameset-restore): Don't override/fix position
of the restored frames for which we have geometry information
saved by a past GUI session.  (Bug#55070)
2022-05-04 12:04:53 +03:00
Po Lu
0105a4ddb8 Turn on XInput 2 support by default
The support doesn't interfere with compatibility, since Emacs
built with XInput 2 support transparently falls back to Core
Input when a suitable version of the input extension is not
available.  It also matured much sooner than expected, so
enabling this by default will lead to new features being
available to more users.

* INSTALL:
* configure.ac:
* etc/NEWS: Enable XInput 2 support by default.
2022-05-04 16:51:48 +08:00
Eli Zaretskii
69521ffcb0 Clarify the doc string of 'with-buffer-unmodified-if-unchanged'
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Describe better what is meant by "buffer changes".  (Bug#4587)
2022-05-04 11:46:01 +03:00
Po Lu
19231f7db2 Remove unused variable in Haiku selection code
* src/haiku_select.cc (selection_state_flag):
* src/haikuselect.h: Remove variable.
2022-05-04 08:40:58 +00:00
Eli Zaretskii
da1b7b6590 ; * lisp/international/characters.el (#xfb50): Fix last change. 2022-05-04 11:20:05 +03:00
Eli Zaretskii
8f17e4de2d Fix 'bidi-class' property of unassigned codepoints
* admin/unidata/unidata-gen.el (unidata-file-alist): Update the
default values of 'bidi-class' according to the latest Unicode
Standard.

* admin/notes/unicode: Mention possible changes in
DerivedBidiClass.txt that need to be reflected in unidata-gen.el.

* lisp/international/characters.el (#xfb50, #xfdf0): Fix the
Arabic block characters.  (Bug#55256)
2022-05-04 11:14:45 +03:00
Lars Ingebrigtsen
d2913901dc Flush the tool bar cache on all terminals when adding new entries
* lisp/tool-bar.el (tool-bar--flush-cache): Flush the cache for
the current tool bar on all terminals.
2022-05-04 09:35:05 +02:00
Po Lu
4c9a7010bc Correctly encode and decode filenames on NS
* src/nsfns.m (Fns_read_file_name): Run dir through ENCODE_FILE
and fname through DECODE_FILE.
2022-05-04 15:31:32 +08:00
Po Lu
273b0b95c2 Fix file name encoding on Haiku file dialogs
* src/haikufns.c (Fhaiku_read_file_name): Use ENCODE_FILE and
DECODE_FILE correctly.
2022-05-04 07:26:43 +00:00
Po Lu
268713e227 Set initial size in the Haiku font dialog
* src/haiku_support.cc (class EmacsFontSelectionDialog)
(EmacsFontSelectionDialog): New argument `initial_size'.
(be_select_font): Likewise.
* src/haiku_support.h: Update prototypes.
* src/haikufont.c (Fx_select_font): Set font dialog size to the
pixel size of the current font.
2022-05-04 05:46:24 +00:00
Po Lu
10284ca3d3 Encode and decode filenames correctly on Haiku
* src/haikufns.c (Fhaiku_read_file_name): Decode file names
correctly.
2022-05-04 03:32:23 +00:00
Po Lu
b5cf6c1ab6 Clean up Haiku file panel code
* lisp/term/haiku-win.el (x-file-dialog): Fix nil values of
`default-filename'.
* src/haiku_io.c (haiku_len): Remove `FILE_PANEL_EVENT'.
(record_c_unwind_protect_from_cxx, c_specpdl_idx_from_cxx)
(c_unbind_to_nil_from_cxx): Delete functions.
* src/haiku_support.cc (MessageReceived): Write pointer to
buffer to file panel port instead.
(struct popup_file_dialog_data): Delete strict.
(unwind_popup_file_dialog): Delete functions.
(be_popup_file_dialog): Accept a pointer to
`process_pending_signals' and run nested event loop as usual.

* src/haiku_support.h (enum haiku_event_type): Remove
`FILE_PANEL_EVENT'.
(struct haiku_file_panel_event): Delete struct.
* src/haikufns.c (unwind_popup): Delete function.
(Fhaiku_read_file_name): Update and quit on invalid filename.

* src/haikuterm.c (struct unhandled_event): Delete struct.
(haiku_read_socket): Remove "unhandled events".
2022-05-04 03:23:11 +00:00
Po Lu
7dfb068c13 * src/haikufns.c (haiku_create_frame): Improve default border width. 2022-05-04 01:42:30 +00:00
Sean Whitton
f2d2fe6fc8 server-execute: Initialize the *scratch* buffer
* lisp/server.el: Require subr-x when compiling.
(server-execute): Initialize the *scratch* buffer in the same way that
the scratch-buffer command does, for consistency.
2022-05-03 18:09:01 -07:00
Po Lu
185c2f1904 Fix display of placeholder composite string on Haiku
* src/haikuterm.c
(haiku_draw_composite_glyph_string_foreground): Correct
translation of XDrawRectangle.
2022-05-04 00:47:52 +00:00
Po Lu
a1dc1512b3 Fix event mask and source indication of _NET_WM_STATE messages
* src/xselect.c (x_send_client_event): Make static.
* src/xterm.c (set_wm_state): Send event with correct mask and
source indication set.
* src/xterm.h: Update prototypes.
2022-05-04 08:40:12 +08:00
Lars Ingebrigtsen
c761ded251 Make some recently added tests actually run 2022-05-03 22:30:39 +02:00
Lars Ingebrigtsen
0a2f0e7f8c Make with-buffer-unmodified-if-unchanged more efficient
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Make more efficient.
2022-05-03 22:06:31 +02:00
Lars Ingebrigtsen
b7ddd0f2fd Make with-buffer-unmodified-if-unchanged more resilient
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Make more resilient.
2022-05-03 22:04:39 +02:00
Stefan Monnier
b5db5a6443 with-buffer-unmodified-if-unchanged: Tweak the implementation
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
Skip the hash if the buffer was not modified at all.
Use `restore-buffer-modified-p`.
Also mention that it's imperative that the current buffer is preserved.
2022-05-03 15:35:47 -04:00
Lars Ingebrigtsen
8a7db868cc Add NEWS entry about incompatible sorting command behaviors 2022-05-03 21:29:47 +02:00
Lars Ingebrigtsen
5206596ea7 Make sorting not change buffer modification status always
* lisp/sort.el (sort-subr): Don't mark buffer modified if the
sorting didn't change anything (bug#4587).
2022-05-03 21:23:40 +02:00
Lars Ingebrigtsen
59353ec7b5 Add new macro with-buffer-unmodified-if-unchanged
* lisp/emacs-lisp/subr-x.el (with-buffer-unmodified-if-unchanged):
New macro.
* lisp/textmodes/fill.el (fill-paragraph): Macro code copied from
here.  Adjust and use the macro.
2022-05-03 21:22:53 +02:00
Lars Ingebrigtsen
8ef34a065a Fix thinko in recent tool bar caching logic
* lisp/tool-bar.el (tool-bar--cache-key): New function.
(tool-bar--flush-cache, tool-bar-make-keymap): Use it.
2022-05-03 19:20:52 +02:00
Lars Ingebrigtsen
99fbf39d61 Make tool bar caching more sensible
* lisp/tool-bar.el (tool-bar-keymap-cache): Make into a non-weak
EQ hash table, which should be faster and not lose the contents
after a GC (bug#43397).
(tool-bar--flush-cache, tool-bar-make-keymap): Use the terminal
only as the key.
(tool-bar-local-item, tool-bar-local-item-from-menu): Flush the
cache after altering the tool bar.
2022-05-03 18:46:13 +02:00
Eli Zaretskii
3346b94b73 ; * doc/misc/eshell.texi (Arguments): Fix cross-references. 2022-05-03 19:38:06 +03:00
Eli Zaretskii
39fb555a95 Allow desktop to restore frames and windows on TTY frames
* lisp/frameset.el (frameset-persistent-filter-alist): Add 'top',
'left', 'bottom', and 'right' to frame parameters that are shelved
and unshelved when switching from GUI to TTY frames and vice
versa.
(frameset--restore-frame): Accept two optional arguments DX and
DY, and offset by them each frame restored from TTY desktop, to
make such restored frames more prominently visible.  Force such
frames to be visible on GUI display, since the visibility
parameter is meaningless for TTY frames.
(frameset-restore): Pass DX and DY offsets to
'frameset--restore-frame', when restoring TTY frames on GUI
display.
* lisp/desktop.el (desktop-restore-frameset): Pass the
:force-onscreen argument of 'frameset-restore' as nil when
restoring frames on text-mode display.
(desktop-restore-forces-onscreen): Document that this option has
no real effect on restoring frames on text-mode display.
(desktop-restoring-frameset-p): Allow restoring frames in non-GUI
sessions, but disallow that when the selected frame is the
daemon's initial frame.  (Bug#55070)
2022-05-03 19:29:03 +03:00
Jim Porter
a3a7279a4a Improve the behavior of concatenating parts of Eshell arguments
Previously, concatenating a list to a string would first convert the
list to a string.  Now, the string is concatenated with the last
element of the list.

* lisp/eshell/esh-util.el (eshell-to-flat-string): Make obsolete.

* lisp/eshell/esh-arg.el (eshell-concat, eshell-concat-1): New
functions.
(eshell-resolve-current-argument): Use 'eshell-concat'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-concat-cmd):
Add check for concatenation of multiline output of subcommands.
(esh-var-test/quoted-interp-concat-cmd): New test.

* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-13): Use
'eshell-concat'.

* doc/misc/eshell.texi (Expansion): Document this behavior.

* etc/NEWS: Announce the change (bug#55236).
2022-05-03 18:23:02 +02:00
Jim Porter
06423b5d1e Return a list of numbers if all lines of an Eshell subcommand are numeric
* lisp/eshell/esh-util.el (eshell-convertible-to-number-p)
(eshell-convert-to-number): New functions...
(eshell-convert): ... use them.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-convert-cmd-string-newline): Add checks for
numeric output.

* doc/misc/eshell.texi (Dollars Expansion): Document the new behavior.

* etc/NEWS: Announce the change (bug#55236).
2022-05-03 18:23:00 +02:00
Jim Porter
f7a82699d6 Eshell variable expansion should always return strings inside quotes
This is closer in behavior to regular shells, and gives Eshell users
greater flexibility in how variables are expanded.

* lisp/eshell/esh-util.el (eshell-convert): Add TO-STRING argument.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Add MODIFIER-P
argument and adjust how 'eshell-convert' and 'eshell-apply-indices'
are called.
(eshell-get-variable, eshell-apply-indices): Add QUOTED argument.

* test/lisp/eshell/esh-var-tests.el (eshell-test-value): New defvar.
(esh-var-test/interp-convert-var-number)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-string-newline)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-number)
(esh-var-test/interp-convert-cmd-split-indices)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-var-split-indices)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-split-indices)
(esh-var-test/quoted-interp-convert-cmd-string-newline)
(esh-var-test/quoted-interp-convert-cmd-multiline)
(esh-var-test/quoted-interp-convert-cmd-number)
(esh-var-test/quoted-interp-convert-cmd-split-indices): New tests.

* doc/misc/eshell.texi (Arguments): Expand this section, and document
the new behavior.
(Dollars Expansion): Provide more detail about '$(lisp)' and
'${command}' forms.

* etc/NEWS (Eshell): Announce this change (bug#55236).
2022-05-03 18:22:57 +02:00
Lars Ingebrigtsen
316c082d58 Make adding things to the tool bar show up on next redisplay
* lisp/tool-bar.el (tool-bar--flush-cache): New function.
(tool-bar-add-item): Flush the cache (bug#43397).
2022-05-03 18:19:13 +02:00
Lars Ingebrigtsen
0916fd3aaa Add new command 'package-update'
* doc/emacs/package.texi (Package Installation): Mention it.
* lisp/emacs-lisp/package.el (package-update): New command
(bug#18790).
2022-05-03 18:00:32 +02:00
Lars Ingebrigtsen
41e946f46e Fix key-parse problem with C-x ( ... sequences
* lisp/keymap.el (key-parse): Move the read-kbd-macro compat code
from here...
* lisp/subr.el (kbd): ... to here.  (And fix the logic, too.)
This allows `key-parse' to have a less puzzling result while
maintaining backwards compatibility (bug#38775).
2022-05-03 16:19:50 +02:00
Lars Ingebrigtsen
a4c96147d1 Make TAB work in makefile mode when transient mark mode is on
* lisp/progmodes/make-mode.el (makefile-mode): Insert a tab
instead of removing it (bug#37087).
2022-05-03 16:02:51 +02:00
Michael Albinus
47fe7a5983 Handle file name handler in write-region's VISIT arg
* lisp/net/tramp.el (tramp-skeleton-delete-directory): Move up.
(tramp-skeleton-write-region): New defmacro.  Handle also file
name handler in VISIT.  (Bug#55166)
(tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region): Use it.
2022-05-03 14:14:37 +02:00
Filipp Gunbin
0b626ff8d6 Rewrite sql-interactive-remove-continuation-prompt
* lisp/progmodes/sql.el (sql-starts-with-prompt-re): Remove.
(sql-ends-with-prompt-re): Remove
(sql-interactive-remove-continuation-prompt): Delete prompts from
anywhere in the process output, not just at the beginning of current
string.  Streamline logic, describe it in docstring.
* test/lisp/progmodes/sql-tests.el: Add tests
2022-05-03 12:35:34 +02:00
Lars Ingebrigtsen
0e8fc556b6 Make more buttons in *Help* respect `help-window-keep-selected'
* lisp/help-mode.el (help-function-cmacro, help-variable-def)
(help-face-def): Also respect `help-window-keep-selected' like the
other commands.
2022-05-03 12:23:25 +02:00
Lars Ingebrigtsen
cf0d289e38 Further mm-base64-line-p bug fixes
* lisp/gnus/mm-bodies.el (mm-base64-line-p): Fix parsing error
introduced by d90f54d.
2022-05-03 11:32:03 +02:00
Lars Ingebrigtsen
d5803a0c97 Fix mm-base64-line-p logic
* lisp/gnus/mm-bodies.el (mm-base64-line-p): Don't claim that an
empty line is base64.
2022-05-03 11:28:59 +02:00
Po Lu
b8dfd8400a * src/haiku_support.cc (DrawContent): Use right UI color. 2022-05-03 08:19:41 +00:00
Po Lu
2ec7521b41 ; * lisp/tooltip.el (tooltip-show-help): Fix typo in last change. 2022-05-03 16:13:59 +08:00
Po Lu
5adc84a27b Make menu bar help text work on macOS as well
* lisp/tooltip.el (tooltip-show-help): Resort to displaying
messages in the echo area on NS.

* src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Call
`show_help_echo' instead of storing an event into the keyboard
buffer.
2022-05-03 16:12:24 +08:00
Po Lu
f9dea5b4c5 Fix default font in macOS font dialogs
* src/nsterm.m ([EmacsView noteUserSelectedFont]): Use current
font if none was selected.
2022-05-03 16:05:46 +08:00
Po Lu
64aac418c2 Fix some font parsing problems on NS
* src/nsterm.m (ns_font_desc_to_font_spec): Fix processing of
condensed width.
2022-05-03 16:02:02 +08:00
Po Lu
0b94669c14 Handle GraphicsExpose events on scroll bars
* src/xterm.c (x_scroll_bar_expose): Handle GraphicsExpose
events.
(handle_one_xevent): Give graphics exposures to scroll bars.
2022-05-03 13:40:54 +08:00
Po Lu
c77ef7d193 Make sure rectangles are drawn correctly on X
* src/xfaces.c (prepare_face_for_display): Always use line-width
of 1.
* src/xfns.c (x_make_gc): Likewise.
* src/xterm.c (x_scroll_bar_expose): Comment out obsolete code.
2022-05-03 11:43:32 +08:00
Po Lu
61a5829c1e Fix glyphless glyph display on Haiku
* src/haikuterm.c
(haiku_draw_glyphless_glyph_string_foreground): Fix rectangle
width.
2022-05-03 03:18:11 +00:00