1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00
Commit graph

44279 commits

Author SHA1 Message Date
Lars Ingebrigtsen
686d85c767 Include the major mode name in the `C-h b' output
* lisp/calc/calc-help.el (calc-describe-bindings): Don't add the
name since it's there now.

* src/keymap.c (Fdescribe_buffer_bindings): Include the major mode
name for symmetry with the minor modes (and because it's easy to
forget).
2021-11-01 01:44:01 +01:00
Eli Zaretskii
3ec6520088 Merge from origin/emacs-28
5e05be5 Fix localized display of date and time in the NS port
2021-10-31 18:46:26 +02:00
Eli Zaretskii
a50571950d ; * src/font.c (Ffont_has_char_p): Minor stylistic changes; doc fix. 2021-10-31 18:12:03 +02:00
Lars Ingebrigtsen
b75e79138c Add new function 'font-has-char-p'
* src/font.c (Ffont_has_char_p): New function.
(Ffont_get_glyphs): Link to the new function from the doc string.
2021-10-31 16:58:16 +01:00
Eli Zaretskii
d1523bc78c Avoid signaling errors in lookup-key
* src/keymap.c (Flookup_key): Handle KEY vectors where not all
components are symbols.  (Bug#51527
2021-10-31 16:16:38 +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
Alan Third
90bd80d47b Ensure help echoes only occur once on NS
* src/nsterm.m ([EmacsView windowDidResignKey:]): Reset
any_help_event_p as it is never reset otherwise.
2021-10-31 10:28:19 +00:00
Eli Zaretskii
d9b309cda8 Merge from origin/emacs-28
335a660b4b Fix display glitches with side-by-side windows on TTY frames
4a96f32def Avoid replacing common prefix with ellipsis
2021-10-31 03:58:55 -04: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
Stefan Kangas
8227d1273e Fix bug with string values in equal-including-properties
* src/intervals.c (intervals_equal_1): Factor out from
intervals_equal.  Optionally use Fequal for comparison of string
values in property lists.
(intervals_equal): Update for the above.
(compare_string_intervals): Use the above optional Fequal comparison
to fix a bug where 'equal-including-properties' compared strings with
eq, instead of equal.  (Bug#6581)
* test/src/fns-tests.el (fns-tests-equal-including-properties)
(fns-tests-equal-including-properties/string-prop-vals): New tests.

* test/lisp/emacs-lisp/ert-tests.el
(ert-test-equal-including-properties): Remove parts testing
'equal-including-properties'.
* lisp/emacs-lisp/ert.el (ert-equal-including-properties): Add
FIXME that this should be removed.
2021-10-31 03:02:32 +01:00
Stefan Kangas
da67e888d5 Use primes for hash table bucket sizes
* src/dispextern.h (IMAGE_CACHE_BUCKETS_SIZE):
* src/image.c (XPM_COLOR_CACHE_BUCKETS): Use primes for hash table
bucket sizes.
2021-10-30 20:24:25 +02:00
Eli Zaretskii
520e358a3f Minor fixes for previous change
* src/w32fns.c (DWMWA_USE_IMMERSIVE_DARK_MODE_OLD): Define only if
undefined.
(w32_applytheme, w32_createwindow, globals_of_w32fns): Minor
stylistic copyedits.

* etc/NEWS: Reword the entry about using dark mode on MS-Windows.

* doc/emacs/msdos.texi (Windows Misc): Fix wording and markup in
the last change.
2021-10-30 13:22:57 +03:00
Vince Salvino
c79d8fa416 Support system dark mode on Windows 10 version 1809 and higher
* src/w32fns.c (DARK_MODE_APP_NAME)
(DWMWA_USE_IMMERSIVE_DARK_MODE_OLD)
(DWMWA_USE_IMMERSIVE_DARK_MODE): Define.
(w32_applytheme): New function.
(w32_createvscrollbar, w32_createhscrollbar, w32_createwindow):
Call 'w32_applytheme'.
(globals_of_w32fns): Load 'DwmSetWindowAttribute' and
'SetWindowTheme' from their DLLs, and initialize 'w32_darkmode'.
* src/w32.c (w32_get_resource): Accept an additional argument
instead of hard-coding REG_ROOT; callers changed.  (Bug#51404)

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc): Document the new feature.
2021-10-30 12:55:35 +03:00
Eli Zaretskii
c3499b8ddc ; Fix a recent change in image.c
* src/image.c (DGifSavedExtensionToGCB): Define only for GIFLIB >= 5.
2021-10-29 22:07:27 +03:00
Stefan Kangas
d9abc45ab5 * src/image.c: Fix building with giflib on MS-Windows. 2021-10-29 20:25:42 +02:00
Glenn Morris
502a00b8b9 Merge from origin/emacs-28
7e2b973d60 * lisp/textmodes/text-mode.el (text-mode-context-menu): Re...
da6d889e90 ; * etc/NEWS: Use active voice for 'repeat-mode', etc.
e3171e7e86 Allow automatic use of color fonts for emoji on macOS

# Conflicts:
#	etc/NEWS
2021-10-29 09:19:51 -07:00
Stefan Kangas
288e8bba81 Prefer giflib 5 macros to magic numbers
* src/image.c (DISPOSAL_UNSPECIFIED, DISPOSE_DO_NOT)
(DISPOSE_BACKGROUND, DISPOSE_PREVIOUS, NO_TRANSPARENT_COLOR)
[GIFLIB_MAJOR < 5]: Macro defined (for old versions of giflib).
(gif_load): Replace magic numbers with giflib 5 macros for disposal
and transparency_color_index.
2021-10-29 17:44:29 +02:00
Stefan Kangas
f9282e1d72 Don't parse GCB block by hand with giflib 5 or later
* src/image.c (gif_load): If GIFLIB_MAJOR > 5, use
DGifSavedExtensionToGCB instead of parsing the Graphic Control
Extension block by hand.
2021-10-29 17:44:23 +02:00
Stefan Kangas
6523df43e6 * src/image.c (gif_load): Minor simplification. 2021-10-29 15:07:29 +02:00
Eli Zaretskii
aaed8d4a81 Fix bootstrapping broken by a recent change
* src/keymap.c (Flookup_key): Avoid crashes during bootstrap when
uni-lowercase.el is not available yet.
2021-10-29 09:23:54 +03:00
Stefan Kangas
2671ea0de8 Be more allowing when looking for menu-bar items
* src/keymap.c (lookup_key_1): Factor out function from
Flookup_key.
(Flookup_key): Be case insensitive, and treat spaces as dashes,
when looking for Qmenu_bar items.  (Bug#50752)

* test/src/keymap-tests.el
(keymap-lookup-key/mixed-case)
(keymap-lookup-key/mixed-case-multibyte)
(keymap-lookup-keymap/with-spaces)
(keymap-lookup-keymap/with-spaces-multibyte)
(keymap-lookup-keymap/with-spaces-multibyte-lang-env): New tests.
2021-10-28 22:21:16 +02:00
Eli Zaretskii
64cc31b5c8 ; * src/keyboard.c (readable_events): Fix a thinko. 2021-10-28 21:19:34 +03: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
Eli Zaretskii
802e9b1b45 Ignore more events in input-pending-p
* src/keyboard.c (readable_events)
(kbd_buffer_store_buffered_event): Use 'is_ignored_event' to
decide whether the input event is to be ignored.
(is_ignored_event): New function.
(syms_of_keyboard) <input-pending-p-filter-events>: New variable.
Patch from Aaron Jensen <aaronjensen@gmail.com>.
2021-10-28 18:47: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
Stefan Monnier
c22b735f0c (string-pixel-width): Rewrite to avoid side effects
* src/xdisp.c (Fwindow_text_pixel_size): Allow `window` to be a buffer.
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify accordingly.
2021-10-27 14:03:43 -04: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
Eli Zaretskii
65cd2d90b7 ; * src/atimer.c (init_atimer): Fix a typo in a comment. 2021-10-27 16:14:55 +03:00
Lars Ingebrigtsen
4107549a61 Always start the SIGALRM atimers
* src/atimer.c (init_atimer): Always start the SIGALRM alarms,
even if we're using timerfd (bug#19776).  See long, long
discussion in the bug report for why this is necessary.
2021-10-27 14:58:08 +02:00
Lars Ingebrigtsen
14d835a298 Redisplay after changing to the hourglass mouse pointer
* src/xterm.c (x_show_hourglass): Do a redisplay after changing to
the hourglass pointer -- otherwise it won't be displayed until a
keyboard/mouse event arrives (bug#19776).
2021-10-27 14:56:50 +02:00
Glenn Morris
f2dfe1e780 Merge from origin/emacs-28
817c929eda Doc fix for concat
3eca2ad2a1 * lisp/image-dired.el (image-dired-external-viewer): Suppo...
2021-10-25 09:34:37 -07:00
Lars Ingebrigtsen
8c73e6b0f9 Heed the EMACS_IGNORE_TIMERFD environment variable
* src/emacs.c (main): Call init_atimer after setting up the
environment so that the EMACS_IGNORE_TIMERFD environment variable
is actually heeded.
2021-10-25 16:49:48 +02:00
Lars Ingebrigtsen
83f1e4b3bc Fix issues with type casting in delayed message functions
* src/eval.c (with_delayed_message_display)
(with_delayed_message_cancel, Ffuncall_with_delayed_message): Fix
some type confusion.
2021-10-25 02:19:44 +02:00
Lars Ingebrigtsen
ea036e6f8d Remove debugging in with_delayed_message_display
* src/eval.c (with_delayed_message_display): Remove debugging.
2021-10-24 23:04:31 +02:00
Lars Ingebrigtsen
c2055d41b4 Add new macro `with-delayed-message'
* doc/lispref/display.texi (Progress): Document it.
* lisp/subr.el (with-delayed-message): New macro.

* src/eval.c (with_delayed_message_display)
(with_delayed_message_cancel): Helper functions.
(Ffuncall_with_delayed_message): New function (bug#19776).
2021-10-24 22:21:19 +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
Glenn Morris
b931e11a03 Merge from origin/emacs-28
c7f53824a8 (origin/emacs-28) Update publicsuffix.txt from upstream
9a50f760e9 ; * doc/lispref/modes.texi (Hooks): Clarify wording.  (Bug...
e154fd9119 Refer to the info node on keymaps in map-keymap docstring
4fd5c8df67 Clarify abnormal hook documentation
6fa5206770 Update to Org 9.5-59-g52e6f1
39413a45bf ; * doc/lispref/functions.texi (Calling Functions): Fix la...
43914ab01f Improve documentation of cl-reduce
ef37a86cac Improve documentation of apply-partially
1e8be48738 Fix typos
8c5fbd712b Revert commit 225ca617b7, and apply another fix
cdbd03345d Fix documentation of posn-at-x-y
598732c899 ; * src/vm-limit.c (get_lim_data): Fix a typo.  (Bug#18238)
efdffd86c5 ; * etc/refcards/README: Prefer HTTPS in link.

# Conflicts:
#	etc/NEWS
2021-10-24 01:55:45 -07: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
Stefan Kangas
0170e6d0e8 * src/image.c (webp_load): Fix thinkos. 2021-10-23 02:46:06 +02:00
Eli Zaretskii
2bffa0189d Fix WebP support on MS-Windows
* src/image.c (WebPDecodeRGBA, WebPDecodeRGB, WebPFree): Use
correct names and argument lists in DEF_DLL_FN; fix typos.
(WebPGetFeaturesInternal): Load this instead of WebPGetFeatures,
which is a static inline function in webp/decode.h.
(WebPGetFeatures): Redirect to call WebPGetFeaturesInternal.

* lisp/term/w32-win.el (dynamic-library-alist): Fix the name of
the WebP symbol.

* configure.ac (HAVE_WEBP): Fix detection of libwebp on MinGW.

* nt/INSTALL.W64:
* nt/INSTALL: Update information about libwebp availability.
2021-10-22 15:41:00 +03:00
Stefan Kangas
bc2a5c1127 Add WebP image format support (Bug#51296)
* configure.ac (--with-webp): New option.
(HAVE_WEBP): New variable.
(emacs_config_features): Add webp.
* src/image.c (enum webp_keyword_index) [HAVE_WEBP]: New enum.
(webp_format) [HAVE_WEBP]: New variable.
(webp_image_p, init_webp_functions, webp_load) [HAVE_WEBP]: New
functions for WebP support.
(image_types) [HAVE_WEBP]: Define WebP format.
(syms_of_image) <Qwebp> [HAVE_WEBP]: New DEFSYM.  Add image type Qwebp.
* src/Makefile.in (LIBIMAGE): Add WEBP_LIBS.

* lisp/files.el (auto-mode-alist):
* lisp/image-file.el (image-file-name-extensions):
* lisp/image.el (image-type-header-regexps)
(image-type-file-name-regexps, image-type-auto-detectable): Add WebP
support.
* lisp/term/w32-win.el (dynamic-library-alist): Add the libwebp DLL.

* INSTALL:
* admin/CPP-DEFINES:
* doc/lispref/display.texi (Image Formats, Other Image Types):
* nt/INSTALL: Document WebP support.

* test/lisp/image-tests.el (image-find-image)
(image-type-from-file-name): Expand tests.
* test/src/image-tests.el (image-tests--files): Add WebP.
(image-tests-image-size/webp, image-tests-image-mask-p/webp)
(image-tests-image-metadata/webp): New tests.
* test/data/image/black.webp: New file.
2021-10-22 10:59:01 +02:00
Martin Rudalics
938f10c601 In 'window-text-pixel-size' use actual mode line heights if wanted (Bug#38181)
* src/xdisp.c (Fwindow_text_pixel_size): Run display_mode_line
when MODE_LINES wants it to take actual mode line heights into
account (Bug#38181).
2021-10-22 10:34:49 +02:00
Lars Ingebrigtsen
2260d01f4d Actually fix the Pango build problem
* src/gtkutil.c (xg_weight_to_symbol): Don't break the build on
older systems.
2021-10-21 17:24:00 +02:00
Glenn Morris
bd7b5f72a9 Merge from origin/emacs-28
0545c70c16 (origin/emacs-28) ; * src/keyboard.c (readable_events): Ad...
805ed8d318 Fix todo-mode AOT test failures (bug#51308)
8f42ff31f6 Fix hi-lock AOT test failures (bug#51308)
8002fcd4b9 Fix socks test
4540130312 ; Fix typo
59df93e2dd * lisp/help.el (help--analyze-key): Add new arg BUFFER (bu...
cb8b12b56d Improve docstrings and NEWS item of 'repeat-mode'
06fe499614 * lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#512...
8358da9c4c Display a tab bar item as sunken when appropriate
29fdc65860 Fix tab bar item highlight when a mouse click is dropped
7236592668 Refer to mouse-highlight from make-pointer-invisible docst...
cf4394a397 * etc/PROBLEMS: Add hex codepoint for NO-BREAK SPACE
2d647e88fa Describe how to debug fontconfig issues
c916040921 Adapt Tramp tests
1bb14f93f1 Convert ANSI color definitions in themes to use faces (e.g...
8e7cd29712 Revert "Revert back to using ESC as viper-ESC-key again"
91d71b38a3 Fix inset rectangle corners when sides aren't drawn (bug#5...
5c1a575ef4 Don't use color escape sequences in vc-git-expanded-log-entry
d7f595cc89 Code cleanup in tramp-tests.el
548a5db611 ; etc/NEWS fix wording

# Conflicts:
#	etc/NEWS
2021-10-21 08:02:57 -07:00
Lars Ingebrigtsen
a4c232effc Fix build on systems with older Pango versions
* src/gtkutil.c (xg_weight_to_symbol): Don't break the build on
older systems.
2021-10-21 15:07:08 +02:00
Lars Ingebrigtsen
aa9bbf5446 Fix bold/black in w32_to_fc_weight
* src/w32font.c (w32_to_fc_weight): Use symbols.
2021-10-21 14:36:50 +02:00
Eli Zaretskii
0545c70c16 ; * src/keyboard.c (readable_events): Add a comment. 2021-10-21 10:53:20 +03:00
Lars Ingebrigtsen
65fd3ca84f Support the "medium" font weight
* lisp/faces.el (set-face-attribute): Mention new font weights in
doc string.
* src/font.c (struct table_entry): Allow more synonyms.
(weight_table): Expand to support separating medium and normal
weights.  Also add heavy/ultra-heavy and some other variants.
(font_parse_fcname): Support more names.

* src/gtkutil.c (xg_weight_to_symbol): Support all the Pango weights.
(xg_style_to_symbol): Make into functions.
(xg_get_font): Adjust.

* src/w32font.c (w32_to_fc_weight): Use symbols.

* src/xfaces.c (syms_of_xfaces): Add the new symbols.
2021-10-21 04:30:02 +02: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