]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoImprove lock-pid handling in Tramp
Michael Albinus [Thu, 9 Dec 2021 19:03:16 +0000 (20:03 +0100)]
Improve lock-pid handling in Tramp

* lisp/net/tramp-cache.el: Remove comment.

* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Do not set "lock-pid" connection-property.
(tramp-sudoedit-handle-delete-file): Use "rm -f".

* lisp/net/tramp.el (tramp-test-message): Extend for buffers w/o
remote default-directory.
(tramp-lock-pid): New defvar.
(tramp-get-lock-pid): Reimplement.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 9 Dec 2021 13:53:51 +0000 (14:53 +0100)]
Merge from origin/emacs-28

1821844357 Add missing K key documentation for Cangjie input methods
be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328)
35a96139df Clarify a comment in xdisp.c
6ba2f028cf Revert "Grep alias `all' shall not match parent directory"
eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul...
538fc1d0e0 Fix mode-line display in Calendar mode

# Conflicts:
# etc/NEWS
# lisp/help.el

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 9 Dec 2021 13:52:46 +0000 (14:52 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

c8c7822c51 * etc/tutorials/TUTORIAL.it (CONCLUSIONI): Reword paragraph.

3 years agoAdd missing K key documentation for Cangjie input methods
Cameron Desautels [Thu, 9 Dec 2021 08:08:14 +0000 (00:08 -0800)]
Add missing K key documentation for Cangjie input methods

* lisp/international/titdic-cnv.el (tsang-quick-converter): Add the
missing K key in input method documentation. (Bug#52264)

3 years agoMake precision scrolling up work over display strings
Po Lu [Thu, 9 Dec 2021 09:57:25 +0000 (17:57 +0800)]
Make precision scrolling up work over display strings

* lisp/pixel-scroll.el
(pixel-point-and-height-at-unseen-line): Use
`window-text-pixel-size'.
(pixel-scroll-precision-scroll-up-page): Use delta as vscroll
directly.

3 years agoFix pixel scrolling over lines with different sized glyphs
Po Lu [Thu, 9 Dec 2021 09:40:08 +0000 (17:40 +0800)]
Fix pixel scrolling over lines with different sized glyphs

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Calculate desired
vscroll with `window-text-pixel-size'.

3 years agoFix manual entry of 'quit-restore-window' (Bug#52328)
Martin Rudalics [Thu, 9 Dec 2021 09:00:51 +0000 (10:00 +0100)]
Fix manual entry of 'quit-restore-window' (Bug#52328)

* doc/lispref/windows.texi (Quitting Windows): Fix bug in
description of 'quit-restore-window' (Bug#52328).

3 years agoClarify a comment in xdisp.c
Eli Zaretskii [Thu, 9 Dec 2021 07:18:04 +0000 (09:18 +0200)]
Clarify a comment in xdisp.c

* src/xdisp.c (compute_window_start_on_continuation_line): Clarify
a comment.  (Bug#52378)

3 years agoFix jumping cursor during interpolated scrolls
Po Lu [Thu, 9 Dec 2021 03:40:39 +0000 (11:40 +0800)]
Fix jumping cursor during interpolated scrolls

* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page): Go to next position
before setting start or vscroll.

3 years agoAllow customizing step between each interpolated scroll
Po Lu [Thu, 9 Dec 2021 03:11:26 +0000 (11:11 +0800)]
Allow customizing step between each interpolated scroll

* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate):
Use new option.
(pixel-scroll-precision-interpolation-between-scroll): New user
option.

3 years agoimage-dired: Show image info in header line
Stefan Kangas [Thu, 9 Dec 2021 02:28:19 +0000 (03:28 +0100)]
image-dired: Show image info in header line

* lisp/image-dired.el
(image-dired-update-header-line): New function to show image
information in the header line.
(image-dired-display-thumb-properties): Make obsolete.
(image-dired-track-thumbnail)
(image-dired--display-thumb-properties-fun)
(image-dired-forward-image, image-dired-next-line)
(image-dired-previous-line, image-dired-beginning-of-buffer)
(image-dired-end-of-buffer, image-dired-read-comment): Use
image-dired-update-header-line instead of
image-dired-display-thumb-properties.

3 years agoimage-dired: Go to next image when marking
Stefan Kangas [Wed, 8 Dec 2021 23:57:34 +0000 (00:57 +0100)]
image-dired: Go to next image when marking

* lisp/image-dired.el
(image-dired-marking-shows-next): New user option to show the next
image after marking, unmarking or flagging an image.
(image-dired--do-mark-command): New macro.
(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-unmark-all-marks): Use above new macro.

3 years agoimage-dired: Remove some TODOs
Stefan Kangas [Wed, 8 Dec 2021 23:01:23 +0000 (00:01 +0100)]
image-dired: Remove some TODOs

To the extent that these TODOs are relevant or useful, it would be
better to add such features to image-mode directly.
* lisp/image-dired.el: Remove some TODOs.

3 years agoRevert "Grep alias `all' shall not match parent directory"
Óscar Fuentes [Wed, 8 Dec 2021 22:49:26 +0000 (23:49 +0100)]
Revert "Grep alias `all' shall not match parent directory"

This reverts commit 856cd948d1a5a016ad36721246a049d33451902f.

Emacs got better at quoting shell arguments and the original value
works correctly for vc-git-grep. At the same time, the value
introduced on that commit caused a regression on lgrep.

* lisp/progmodes/grep.el (grep-files-aliases): Use previous value for
`all'. Fixes bug#52367

3 years ago* test/lisp/emacs-lisp/subr-x-tests.el (subr-x-named-let): New test
Stefan Monnier [Wed, 8 Dec 2021 21:58:24 +0000 (16:58 -0500)]
* test/lisp/emacs-lisp/subr-x-tests.el (subr-x-named-let): New test

3 years ago* test/lisp/emacs-lisp/cl-macs-tests.el: Avoid `with-suppressed-warnings`
Stefan Monnier [Wed, 8 Dec 2021 21:22:24 +0000 (16:22 -0500)]
* test/lisp/emacs-lisp/cl-macs-tests.el: Avoid `with-suppressed-warnings`

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--progv): Use a proper
namespace prefix for the global vars.

3 years agolisp/mouse.el: Fix some lambdas quoted with ` or '
Stefan Monnier [Wed, 8 Dec 2021 21:14:03 +0000 (16:14 -0500)]
lisp/mouse.el: Fix some lambdas quoted with ` or '

Also prefer #' to quote named functions.

* lisp/mouse.el (minor-mode-menu-from-indicator, context-menu-entry)
([C-down-mouse-3]): Don't abuse lambda lists for functions.
(context-menu-mode): Remove redundant `:group`.
(mouse-drag-line): Remove unused var `draggable`.
(mouse-yank-primary): Make it work for non-mouse events.

3 years ago* lisp/mouse.el (context-menu-entry): Bind to make-sparse-keymap, not ignore.
Juri Linkov [Wed, 8 Dec 2021 20:31:55 +0000 (22:31 +0200)]
* lisp/mouse.el (context-menu-entry): Bind to make-sparse-keymap, not ignore.

Then where-is-internal does not run context-menu-map from the :filter,
and no context menu functions are called by e.g. describe-mode in wrong buffer
(bug#9923)

3 years ago; * etc/NEWS: Non-nil repeat-keep-prefix is not the default anymore.
Juri Linkov [Wed, 8 Dec 2021 20:20:41 +0000 (22:20 +0200)]
; * etc/NEWS: Non-nil repeat-keep-prefix is not the default anymore.

3 years agoDefine some more keymaps in one step
Stefan Kangas [Wed, 8 Dec 2021 16:15:28 +0000 (17:15 +0100)]
Define some more keymaps in one step

* lisp/calc/calc-store.el (calc-var-name-map):
* lisp/mail/rmailsum.el (rmail-summary-edit-map):
* lisp/speedbar.el (speedbar-buffers-key-map): Define in one step.
* lisp/progmodes/ebrowse.el (ebrowse-global-submap-4)
(ebrowse-global-submap-5): Define in one step and use defvar-keymap.

3 years ago; * lisp/calc/calc-ext.el: Fix warnings in my last commit.
Stefan Kangas [Wed, 8 Dec 2021 16:48:13 +0000 (17:48 +0100)]
; * lisp/calc/calc-ext.el: Fix warnings in my last commit.

3 years agoFix mode-line display in Calendar mode
Eli Zaretskii [Wed, 8 Dec 2021 14:22:10 +0000 (16:22 +0200)]
Fix mode-line display in Calendar mode

* lisp/help.el (substitute-command-keys): New optional argument
NO-FACE, to avoid putting the 'help-key-binding' face on the key
bindings.
* lisp/calendar/calendar.el (calendar-mode-line-entry): Call
'substitute-command-keys' with the new optional argument non-nil.
(Bug#52366)

* doc/lispref/help.texi (Keys in Documentation): Document the new
optional argument of 'substitute-command-keys'.

* etc/NEWS: Announce the addition of a new argument to
'substitute-command-keys'.

3 years ago* etc/tutorials/TUTORIAL.it (CONCLUSIONI): Reword paragraph.
Lele Gaifax [Wed, 8 Dec 2021 08:00:19 +0000 (09:00 +0100)]
* etc/tutorials/TUTORIAL.it (CONCLUSIONI): Reword paragraph.

Don't merge to master.

3 years agoDefine calc-help-map in one step
Stefan Kangas [Wed, 8 Dec 2021 12:30:23 +0000 (13:30 +0100)]
Define calc-help-map in one step

* lisp/calc/calc-ext.el (calc-help-map): Define in one step and
convert to defvar-keymap.

3 years agoConvert shortdoc-mode-map to defvar-keymap
Stefan Kangas [Wed, 8 Dec 2021 12:22:21 +0000 (13:22 +0100)]
Convert shortdoc-mode-map to defvar-keymap

* lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Convert to
defvar-keymap.

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 8 Dec 2021 12:04:14 +0000 (13:04 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

0a2507ff90 Backport: Make a more robust check in Tramp using scripts

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 8 Dec 2021 12:04:14 +0000 (13:04 +0100)]
Merge from origin/emacs-28

ce5bca4913 Document native-comp-async-report-warning-errors more
1933cd5307 Doc fix; Epiphany has been renamed to GNOME Web
b80d7568e4 * lisp/dired-aux.el (dired-check-process): Doc fix.  (Bug#...
0f30227f97 ; * lisp/net/browse-url.el (browse-url-epiphany): Fix typo.
d34009db66 Remove dead link from newsticker

# Conflicts:
# lisp/net/browse-url.el

3 years agoFix coarse scroll deltas on macOS
Po Lu [Wed, 8 Dec 2021 11:44:50 +0000 (19:44 +0800)]
Fix coarse scroll deltas on macOS

* src/nsterm.m (- mouseDown): Multiply deltas as appropriate.

3 years agoClear scroll interpolation when interpolated scroll completes
Po Lu [Wed, 8 Dec 2021 10:36:18 +0000 (18:36 +0800)]
Clear scroll interpolation when interpolated scroll completes

* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate): Set
saved interpolation to nil upon completion.

3 years agoImprove precision scroll interpolation
Po Lu [Wed, 8 Dec 2021 10:29:05 +0000 (18:29 +0800)]
Improve precision scroll interpolation

* lisp/pixel-scroll.el
(pixel-scroll-precision-interpolation-total-time)
(pixel-scroll-precision-interpolation-factor): Add better
default values.

(pixel-scroll-precision-interpolate): Save deltas and run loop
inside `while-no-input' instead.

3 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 8 Dec 2021 09:20:42 +0000 (10:20 +0100)]
; * etc/NEWS: Fix typos.

3 years agoBackport: Make a more robust check in Tramp using scripts
Michael Albinus [Tue, 7 Dec 2021 15:20:13 +0000 (16:20 +0100)]
Backport: Make a more robust check in Tramp using scripts

* lisp/net/tramp-sh.el (tramp-find-inline-encoding):
Check, whether scripts in `tramp-remote-coding-commands' are
expandable.

(cherry picked from commit 1d0a60113fd155c77ef5ea4ea44fcba3504adcbf)

3 years agoFix last change
Po Lu [Wed, 8 Dec 2021 07:52:21 +0000 (15:52 +0800)]
Fix last change

* lisp/pixel-scroll.el
(pixel-scroll-precision-interpolation-total-time)
(pixel-scroll-precision-interpolation-factor): Fix declared versions.

3 years agoMake interpolated scrolling work better
Po Lu [Wed, 8 Dec 2021 05:40:12 +0000 (13:40 +0800)]
Make interpolated scrolling work better

* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate):
Stop using `while-no-input'.

3 years agoAllow customizing precision scroll interpolation
Po Lu [Wed, 8 Dec 2021 05:02:16 +0000 (13:02 +0800)]
Allow customizing precision scroll interpolation

* lisp/pixel-scroll.el
(pixel-scroll-precision-interpolation-total-time)
(pixel-scroll-precision-interpolation-factor): New user
options.
(pixel-scroll-precision-interpolate): Use these new options.

(pixel-scroll-precision-mode): Set
`make-cursor-line-fully-visible' to nil.

3 years agoSend scroll stop events to xwidgets correctly
Po Lu [Wed, 8 Dec 2021 02:04:31 +0000 (10:04 +0800)]
Send scroll stop events to xwidgets correctly

* src/xterm.c (handle_one_xevent): Record stop events manually.

* src/xwidget.h (xwidget_scroll):
* src/xwidget.c (xwidget_scroll): New parameter `stop_p'.

3 years agoConvert etc-authors-mode-map to defvar-keymap
Stefan Kangas [Wed, 8 Dec 2021 00:55:50 +0000 (01:55 +0100)]
Convert etc-authors-mode-map to defvar-keymap

* lisp/textmodes/etc-authors-mode.el (etc-authors-mode-map):
Convert to defvar-keymap.

3 years agoPacify svg_load_image compiler warning
Lars Ingebrigtsen [Wed, 8 Dec 2021 00:52:39 +0000 (01:52 +0100)]
Pacify svg_load_image compiler warning

* src/image.c (svg_load_image): Fix compiler warning from gcc
(Debian 11.2.0-10).

3 years ago; * lisp/textmodes/texinfo.el: Remove stale comment.
Stefan Kangas [Wed, 8 Dec 2021 00:12:10 +0000 (01:12 +0100)]
; * lisp/textmodes/texinfo.el: Remove stale comment.

The referenced variable was removed two decades ago.

3 years agoCheck decoding results in webp_load before using it
Lars Ingebrigtsen [Wed, 8 Dec 2021 00:38:25 +0000 (01:38 +0100)]
Check decoding results in webp_load before using it

* src/image.c (webp_load): Check whether we were able to decode
the image before using it.

3 years agoimage-dired: Navigate from image display buffer
Stefan Kangas [Tue, 7 Dec 2021 22:28:44 +0000 (23:28 +0100)]
image-dired: Navigate from image display buffer

* lisp/image-dired.el
(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-unmark-all-marks)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Make commands
usable from image-dired-display-image-mode.
(image-dired-display-image-mode-map): Bind above commands.
(image-dired--with-thumbnail-buffer): New macro.

3 years agoImprove yanking in the middle of comint process output
Miha Rihtaršič [Tue, 7 Dec 2021 20:16:23 +0000 (21:16 +0100)]
Improve yanking in the middle of comint process output

* lisp/comint.el
(comint--unmark-string-as-output): New function to remove unwanted
properties from text yanked from comint buffers.

(comint-mode): Use it as a 'filter-buffer-substring-function'.

(comint-output-filter): Set 'insert-in-front-hooks' text property on
process output such that text yanked by the user in the middle of
process output is marked as process output (Bug#3735).

(comint--mark-as-output): New function.
(comint--mark-yanked-as-output): New function.

3 years agobrowse-url: Refactor code to find executable
Stefan Kangas [Tue, 7 Dec 2021 18:46:21 +0000 (19:46 +0100)]
browse-url: Refactor code to find executable

* lisp/net/browse-url.el (browse-url--find-executable): Extract from...
(browse-url-firefox-program, browse-url-chrome-program)
(browse-url-chromium-program): ...here.

3 years agoDocument native-comp-async-report-warning-errors more
Robert Pluim [Tue, 7 Dec 2021 17:43:01 +0000 (18:43 +0100)]
Document native-comp-async-report-warning-errors more

The docstring has a description of how fix problems in lisp code
detected by native compilation, but not the Emacs Lisp manual, so
document it there as well.

* doc/lispref/compile.texi (Native-Compilation Functions): Refer to
'native-comp-async-report-warning-errors'
(Native-Compilation Variables): Explain potential cause of warnings
from native compilation.

3 years agobrowse-url: Remove support for Galeon
Stefan Kangas [Tue, 7 Dec 2021 18:31:21 +0000 (19:31 +0100)]
browse-url: Remove support for Galeon

* lisp/net/browse-url.el (browse-url-galeon-program)
(browse-url-galeon-arguments)
(browse-url-galeon-startup-arguments)
(browse-url-galeon-new-window-is-tab, browse-url-galeon)
(browse-url-galeon-sentinel): Delete, thus removing support for the long
defunct Galeon web browser.
* etc/NEWS: Announce its removal.

3 years ago* etc/tutorials/TUTORIAL.he: Add section about package management.
Eli Zaretskii [Tue, 7 Dec 2021 18:17:11 +0000 (20:17 +0200)]
* etc/tutorials/TUTORIAL.he: Add section about package management.

3 years agoDoc fix; Epiphany has been renamed to GNOME Web
Stefan Kangas [Tue, 7 Dec 2021 17:57:48 +0000 (18:57 +0100)]
Doc fix; Epiphany has been renamed to GNOME Web

* lisp/net/browse-url.el: Doc fix; Epiphany is called GNOME Web
since GNOME 3.4, released in 2012.
Ref: https://help.gnome.org/misc/release-notes/3.4/

3 years agoImprove before-make-frame-hook and after-make-frame-functions docs.
Eli Zaretskii [Tue, 7 Dec 2021 17:57:14 +0000 (19:57 +0200)]
Improve before-make-frame-hook and after-make-frame-functions docs.

* lisp/frame.el (before-make-frame-hook)
(after-make-frame-functions):
* doc/lispref/frames.texi (Creating Frames): Mention that these
functions will be run for the initial frame only if added to the
hook in early-init file.  (Bug#38143)

3 years ago* lisp/dired-aux.el (dired-check-process): Doc fix. (Bug#52337)
Eli Zaretskii [Tue, 7 Dec 2021 17:46:15 +0000 (19:46 +0200)]
* lisp/dired-aux.el (dired-check-process): Doc fix.  (Bug#52337)

3 years ago; * lisp/net/browse-url.el (browse-url-epiphany): Fix typo.
Stefan Kangas [Tue, 7 Dec 2021 17:37:47 +0000 (18:37 +0100)]
; * lisp/net/browse-url.el (browse-url-epiphany): Fix typo.

3 years agoRemove dead link from newsticker
Stefan Kangas [Tue, 7 Dec 2021 17:37:18 +0000 (18:37 +0100)]
Remove dead link from newsticker

* lisp/net/newst-backend.el (newsticker--parse-rss-0.91):
* lisp/net/newsticker.el: Remove dead link.

3 years agobrowse-url: Remove support for Netscape
Stefan Kangas [Tue, 7 Dec 2021 17:27:41 +0000 (18:27 +0100)]
browse-url: Remove support for Netscape

* lisp/net/browse-url.el (browse-url-netscape-program)
(browse-url-netscape-arguments)
(browse-url-netscape-startup-arguments)
(browse-url-netscape-new-window-is-tab)
(browse-url-netscape-version, browse-url-netscape)
(browse-url-netscape-sentinel, browse-url-netscape-reload)
(browse-url-netscape-send): Delete, thus removing support for the long
defunct Netscape web browser.
* etc/NEWS: Announce its removal.

3 years ago* doc/misc/eshell.texi (Built-ins): Fix xref.
Glenn Morris [Tue, 7 Dec 2021 16:58:45 +0000 (08:58 -0800)]
* doc/misc/eshell.texi (Built-ins): Fix xref.

3 years agoMake a more robust check in Tramp using scripts
Michael Albinus [Tue, 7 Dec 2021 15:20:13 +0000 (16:20 +0100)]
Make a more robust check in Tramp using scripts

* lisp/net/tramp-sh.el (tramp-find-inline-encoding):
Check, whether scripts in `tramp-remote-coding-commands' are
expandable.

3 years agoAdd the new packages section to the Italian tutorial
Lele Gaifax [Tue, 7 Dec 2021 06:42:04 +0000 (07:42 +0100)]
Add the new packages section to the Italian tutorial

* etc/tutorials/TUTORIAL.it (INSTALLAZIONE DI ULTERIORI PACCHETTI):
Translate from recently added INSTALLING PACKAGES section in the English
version.  (Bug#52345)
(CONCLUSIONI): Reword paragraph, to better convey the original intent.

3 years agoRemove some unnecessary references to Emacs 22
Stefan Kangas [Tue, 7 Dec 2021 13:34:29 +0000 (14:34 +0100)]
Remove some unnecessary references to Emacs 22

* lisp/cedet/semantic/fw.el:
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer):
* lisp/emulation/viper-util.el (viper-frame-value):
* lisp/mail/rmail.el (rmail-delete-headers):
* lisp/mh-e/mh-e.el (mh-inc-spool-list): Remove some unnecessary
references to Emacs 22.

3 years ago* etc/tutorials/TUTORIAL: Say that there is usually a delete key.
Stefan Kangas [Tue, 7 Dec 2021 12:28:39 +0000 (13:28 +0100)]
* etc/tutorials/TUTORIAL: Say that there is usually a delete key.

3 years agoimage-dired: Fix behavior of slideshow command
Stefan Kangas [Tue, 7 Dec 2021 11:59:18 +0000 (12:59 +0100)]
image-dired: Fix behavior of slideshow command

* lisp/image-dired.el (image-dired-slideshow-start): Fix behavior
to match documentation.  Minor simplification of docstring.

3 years agoRemove obsolete values from image-mode-auto-resize
Stefan Kangas [Tue, 7 Dec 2021 11:31:21 +0000 (12:31 +0100)]
Remove obsolete values from image-mode-auto-resize

* lisp/image-mode.el (image-auto-resize): Remove obsolete options
fit-height and fit-width.
(image-transform-resize): Document that fit-height and fit-width
are obsolete.

(image-auto-resize-max-scale-percent): Fix defcustom const :tag.

3 years ago* lisp/view.el (view-mode-map): Convert to defvar-keymap.
Stefan Kangas [Tue, 7 Dec 2021 11:03:45 +0000 (12:03 +0100)]
* lisp/view.el (view-mode-map): Convert to defvar-keymap.

3 years agoRemove XEmacs compat code from strokes.el
Stefan Kangas [Tue, 7 Dec 2021 10:39:46 +0000 (11:39 +0100)]
Remove XEmacs compat code from strokes.el

* lisp/strokes.el (strokes-mode): Remove XEmacs compat code;
select-frame-hook does not exist in Emacs.

3 years agoAdd vc-git-stash-pop to vc-dir-git-mode
Lars Ingebrigtsen [Tue, 7 Dec 2021 07:06:12 +0000 (08:06 +0100)]
Add vc-git-stash-pop to vc-dir-git-mode

* lisp/vc/vc-git.el (vc-dir-git-mode-map): Add vc-git-stash-pop
(bug#52158).

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

da23e607d3 Select the right buffer for event in context-menu function...

3 years agoCancel xwidget progress timer when buffer is killed
Po Lu [Tue, 7 Dec 2021 05:44:52 +0000 (13:44 +0800)]
Cancel xwidget progress timer when buffer is killed

* lisp/xwidget.el (xwidget-webkit-buffer-kill): New function.
(xwidget-webkit-mode): Add `xwidget-webkit-buffer-kill' to
`kill-buffer-hook'.  (bug#52344)

3 years agoWhen registering Gnus message ids, guard against no registry
Eric Abrahamsen [Mon, 6 Dec 2021 21:43:24 +0000 (13:43 -0800)]
When registering Gnus message ids, guard against no registry

* lisp/gnus/gnus-registry.el (gnus-registry-register-message-ids):
There are situations where this code is called without a full Gnus
startup (eg, debbugs). If the registry doesn't exist, just skip this
process.

3 years agoSilence byte-compiler in two tests
Stefan Kangas [Mon, 6 Dec 2021 21:05:57 +0000 (22:05 +0100)]
Silence byte-compiler in two tests

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/mail/mail-utils-tests.el
(mail-utils-tests-mail-rfc822-time-zone): Silence byte-compiler.

3 years agoRemove spurious space in byte-compiler warning
Stefan Kangas [Mon, 6 Dec 2021 20:51:37 +0000 (21:51 +0100)]
Remove spurious space in byte-compiler warning

* lisp/emacs-lisp/bytecomp.el
(byte-compile-docstring-length-warn): Remove spurious space in
byte-compiler warning.
* test/lisp/emacs-lisp/bytecomp-tests.el
("warn-wide-docstring-defun.el"): Update test.

3 years agoAssume unfilled byte-compiler warnings in tests
Stefan Kangas [Mon, 6 Dec 2021 20:48:40 +0000 (21:48 +0100)]
Assume unfilled byte-compiler warnings in tests

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--define-warning-file-test): Remove workaround for filled
byte-compilation warnings.  See Bug#52281.

3 years agoFix previous shr-parse-style change
Lars Ingebrigtsen [Mon, 6 Dec 2021 20:43:39 +0000 (21:43 +0100)]
Fix previous shr-parse-style change

* lisp/net/shr.el (shr-parse-style): Fix previous clean-up here
(which wasn't well thought through).

3 years agodired.texi: Document dired-create-destination-dirs-on-trailing-dirsep
Tassilo Horn [Mon, 6 Dec 2021 20:24:56 +0000 (21:24 +0100)]
dired.texi: Document dired-create-destination-dirs-on-trailing-dirsep

* doc/emacs/dired.texi (Operating on Files): Document new option
dired-create-destination-dirs-on-trailing-dirsep.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 6 Dec 2021 18:49:43 +0000 (20:49 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoRevert "Avoid small parasitic button on mode line"
Eli Zaretskii [Mon, 6 Dec 2021 18:47:43 +0000 (20:47 +0200)]
Revert "Avoid small parasitic button on mode line"

This reverts commit c9e901f4a612646be4ce06e1619897edfb073bf0.

Turns out without that "ghost" button min-width doesn't work
on the mode line at all...

3 years agoTramp code cleanup
Michael Albinus [Mon, 6 Dec 2021 18:36:15 +0000 (19:36 +0100)]
Tramp code cleanup

* lisp/net/tramp.el (tramp-get-default-directory)
(tramp-get-buffer-string): New defsubsts.
(tramp-message, tramp-error-with-buffer)
(tramp-file-name-for-operation, tramp-command-completion-p)
(tramp-action-login, tramp-action-yesno, tramp-action-yn)
(tramp-action-terminal, tramp-action-confirm-message)
(tramp-wait-for-regexp, tramp-call-process)
(tramp-call-process-region, tramp-read-passwd):
* lisp/net/tramp-cmds.el (tramp-list-remote-buffers)
(tramp-reporter-dump-variable):
* lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory)
(tramp-sh-handle-process-file, tramp-sh-handle-write-region)
(tramp-sh-gio-monitor-process-filter):
* lisp/net/tramp-smb.el (tramp-smb-action-set-acl):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions):
* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case)
(tramp-test32-shell-command): Use them.

3 years agoFix mode-line display on TTY frames
Eli Zaretskii [Mon, 6 Dec 2021 17:36:07 +0000 (19:36 +0200)]
Fix mode-line display on TTY frames

* lisp/bindings.el (mode-line-frame-control): Remove the leading
'-' before '%F' on TTY frames.  It has no real purpose, and looks
ugly nowadays, since it's preceded by a blank, due to the new
min-width feature.

3 years agoSelect the right buffer for event in context-menu functions (bug#9923)
Juri Linkov [Mon, 6 Dec 2021 17:24:09 +0000 (19:24 +0200)]
Select the right buffer for event in context-menu functions (bug#9923)

* lisp/mouse.el (context-menu-region):
* lisp/progmodes/prog-mode.el (prog-context-menu):
Switch to the buffer displayed by the window of the event
before using syntax-ppss, char-after.

3 years agoAvoid small parasitic button on mode line
Eli Zaretskii [Mon, 6 Dec 2021 17:10:33 +0000 (19:10 +0200)]
Avoid small parasitic button on mode line

* lisp/bindings.el (mode-line-position): Remove stray space
character, which caused a "ghost" button on the mode line.
(Bug#52332)

3 years ago; * etc/tutorials/TUTORIAL.sv: Re-adjust to latest change in TUTORIAL.
Stefan Kangas [Mon, 6 Dec 2021 15:11:20 +0000 (16:11 +0100)]
; * etc/tutorials/TUTORIAL.sv: Re-adjust to latest change in TUTORIAL.

3 years ago; * etc/tutorials/TUTORIAL: Minor wording change in recent addition.
Eli Zaretskii [Mon, 6 Dec 2021 14:56:30 +0000 (16:56 +0200)]
; * etc/tutorials/TUTORIAL: Minor wording change in recent addition.

3 years agoMerge remote-tracking branch 'origin/emacs-28' into trunk
Stefan Monnier [Mon, 6 Dec 2021 14:44:18 +0000 (09:44 -0500)]
Merge remote-tracking branch 'origin/emacs-28' into trunk

3 years agolisp/minibuffer.el: Fix for bug#52169 regression
Stefan Monnier [Mon, 6 Dec 2021 14:43:13 +0000 (09:43 -0500)]
lisp/minibuffer.el: Fix for bug#52169 regression

* lisp/minibuffer.el (completion-table-subvert): Make sure we return
a boundary that's not outside of the limit of the string.

3 years ago* etc/tutorials/TUTORIAL.sv: Adjust to latest change in TUTORIAL.
Stefan Kangas [Mon, 6 Dec 2021 14:09:51 +0000 (15:09 +0100)]
* etc/tutorials/TUTORIAL.sv: Adjust to latest change in TUTORIAL.

3 years ago; * etc/tutorials/TUTORIAL: Fix typo in last commit.
Stefan Kangas [Mon, 6 Dec 2021 14:08:09 +0000 (15:08 +0100)]
; * etc/tutorials/TUTORIAL: Fix typo in last commit.

3 years agoAdd package management to tutorial and startup screen
Daniel Fleischer [Wed, 1 Dec 2021 17:15:27 +0000 (19:15 +0200)]
Add package management to tutorial and startup screen

* etc/tutorials/TUTORIAL: Add section about package installation.
* lisp/startup.el (fancy-startup-tail): Add button for
package-list-packages.

This was discussed in:
https://lists.gnu.org/r/emacs-devel/2021-12/msg00079.html

3 years agoimage.c: Remove some dead code
Stefan Kangas [Mon, 6 Dec 2021 11:06:35 +0000 (12:06 +0100)]
image.c: Remove some dead code

* src/image.c (gui_put_x_image): Remove dead code, commented out since
2004.

3 years agoUpdate org-compat doc string
Paul Eggert [Mon, 6 Dec 2021 07:13:06 +0000 (23:13 -0800)]
Update org-compat doc string

* lisp/org/org-compat.el (file-attribute-modification-time):
Update doc string to match that of builtin Emacs.

3 years agoFix minor clock skew issues
Paul Eggert [Mon, 6 Dec 2021 07:00:10 +0000 (23:00 -0800)]
Fix minor clock skew issues

* lisp/midnight.el (clean-buffer-list):
* lisp/progmodes/vhdl-mode.el (vhdl-template-replace-header-keywords):
* lisp/net/rcirc.el (rcirc-connect):
Don’t assume that getting the current time twice in rapid
succession will yield the same date and time.

3 years agoAvoid timestamp info loss in mh-alias-tstamp
Paul Eggert [Mon, 6 Dec 2021 06:56:49 +0000 (22:56 -0800)]
Avoid timestamp info loss in mh-alias-tstamp

* lisp/mh-e/mh-alias.el (mh-alias-tstamp):
Don’t lose subsecond info when setting mh-alias-tstamp.

3 years agoSimplify by using format-time-string
Paul Eggert [Mon, 6 Dec 2021 06:52:26 +0000 (22:52 -0800)]
Simplify by using format-time-string

* lisp/mail/sendmail.el (mail-do-fcc):
* lisp/net/tramp.el (tramp-debug-message):
Prefer format-time-string to doing time formatting by hand.

3 years agoSimplify RFC 5322 time zone generation
Paul Eggert [Mon, 6 Dec 2021 06:43:55 +0000 (22:43 -0800)]
Simplify RFC 5322 time zone generation

* lisp/mail/feedmail.el (feedmail-rfc822-time-zone)
(feedmail-rfc822-date, feedmail-default-message-id-generator):
* lisp/mail/mail-utils.el (mail-rfc822-time-zone, mail-rfc822-date):
* lisp/timezone.el (timezone-make-arpa-date):
Simplify by using format-time-string with %z.

* lisp/mail/feedmail.el (feedmail-rfc822-time-zone):
* lisp/mail/mail-utils.el (mail-rfc822-time-zone):
Mark these should-have-been-internal functions obsolete.

3 years agoFix image load timekeeping bug
Paul Eggert [Mon, 6 Dec 2021 03:30:27 +0000 (19:30 -0800)]
Fix image load timekeeping bug

* lisp/image.el (image-animate-timeout): Fix bug that caused the
local variable time-to-load-image to be practically zero, instead
of the time it actually took to load the image.  I think
this bug was introduced in 2013-02-16T03:29:30Z!rgm@gnu.org.

3 years agoUse time-convert in with-decoded-time-value
Paul Eggert [Mon, 6 Dec 2021 03:11:59 +0000 (19:11 -0800)]
Use time-convert in with-decoded-time-value

* lisp/calendar/time-date.el (with-decoded-time-value):
Prefer time-convert to current-time on the off chance that code
will use this obsolete macro even after current-time returns pairs.

3 years agoSimplify message-make-expires
Paul Eggert [Mon, 6 Dec 2021 02:39:28 +0000 (18:39 -0800)]
Simplify message-make-expires

* lisp/gnus/message.el (message-make-expires):
Use time-add instead of doing it by hand.  This also calculates the
expiration time more accurately than the old code did.

3 years agoSimplify message-unique-id etc.
Paul Eggert [Mon, 6 Dec 2021 02:35:27 +0000 (18:35 -0800)]
Simplify message-unique-id etc.

* lisp/gnus/message.el (message-unique-id):
* lisp/net/sasl.el (sasl-unique-id-function):
Avoid unnecessary consing and reliance on internal timestamp
format by using (time-convert nil 'integer) which typically does
no consing, instead of using (current-time) and then ignoring
the subsecond parts of the generated list.

3 years agoPrefer nil to (current-time) when either will do
Paul Eggert [Mon, 6 Dec 2021 02:25:46 +0000 (18:25 -0800)]
Prefer nil to (current-time) when either will do

* lisp/emacs-lisp/timer.el (timer-event-handler, run-at-time):
* lisp/gnus/gnus-score.el (gnus-score-date):
* lisp/gnus/gnus-search.el (gnus-search-query-parse-date)
(gnus-search-imap-handle-date):
* lisp/gnus/gnus-sum.el (gnus-user-date)
(gnus-summary-create-article):
* lisp/image-dired.el (image-dired-create-thumb-1):
* lisp/image/gravatar.el (gravatar-retrieve)
(gravatar--prune-cache):
* lisp/net/dbus.el (dbus-monitor-handler):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
* test/lisp/autorevert-tests.el (auto-revert--wait-for-revert)
(auto-revert-tests--write-file, auto-revert-test--wait-for):
* test/lisp/net/tramp-tests.el (tramp--test-print-duration):
Prefer nil to (current-time) when either will do, as this avoids
some consing.  Similarly, prefer omitting (current-time) arg
when this is equivalent.

3 years agoSimplify cedet-utest-elapsed-time
Paul Eggert [Mon, 6 Dec 2021 01:58:11 +0000 (17:58 -0800)]
Simplify cedet-utest-elapsed-time

* test/manual/cedet/cedet-utests.el (cedet-utest-elapsed-time):
Copy newer (circa-2011) implementation from elp.el, so that the
code matches its documentation again.

3 years agoUse time-equal-p to compare timestamps in tests
Paul Eggert [Mon, 6 Dec 2021 01:44:02 +0000 (17:44 -0800)]
Use time-equal-p to compare timestamps in tests

* test/lisp/calendar/time-date-tests.el (test-days-to-time)
(test-time-since): Use time-equal-p to compare timestamps,
since the default form shouldn’t matter.

3 years agoAdd time-convert tests
Paul Eggert [Mon, 6 Dec 2021 01:38:58 +0000 (17:38 -0800)]
Add time-convert tests

* test/src/timefns-tests.el (time-convert-forms): New test.

3 years agoAdded dired-create-destination-dirs-on-trailing-dirsep
NightMachinary [Tue, 9 Nov 2021 12:49:45 +0000 (16:19 +0330)]
Added dired-create-destination-dirs-on-trailing-dirsep

* lisp/dired-aux.el
(dired-create-destination-dirs-on-trailing-dirsep): New customization
option.
(dired-do-create-files): Use it.
(dired-create-destination-dirs): Mention the new option in the
docstring.

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

e3427faf55 Fix typos and improve consistency in ERC manual
0bf10d5082 * test/Makefile.in (check-declare): Add missing --batch.
34f5656137 Document the subtleties of the 'cursor' text property

3 years agoMake the Git stash commands available in vc-dir Git buffers
Lars Ingebrigtsen [Mon, 6 Dec 2021 05:41:25 +0000 (06:41 +0100)]
Make the Git stash commands available in vc-dir Git buffers

* lisp/vc/vc-dir.el (vc-dir): Call the backend-specific minor mode
if it exists.
* lisp/vc/vc-git.el (vc-dir-git-mode-map): New map.
(vc-dir-git-mode): New minor mode.