]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoAdd highlighting of the F2008 keyword "impure"
Lars Ingebrigtsen [Sun, 31 Oct 2021 16:23:19 +0000 (17:23 +0100)]
Add highlighting of the F2008 keyword "impure"

* lisp/progmodes/f90.el (f90-keywords-re): Highlight F2008 keyword
"impure" (bug#51529).

3 years ago; * src/font.c (Ffont_has_char_p): Minor stylistic changes; doc fix.
Eli Zaretskii [Sun, 31 Oct 2021 16:12:03 +0000 (18:12 +0200)]
; * src/font.c (Ffont_has_char_p): Minor stylistic changes; doc fix.

3 years agoAdd new function 'font-has-char-p'
Lars Ingebrigtsen [Sun, 31 Oct 2021 15:58:16 +0000 (16:58 +0100)]
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.

3 years agoAdd test for Bug#51527
Stefan Kangas [Sun, 31 Oct 2021 15:46:06 +0000 (16:46 +0100)]
Add test for Bug#51527

* test/src/keymap-tests.el (keymap-lookup-key/menu-non-symbol):
New test.

3 years agoeieio-core.el: Make slot-value work on defstructs
Stefan Monnier [Sun, 31 Oct 2021 14:57:44 +0000 (10:57 -0400)]
eieio-core.el: Make slot-value work on defstructs

Adjust the values in EIEIO's index-tables so they are compatible with those
of defstructs.

* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the
`eieio--object-num-slots` offset.
(eieio-defclass-internal): Add the `eieio--object-num-slots` offset
here instead.
(eieio-oref): Allow its use on `cl-structure-object`.

* lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table):
Don't need to add the `eieio--object-num-slots` offset.

* doc/misc/eieio.texi (Accessing Slots, Accessing Slots):
Mention the use on structs.

* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.

3 years agoExpand the kbd-valid-p doc string
Lars Ingebrigtsen [Sun, 31 Oct 2021 14:56:37 +0000 (15:56 +0100)]
Expand the kbd-valid-p doc string

* lisp/subr.el (kbd-valid-p): Expand the doc string.

3 years agoAvoid signaling errors in lookup-key
Eli Zaretskii [Sun, 31 Oct 2021 14:16:38 +0000 (16:16 +0200)]
Avoid signaling errors in lookup-key

* src/keymap.c (Flookup_key): Handle KEY vectors where not all
components are symbols.  (Bug#51527

3 years agoEnsure help echoes only occur once on NS
Alan Third [Sun, 31 Oct 2021 10:25:15 +0000 (10:25 +0000)]
Ensure help echoes only occur once on NS

* src/nsterm.m ([EmacsView windowDidResignKey:]): Reset
any_help_event_p as it is never reset otherwise.

3 years agoMerge from origin/emacs-28
Eli Zaretskii [Sun, 31 Oct 2021 07:58:55 +0000 (03:58 -0400)]
Merge from origin/emacs-28

335a660b4b Fix display glitches with side-by-side windows on TTY frames
4a96f32def Avoid replacing common prefix with ellipsis

3 years agoFix display glitches with side-by-side windows on TTY frames
Eli Zaretskii [Sun, 31 Oct 2021 07:42:09 +0000 (09:42 +0200)]
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)

3 years agoRemove workaround for fixed Bug#6581 from ert
Stefan Kangas [Thu, 21 Oct 2021 17:53:00 +0000 (19:53 +0200)]
Remove workaround for fixed Bug#6581 from ert

* lisp/emacs-lisp/ert.el (ert-equal-including-properties): Make
into obsolete function alias for 'equal-including-properties'.
* test/src/editfns-tests.el (format-properties):
* test/lisp/emacs-lisp/ert-x-tests.el (ert-propertized-string)
(ert-test-run-tests-interactively-2): Don't use above obsolete
name.

(ert--explain-equal-including-properties-rec): New function.
(ert--explain-equal-including-properties): Use as an explainer for
'equal-including-properties' now that Bug#6581 is fixed.

* test/lisp/emacs-lisp/ert-tests.el
(ert-test-explain-equal-string-properties): Expand test.
(ert-test-equal-including-properties): Merge test into above
expanded test.

3 years agoFix bug with string values in equal-including-properties
Stefan Kangas [Wed, 20 Oct 2021 12:16:07 +0000 (14:16 +0200)]
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.

3 years agoUse primes for hash table bucket sizes
Stefan Kangas [Sat, 30 Oct 2021 18:11:16 +0000 (20:11 +0200)]
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.

3 years agoMove the documentation of 'string-glyph-split' to proper place
Eli Zaretskii [Sat, 30 Oct 2021 17:29:40 +0000 (20:29 +0300)]
Move the documentation of 'string-glyph-split' to proper place

* doc/lispref/strings.texi (Creating Strings): Move the
description of 'string-glyph-split' from here...
* doc/lispref/display.texi (Size of Displayed Text): ...to here.

3 years agoAvoid replacing common prefix with ellipsis
Carlos Pita [Fri, 15 Oct 2021 00:48:43 +0000 (21:48 -0300)]
Avoid replacing common prefix with ellipsis

* lisp/progmodes/python.el
(python-shell-completion-native-setup): Configure readline not to
suppress common prefixes.  (Bug#51218)

3 years agoExpand connection-local variables example in doc/emacs/custom.texi
Jim Porter [Sat, 30 Oct 2021 15:40:18 +0000 (17:40 +0200)]
Expand connection-local variables example in doc/emacs/custom.texi

* doc/emacs/custom.texi (Per-Connection Local Variables): Expand the
example to include setting 'system-uses-terminfo'.

3 years agoMake list-colors-display sort list passed as argument
dalanicolai [Sat, 30 Oct 2021 15:32:17 +0000 (17:32 +0200)]
Make list-colors-display sort list passed as argument

* lisp/facemenu.el (list-colors-display): Don't skip sorting list of
colors if it was passed as an argument.  (Bug#51371)

3 years agoAdd new function string-glyph-split
Lars Ingebrigtsen [Sat, 30 Oct 2021 13:22:36 +0000 (15:22 +0200)]
Add new function string-glyph-split

* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/shortdoc.el (string): Mention it.

* lisp/emacs-lisp/subr-x.el (string-glyph-split): New function.

3 years agoAvoid fonts with incomplete coverage of MATHEMATICAL chars
Kévin Le Gouguec [Sat, 30 Oct 2021 12:44:01 +0000 (14:44 +0200)]
Avoid fonts with incomplete coverage of MATHEMATICAL chars

* lisp/international/fontset.el (setup-default-fontset): Include both
ends of each sub-range in 'script-representative-chars' (bug#51495).

Some fonts include glyphs for MATHEMATICAL SCRIPT CAPITAL codepoints
(#x1D49C-#x1D4B5) but not for MATHEMATICAL SCRIPT SMALL codepoints
(#x1D4B6-#x1D4CF), see e.g. KpMath[1].

'script-representative-chars' must thus include both CAPITAL and SMALL
codepoints to ensure that we filter those fonts out.

Bug#51495; discussed in help-gnu-emacs[2].

[1] https://mirrors.ctan.org/fonts/kpfonts-otf/doc/unimath-kpfonts.pdf

[2] <878s02u5m6.fsf@gmail.com>
    https://lists.gnu.org/archive/html/help-gnu-emacs/2021-09/msg00150.html

3 years ago; * doc/emacs/msdos.texi (Windows Misc): Fix typos.
Eli Zaretskii [Sat, 30 Oct 2021 10:25:46 +0000 (13:25 +0300)]
; * doc/emacs/msdos.texi (Windows Misc): Fix typos.

3 years agoMinor fixes for previous change
Eli Zaretskii [Sat, 30 Oct 2021 10:22:57 +0000 (13:22 +0300)]
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.

3 years agoSupport system dark mode on Windows 10 version 1809 and higher
Vince Salvino [Wed, 27 Oct 2021 21:32:09 +0000 (17:32 -0400)]
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.

3 years agoMerge from origin/emacs-28
Eli Zaretskii [Sat, 30 Oct 2021 08:07:09 +0000 (04:07 -0400)]
Merge from origin/emacs-28

20ebd91a73 Improve documentation of string truncation APIs
3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo.  (Bug#51488)

3 years agoImprove documentation of string truncation APIs
Eli Zaretskii [Sat, 30 Oct 2021 07:26:38 +0000 (10:26 +0300)]
Improve documentation of string truncation APIs

* doc/lispref/display.texi (Size of Displayed Text):
* lisp/international/mule-util.el (truncate-string-to-width):
Document caveats of using 'truncate-string-to-width' when
character composition is involved.

* lisp/emacs-lisp/subr-x.el (string-limit):
* doc/lispref/strings.texi (Creating Strings): Improve the
documentation of 'string-limit'.

3 years ago; Fix a recent change in image.c
Eli Zaretskii [Fri, 29 Oct 2021 19:07:27 +0000 (22:07 +0300)]
; Fix a recent change in image.c

* src/image.c (DGifSavedExtensionToGCB): Define only for GIFLIB >= 5.

3 years ago* src/image.c: Fix building with giflib on MS-Windows.
Stefan Kangas [Fri, 29 Oct 2021 18:20:46 +0000 (20:20 +0200)]
* src/image.c: Fix building with giflib on MS-Windows.

3 years ago* lisp/textmodes/css-mode.el: Fix typo. (Bug#51488)
Imran Khan [Fri, 29 Oct 2021 16:07:16 +0000 (16:07 +0000)]
* lisp/textmodes/css-mode.el: Fix typo.  (Bug#51488)

Copyright-paperwork-exempt: yes

3 years ago; Merge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
; Merge from origin/emacs-28

The following commit was skipped:

986fe634e2 (origin/emacs-28) Make message/rfc822 on buttons work agai...

3 years agoMerge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
Merge from origin/emacs-28

52e7049b58 * lisp/loadup.el: Unbreak build.
91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el
00103154e0 Some Tramp changes, mainly in tramp-tests.el

3 years ago; Merge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
; Merge from origin/emacs-28

The following commit was skipped:

9436943fb1 ; * doc/emacs/custom.texi (Connection Variables): Fix typo...

3 years agoMerge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
Merge from origin/emacs-28

08de838531 ; Improve commentary in the last change
3da9fa875b Make hieroglyphs display correctly with existing fonts
928e05f2d6 Clarify "default face attributes" in the ELisp manual
5dbb04e0eb Make `C-u RET' work again
d72fefdeab Fix typos in the manual and in a comment

3 years ago; Merge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
; Merge from origin/emacs-28

The following commit was skipped:

bea843dee1 Avoid assertion violations in 'lookup-key'

3 years agoMerge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
Merge from origin/emacs-28

f52fa1c150 image-dired: Unreverse accidentally reversed menus

# Conflicts:
# lisp/image-dired.el

3 years ago; Merge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:19:51 +0000 (09:19 -0700)]
; Merge from origin/emacs-28

The following commit was skipped:

0f8417d597 Be more allowing when looking for menu-bar items

3 years agoMerge from origin/emacs-28
Glenn Morris [Fri, 29 Oct 2021 16:19:51 +0000 (09:19 -0700)]
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

3 years agoMake message/rfc822 on buttons work again in Gnus
Lars Ingebrigtsen [Fri, 29 Oct 2021 16:08:12 +0000 (18:08 +0200)]
Make message/rfc822 on buttons work again in Gnus

* lisp/gnus/gnus-art.el (gnus-article-mode): Set
mm-inline-message-prepare-function buffer-locally so that it works
both when inlining rfc822 and hitting the MIME button (bug#51388).
(gnus-mime--inline-message): Factor out into own function.
(gnus-mime-display-single): From here.

3 years agoPrefer giflib 5 macros to magic numbers
Stefan Kangas [Fri, 29 Oct 2021 15:44:29 +0000 (17:44 +0200)]
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.

3 years agoDon't parse GCB block by hand with giflib 5 or later
Stefan Kangas [Fri, 29 Oct 2021 15:11:23 +0000 (17:11 +0200)]
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.

3 years ago* lisp/loadup.el: Unbreak build.
Glenn Morris [Fri, 29 Oct 2021 15:41:11 +0000 (16:41 +0100)]
* lisp/loadup.el: Unbreak build.

3 years agoMake message/rfc822 on buttons work again in Gnus
Lars Ingebrigtsen [Fri, 29 Oct 2021 15:26:53 +0000 (17:26 +0200)]
Make message/rfc822 on buttons work again in Gnus

* lisp/gnus/gnus-art.el (gnus-article-mode): Set
mm-inline-message-prepare-function buffer-locally so that it works
both when inlining rfc822 and hitting the MIME button (bug#51388).
(gnus-mime--inline-message): Factor out into own function.
(gnus-mime-display-single): From here.

3 years agoAdd some gnus-short-group-name tests
Morgan J. Smith [Fri, 29 Oct 2021 13:30:10 +0000 (15:30 +0200)]
Add some gnus-short-group-name tests

* test/lisp/gnus/gnus-group-tests.el (gnus-short-group-name): Add
some gnus-short-group-name tests (bug#51450).

3 years agoShorten Gnus groups with [foo] in the name better
Lars Ingebrigtsen [Fri, 29 Oct 2021 13:29:17 +0000 (15:29 +0200)]
Shorten Gnus groups with [foo] in the name better

* lisp/gnus/gnus.el (gnus-short-group-name): Shorten groups with
[] in the names better (bug#51450).

3 years ago* src/image.c (gif_load): Minor simplification.
Stefan Kangas [Fri, 29 Oct 2021 13:07:29 +0000 (15:07 +0200)]
* src/image.c (gif_load): Minor simplification.

3 years agoMove lisp/shorthands.el to lisp/emacs-lisp/shorthands.el
Lars Ingebrigtsen [Fri, 29 Oct 2021 12:37:08 +0000 (14:37 +0200)]
Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el

3 years agoSome Tramp changes, mainly in tramp-tests.el
Michael Albinus [Fri, 29 Oct 2021 12:06:47 +0000 (14:06 +0200)]
Some Tramp changes, mainly in tramp-tests.el

* doc/misc/tramp.texi (External packages): Don't use Tramp internals.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted):
Protect `tramp-make-tramp-file-name' call.

* lisp/net/tramp.el (tramp-make-tramp-file-name): Set advertised
calling conventions.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Adapt test.
(tramp--test-supports-processes-p): New defun.
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
(tramp-test44-asynchronous-requests): Use it.

3 years ago; * doc/emacs/custom.texi (Connection Variables): Fix typo. Don't merge
Michael Albinus [Fri, 29 Oct 2021 12:05:36 +0000 (14:05 +0200)]
; * doc/emacs/custom.texi (Connection Variables): Fix typo.  Don't merge

3 years ago; Improve commentary in the last change
Eli Zaretskii [Fri, 29 Oct 2021 07:41:33 +0000 (10:41 +0300)]
; Improve commentary in the last change

* lisp/language/misc-lang.el: Minor copyedits of the commentary
regarding Egyptian hieroglyph support.

3 years agoMake hieroglyphs display correctly with existing fonts
Gregory Heytings [Thu, 28 Oct 2021 20:58:02 +0000 (20:58 +0000)]
Make hieroglyphs display correctly with existing fonts

* etc/HELLO: Remove hieroglyph format control characters.

* lisp/language/misc-lang.el: Add a rule to compose Egyptian
hieroglyphs even without Unicode format control characters.

3 years agoClarify "default face attributes" in the ELisp manual
Eli Zaretskii [Fri, 29 Oct 2021 07:10:01 +0000 (10:10 +0300)]
Clarify "default face attributes" in the ELisp manual

* doc/lispref/display.texi (Defining Faces): Add index entries for
face symbol properties.
(Attribute Functions): Clarify "default face attribute values" wrt
'face-all-attributes' and 'face-attribute'.  (Bug#51465)

3 years agoFix bootstrapping broken by a recent change
Eli Zaretskii [Fri, 29 Oct 2021 06:23:54 +0000 (09:23 +0300)]
Fix bootstrapping broken by a recent change

* src/keymap.c (Flookup_key): Avoid crashes during bootstrap when
uni-lowercase.el is not available yet.

3 years agoIndent cl-flet-like forms correctly in incomplete expressions
akater [Thu, 28 Oct 2021 21:53:11 +0000 (23:53 +0200)]
Indent cl-flet-like forms correctly in incomplete expressions

* lisp/emacs-lisp/lisp-mode.el
(lisp--local-defform-body-p): Support incomplete sexps

* test/lisp/progmodes/elisp-mode-resources/flet.erts:
Add tests for incomplete sexps (bug#9622).

3 years agoMake `C-u RET' work again
Lars Ingebrigtsen [Thu, 28 Oct 2021 21:38:29 +0000 (23:38 +0200)]
Make `C-u RET' work again

* lisp/simple.el (newline): Fix regression introduced by
d1aacceae9 (bug#51459).

3 years agoFix typos in the manual and in a comment
Jan Synacek [Thu, 28 Oct 2021 21:32:59 +0000 (23:32 +0200)]
Fix typos in the manual and in a comment

* lisp/minibuffer.el (completion-pcm--hilit-commonality):
* doc/lispintro/emacs-lisp-intro.texi (Mode Line): Fix typos
(bug#51434).

Copyright-paperwork-exempt: yes

3 years agoBe more allowing when looking for menu-bar items
Stefan Kangas [Tue, 12 Oct 2021 22:04:23 +0000 (00:04 +0200)]
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.

3 years ago; * src/keyboard.c (readable_events): Fix a thinko.
Eli Zaretskii [Thu, 28 Oct 2021 18:19:34 +0000 (21:19 +0300)]
; * src/keyboard.c (readable_events): Fix a thinko.

3 years agoAvoid assertion violations in 'lookup-key'
Eli Zaretskii [Thu, 28 Oct 2021 17:52:41 +0000 (20:52 +0300)]
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.

3 years agoPut missing c-keep-region-active's into the source code
Alan Mackenzie [Thu, 28 Oct 2021 17:04:06 +0000 (17:04 +0000)]
Put missing c-keep-region-active's into the source code

* lisp/progmodes/cc-cmds.el (c-beginning-of-defun): Insert
c-keep-region-active when (< arg 0).
(c-forward-conditional): Insert c-keep-region-active.

3 years agoMake comint-term-environment connection-aware (bug#51426)
Jim Porter [Thu, 28 Oct 2021 16:44:39 +0000 (18:44 +0200)]
Make comint-term-environment connection-aware (bug#51426)

* lisp/comint.el (comint-term-environment): Make it connection-aware.

* doc/emacs/misc.texi (Shell Options): Document the above change, and
explain how this interacts with 'system-uses-terminfo'.

* etc/NEWS: Announce the above change.

3 years agoIgnore more events in input-pending-p
Eli Zaretskii [Thu, 28 Oct 2021 15:47:41 +0000 (18:47 +0300)]
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>.

3 years agoimage-dired: Unreverse accidentally reversed menus
Stefan Kangas [Thu, 28 Oct 2021 10:54:07 +0000 (12:54 +0200)]
image-dired: Unreverse accidentally reversed menus

* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
In Emacs 26.1 (commits b905454680c7 and bed0373855ea), the menus were
converted to use 'easy-menu-define', but they were reversed in the
process.  Unreverse the menus.  (Bug#51446)

3 years agoBe more allowing when looking for menu-bar items
Stefan Kangas [Thu, 28 Oct 2021 10:30:42 +0000 (12:30 +0200)]
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.

3 years agoDo interactive mode tagging in image-dired.el
Stefan Kangas [Thu, 28 Oct 2021 00:10:09 +0000 (02:10 +0200)]
Do interactive mode tagging in image-dired.el

* lisp/image-dired.el (image-dired-restore-window-configuration)
(image-dired-next-line, image-dired-previous-line)
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-jump-original-dired-buffer)
(image-dired-delete-char, image-dired-refresh-thumb)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Do interactive
tagging; these will only work in 'image-dired-thumbnail-mode'.

3 years agoimage-dired: Make thumbnail rotation commands obsolete
Stefan Kangas [Wed, 27 Oct 2021 23:59:01 +0000 (01:59 +0200)]
image-dired: Make thumbnail rotation commands obsolete

* lisp/image-dired.el (image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options)
(image-dired-rotate-thumbnail)
(image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right): Make obsolete in favor of
'image-dired-refresh-thumb' and 'image-rotate'.  It makes no sense to
have destructive thumbnail rotation commands now that Emacs can rotate
thumbnails in memory, and it is very fast to just generate a new one
reflecting the rotation of the original.
(image-dired-thumbnail-mode-map): Remove menu entries and key bindings
for above obsolete commands.  The rotate right keybinding had already
been made ineffective by the local keymap added by 'insert-image'.

3 years ago; * lisp/image-dired.el: Be more consistent with spelling.
Stefan Kangas [Wed, 27 Oct 2021 20:10:04 +0000 (22:10 +0200)]
; * lisp/image-dired.el: Be more consistent with spelling.

3 years agoimage-dired: Don't show thumbnails if there are no image files
Stefan Kangas [Wed, 27 Oct 2021 19:04:10 +0000 (21:04 +0200)]
image-dired: Don't show thumbnails if there are no image files

* lisp/image-dired.el (image-dired-show-all-from-dir): Don't show
thumbnail buffer if there are no image files.

3 years agoIncrease image-dired-show-all-from-dir-max-files to 500
Stefan Kangas [Wed, 27 Oct 2021 18:39:10 +0000 (20:39 +0200)]
Increase image-dired-show-all-from-dir-max-files to 500

* lisp/image-dired.el (image-dired-show-all-from-dir-max-files):
Increase default to 500 to ask for confirmation much less frequently.
The old value was added before we had asynchronous generation of
thumbnails, when a large number of files would lock up Emacs.  Asking
for confirmation could probably be disabled completely these days, but
let's be conservative and set it to some large number of files for
which some users might want to see a prompt.  It can't hurt.
(image-dired-show-all-from-dir): Never warn if above variable is nil.
(image-dired-bookmark-jump): Let-bind above variable to nil instead of
'most-positive-fixnum'.
* doc/emacs/dired.texi (Image-Dired): Don't mention the above
variable, as it is no longer important enough to deserve the space.
* etc/NEWS: Announce the above change.

3 years ago(string-pixel-width): Rewrite to avoid side effects
Stefan Monnier [Wed, 27 Oct 2021 18:03:43 +0000 (14:03 -0400)]
(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.

3 years ago* lisp/textmodes/text-mode.el (text-mode-context-menu): Rename recently added.
Juri Linkov [Wed, 27 Oct 2021 17:32:23 +0000 (20:32 +0300)]
* lisp/textmodes/text-mode.el (text-mode-context-menu): Rename recently added.

3 years ago; * etc/NEWS: Use active voice for 'repeat-mode', etc.
Juri Linkov [Wed, 27 Oct 2021 17:30:59 +0000 (20:30 +0300)]
; * etc/NEWS: Use active voice for 'repeat-mode', etc.

3 years agoAllow automatic use of color fonts for emoji on macOS
Robert Pluim [Wed, 27 Oct 2021 16:46:45 +0000 (18:46 +0200)]
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.

3 years agoRevert "Add tentative key bindings for the three emoji commands"
Lars Ingebrigtsen [Wed, 27 Oct 2021 15:49:30 +0000 (17:49 +0200)]
Revert "Add tentative key bindings for the three emoji commands"

This reverts commit e678067cb5c4a642ef3fab1cc5046a34a4ae35d1.

Applied to the wrong branch.

3 years agoAdd tentative key bindings for the three emoji commands
Lars Ingebrigtsen [Wed, 27 Oct 2021 15:48:20 +0000 (17:48 +0200)]
Add tentative key bindings for the three emoji commands

3 years agoMerge from origin/emacs-28
Glenn Morris [Wed, 27 Oct 2021 14:59:28 +0000 (07:59 -0700)]
Merge from origin/emacs-28

2bdd5732aa (origin/emacs-28) ; * etc/NEWS: Fix last change.
492b927909 Fix help commands for menu-bar menus
9589be772d ; * etc/NEWS: Fix typos.
d353fc4a00 ; Explain why "kinds of atom" isn't a typo
47a3750162 ; * etc/NEWS: Improve wording of the Emoji entry.
b814712796 ; Checkdoc fixes in image-dired.el
e45b3fc521 Improve function documentation with text from XDG BDS spec
284c77eeb6 * lisp/transient.el: Update to package version 0.3.7.
40400e6977 ; Revert parts of "Use string-replace instead of replace-r...
214c2e268c ; Revert parts of "Use string-search instead of string-mat...

# Conflicts:
# etc/NEWS

3 years agoSimplify string-pixel-width
Lars Ingebrigtsen [Wed, 27 Oct 2021 14:50:40 +0000 (16:50 +0200)]
Simplify string-pixel-width

* lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify --
save-window-excursion saves dedication status (and the code was
buggy).

3 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Wed, 27 Oct 2021 14:13:59 +0000 (17:13 +0300)]
; * etc/NEWS: Fix last change.

3 years agoFix parsing of erts files
Lars Ingebrigtsen [Wed, 27 Oct 2021 14:13:30 +0000 (16:13 +0200)]
Fix parsing of erts files

* lisp/emacs-lisp/ert.el (ert-test-erts-file): Fix progress
through a test file (bug#51409).

3 years agoHarden ert-resource-directory against errors
Lars Ingebrigtsen [Wed, 27 Oct 2021 14:04:31 +0000 (16:04 +0200)]
Harden ert-resource-directory against errors

* lisp/emacs-lisp/ert-x.el (ert-resource-directory): Be more
resilient -- don't bug out if called from a file that's not
visiting a directory.

3 years agoBe more efficient when checking for a matching client in server.el
Jim Porter [Wed, 27 Oct 2021 13:54:42 +0000 (15:54 +0200)]
Be more efficient when checking for a matching client in server.el

lisp/server.el (server-handle-delete-frame): Use 'seq-some' to
determine if another frame for the current client exists.
(server-kill-emacs-query-function): Use 'seq-some' to determine if
another live client exists (bug#51420).

3 years agoAdd new function 'string-pixel-width'
Lars Ingebrigtsen [Wed, 27 Oct 2021 13:41:18 +0000 (15:41 +0200)]
Add new function 'string-pixel-width'

* doc/lispref/display.texi (Size of Displayed Text): Mention it.
* lisp/emacs-lisp/shortdoc.el (string): Mention it.

* lisp/emacs-lisp/subr-x.el (string-pixel-width): New function.

3 years agoAllow matching non-.git gitlab and gitea URLs in bug-reference
Miha Rihtaršič [Tue, 26 Oct 2021 08:54:54 +0000 (10:54 +0200)]
Allow matching non-.git gitlab and gitea URLs in bug-reference

* lisp/progmodes/bug-reference.el
(bug-reference--build-forge-setup-entry): Allow matching non-.git
gitlab and gitea URLs, with and without slashes (bug#51316).

3 years ago; * src/atimer.c (init_atimer): Fix a typo in a comment.
Eli Zaretskii [Wed, 27 Oct 2021 13:14:55 +0000 (16:14 +0300)]
; * src/atimer.c (init_atimer): Fix a typo in a comment.

3 years agoFix help commands for menu-bar menus
Eli Zaretskii [Wed, 27 Oct 2021 13:09:47 +0000 (16:09 +0300)]
Fix help commands for menu-bar menus

* lisp/help.el (help--analyze-key): Fix "C-h c" and "C-h k" on
menu-bar menu items.  (Bug#51421)

3 years agoAlways start the SIGALRM atimers
Lars Ingebrigtsen [Wed, 27 Oct 2021 12:58:08 +0000 (14:58 +0200)]
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.

3 years agoRedisplay after changing to the hourglass mouse pointer
Lars Ingebrigtsen [Wed, 27 Oct 2021 12:56:50 +0000 (14:56 +0200)]
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).

3 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 27 Oct 2021 12:11:09 +0000 (14:11 +0200)]
; * etc/NEWS: Fix typos.

3 years ago; Explain why "kinds of atom" isn't a typo
Eli Zaretskii [Wed, 27 Oct 2021 11:33:42 +0000 (14:33 +0300)]
; Explain why "kinds of atom" isn't a typo

* doc/lispintro/emacs-lisp-intro.texi (Lisp Atoms): Add a comment
explaining why "kinds of atom" isn't a typo.

3 years ago; * etc/NEWS: Improve wording of the Emoji entry.
Eli Zaretskii [Wed, 27 Oct 2021 11:32:18 +0000 (14:32 +0300)]
; * etc/NEWS: Improve wording of the Emoji entry.

3 years agoimage-dired: Set line-spacing to match horizontal space
Stefan Kangas [Wed, 27 Oct 2021 05:51:35 +0000 (07:51 +0200)]
image-dired: Set line-spacing to match horizontal space

* lisp/image-dired.el (image-dired-thumbnail-mode): Set value of
'line-spacing' to approximately match horizontal space.  This makes
the thumbnail view look better.

3 years ago; * test/lisp/files-tests.el: Fix last commit.
Stefan Kangas [Wed, 27 Oct 2021 05:05:33 +0000 (07:05 +0200)]
; * test/lisp/files-tests.el: Fix last commit.

3 years agoimage-dired: Add support for bookmark.el
Stefan Kangas [Wed, 27 Oct 2021 04:05:39 +0000 (06:05 +0200)]
image-dired: Add support for bookmark.el

* lisp/image-dired.el (image-dired-thumbnail-mode): Add bookmark.el support.
(bookmark-make-record-default, bookmark-prop-get): Declare.
(image-dired-bookmark-name, image-dired-bookmark-make-record)
(image-dired-bookmark-jump): New defuns.

3 years agoAdd test for file-name-base
Stefan Kangas [Wed, 27 Oct 2021 03:34:52 +0000 (05:34 +0200)]
Add test for file-name-base

* test/lisp/files-tests.el (files-tests-file-name-base): New test.

3 years ago; * lisp/image-dired.el: Move obsolete things to "Obsolete" section
Stefan Kangas [Wed, 27 Oct 2021 03:16:05 +0000 (05:16 +0200)]
; * lisp/image-dired.el: Move obsolete things to "Obsolete" section

3 years ago; Checkdoc fixes in image-dired.el
Stefan Kangas [Wed, 27 Oct 2021 02:53:41 +0000 (04:53 +0200)]
; Checkdoc fixes in image-dired.el

3 years agoimage-dired: Improve mouse behaviour
Stefan Kangas [Wed, 27 Oct 2021 02:34:25 +0000 (04:34 +0200)]
image-dired: Improve mouse behaviour

* lisp/image-dired.el (image-dired-thumbnail-mode-map): Improve mouse
behaviour: ignore dragging, as it currently doesn't do anything
useful, and make all clicks just select the thumbnail.
(image-dired-mouse-display-image)
(image-dired-mouse-select-thumbnail): Move point to closest image
after clicking in buffer.

3 years agoimage-dired: Don't ding at beginning or end of buffer
Stefan Kangas [Wed, 27 Oct 2021 01:43:21 +0000 (03:43 +0200)]
image-dired: Don't ding at beginning or end of buffer

* lisp/image-dired.el
(image-dired--display-thumb-properties-fun): New defun.
(image-dired-forward-image, image-dired-backward-image): Don't ding
when moving past first or last image; instead show a message, wait a
second and then show image properties.

3 years agoimage-dired: Add new commands for beginning/end of buffer
Stefan Kangas [Wed, 27 Oct 2021 01:23:49 +0000 (03:23 +0200)]
image-dired: Add new commands for beginning/end of buffer

* lisp/image-dired.el (image-dired-beginning-of-buffer)
(image-dired-end-of-buffer): New commands.
(image-dired-thumbnail-mode-map): Bind new beginning of buffer command
to '<' and 'M-<', and end of buffer command to '>' and 'M->'.

3 years agoAdd new function image-at-point-p
Stefan Kangas [Wed, 27 Oct 2021 01:22:09 +0000 (03:22 +0200)]
Add new function image-at-point-p

* lisp/image.el (image-at-point-p): New defun.
* doc/lispref/display.texi (Showing Images): Document above new defun.

3 years agoimage-dired: Use an evenly spaced grid for thumbnails
Stefan Kangas [Wed, 27 Oct 2021 00:36:57 +0000 (02:36 +0200)]
image-dired: Use an evenly spaced grid for thumbnails

* lisp/image-dired.el (image-dired-line-up): Use an evenly spaced
grid for thumbnails, even if image sizes differ.

3 years ago; * lisp/image-dired.el (image-dired-cmd-pngnq-options): Fix :version.
Stefan Kangas [Wed, 27 Oct 2021 00:07:35 +0000 (02:07 +0200)]
; * lisp/image-dired.el (image-dired-cmd-pngnq-options): Fix :version.

3 years agoimage-dired: Use example.org in examples
Stefan Kangas [Wed, 27 Oct 2021 00:00:24 +0000 (02:00 +0200)]
image-dired: Use example.org in examples

* lisp/image-dired.el (image-dired-gallery-image-root-url)
(image-dired-gallery-thumb-image-root-url): Use example.org to be
RFC 2606 compliant.