]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix precision scrolling inside terminal buffers
Po Lu [Mon, 27 Dec 2021 09:55:23 +0000 (17:55 +0800)]
Fix precision scrolling inside terminal buffers

* lisp/term.el (term-goto-process-mark-maybe): Don't move point
to process mark if the event is a vertical wheel event.

3 years ago* lisp/emacs-list/eieio-compat.el: Really move to obsolete
Stefan Monnier [Mon, 27 Dec 2021 06:57:25 +0000 (01:57 -0500)]
* lisp/emacs-list/eieio-compat.el: Really move to obsolete

3 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 27 Dec 2021 05:32:28 +0000 (06:32 +0100)]
Merge from origin/emacs-28

d4e2850b32 Update to Org 9.5.2-3-geb9f34

3 years ago* src/pgtkterm.c (pgtk_handle_event): Add pinch event support.
Po Lu [Mon, 27 Dec 2021 04:43:11 +0000 (12:43 +0800)]
* src/pgtkterm.c (pgtk_handle_event): Add pinch event support.

3 years agoperl-mode: Recognize "when"/"given" keywords
Stefan Kangas [Mon, 27 Dec 2021 02:07:50 +0000 (03:07 +0100)]
perl-mode: Recognize "when"/"given" keywords

* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-2): Add
keywords "when", "given" and "default".  (Bug#10560)
(perl--syntax-exp-intro-keywords): Add "printf".

* test/manual/indent/perl.perl: Add test for "when"/"given".

3 years agoFix menu window persistence and entry/leave events on Lucid on XI2
Po Lu [Mon, 27 Dec 2021 02:02:39 +0000 (10:02 +0800)]
Fix menu window persistence and entry/leave events on Lucid on XI2

* src/xmenu.c (x_activate_menubar): Always clear the XI2 grab on
Xt.
* src/xterm.c (handle_one_xevent): On XI2, ignore LeaveNotify
events coming from the shell widget and use `x_window_to_frame'
to find the frame when handling XI_Leave events.

3 years agoFix Lucid popup menu being stuck on XI2 builds
Po Lu [Mon, 27 Dec 2021 01:16:18 +0000 (09:16 +0800)]
Fix Lucid popup menu being stuck on XI2 builds

* src/xmenu.c (x_activate_menubar): Make some changes
conditional on XI2.
(create_and_show_popup_menu): Clear XI2 grab before showing
popup.
* src/xterm.c (xi_grab_or_ungrab_device): Don't grab device
if popup is activated on Lucid.

3 years agoStore sign separately when accumulating precision scroll momentum
Po Lu [Mon, 27 Dec 2021 01:02:20 +0000 (09:02 +0800)]
Store sign separately when accumulating precision scroll momentum

* lisp/pixel-scroll.el (pixel-scroll-kinetic-state): Return
vector in new format.
(pixel-scroll-accumulate-velocity): Use new sign field.

3 years agoUpdate to Org 9.5.2-3-geb9f34
Kyle Meyer [Sun, 26 Dec 2021 21:37:26 +0000 (16:37 -0500)]
Update to Org 9.5.2-3-geb9f34

3 years agoUse defvar-keymap in tests
Stefan Kangas [Sun, 26 Dec 2021 20:52:56 +0000 (21:52 +0100)]
Use defvar-keymap in tests

* test/lisp/button-tests.el (button-tests--map):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap):
* test/lisp/help-tests.el (help-tests-remap-map)
(help-tests-major-mode-map, help-tests-minor-mode-map):
* test/lisp/kmacro-tests.el (kmacro-tests-keymap):
* test/lisp/repeat-tests.el (repeat-tests-map)
(repeat-tests-repeat-map):
* test/src/keymap-tests.el (keymap-tests-minor-mode-map)
(keymap-tests-major-mode-map): Use defvar-keymap.

3 years agoPrefer the defcustom :risky property in gnus
Stefan Kangas [Sun, 26 Dec 2021 16:51:15 +0000 (17:51 +0100)]
Prefer the defcustom :risky property in gnus

* lisp/gnus/gnus-art.el (gnus-button-alist)
(gnus-header-button-alist):
* lisp/gnus/gnus-group.el (gnus-group-highlight)
(gnus-group-icon-list):
* lisp/gnus/gnus-sum.el (gnus-summary-highlight):
* lisp/gnus/mm-util.el (mm-charset-eval-alist): Prefer the
defcustom :risky property to setting 'risky-local-variable
manually.

3 years ago; * lisp/subr.el (define-keymap): Fix typos.
Stefan Kangas [Sun, 26 Dec 2021 16:25:31 +0000 (17:25 +0100)]
; * lisp/subr.el (define-keymap): Fix typos.

3 years agoRewrite disabled-command to use read-multiple-choice
Stefan Kangas [Sun, 26 Dec 2021 15:52:54 +0000 (16:52 +0100)]
Rewrite disabled-command to use read-multiple-choice

* lisp/novice.el (disabled-command-function): Rewrite to use
read-multiple-choice.  Use command substitutions.

3 years agoread-multiple-choice: Display "SPC" instead of " "
Stefan Kangas [Sun, 26 Dec 2021 05:47:15 +0000 (06:47 +0100)]
read-multiple-choice: Display "SPC" instead of " "

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display
of the keys TAB, RET, SPC, DEL, and ESC.  This fixes a bug where " "
was highlighted in the description in a confusing way.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes): Update tests for the
above change.

3 years agoread-multiple-choice: Add optional argument show-help
Stefan Kangas [Sun, 26 Dec 2021 00:27:39 +0000 (01:27 +0100)]
read-multiple-choice: Add optional argument show-help

* lisp/emacs-lisp/rmc.el (rmc--show-help): Factor out new function
from read-multiple-choice.
(read-multiple-choice): Add new optional argument show-help.
* doc/lispref/commands.texi (Reading One Event): Document above new
optional argument.

3 years agoread-multiple-choice: Add face when key not in name string
Stefan Kangas [Sat, 25 Dec 2021 23:45:50 +0000 (00:45 +0100)]
read-multiple-choice: Add face when key not in name string

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face
property also when key is not in the name string.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): Update tests.

3 years agoFactor out new function rmc--add-key-description
Stefan Kangas [Sat, 25 Dec 2021 21:58:59 +0000 (22:58 +0100)]
Factor out new function rmc--add-key-description

* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Factor out
new function from...
(read-multiple-choice): ...here.

* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): New tests.

3 years ago* INSTALL: Document `--with-xinput2'.
Po Lu [Sun, 26 Dec 2021 13:45:33 +0000 (21:45 +0800)]
* INSTALL: Document `--with-xinput2'.

3 years ago; * doc/lispref/commands.texi (Misc Events): Fix wording.
Eli Zaretskii [Sun, 26 Dec 2021 12:21:36 +0000 (14:21 +0200)]
; * doc/lispref/commands.texi (Misc Events): Fix wording.

3 years agoAccumulate deltas in pinch events that were skipped
Po Lu [Sun, 26 Dec 2021 12:07:47 +0000 (20:07 +0800)]
Accumulate deltas in pinch events that were skipped

* src/keyboard.c (kbd_buffer_get_event): Accumulate relative deltas
inside skipped events when coalescing them.

3 years agoClarify situations where pinch events can be sent.
Po Lu [Sun, 26 Dec 2021 11:40:47 +0000 (19:40 +0800)]
Clarify situations where pinch events can be sent.

* doc/lispref/commands.texi (Misc Events): Clarify the
conditions under which pinch events will be sent.

3 years agoCoalesce pinch gestures in the keyboard buffer
Po Lu [Sun, 26 Dec 2021 11:36:18 +0000 (19:36 +0800)]
Coalesce pinch gestures in the keyboard buffer

* src/keyboard.c (kbd_buffer_get_event): Coalesce consecutive
pinch gesture events.

3 years agoDocument the representation of DX and DY in pinch events
Po Lu [Sun, 26 Dec 2021 11:00:33 +0000 (19:00 +0800)]
Document the representation of DX and DY in pinch events

* doc/lispref/commands.texi (Misc Events): Document
the precise meaning of DX and DY in pinch events.

3 years agoDocument some missing commands related to text scaling
Po Lu [Sun, 26 Dec 2021 10:51:48 +0000 (18:51 +0800)]
Document some missing commands related to text scaling

* doc/emacs/display.texi (Text Scale): Document
`text-scale-pinch' and `mouse-wheel-text-scale'.

3 years ago; * doc/lispref/commands.texi (Misc Events): Fix typos and wording.
Eli Zaretskii [Sun, 26 Dec 2021 10:39:33 +0000 (12:39 +0200)]
; * doc/lispref/commands.texi (Misc Events): Fix typos and wording.

3 years agoFix some issues with a recent change
Po Lu [Sun, 26 Dec 2021 10:13:53 +0000 (18:13 +0800)]
Fix some issues with a recent change

* doc/lispref/commands.texi (Misc Events): Improve documentation
on pinch events.
* etc/NEWS: Update documentation status for some recent changes
and describe pinch events in more detail.
* lisp/face-remap.el (text-scale-pinch): Prevent pinch events
from being received in too quick succession.

3 years ago; Fix last change: use 'utf-8-emacs-unix' encoding.
Eli Zaretskii [Sun, 26 Dec 2021 08:20:05 +0000 (10:20 +0200)]
; Fix last change: use 'utf-8-emacs-unix' encoding.

3 years agoMinor improvements in multisession.el
Eli Zaretskii [Sun, 26 Dec 2021 08:16:40 +0000 (10:16 +0200)]
Minor improvements in multisession.el

* lisp/emacs-lisp/multisession.el (multisession--read-file-value):
Handle 'file-missing' error when reading values from files.
(multisession--backend-values, multisession--backend-set-value)
(multisession--read-file-value): Use 'utf-8-emacs' encoding.

3 years agoChange `x-server-input-version' to `x-server-input-extension-version'
Po Lu [Sun, 26 Dec 2021 07:01:55 +0000 (15:01 +0800)]
Change `x-server-input-version' to `x-server-input-extension-version'

* src/xfns.c (Fx_server_input_version)
(Fx_server_input_extension_version): Rename to
`x-server-input-extension-version'.
(syms_of_xfns): Update defsubr.

3 years agoAdd configure tests for faulty XI2 installations
Po Lu [Sun, 26 Dec 2021 06:44:53 +0000 (14:44 +0800)]
Add configure tests for faulty XI2 installations

* configure.ac: Detect cases where XI 2.4 headers are installed
without the correct event structures.
* src/xterm.c (handle_one_xevent): Don't use structures that
might not exist unless configure found them.

3 years agoOnly focus frame implicitly if focus flag is set
Po Lu [Sun, 26 Dec 2021 06:24:16 +0000 (14:24 +0800)]
Only focus frame implicitly if focus flag is set

* src/xterm.c (x_detect_focus_change): Test for focus flag on
XI entry events.

3 years agoAdd test for text-char-description
Stefan Kangas [Sun, 26 Dec 2021 05:55:06 +0000 (06:55 +0100)]
Add test for text-char-description

* test/src/keymap-tests.el (keymap-text-char-description): New
test.

3 years agoAdd support for pinch gestures to the XI2 build
Po Lu [Sun, 26 Dec 2021 05:47:23 +0000 (13:47 +0800)]
Add support for pinch gestures to the XI2 build

* doc/lispref/commands.texi (Misc Events): Document new event
type `pinch'.
* etc/NEWS: Announce new event `pinch'.
* etc/PROBLEMS: Document problems with mismatched libXi
versions.
* lisp/face-remap.el (text-scale--pinch-start-scale): New
variable.
(text-scale-pinch): New command.
* src/keyboard.c (make_lispy_event): Handle PINCH_EVENTs.
(syms_of_keyboard): New symbol `pinch'.
* src/termhooks.h (enum event_kind): New enum `PINCH_EVENT'.
* src/xfns.c (setup_xi_event_mask): Add pinch events to event
mask if available.
* src/xterm.c (handle_one_xevent): Handle pinch events.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 26 Dec 2021 05:30:37 +0000 (06:30 +0100)]
Merge from origin/emacs-28

89a82182cb Improve documentation of read-multiple-choice
5fccd1e371 Explain why we remove stuff from 'user-full-name'

3 years agoAllow interpolating scrolls via the Page Down and Page Up keys
Po Lu [Sun, 26 Dec 2021 02:36:05 +0000 (10:36 +0800)]
Allow interpolating scrolls via the Page Down and Page Up keys

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Define
new commands.
(pixel-scroll-precision-interpolate-page): New user option.
(pixel-scroll-interpolate-down):
(pixel-scroll-interpolate-up): New functions.

3 years agoDon't clear internal border if frame isn't realized
Po Lu [Sun, 26 Dec 2021 01:20:51 +0000 (09:20 +0800)]
Don't clear internal border if frame isn't realized

* src/pgtkterm.c (pgtk_clear_under_internal_border): Don't clear
border if frame isn't realized.  (bug#52705)

3 years agoMake read-multiple-choice-face inherit help-key-binding
Stefan Kangas [Sun, 26 Dec 2021 01:13:16 +0000 (02:13 +0100)]
Make read-multiple-choice-face inherit help-key-binding

* lisp/faces.el (read-multiple-choice-face): Inherit
help-key-binding in addition to underline.

3 years agoUse the standard `quit-window' binding from `special-mode' for "q"
Sam Steingold [Sun, 26 Dec 2021 00:24:50 +0000 (19:24 -0500)]
Use the standard `quit-window' binding from `special-mode' for "q"

* epa.el (epa-info-mode-map): Remove `defvar'.

3 years agoImprove documentation of read-multiple-choice
Stefan Kangas [Sun, 26 Dec 2021 00:08:33 +0000 (01:08 +0100)]
Improve documentation of read-multiple-choice

* doc/lispref/commands.texi (Reading One Event): Document optional
third argument help-string of read-multiple-choice.

3 years agoUpdate modus-themes to version 2.0.0
Protesilaos Stavrou [Fri, 24 Dec 2021 13:50:22 +0000 (15:50 +0200)]
Update modus-themes to version 2.0.0

* doc/misc/modus-themes.org (Overview): Update the description of the
themes.
(Enable and load): Reflow text.
(Customization Options): Update the code sample with all customization
options.
(Option for color-coding success state)
(Option for red-green color deficiency or deuteranopia): Document the
new user option 'modus-themes-deuteranopia'.
(Option for mode line presentation, Option for mode line padding):
Update documentation about mode line padding.
(Option for completion framework aesthetics): Minor rewording.
(Option for diff buffer looks): Update section to exclude the
discontinued "foreground-only" diff styles.
(Option for Org agenda constructs): Expand documentation pertaining to
the 'modus-themes-org-agenda' user option.
(Option for the headings' overall style, Option for scaled headings):
Document how heading scaling is now done directly with the
'modus-themes-headings' user option.
(Option for variable-pitch font in headings): Remove section on
'modus-themes-variable-pitch-headings'.  Its functionality is merged
into 'modus-themes-headings'.
(A theme-agnostic hook for theme loading): Add section on how users
can add their own "foreground-only" diff styles.
(Full support for packages or face groups, Indirectly covered
packages): Update list of supported packages.
(Note on god-mode.el): Reflow text.
(Frequently Asked Questions): Remove invalid characters from heading.
(Acknowledgements): Update list of contributors to code, ideas, etc.

* etc/themes/modus-themes.el (modus-themes-operandi-colors)
(modus-themes-vivendi-colors): Update theme color palettes.
(modus-themes-variable-pitch-headings): Make it obsolete.  Use
'modus-themes-headings' instead.
(modus-themes--headings-choice): Accept float to adjust heading
height.
(modus-themes-headings, modus-themes-org-agenda): Update doc strings
to cover new features.
(modus-themes-scale-headings, modus-themes-scale-1, modus-themes-scale-2)
(modus-themes-scale-3, modus-themes-scale-4, modus-themes-scale-5)
(modus-themes-scale-title, modus-themes-scale-small): Deprecate them.
Use 'modus-themes-headings' directly.
(modus-themes-org-habit): Remove long-deprecated user option
(modus-themes-mode-line): Update doc string about padding the mode
line.
(modus-themes-mode-line-padding): Deprecate user option.  Use
'modus-themes-mode-line' directly.
(modus-themes-diffs): Update doc string to omit discontinued
"foreground-only" styles.
(modus-themes-completions): Remove outdated reference.
(modus-themes-intense-hl-line): Delete long-deprecated form.
(modus-themes-lang-checkers, modus-themes-hl-line)
(modus-themes-paren-match, modus-themes-syntax, modus-themes-links)
(modus-themes-region): Update syntax of code sample in doc string.
(modus-themes-success-deuteranopia): Deprecate it and alias it as
'modus-themes-deuteranopia'.
(modus-themes--variable-pitch, modus-themes--lang-check)
(modus-themes--prompt, modus-themes--paren)
(modus-themes--syntax-foreground, modus-themes--syntax-extra)
(modus-themes--syntax-string, modus-themes--syntax-comment)
(modus-themes--heading, modus-themes--agenda-structure)
(modus-themes--agenda-date, modus-themes--agenda-event)
(modus-themes--agenda-habit, modus-themes--org-block-delim)
(modus-themes--mode-line-padding, modus-themes--mode-line-attrs)
(modus-themes--diff, modus-themes--diff-deuteran)
(modus-themes--success-deuteran, modus-themes--link)
(modus-themes--link-color, modus-themes--scale, modus-themes--region)
(modus-themes--hl-line): Update private functions to parse the updated
user options and to simplify/refine their code.
(modus-themes-faces): Remove some faces, add a few others, and
generally clean up the code to avoid overusing private functions for
the expansion of attributes with user-facing options.
(modus-themes-custom-variables): Remove support for 'highlight-tail'
variable.

* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Bump file version.

The change log entry for this release is available here:
<https://protesilaos.com/codelog/2021-12-24-modus-themes-2-0-0/>.

3 years agoFix unused variable warning in xfns.c
Stefan Kangas [Sat, 25 Dec 2021 15:41:06 +0000 (16:41 +0100)]
Fix unused variable warning in xfns.c

* src/xfns.c (Fx_server_input_version): Fix unused variable
warning.

3 years ago* lisp/net/webjump.el: Add TODO section. (Bug#14624)
Stefan Kangas [Sat, 25 Dec 2021 15:36:07 +0000 (16:36 +0100)]
* lisp/net/webjump.el: Add TODO section.  (Bug#14624)

3 years agoUse defvar-keymap in ido.el
Stefan Kangas [Sat, 25 Dec 2021 04:18:03 +0000 (05:18 +0100)]
Use defvar-keymap in ido.el

* lisp/ido.el (ido-common-completion-map)
(ido-file-dir-completion-map, ido-file-completion-map)
(ido-buffer-completion-map): Use defvar-keymap.

3 years ago* lisp/url/url-handlers.el (directory-files): Adapt ARGS list.
Michael Albinus [Sat, 25 Dec 2021 13:13:58 +0000 (14:13 +0100)]
* lisp/url/url-handlers.el (directory-files): Adapt ARGS list.

3 years ago* lisp/net/browse-url.el (browse-url-of-file): Improve browsing remote files.
Michael Albinus [Sat, 25 Dec 2021 13:13:43 +0000 (14:13 +0100)]
* lisp/net/browse-url.el (browse-url-of-file): Improve browsing remote files.

3 years ago* lisp/simple.el (completion-auto-select): Fix docstring.
Michael Albinus [Sat, 25 Dec 2021 13:13:27 +0000 (14:13 +0100)]
* lisp/simple.el (completion-auto-select): Fix docstring.

3 years agoAdd a utility function to query the XI2 version on a display
Po Lu [Sat, 25 Dec 2021 12:09:37 +0000 (20:09 +0800)]
Add a utility function to query the XI2 version on a display

* src/xfns.c (Fx_server_input_version): New function.
(syms_of_xfns): Define new subr.

3 years agoExplain why we remove stuff from 'user-full-name'
Eli Zaretskii [Sat, 25 Dec 2021 07:38:39 +0000 (09:38 +0200)]
Explain why we remove stuff from 'user-full-name'

* src/editfns.c (Fuser_full_name): Document why we chop everything
starting from the first comma.  (Bug#52785)

3 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 25 Dec 2021 05:32:13 +0000 (06:32 +0100)]
Merge from origin/emacs-28

c09ad0cabd Fix the bug with duplicate entries in xref output

3 years agoMove mouse key bindings to gametree-mode-map
Stefan Kangas [Sat, 25 Dec 2021 04:02:59 +0000 (05:02 +0100)]
Move mouse key bindings to gametree-mode-map

* lisp/play/gametree.el (gametree-mode-map): Move mouse key
bindings here.

3 years agoAdd support for XI 2.4
Po Lu [Sat, 25 Dec 2021 02:38:23 +0000 (10:38 +0800)]
Add support for XI 2.4

We will be able to use touchpad (not touchscreen) gestures, such
as pinch and swipe gestures after this change, but they are not
yet exposed to Lisp.

* src/xterm.c (x_term_init): Declare support for XI 2.4 if
present.

3 years agoFix Emacs tooltips on PGTK
Po Lu [Sat, 25 Dec 2021 00:29:00 +0000 (08:29 +0800)]
Fix Emacs tooltips on PGTK

* src/pgtkfns.c (x_create_tip_frame): Don't set cursor and
show window.
(Fx_show_tip): Set cursor and show window.

3 years agoSimplify command remapping in play/blackbox.el
Stefan Kangas [Fri, 24 Dec 2021 16:29:05 +0000 (17:29 +0100)]
Simplify command remapping in play/blackbox.el

* lisp/play/blackbox.el (blackbox-redefine-key): Make obsolete.
(blackbox-mode-map): Simplify.

3 years ago; * lisp/gnus/mm-url.el: Delete spurious defvars.
Stefan Kangas [Fri, 24 Dec 2021 14:37:08 +0000 (15:37 +0100)]
; * lisp/gnus/mm-url.el: Delete spurious defvars.

3 years agoPrefer the defcustom :risky property in eshell
Stefan Kangas [Fri, 24 Dec 2021 02:24:44 +0000 (03:24 +0100)]
Prefer the defcustom :risky property in eshell

* lisp/eshell/em-banner.el (eshell-banner-message):
* lisp/eshell/em-hist.el (eshell-input-filter):
* lisp/eshell/em-pred.el (eshell-predicate-alist)
(eshell-modifier-alist):
* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings):
* lisp/eshell/esh-io.el (eshell-virtual-targets):
* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Prefer
defcustom :risky property to setting 'risky-local-variable manually.

3 years ago* lisp/eshell/em-hist.el (eshell-hist-match-partial): Minor doc fix.
Stefan Kangas [Thu, 23 Dec 2021 19:10:26 +0000 (20:10 +0100)]
* lisp/eshell/em-hist.el (eshell-hist-match-partial): Minor doc fix.

3 years agoUse defvar-keymap in eshell
Stefan Kangas [Thu, 23 Dec 2021 18:03:53 +0000 (19:03 +0100)]
Use defvar-keymap in eshell

* lisp/eshell/em-cmpl.el (eshell-cmpl-mode-map):
* lisp/eshell/em-hist.el (eshell-isearch-map, eshell-hist-mode-map):
* lisp/eshell/em-pred.el (eshell-pred-mode-map):
* lisp/eshell/em-prompt.el (eshell-prompt-mode-map):
* lisp/eshell/em-rebind.el (eshell-rebind-mode-map):
* lisp/eshell/esh-arg.el (eshell-arg-mode-map):
* lisp/eshell/esh-mode.el (eshell-mode-map, eshell-command-map):
* lisp/eshell/esh-proc.el (eshell-proc-mode-map):
* lisp/eshell/esh-var.el (eshell-var-mode-map): Use defvar-keymap.

3 years agoRespect changes in eshell-hist-match-partial
Stefan Kangas [Thu, 23 Dec 2021 19:10:16 +0000 (20:10 +0100)]
Respect changes in eshell-hist-match-partial

* lisp/eshell/em-hist.el (eshell-hist--update-keymap): New function.
(eshell-hist-match-partial): Add :set property with above new
function.
(eshell-hist-mode-map): Update for eshell-hist-match-partial using
eshell-hist--update-keymap.

3 years ago* etc/PROBLEMS: Add a problem when PGTK started in systemd unit file
Yuuki Harano [Fri, 24 Dec 2021 14:21:50 +0000 (23:21 +0900)]
* etc/PROBLEMS: Add a problem when PGTK started in systemd unit file

3 years agoFix the bug with duplicate entries in xref output
Dmitry Gutov [Fri, 24 Dec 2021 13:27:00 +0000 (15:27 +0200)]
Fix the bug with duplicate entries in xref output

* lisp/progmodes/etags.el (xref-backend-definitions): Make sure to
save the changed intermediate value of the list (bug#52734).

3 years agoAdd tag :tramp-asynchronous-processes to tramp-tests.el
Michael Albinus [Fri, 24 Dec 2021 10:32:34 +0000 (11:32 +0100)]
Add tag :tramp-asynchronous-processes to tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp--test--deftest-direct-async-process)
(tramp-test30-make-process, tramp-test31-interrupt-process)
(tramp-test34-explicit-shell-file-name)
(tramp-test44-asynchronous-requests):
Add :tramp-asynchronous-processes tag.
(tramp--test-asynchronous-processes-p): New defun.
(tramp-test32-shell-command, tramp-test33-environment-variables):
Use it.
(tramp--test-expensive-test-p): Rename from
`tramp--test-expensive-test'.  Make it a defun.  Adapt all callees.

3 years agoverify signed content in smime encrypted and signed message
Sebastian Fieber [Fri, 24 Dec 2021 09:43:52 +0000 (10:43 +0100)]
verify signed content in smime encrypted and signed message

* lisp/gnus/gnus-art.el (gnus-mime-display-part): Parse pkcs7
parts (bug#40397).
(gnus-mime-security-verify-or-decrypt):
(gnus-insert-mime-security-button): Handle these parts.

* lisp/gnus/mm-decode.el (mm-verify-function-alist): Add pkcs7
functions.
(mm-decrypt-function-alist): Handle them.
(mm-possibly-verify-or-decrypt): Ditto.

* lisp/gnus/mm-view.el (mm-view-pkcs7-decrypt): Handle pkcs7.

Changes:
- structure the result of mm-dissect-buffer of application/pkcs7-mime
  like a multipart mail so there is no loosing of information of
  verification and decryption results which can now be displayed by
  gnus-mime-display-security

- adjust gnus-mime-display-part to handle application/pkcs7-mime like
  multipart/encrypted or multipart/signed

- add dummy entries to mm-verify-function-alist and
  mm-decrypt-function-alist so gnus-mime-display-security correctly
  displays "S/MIME" and not "unknown protocol"

- don't just check for multipart/signed in
  gnus-insert-mime-security-button but also for the pkcs7-mime mimetypes
  to print "Encrypted" or "Signed" accordingly in the security button

- adjust mm-possibly-verify-or-decrypt to check for smime-type to ask
  wether to verify or decrypt the part and not to always ask to decrypt

- adjust mm-view-pkcs7-decrypt and verify to call mm-sec-status so
  success information can be displayed by gnus-mime-display-security

- adjust gnus-mime-security-verify-or-decrypt to handle pkcs7-mime
  right with the done changes

3 years agoSimplify whitespace stripping in shr-expand-url
Lars Ingebrigtsen [Fri, 24 Dec 2021 09:23:35 +0000 (10:23 +0100)]
Simplify whitespace stripping in shr-expand-url

* lisp/net/shr.el (shr-expand-url): Simplify whitespace stripping.

3 years agoFix text decoration display on stretch glyphs with no box on NS
Po Lu [Fri, 24 Dec 2021 07:48:27 +0000 (15:48 +0800)]
Fix text decoration display on stretch glyphs with no box on NS

* src/nsterm.m (ns_dumpglyphs_stretch): Draw decorations if
there is no box.

3 years agoMake precision scrolling work on margins and fringes
Po Lu [Fri, 24 Dec 2021 07:35:15 +0000 (15:35 +0800)]
Make precision scrolling work on margins and fringes

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Add
missing key definitions.

3 years agoRemove useless functions from PGTK port that were breaking emacsbug
Po Lu [Fri, 24 Dec 2021 07:24:35 +0000 (15:24 +0800)]
Remove useless functions from PGTK port that were breaking emacsbug

* src/pgtkfns.c (Fx_server_vendor, Fx_server_version): Remove
useless functions that returned invalid values.
(syms_of_pgtkfns): Stop defining removed subrs.

3 years agoGrab the server when warping the client pointer
Po Lu [Fri, 24 Dec 2021 06:22:21 +0000 (14:22 +0800)]
Grab the server when warping the client pointer

* src/xfns.c (Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (x_make_frame_invisible): Avoid race conditions
where the client pointer is destroyed between when it is
obtained and when XIWarpPointer is called.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 24 Dec 2021 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28

04be23f19f Improve Xref documentation
edb1d491d9 * lisp/net/shr.el (shr-expand-url): Also strip trailing wh...

3 years agoAcquire draw lock when updating menubar on Haiku
Po Lu [Fri, 24 Dec 2021 03:21:21 +0000 (03:21 +0000)]
Acquire draw lock when updating menubar on Haiku

* src/haikumenu.c (digest_menu_items): Acquire draw lock.

3 years agoFix menu grabs on XI2 Motif builds
Po Lu [Fri, 24 Dec 2021 03:10:09 +0000 (11:10 +0800)]
Fix menu grabs on XI2 Motif builds

* src/xmenu.c (x_activate_menubar) [USE_MOTIF]: Clear XI grab.
* src/xterm.c (xi_grab_or_ungrab_device) [USE_MOTIF]: Always
ungrab if a popup is active.

3 years agoFix some more incorrect valuator clearing
Po Lu [Fri, 24 Dec 2021 01:55:15 +0000 (09:55 +0800)]
Fix some more incorrect valuator clearing

* src/xterm.c (handle_one_xevent): Improve detection of stray
ungrab events.

3 years agoImprove Xref documentation
Dmitry Gutov [Fri, 24 Dec 2021 01:24:52 +0000 (03:24 +0200)]
Improve Xref documentation

* lisp/progmodes/xref.el (xref-item): Add docstring for 'summary'.
Fix typo in the header Commentary.

3 years agoDrop scrollbar motion events when valuators are found
Po Lu [Fri, 24 Dec 2021 01:20:44 +0000 (09:20 +0800)]
Drop scrollbar motion events when valuators are found

* src/xterm.c (handle_one_xevent): Drop XI_Motion if it's on
top of a scroll bar and a valuator is found.

3 years ago* lisp/net/shr.el (shr-expand-url): Also strip trailing
Andreas Schwab [Thu, 23 Dec 2021 18:06:13 +0000 (19:06 +0100)]
* lisp/net/shr.el (shr-expand-url): Also strip trailing
whitespace.

3 years ago* doc/misc/Makefile.in (need_emacsver): Add missing members.
Glenn Morris [Thu, 23 Dec 2021 16:34:16 +0000 (08:34 -0800)]
* doc/misc/Makefile.in (need_emacsver): Add missing members.

3 years agoMake precision scrolling also work on various bars
Po Lu [Thu, 23 Dec 2021 13:35:46 +0000 (21:35 +0800)]
Make precision scrolling also work on various bars

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map):
Define keys for various kinds of bars.

3 years agoFix precision scrolling down for multi-line display strings
Po Lu [Thu, 23 Dec 2021 13:26:59 +0000 (21:26 +0800)]
Fix precision scrolling down for multi-line display strings

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Make sure Y delta
is appropriate before deciding on next-pos.

3 years agoSet start to desired start when pixel scrolling to end of buffer
Po Lu [Thu, 23 Dec 2021 11:00:30 +0000 (19:00 +0800)]
Set start to desired start when pixel scrolling to end of buffer

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Set start to desired
start when point cannot be moved further down.

3 years agoAllow window-text-pixel-size to measure pixels around a position
Po Lu [Thu, 23 Dec 2021 01:12:02 +0000 (09:12 +0800)]
Allow window-text-pixel-size to measure pixels around a position

* doc/lispref/display.texi (Size of Displayed Text): Announce
new meaning of `from'.
* etc/NEWS: Announce changes.

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up-page):
Use new feature.

* src/xdisp.c (window_text_pixel_size): Understand a special
format of `from' that specifies the amount of pixels above or
below a position.

(Fwindow_text_pixel_size): Update doc string.

3 years agoRevert back to using monospaced fonts in the mode line
Lars Ingebrigtsen [Thu, 23 Dec 2021 10:43:47 +0000 (11:43 +0100)]
Revert back to using monospaced fonts in the mode line

* lisp/faces.el (mode-line-active, mode-line-inactive): Revert
back to using monospaced fonts on the mode line (for now).  The
main remaining usability problem is clicking on the very small "-"
characters in "U:--".

3 years ago; Fix documentation of a recently-installed change
Eli Zaretskii [Thu, 23 Dec 2021 07:55:48 +0000 (09:55 +0200)]
; Fix documentation of a recently-installed change

* lisp/gnus/message.el (message-server-alist)
(message-update-smtp-method-header): Doc string fixes.

* doc/misc/message.texi (Sending Variables): Fix wording and
markup.

* etc/NEWS: Fix the wording of the 'message-server-alist' entry.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 23 Dec 2021 05:31:26 +0000 (06:31 +0100)]
Merge from origin/emacs-28

29fffbdd87 Revert field-related thingatpt changes
9bcb732686 * lisp/window.el (quit-restore-window): Select previously ...
b7d31d6192 Revert "Remove Motif support"

# Conflicts:
# etc/NEWS

3 years agoFix wrong-type-argument
Philip Kaludercic [Wed, 22 Dec 2021 23:38:28 +0000 (00:38 +0100)]
Fix wrong-type-argument

* message.el (message-update-smtp-method-header): Only Use address
part of mail-extract-address-component.

3 years agoAllow automatic X-Message-SMTP-Method header insertion
Philip Kaludercic [Sun, 19 Dec 2021 21:53:59 +0000 (22:53 +0100)]
Allow automatic X-Message-SMTP-Method header insertion

* message.el (message-server-alist): Add user option
(message-update-smtp-method-header): Add function
(message-send): Call message-update-smtp-method-header
* doc/misc/message.texi (Sending Variables): Document
message-server-alist
* etc/NEWS: Add news entry

3 years agoFix compile time error in a pcase test
Stefan Kangas [Wed, 22 Dec 2021 21:40:51 +0000 (22:40 +0100)]
Fix compile time error in a pcase test

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Fix test.

3 years agoUse defvar-keymap in minibuffer.el
Stefan Kangas [Wed, 22 Dec 2021 21:26:46 +0000 (22:26 +0100)]
Use defvar-keymap in minibuffer.el

* lisp/minibuffer.el (completion-in-region-mode-map)
(minibuffer-local-completion-map)
(minibuffer-local-must-match-map)
(minibuffer-local-filename-completion-map)
(minibuffer-local-ns-map, minibuffer-inactive-mode-map): Use
defvar-keymap.

3 years agoMake substitute-command-keys test less brittle
Stefan Kangas [Wed, 22 Dec 2021 21:15:57 +0000 (22:15 +0100)]
Make substitute-command-keys test less brittle

* test/lisp/help-tests.el (help-tests--test-keymap): New keymap
variable.
(help-tests-substitute-command-keys/keymaps): Make test less
brittle by using above new keymap.

3 years agoAdd native HEIC support on macOS (bug#51381)
Alan Third [Fri, 26 Nov 2021 12:54:07 +0000 (12:54 +0000)]
Add native HEIC support on macOS (bug#51381)

* lisp/image.el (image-type-header-regexps):
(image-type-file-name-regexps):
(image-type-auto-detectable): Add auto-detect code for heic.
* src/image.c (syms_of_image): Add heic as an image type under NS.
* src/nsimage.m (ns_can_use_native_image_api): Add heic to list of
possible image types in the native image support lookup.

3 years agoAllow resizing undecorated frames on macOS (bug#28512, bug#31795)
Alan Third [Thu, 26 Aug 2021 18:25:48 +0000 (19:25 +0100)]
Allow resizing undecorated frames on macOS (bug#28512, bug#31795)

* src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS):
Remove unused defines.
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Since this is now the only place these defines are used just put them
inline and add NSWindowStyleMaskResizable for undecorated frames on
Cocoa.

3 years agoMake NS toolbar item ID more unique (bug#50160)
Alan Third [Wed, 25 Aug 2021 18:50:27 +0000 (19:50 +0100)]
Make NS toolbar item ID more unique (bug#50160)

* src/nsmenu.m
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add the label to the identifier to avoid collisions between toolbar
items that use the same image.

3 years agoMake NS toolbar use NSString instead of C strings
Alan Third [Sun, 22 Aug 2021 20:50:09 +0000 (21:50 +0100)]
Make NS toolbar use NSString instead of C strings

* src/nsfns.m ([NSString stringWithLispString:]): Ensure that the lisp
object is actually a string.
* src/nsmenu.m (update_frame_tool_bar): Convert to NSString instead of
C strings.
([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
No need to convert to NSString here anymore.

3 years agoFix macfont backend color handling
Alan Third [Sat, 21 Aug 2021 18:39:39 +0000 (19:39 +0100)]
Fix macfont backend color handling

* src/macfont.m (get_cgcolor): Replace use of ns_lookup_indexed_color.
(CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND):
(CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND):
(CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Fix call to get_cgcolor
and fix all callers.

3 years agoFurther cleanup of NS color code
Alan Third [Sun, 15 Aug 2021 09:46:43 +0000 (10:46 +0100)]
Further cleanup of NS color code

* src/dispextern.h (FACE_COLOR_TO_PIXEL): Remove define and fix all
callers.
* src/nsterm.h (struct nsfont_info): Remove color_table.
* src/nsterm.m ([NSColor colorWithUnsignedLong:]): Always assume the
input contains the correct alpha value.
(ns_lookup_indexed_color):
(ns_index_color):
(ns_color_index_to_rgba): Remove functions and fix all callers.
(ns_query_color): No longer set pixel to the lookup table index,
always just set it to the ARGB integer value.
(ns_defined_color): Ignore makeindex as we no longer set pixel to the
lookup table index.
(ns_initialize_display_info):
(ns_redisplay_interface): Remove lookup table.
(ns_term_init): Fix the alpha setting.

thing

3 years agoSimplify NS color handling
Alan Third [Sat, 14 Aug 2021 15:11:30 +0000 (16:11 +0100)]
Simplify NS color handling

* src/image.c (RGB_TO_ULONG):
(ARGB_TO_ULONG):
(RED_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): Define these here for NS too.
* src/nsfns.m (ns_set_foreground_color):
(ns_set_background_color): Use new EmacsColor methods.
* src/nsterm.h (struct ns_color_table): Replace this struct with a
built-in Objective C type.
(RGB_TO_ULONG):
(ARGB_TO_ULONG):
(ALPHA_FROM_ULONG):
(RED_FROM_ULONG):
(GREEN_FROM_ULONG):
(BLUE_FROM_ULONG):
(RED16_FROM_ULONG):
(GREEN16_FROM_ULONG):
(BLUE16_FROM_ULONG): These are no longer needed in the NS specific code.
(struct ns_display_info): Use an NSMutableArray instead of a custom struct.
* src/nsterm.m ([NSColor colorWithUnsignedLong:hasAlpha:]):
([NSColor unsignedLong]): New methods.
(ns_lookup_indexed_color):
(ns_index_color): Use the NSMutableArray lookup table.
(ns_term_init):
(ns_color_index_to_rgba):
(ns_query_color): Use the new EmacsColor methods.
(ns_initialize_display_info):
(ns_delete_display): Initialize and release the NSMutableArray lookup table.

3 years agoHelp outline-minor-mode avoid some false matches
Jonas Bernoulli [Wed, 22 Dec 2021 19:03:00 +0000 (20:03 +0100)]
Help outline-minor-mode avoid some false matches

* lisp/international/emoji.el (emoji--generate-file): Help
'outline-minor-mode' avoid false matches by quoting certain
characters when they appear at bol in a multi-line string.

3 years agoHide transient prefix/suffix commands from execute-extended-command
Jonas Bernoulli [Wed, 22 Dec 2021 19:02:00 +0000 (20:02 +0100)]
Hide transient prefix/suffix commands from execute-extended-command

* lisp/international/emoji.el (emoji--define-transient): Hide
transient prefix/suffix commands from 'execute-extended-command'
by declaring that they should only be listed in the non-existent
'not-a-mode' mode.

3 years agoFix some Tramp tests
Michael Albinus [Wed, 22 Dec 2021 17:13:18 +0000 (18:13 +0100)]
Fix some Tramp tests

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory, tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.

3 years agoUse unibyte strings in ntlm auth requests and responses
Mattias EngdegÄrd [Wed, 22 Dec 2021 15:32:04 +0000 (16:32 +0100)]
Use unibyte strings in ntlm auth requests and responses

* lisp/net/ntlm.el (ntlm-build-auth-request)
(ntlm-build-auth-response): Make sure to use unibyte strings for bytes
greater than 127, or base64 encoding will fail.
This should fix failures in ntlm-tests.

3 years ago; * etc/NEWS: Fix a recently-added entry.
Eli Zaretskii [Wed, 22 Dec 2021 14:24:56 +0000 (16:24 +0200)]
; * etc/NEWS: Fix a recently-added entry.

3 years agoAdjust test after recent help.el change
Lars Ingebrigtsen [Wed, 22 Dec 2021 14:19:41 +0000 (15:19 +0100)]
Adjust test after recent help.el change