1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00
Commit graph

44198 commits

Author SHA1 Message Date
Stefan Kangas
2782bc113e Revert "Fix localized display of date and time in the NS port"
This reverts commit 5e05be566b.

This was discussed in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51321#93
2021-11-09 08:49:34 +01:00
Eli Zaretskii
21de5e7b2e Fix compilation MinGW warnings
* src/w32.h (prepare_standard_handles, reset_standard_handles):
Fix prototypes.  Reported by Andy Moreton
<andrewjmoreton@gmail.com> in
https://lists.gnu.org/archive/html/emacs-devel/2021-11/msg00597.html.
2021-11-07 17:02:46 +02:00
Eli Zaretskii
c2e3cd6694 Clarify "text area of a window" in the documentation
* src/keyboard.c (Fposn_at_x_y): Clarify that the Y coordinate
includes the header-line and the tab-line.  (Bug#51590)

* doc/lispref/windows.texi (Window Sizes, Splitting Windows)
(Textual Scrolling, Coordinates and Windows): Fix/remove improper
or confusing uses of "text area" of a window.
2021-11-06 08:59:09 +02:00
Eli Zaretskii
4df9998564 Fix header-line and tab-line when mode-line-compact is set
* src/xdisp.c (display_mode_line): Make 'mode-line-compact' apply
only to mode lines.  (Bug#51558)
2021-11-03 14:57:51 +02:00
Andrea Corallo
9d6162053e * src/pdumper.c (dump_do_dump_relocation): Add sanity check. 2021-11-02 21:05:34 +01:00
Eli Zaretskii
e170a31c57 Avoid signaling errors in lookup-key
* src/keymap.c (Flookup_key): Handle KEY vectors where not all
components are symbols.  (Bug#51527)  Do not merge to master.
2021-10-31 16:20:27 +02:00
Daniel Martín
5e05be566b Fix localized display of date and time in the NS port
* src/nsterm.m (ns_init_locale): If not already set, set LC_ALL to the
current locale ID so that dates, currencies, etc. use the settings
configured in the operating system.  (Bug#51321)
2021-10-31 13:33:55 +02:00
Eli Zaretskii
335a660b4b Fix display glitches with side-by-side windows on TTY frames
* src/dispnew.c (adjust_glyph_matrix, prepare_desired_row): Leave
room for the border glyph only if the window does actually have
the right margin.  (Bug#51521)
2021-10-31 09:42:09 +02:00
Eli Zaretskii
bea843dee1 Avoid assertion violations in 'lookup-key'
* src/keymap.c (Flookup_key): Don't call ASIZE unless KEY is a
vector.  This avoids assertion violations when KEY is a string.
2021-10-28 20:52:41 +03:00
Stefan Kangas
0f8417d597 Be more allowing when looking for menu-bar items
Don't merge to master.  This is a safe-for-release fix for Bug#50752.

* src/keymap.c (lookup_key_1): Factor out function from
Flookup_key.
(Flookup_key): Be case insensitive when looking for Qmenu_bar
items.  (Bug#50752)

* test/src/keymap-tests.el
(keymap-lookup-key/mixed-case)
(keymap-lookup-key/mixed-case-multibyte): New tests.
2021-10-28 12:30:42 +02:00
Robert Pluim
e3171e7e86 Allow automatic use of color fonts for emoji on macOS
* src/macfont.m (macfont_list): Don't exclude color fonts when the
fontspec has an 'emoji' script specification.
2021-10-27 18:56:33 +02:00
Ihor Radchenko
817c929eda Doc fix for concat
* src/fns.c (Fconcat): Note that composition values may not remain eq
in return value of concat.  (Bug#48740)
2021-10-24 14:13:15 +02:00
Stefan Kangas
e154fd9119 Refer to the info node on keymaps in map-keymap docstring
* src/keymap.c (Fmap_keymap): Doc fix; add a reference to the Info
node '(elisp) Keymaps'.  (Bug#30958)
2021-10-24 08:12:12 +02:00
Eli Zaretskii
598732c899 ; * src/vm-limit.c (get_lim_data): Fix a typo. (Bug#18238) 2021-10-23 09:15:40 +03:00
Eli Zaretskii
0545c70c16 ; * src/keyboard.c (readable_events): Add a comment. 2021-10-21 10:53:20 +03:00
Po Lu
8358da9c4c Display a tab bar item as sunken when appropriate
When the mouse pointer is pressed on the tab bar, moved out of the tab
bar, and moved back in, it would be more appropriate to behave like
other programs by displaying the item as sunken.

* src/xdisp.c (note_tab_bar_highlight): Display item as sunken if the
mouse pointer returns to the tab bar down.
2021-10-20 19:42:14 +03:00
Po Lu
29fdc65860 Fix tab bar item highlight when a mouse click is dropped
* src/xdisp.c (note_mouse_highlight): Clear last_tab_bar_item if the
movement wasn't made on top of the tab bar.
2021-10-20 19:42:12 +03:00
Stefan Kangas
7236592668 Refer to mouse-highlight from make-pointer-invisible docstring
* src/frame.c (syms_of_frame) <Vmake_pointer_invisible>: Doc fix;
add reference to 'mouse-highlight'.  (Bug#42889)
2021-10-20 18:28:14 +02:00
Alan Third
91d71b38a3 Fix inset rectangle corners when sides aren't drawn (bug#51251)
* src/nsterm.m (ns_draw_relief): Make the inner rectangle line up with
the outer rectangle's edges where the edges aren't drawn.
2021-10-19 21:25:01 +01:00
Robert Pluim
9bd2f59db6 Handle VS-16 correctly for non-emoji codepoints
* admin/unidata/blocks.awk: Remove emoji overrides for codepoints with
Emoji_Presentation = No, they're no longer necessary.
* lisp/composite.el: Remove #xFE0F (VS-16) from the range handled by
`compose-gstring-for-variation-glyph' so it can be handled by
`font_range'.
* src/composite.c (syms_of_composite): New variable
`auto-composition-emoji-eligible-codepoints'.
* admin/unidata/emoji-zwj.awk: Generate value for
`auto-composition-emoji-eligible-codepoints'.  Add
`composition-function-table' entries for 'codepoint + U+FE0F' for
them.
* src/font.c (codepoint_is_emoji_eligible): New function to check if
we should try to use the emoji font for a codepoint.
(font_range): Use it.
2021-10-19 14:40:26 +02:00
Juri Linkov
5a3242301d Rename tab-bar-drag-maybe to tab-bar--dragging-in-progress
* lisp/tab-bar.el (tab-bar--event-to-item, tab-bar-mouse-down-1)
(tab-bar-mouse-move-tab): Rename tab-bar-drag-maybe to
tab-bar--dragging-in-progress.

* src/xdisp.c (note_mouse_highlight): Rename tab_bar_drag_maybe to
tab_bar__dragging_in_progress.
2021-10-18 19:52:29 +03:00
Martin Rudalics
e74e17c1f0 Rewrites of Elisp manual including tab-bar and tab-line changes
* doc/lispref/buffers.texi (Current Buffer, Buffer List): Update
references to 'selected-window'.
* doc/lispref/elisp.texi (Top): Move up Selecting Windows section
in front of Window Sizes section.
* doc/lispref/frames.texi (Creating Frames): Say window system
instead of windowing system.
(Frame Layout): Add Tab Bar to layout.
(Layout Parameters): Add 'tab-bar-lines'.
(Input Focus): Say window system window instead of window
manager window.  Fix reference to 'selected-window'.
* doc/lispref/objects.texi (Window Type): Minor rewrite.
* doc/lispref/windows.texi (Basic Windows): Rewrite.  Settle on
term 'window system window' for disambiguation with our windows.
Move 'selected-window' description to Selecting Windows section.
Move schematic of window structure here.  Use 'decorations' for
objects outside the window body.  Say that the areas reserved
for continuation and truncation glyphs, vertical dividers and
line numbers are part of the window body.
(Windows and Frames): Minor rewrite, adding and fixing some
cross references.  Move live window schematic to 'Basic Windows'
section.
(Selecting Windows): Move section in front of Window Sizes
section.  Move description of 'selected-window' here.  Move up
description of 'frame-selected-window' and
'set-frame-selected-window'.  Update and move description of
'window-bump-use-time' here.
(Window Sizes): Throughout use the term 'decorations' instead of
enumerating them individually.  Add 'window-tab-line-height'
description.
(Resizing Windows): Again use the term 'decorations' instead of
enumerating them individually.
(Splitting Windows): Minor fix.
(Cyclic Window Ordering): Improve descriptions of 'get-lru-window'
and 'get-mru-window'.  Move 'window-bump-use-time' to Selecting
Windows section.
(Coordinates and Windows, Window Configurations): Once more use
the term 'decorations' instead of enumerating them individually.
* src/window.c (Fwindow_bump_use_time): Move after
'window-use-time'.  Make it work for live windows only.  Make
WINDOW argument optional.  Update doc-string.
2021-10-18 09:58:48 +02:00
Martin Rudalics
04716ca48f Add tab-bar-drag-maybe for indication of tab dragging (bug#50993)
* lisp/tab-bar.el (tab-bar--event-to-item)
(tab-bar-mouse-move-tab): Set tab-bar-drag-maybe to nil.
(tab-bar-mouse-down-1): Set tab-bar-drag-maybe to t.

* src/xdisp.c (note_mouse_highlight): Set cursor to 'hand_cursor'
when tab_bar_drag_maybe is true.
(syms_of_xdisp): New variable tab-bar-drag-maybe.
2021-10-17 20:48:45 +03:00
Po Lu
77dbaedadc Add tab bar support to the nextstep port
* src/nsfns.m (ns_change_tab_bar_height): New function.
(ns_set_tab_bar_lines): Check tab bar height and set tab bar
accordingly.
* src/nsterm.m (ns_clear_under_internal_border): Clear internal border
correctly when there is a tab bar.
(ns_create_terminal): Add ns_change_tab_bar_height.
(mouseDown): Handle tab bar mouse click events.
2021-10-17 10:54:18 +01:00
Alan Third
7b6fb486c2 Fix potential buffer overflow (bug#50767)
* src/image.c (svg_load_image): Check how many bytes were actually
written to the buffer.  Don't check xmalloc return value as xmalloc
doesn't return if it fails.
2021-10-17 10:54:18 +01:00
Eli Zaretskii
e8488808df Avoid aborts when a thread is signaled while "waiting for input".
* src/process.c (kbd_is_ours): New function.
(wait_reading_process_output): Set 'waiting_for_input' only if the
current thread is monitoring the keyboard descriptor.  See also
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg01180.html.
(Bug#51229)
2021-10-16 14:47:32 +03:00
Martin Rudalics
f5b8df14c6 Fixes to account for windows' tab lines
* doc/lispref/display.texi (Size of Displayed Text): Fix entry
on 'window-text-pixel-size'.
* lisp/window.el (window--dump-window): Dump tab-line-height and
scroll-bar-height too.
(window--min-size-1): Take 'window-tab-line-height' into account.
* src/xdisp.c (Fwindow_text_pixel_size): Fix doc-string of
'window-text-pixel-size'.  Rename last argument to 'MODE-LINES'.
2021-10-15 10:21:05 +02:00
Martin Rudalics
8153f70b9c In make_lispy_position fix Bug#50993 in rudimentary fashion
* src/keyboard.c (make_lispy_position): Do not set posn to
tool- or tab-bar when track_mouse is enabled (Bug#50993).
2021-10-14 10:39:27 +02:00
Paul Eggert
ebeaa54f19 Pacify GCC 11 -fanalyzer on x86-64
* src/buffer.c (fix_overlays_before):
Redo slightly to work around GCC bug 102692
<https://gcc.gnu.org/bugzilla//show_bug.cgi?id=102692>.
2021-10-12 11:54:32 -07:00
Eli Zaretskii
66b8dfd060 ; Fix last change related to shorthands
* src/lread.c (read1): Minor stylistic fixes of the last change,
including the wording of the comment.

* doc/lispref/symbols.texi (Shorthands): Fix wording and typos.
2021-10-12 16:20:47 +03:00
Martin Rudalics
3832b983cf In Fdelete_other_windows_internal fix new total window sizes (Bug#51007)
* src/window.c (Fdelete_other_windows_internal): Assign the
new total sizes of windows _after_ the new window configuration
is in place (Bug#51007).
2021-10-12 09:25:57 +02:00
João Távora
cf1409db71 Don't apply shorthands to punctuation-only symbols (bug#51089)
This includes symbols used for arithmetic functions such as -, /=,
etc.  Using "-" or "/=" is still possible but doing so won't shadow
those functions.

* doc/lispref/symbols.texi (Shorthand, Exceptions): New
subsubsection.

* src/lread.c (read1): Exempt punctionation-only symbols from
oblookup_considering_shorthand.

* test/lisp/progmodes/elisp-mode-tests.el
(elisp-dont-shadow-punctuation-only-symbols): Tweak test.
2021-10-11 22:29:16 +01:00
Paul Eggert
0d374b1b83 Work around GCC bug 102671
This is for --enable-gcc-warnings on GCC 11.2.1.
* src/window.c, src/timefns.c: Disable -Wanalyzer-null-dereference.
2021-10-11 09:24:56 -07:00
Eli Zaretskii
1a1b206a8b Adapt the recent 'num_processors' change to MS-Windows
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_nproc): Omit nproc.

* src/w32.c (num_processors): New function.
* src/w32proc.c (Fw32_get_nproc): Remove.
2021-10-11 15:56:31 +03:00
Paul Eggert
96278de8ac New function num-processors
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
2021-10-10 14:00:26 -07:00
Eli Zaretskii
ae61d7a57d Fix point positioning on mouse clicks with non-zero line-height
* src/xdisp.c (move_it_to): After passing a newline, reset
it->override_ascent, like 'display_line' does (in
'append_space_for_newline').  (Bug#51111)
2021-10-10 17:14:55 +03:00
Eli Zaretskii
00eb21c897 ; * src/dispextern.h (struct glyph_string): Comment on NCHARS. (Bug#51105) 2021-10-09 14:38:06 +03:00
Eli Zaretskii
315fe20086 ; * src/Makefile.in (../native-lisp): Add comment. 2021-10-09 11:23:44 +03:00
Stephen Gildea
65de510c16 ; Fix 'restore-buffer-modified-p' doc string typo
* src/buffer.c (restore-buffer-modified-p): Fix typo in doc string:
"and" for "or" regarding lock/unlock.  Note that 'set-buffer-modified-p'
doc string already uses the correct "or".
2021-10-07 20:11:36 -07:00
Paul Eggert
89d64fca75 Pacify GCC 10.3 -Wmaybe-uninitialized
Problem reported by Basil L. Contovounesios (Bug#51075).
* src/term.c (encode_terminal_code):
Add an UNINIT to pacify GCC 10 bug.
2021-10-07 13:09:47 -07:00
Eli Zaretskii
7ae70054aa ; * src/composite.h (LGSTRING_FONT): Add comment about its role. 2021-10-07 19:27:49 +03:00
Eli Zaretskii
3c29fb705c ; * src/Makefile.in (../native-lisp): Make the long recipe silent. 2021-10-07 18:48:09 +03:00
Eli Zaretskii
7cb98ba057 ; * src/keyboard.c (make_lispy_position): Avoid GCC warning. (Bug#51076) 2021-10-07 16:09:37 +03:00
Eli Zaretskii
b5afbedc90 Backward compatibility option for 'nobreak-char-display'
* src/xdisp.c (syms_of_xdisp) <nobreak-char-ascii-display>: New
variable.
(get_next_display_element): If 'nobreak-char-ascii-display' is
non-nil, display non-ASCII space and hyphen characters as their
ASCII equivalents.  (Bug#50983)

* etc/NEWS:
* etc/PROBLEMS: Mention 'nobreak-char-ascii-display'.
2021-10-05 17:12:49 +03:00
Paul Eggert
1a65d49931 Port recent Gnulib changes to MS-Windows
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_free-posix)
(OMIT_GNULIB_MODULE_malloc-posix)
(OMIT_GNULIB_MODULE_realloc-gnu)
(OMIT_GNULIB_MODULE_realloc-posix):
New macros, since we don’t want these modules on MS-Windows.
* src/w32heap.c (heap_alloc, heap_realloc): New functions.
(malloc_after_dump, realloc_after_dump, realloc_before_dump):
Use them.
2021-10-04 15:21:43 -07:00
Paul Eggert
68a256c892 Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove.  These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 15:21:31 -07:00
Ken Brown
894dfe70da Fix native-compilation build from tarball on Cygwin
* src/Makefile.in (../native-lisp) [CYGWIN]: Rebase the *.eln
files after they are all created, to avoid fork problems later in
the build.  (Bug#50666)
2021-10-04 14:53:46 -04:00
Robert Pluim
9750e78202 Fix problem with 'vertical-motion' and emoji
* src/font.c (font_range): Pass correct position to
font_for_char (Bug#51012).
2021-10-04 18:56:52 +02:00
Gregory Heytings
95a0227ff7 Avoid exiting when outputting error messages during loadup
* src/print.c (print_error_message): Don't call
'substitute-command-keys' when it isn't fboundp.
2021-10-04 18:04:20 +03:00
Eli Zaretskii
b7ae0232be ; * src/Makefile.in (../native-lisp): More tweaks of the recipe. 2021-10-04 16:54:37 +03:00