]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix last change
Eli Zaretskii [Wed, 7 Jul 2021 19:53:28 +0000 (22:53 +0300)]
Fix last change

* lisp/faces.el (tty-menu-enabled-face, tty-menu-disabled-face):
Define for monochrome displays.

3 years agoAdd new user option lock-file-name-transforms
Lars Ingebrigtsen [Wed, 7 Jul 2021 19:39:00 +0000 (21:39 +0200)]
Add new user option lock-file-name-transforms

* doc/emacs/files.texi (Interlocking): Mention
lock-file-name-transforms.

* doc/lispref/files.texi (File Locks): Document
lock-file-name-transforms.

* doc/misc/efaq.texi (Not writing files to the current directory):
Mention all the three variables needed to not having Emacs writing
files to the current directory in one place.

* lisp/files.el (lock-file-name-transforms): New user option (bug#49261).
(make-auto-save-file-name): Factor out the main logic...
(auto-save--transform-file-name): ... to this new function.
(make-lock-file-name): New function that also calls the
factored-out function.

* src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name.
(make_lock_file_name): New utility function that calls out to Lisp
to heed `lock-file-name-transforms'.
(lock_file): Use it.  Also remove likely buggy call to
dostounix_filename.
(unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.

3 years agoFix tty menus on monochrome displays
Eli Zaretskii [Wed, 7 Jul 2021 19:36:27 +0000 (22:36 +0300)]
Fix tty menus on monochrome displays

* lisp/faces.el (tty-menu-selected-face): Make sure the selected
menu item stands out even without colors.

3 years agoImplement file locks for remote files (Bug#49261)
Michael Albinus [Wed, 7 Jul 2021 16:36:53 +0000 (18:36 +0200)]
Implement file locks for remote files (Bug#49261)

* doc/lispref/files.texi (Magic File Names): Add file-locked-p,
lock-file and unlock-file.

* etc/NEWS: Tramp supports file locks now.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-adb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): New defun.

* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
(tramp-fuse-unmount): New defun.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sh-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-smb-handle-copy-directory): Use `sleep-for'.
(tramp-smb-handle-write-region): Handle LOCKNAME.

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sshfs-handle-write-region): Handle LOCKNAME.
(tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sudoedit-maybe-open-connection):
Set "lock-pid" connection property.

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
(tramp-handle-file-locked-p, tramp-handle-lock-file)
(tramp-handle-unlock-file): New defuns.
(tramp-lock-file-contents-regexp): New regexp.
(tramp-handle-write-region): Handle LOCKNAME.

* src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
Call handler if exists.
(Flock_file, Funlock_file): New defuns.
(Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
(Slock_file, Sunlock_file): Declare subroutines.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test40-make-nearby-temp-file)
(tramp-archive-test43-file-system-info): Rename.

* test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
(tramp--test-fuse-p): New defun.
(tramp-test14-delete-directory): Use it.
(tramp-test39-lock-file): New test.
(tramp-test40-make-nearby-temp-file)
(tramp-test41-special-characters)
(tramp-test41-special-characters-with-stat)
(tramp-test41-special-characters-with-perl)
(tramp-test41-special-characters-with-ls, tramp-test42-utf8)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
(tramp-test44-asynchronous-requests, tramp-test45-auto-load)
(tramp-test45-delay-load, tramp-test45-recursive-load)
(tramp-test45-remote-load-path, tramp-test46-unload): Rename.
(tramp--test-special-characters, tramp--test-utf8)
(tramp--test-asynchronous-requests-timeout): Modify docstring.

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 7 Jul 2021 15:04:03 +0000 (08:04 -0700)]
Merge from origin/emacs-27

fbf1cb2bf2 (origin/emacs-27) Fix overfull hbox in Emacs manual
fda60094a2 Minor copyedits of Emacs manual

# Conflicts:
# doc/emacs/display.texi

3 years agoMake previous empty-body warning disabling more robust
Lars Ingebrigtsen [Tue, 6 Jul 2021 20:01:55 +0000 (22:01 +0200)]
Make previous empty-body warning disabling more robust

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
`byte-compile-warning-enabled-p' may not be defined here.

3 years agoAvoid invalid regexp in wide docstring check
Basil L. Contovounesios [Tue, 6 Jul 2021 00:05:41 +0000 (01:05 +0100)]
Avoid invalid regexp in wide docstring check

* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Avoid constructing an invalid regexp during byte-compilation by
limiting the number of columns to the current RE_DUP_MAX of 65535.
This protects against pathological values of fill-column, for
example (bug#49426).

3 years ago* lisp/repeat.el (describe-repeat-maps): Rename from `describe-repeat'.
Juri Linkov [Tue, 6 Jul 2021 17:53:09 +0000 (20:53 +0300)]
* lisp/repeat.el (describe-repeat-maps): Rename from `describe-repeat'.

Fix text strings (bug#49265).

3 years agoMake `M-x clipboard-yank' work reliably
Lars Ingebrigtsen [Tue, 6 Jul 2021 17:25:41 +0000 (19:25 +0200)]
Make `M-x clipboard-yank' work reliably

* lisp/menu-bar.el (clipboard-yank): Make the command work
consistently (bug#27442).

* lisp/select.el (gui-selection-value): Try to explain why the
logic is the way it is.

3 years agoExplain what ( . c) means to the Emacs Lisp reader
Lars Ingebrigtsen [Tue, 6 Jul 2021 17:13:45 +0000 (19:13 +0200)]
Explain what ( . c) means to the Emacs Lisp reader

* doc/lispref/objects.texi (Dotted Pair Notation): Explain what
( . c) means to the Lisp reader (bug#24875).

3 years agoFix right-margin display on TTY frames
Eli Zaretskii [Tue, 6 Jul 2021 17:11:51 +0000 (20:11 +0300)]
Fix right-margin display on TTY frames

* src/dispnew.c (prepare_desired_row, adjust_glyph_matrix): Adjust
the glyph pointer of the right-margin area for all windows but the
rightmost ones on TTY frames, to account for the border glyph.
(Bug#48257)

3 years agoWarn when wrapping index matches with `,' after `i' in Info
Lars Ingebrigtsen [Tue, 6 Jul 2021 16:56:51 +0000 (18:56 +0200)]
Warn when wrapping index matches with `,' after `i' in Info

* lisp/info.el (Info--current-index-alternative): New internal
variable.
(Info-warn-on-index-alternatives-wrap): New user option (bug#24282).
(Info-index-next): Use the new user option.

3 years agoAdd faces for shr heading elements (bug#49433)
Protesilaos Stavrou [Tue, 6 Jul 2021 07:44:46 +0000 (10:44 +0300)]
Add faces for shr heading elements (bug#49433)

* etc/NEWS: Document new faces.
* lisp/net/shr.el (shr-h1, shr-h2, shr-h3, shr-h4, shr-h5, shr-h6):
Define new faces.
(shr-tag-h1): Remove inclusion of 'variable-pitch' face.  Fix
bug#49433 by applying a new face directly.
(shr-tag-h2, shr-tag-h3, shr-tag-h4, shr-tag-h5, shr-tag-h6): Apply
new faces.

3 years agoMake gnus-gcc-externalize-attachments work again
Lars Ingebrigtsen [Tue, 6 Jul 2021 15:04:28 +0000 (17:04 +0200)]
Make gnus-gcc-externalize-attachments work again

* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Allow externalizing
parts again by defeating the cache (bug#49436).

3 years agoAllow inhibiting warnings about unused variables and empty bodies
Lars Ingebrigtsen [Tue, 6 Jul 2021 14:43:49 +0000 (16:43 +0200)]
Allow inhibiting warnings about unused variables and empty bodies

* lisp/emacs-lisp/cconv.el (cconv--warn-unused-msg): Allow
inhibiting warnings about unbound variables (bug#26486).

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Allow
inhibiting warnings about empty bodies.

3 years agoAllow using `mm-inline-message' from other mail clients than Gnus
Lars Ingebrigtsen [Tue, 6 Jul 2021 14:33:25 +0000 (16:33 +0200)]
Allow using `mm-inline-message' from other mail clients than Gnus

* lisp/gnus/mm-view.el (mm-inline-message-prepare-function): New
variable (bug#49380).
(mm-inline-message): Use it to separate out the Gnus-specific code.
* lisp/gnus/gnus-art.el (gnus-mime-display-single): ... which has
been moved here.

3 years agoFix overfull hbox in Emacs manual
Eli Zaretskii [Tue, 6 Jul 2021 12:25:51 +0000 (15:25 +0300)]
Fix overfull hbox in Emacs manual

* doc/emacs/display.texi (Displaying Boundaries): Fix overfull
hbox.

3 years agoMinor copyedits of Emacs manual
Eli Zaretskii [Tue, 6 Jul 2021 11:57:19 +0000 (14:57 +0300)]
Minor copyedits of Emacs manual

* doc/emacs/book-spine.texi: Fix the author attribution.
(Bug#49405)
* doc/emacs/back.texi: Update text.

3 years ago(xref--insert-xrefs): Fix printing of line numbers
Dmitry Gutov [Mon, 5 Jul 2021 22:55:26 +0000 (01:55 +0300)]
(xref--insert-xrefs): Fix printing of line numbers

* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of line numbers when we have multiple files with
(e.g.) single match on the same line.

3 years ago; * test/lisp/subr-tests.el (subr-tests-add-hook-depth): Fix a typo.
Philipp Stephani [Mon, 5 Jul 2021 18:34:36 +0000 (20:34 +0200)]
; * test/lisp/subr-tests.el (subr-tests-add-hook-depth): Fix a typo.

3 years ago* lisp/progmodes/bug-reference.el: Refer to info manual node
Stephen Leake [Mon, 5 Jul 2021 17:04:56 +0000 (10:04 -0700)]
* lisp/progmodes/bug-reference.el: Refer to info manual node

3 years agoSupport reverting in Customize buffers
Lars Ingebrigtsen [Mon, 5 Jul 2021 14:56:07 +0000 (16:56 +0200)]
Support reverting in Customize buffers

* lisp/cus-edit.el (custom--revert-buffer): New function (bug#26871).
(Custom-mode): Set up reversion.
(custom--invocation-options): New variable.
(custom-buffer-create-internal): Set it.

3 years agoCount zero-length matches in `count-matches' correctly
Lars Ingebrigtsen [Mon, 5 Jul 2021 14:30:43 +0000 (16:30 +0200)]
Count zero-length matches in `count-matches' correctly

* lisp/replace.el (how-many): Count zero-length matches correctly
(bug#27359).

3 years agoPropagate :safe properties when autoloading defcustoms
Lars Ingebrigtsen [Mon, 5 Jul 2021 13:55:38 +0000 (15:55 +0200)]
Propagate :safe properties when autoloading defcustoms

* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe
property to the loaddefs file (bug#28104).

3 years agoMake `bookmark--unfontify' more robust
Lars Ingebrigtsen [Mon, 5 Jul 2021 13:09:45 +0000 (15:09 +0200)]
Make `bookmark--unfontify' more robust

* lisp/bookmark.el (bookmark--unfontify): Don't bug out if there's
no fontification recorded (bug#49341).

3 years ago`image-save' doc string clarification
Lars Ingebrigtsen [Mon, 5 Jul 2021 12:49:56 +0000 (14:49 +0200)]
`image-save' doc string clarification

* lisp/image.el (image-save): Clarify what's being saved
(bug#49347).

3 years agoDon't use LOCKNAME for temp files in Tramp (Bug#49406)
Michael Albinus [Mon, 5 Jul 2021 10:09:28 +0000 (12:09 +0200)]
Don't use LOCKNAME for temp files in Tramp (Bug#49406)

* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Don't use LOCKNAME for temp file.  (Bug#49406)

* test/lisp/shadowfile-tests.el (password-cache-expiry):
Set `shadow-debug' also on emba.

3 years agoShow hand cursor when dragging frame (Bug#49247)
Martin Rudalics [Mon, 5 Jul 2021 08:53:39 +0000 (10:53 +0200)]
Show hand cursor when dragging frame (Bug#49247)

* src/xdisp.c (note_mode_line_or_margin_highlight): Show hand
cursor when dragging frame with mode, tab or header line.
(syms_of_xdisp): Define Qdrag_with_mode_line,
Qdrag_with_header_line and Qdrag_with_tab_line.

3 years agoFix newly introduced error in tramp-tests.el (Bug#49406)
Michael Albinus [Mon, 5 Jul 2021 08:24:31 +0000 (10:24 +0200)]
Fix newly introduced error in tramp-tests.el (Bug#49406)

* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Filter out empty strings.  (Bug#49406)

3 years agoIgnore .dir-locals-2.el files more
Lars Ingebrigtsen [Sun, 4 Jul 2021 14:23:46 +0000 (16:23 +0200)]
Ignore .dir-locals-2.el files more

* lisp/emacs-lisp/shadow.el (load-path-shadows-find):
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Ignore
.dir-locals-2.el, too (bug#23257).

3 years agoEnsure 'call-process' interprets INFILE as a local path
Jim Porter [Sun, 4 Jul 2021 13:32:03 +0000 (15:32 +0200)]
Ensure 'call-process' interprets INFILE as a local path

* src/callproc.c (get_current_directory): Rename from
'encode_current_directory' and add boolean ENCODE flag.
(Fcall_process): Interpret INFILE relative to the working directory
from which PROGRAM is run, not 'default-directory'.
(call_process): Use 'get_current_directory'.
* src/process.c (Fmake_process): Use 'get_current_directory'.
* src/process.h (get_current_directory): Rename decl from
'encode_current_directory'.
* src/sysdep.c (sys_subshell): Use 'get_current_directory' (bug#49283).

3 years agoAdjust eshell and ps-print to not use emacs-kill-hook
Lars Ingebrigtsen [Fri, 2 Jul 2021 15:33:37 +0000 (17:33 +0200)]
Adjust eshell and ps-print to not use emacs-kill-hook

* lisp/ps-print.el (ps-kill-emacs-check):

* lisp/eshell/em-dirs.el (eshell-dirs-initialize)
(eshell-save-some-last-dir): Don't use `emacs-kill-hook' (bug#28943).

* lisp/eshell/em-hist.el (eshell-hist-initialize)
(eshell-save-some-history):

3 years ago* lisp/url/url-util.el (url-unhex-string): Doc fix.
Eli Zaretskii [Sun, 4 Jul 2021 12:04:52 +0000 (15:04 +0300)]
* lisp/url/url-util.el (url-unhex-string): Doc fix.

3 years agoAvoid deprecation warnings with Texinfo 6.8
Eli Zaretskii [Sun, 4 Jul 2021 11:55:42 +0000 (14:55 +0300)]
Avoid deprecation warnings with Texinfo 6.8

* doc/lispref/functions.texi (Function Safety):
* doc/misc/srecode.texi (Parts of SRecode):
* doc/misc/wisent.texi (Wisent Semantic, Wisent Lex):
* doc/misc/pcl-cvs.texi (Editing files):
* doc/misc/bovine.texi (top, Starting Rules)
(Bovine Grammar Rules, How Lexical Tokens Match)
(Optional Lambda Expression):
* doc/emacs/msdos.texi (Windows Keyboard):
* doc/emacs/buffers.texi (Several Buffers):
* doc/emacs/text.texi (Text): Avoid using @inforef, which is
deprecated.

3 years agoFix crash in GNUstep font coverage check
Alan Third [Mon, 28 Jun 2021 18:50:31 +0000 (19:50 +0100)]
Fix crash in GNUstep font coverage check

* src/nsfont.m (ns_charset_covers): Check coverage more accurately and
don't automatically assume the buffer is 8192 bytes long.

3 years agoRemove unused variables
Alan Third [Sat, 26 Jun 2021 14:39:19 +0000 (15:39 +0100)]
Remove unused variables

* src/nsterm.m ([EmacsView keyDown:]): Remove ns_fake_keydown as
there's no code that ever sets it to YES.

3 years agoFix thread memory management under NS
Alan Third [Tue, 22 Jun 2021 20:46:02 +0000 (21:46 +0100)]
Fix thread memory management under NS

* src/thread.c (run_thread): Allocate an autorelease pool so that any
autoreleased Objective C objects are correctly released.

3 years agoUpdate a few more IRC-related references to point to Libera.Chat
Amin Bandali [Sun, 4 Jul 2021 05:18:19 +0000 (01:18 -0400)]
Update a few more IRC-related references to point to Libera.Chat

3 years agoMerge from origin/emacs-27
Amin Bandali [Sun, 4 Jul 2021 04:14:47 +0000 (00:14 -0400)]
Merge from origin/emacs-27

348b2aed0c Update IRC-related references to point to Libera.Chat
b0e725e2fe Fix typo in c-macro-expand docstring

# Conflicts:
# doc/misc/erc.texi
# doc/misc/gnus-faq.texi
# doc/misc/rcirc.texi
# etc/NEWS
# lisp/erc/erc-services.el
# lisp/erc/erc.el
# lisp/ldefs-boot.el
# lisp/net/rcirc.el

3 years ago; Merge from origin/emacs-27
Amin Bandali [Sun, 4 Jul 2021 04:12:58 +0000 (00:12 -0400)]
; Merge from origin/emacs-27

The following commit was skipped:

d70dc6946a ; Auto-commit of loaddefs files.

3 years agoMerge from origin/emacs-27
Amin Bandali [Sun, 4 Jul 2021 04:12:57 +0000 (00:12 -0400)]
Merge from origin/emacs-27

d898d3c73a ; * doc/emacs/back.texi: Fix a typo.
de52dbd4ad Update doc/emacs/ for a new printing of the Emacs Manual book

3 years agoUpdate IRC-related references to point to Libera.Chat
Amin Bandali [Sun, 4 Jul 2021 03:39:18 +0000 (23:39 -0400)]
Update IRC-related references to point to Libera.Chat

Per GNU and FSF's announcements [0, 1] of moving official IRC channels
to the Libera.Chat IRC network, as well as several Emacs-related
channels following suit [2], update IRC-related references to reflect
the migration.

[0]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html
[1]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html
[2]: https://lists.gnu.org/archive/html/info-gnu-emacs/2021-06/msg00000.html

3 years agoSpeed up fido-mode
Dmitry Gutov [Sun, 4 Jul 2021 01:38:35 +0000 (04:38 +0300)]
Speed up fido-mode

* lisp/icomplete.el (icomplete-completions): Speed up fido-mode (bug#48841).

3 years agoFix typo in c-macro-expand docstring
Daniel Martín [Sat, 3 Jul 2021 15:59:22 +0000 (17:59 +0200)]
Fix typo in c-macro-expand docstring

* lisp/progmodes/cmacexp.el (c-macro-expand): Fix typo.  (Bug#49356)

3 years agoRetain documentation string when customizing theme
Christopher League [Sat, 3 Jul 2021 13:46:28 +0000 (10:46 -0300)]
Retain documentation string when customizing theme

* lisp/cus-theme.el (customize-create-theme): When editing an existing
theme, load its doc string into the description widget, instead of
replacing it with a date stamp (Bug#49274).

3 years agoDon't have desktop-save-mode query on `M-x kill-emacs'
Lars Ingebrigtsen [Fri, 2 Jul 2021 15:29:10 +0000 (17:29 +0200)]
Don't have desktop-save-mode query on `M-x kill-emacs'

* lisp/desktop.el (noninteractive): Prompting functions should not
be added to `kill-emacs-hook' (bug#28943).
(desktop-kill): Return t so that it can be used from
`kill-emacs-query-functions'.

3 years agoImplement another fix for bug#49229
Michael Albinus [Fri, 2 Jul 2021 12:51:23 +0000 (14:51 +0200)]
Implement another fix for bug#49229

* lisp/minibuffer.el (read-file-name-default): Respect remote files.
(Bug#49229)

* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
Handle special file names on MS Windows.

* lisp/net/tramp.el (tramp-file-name-handler): Revert patch.
(Bug#49229)

3 years agoHide emacs-mail.desktop, emacsclient-mail.desktop from menus
Peter Oliver [Wed, 9 Jun 2021 11:58:39 +0000 (12:58 +0100)]
Hide emacs-mail.desktop, emacsclient-mail.desktop from menus

These are intended for use as mailto: URL handlers, not for launching
directly, so we can reduce clutter by hiding them from a desktop
environment’s menus.

* etc/emacs-mail.desktop, etc/emacsclient-mail.desktop: NoDisplay=true

3 years agoInstall emacs-mail.desktop and emacsclient-mail.desktop
Peter Oliver [Wed, 9 Jun 2021 11:51:15 +0000 (12:51 +0100)]
Install emacs-mail.desktop and emacsclient-mail.desktop

* Makefile.in (install-etc): Install emacs-mail.desktop and
emacsclient-mail.desktop

3 years agoProvide an emacsclient-mail.desktop
Peter Oliver [Wed, 9 Jun 2021 11:44:32 +0000 (12:44 +0100)]
Provide an emacsclient-mail.desktop

We provide both an emacs.desktop and an emacsclient.desktop, so for
consistency let’s do the same with mail.

* etc/emacs-mail.desktop: Extract suggestions for using emacsclient
from comments to create emacsclient-mail.desktop.
* etc/emacsclient-mail.desktop: Send mail using an existing Emacs
rather than starting a new one.

3 years agolisp/auth-source-pass.el: Keep legitimate spaces inside data
Tino Calancha [Sun, 27 Jun 2021 15:53:30 +0000 (17:53 +0200)]
lisp/auth-source-pass.el: Keep legitimate spaces inside data

Users should be able to store a field as follows:
message: remember: Destroy the image and you will break the enemy

and later, recover the message untouched, i.e.:
"remember: Destroy the image and you will break the enemy"

* lisp/auth-source-pass.el (auth-source-pass--parse-data): Preserve
inner spaces at data.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-parse-with-colons-in-data): Add test.

3 years ago; * lisp/auth-source-pass.el: Remove useless metadata
Damien Cassou [Sun, 27 Jun 2021 15:51:54 +0000 (17:51 +0200)]
; * lisp/auth-source-pass.el: Remove useless metadata

3 years ago; * lisp/auth-source-pass.el: Improve docstrings
Damien Cassou [Sun, 27 Jun 2021 15:38:59 +0000 (17:38 +0200)]
; * lisp/auth-source-pass.el: Improve docstrings

3 years agolisp/auth-source-pass.el: Support multiple hosts in search spec
Iku Iwasa [Sun, 27 Jun 2021 15:36:00 +0000 (17:36 +0200)]
lisp/auth-source-pass.el: Support multiple hosts in search spec

* lisp/auth-source-pass.el (auth-source-pass-search): Accept a list of
strings for argument HOST.
(auth-source-pass--build-result): Rename argument HOST to HOSTS. Also
return value "host" from entry if it exists.
(auth-source-pass--find-match): Rename argument HOST to HOSTS. Iterate
over each host in HOSTS.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests

3 years agoDon't pass 'null-device' to 'call-process' in ispell
Jim Porter [Thu, 1 Jul 2021 11:01:00 +0000 (13:01 +0200)]
Don't pass 'null-device' to 'call-process' in ispell

* lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries):
Replace 'null-device' with nil (bug#49283).  This allows running a
local ispell process when editing a buffer editing a file via Tramp.

3 years agoNew frame parameter 'drag-with-tab-line' (Bug#49247)
Martin Rudalics [Fri, 2 Jul 2021 08:55:42 +0000 (10:55 +0200)]
New frame parameter 'drag-with-tab-line' (Bug#49247)

The new frame parameter 'drag-with-tab-line' allows to move
frames by dragging their topmost windows' tab line with the
mouse thus achieving a behavior similar to that provided by
the 'drag-with-header-line' parameter.

* lisp/mouse.el (mouse-drag-tab-line): New function.
(mouse-drag-frame-resize, mouse-drag-frame-move)
([tab-line down-mouse-1]): Handle tab line dragging in various
keymaps.
* doc/lispref/frames.texi (Mouse Dragging Parameters): Describe
new parameter 'drag-with-tab-line'.
* etc/NEWS: Add entry for 'drag-with-tab-line'.

3 years agoFix a problem of cus-start.el for remote default directories
Michael Albinus [Fri, 2 Jul 2021 08:01:46 +0000 (10:01 +0200)]
Fix a problem of cus-start.el for remote default directories

* lisp/cus-start.el: Bind `default-directory' to "/" when calling
`shell-command-to-string' for a local value on DARWIN.

3 years agoFix NS self contained eln location (bug#49271)
Alan Third [Wed, 30 Jun 2021 18:58:13 +0000 (19:58 +0100)]
Fix NS self contained eln location (bug#49271)

* Makefile.in:
* configure.ac: Change eln file install location to
Contents/Frameworks.
* src/comp.c (hash_native_abi): Replace dots with underscores in the
eln install location as the macOS code-signing tool won't sign the
files if the parent directories have dots.

3 years agoFix NS native comp search path (bug#49270)
Alan Third [Tue, 29 Jun 2021 21:02:43 +0000 (22:02 +0100)]
Fix NS native comp search path (bug#49270)

* configure.ac (NS_SELF_CONTAINED): We need to make lispdirrel the
same as lispdir when building a self contained app bundle as they're
both relative paths.

3 years ago* lisp/transient.el: Update to package version 0.3.6.
Jonas Bernoulli [Thu, 1 Jul 2021 15:20:58 +0000 (17:20 +0200)]
* lisp/transient.el: Update to package version 0.3.6.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Jul 2021 13:28:40 +0000 (06:28 -0700)]
; Auto-commit of loaddefs files.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Jul 2021 13:11:38 +0000 (06:11 -0700)]
; Auto-commit of loaddefs files.

3 years agoUpdate describe-prefix-binding manual text
Mattias Engdegård [Thu, 1 Jul 2021 12:27:13 +0000 (14:27 +0200)]
Update describe-prefix-binding manual text

* doc/emacs/help.texi (Misc Help): `ESC ?` isn't unbound any more.

3 years agoHandle test environment variables
Michael Albinus [Thu, 1 Jul 2021 11:43:44 +0000 (13:43 +0200)]
Handle test environment variables

* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
Check also for EMACS_EMBA_CI.

* test/README (SELECTOR): Mention EMACS_TEST_VERBOSE.

* test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_VERBOSE.

3 years agoFix copy/paste error in emacsclient.desktop
Peter Oliver [Thu, 1 Jul 2021 10:46:10 +0000 (12:46 +0200)]
Fix copy/paste error in emacsclient.desktop

* etc/emacsclient.desktop: new-instance should read new-window.

3 years ago; * doc/emacs/back.texi: Fix a typo.
Eli Zaretskii [Thu, 1 Jul 2021 08:31:05 +0000 (11:31 +0300)]
; * doc/emacs/back.texi: Fix a typo.

3 years agoUpdate doc/emacs/ for a new printing of the Emacs Manual book
Eli Zaretskii [Thu, 1 Jul 2021 08:28:05 +0000 (11:28 +0300)]
Update doc/emacs/ for a new printing of the Emacs Manual book

* doc/emacs/book-spine.texi: New file: the printed book spine.
* doc/emacs/back.texi: New file: the backcover text for the
printed book.
* doc/emacs/emacs.texi: Update ISBN.

3 years agoDoc cleanup
Michael Albinus [Thu, 1 Jul 2021 08:19:48 +0000 (10:19 +0200)]
Doc cleanup

* doc/lispref/files.texi (File Locks, Changing Files)
(File Name Components, File Name Expansion, Magic File Names):
* lisp/files.el (locate-dominating-stop-dir-regexp)
(auto-mode-alist, set-auto-mode, file-name-with-extension)
(backup-directory-alist, wildcard-to-regexp)
(save-buffers-kill-terminal): Doc fixes.

* etc/NEWS: Fix typos.

3 years agoIn files that use allout use it for all headings
Jonas Bernoulli [Wed, 30 Jun 2021 20:17:01 +0000 (22:17 +0200)]
In files that use allout use it for all headings

* lisp/allout.el: Don't prefix regular comments with three
semicolons.
* lisp/icomplete.el: Use allout syntax for all headings.
* lisp/net/eudc.el: Use allout syntax for all headings.

3 years ago* lisp/comint.el: Prefix headings with enough semicolons.
Jonas Bernoulli [Wed, 30 Jun 2021 20:15:13 +0000 (22:15 +0200)]
* lisp/comint.el: Prefix headings with enough semicolons.

Outline headings must begin with three or more semicolons.

3 years agoImprove consistency of outline headings in dired libraries
Jonas Bernoulli [Sun, 14 Mar 2021 19:24:07 +0000 (20:24 +0100)]
Improve consistency of outline headings in dired libraries

* lisp/dired-aux.el: Improve consistency of outline headings.
* lisp/dired-x.el: Improve consistency of outline headings.
* lisp/dired.el: Improve consistency of outline headings.

- Use three semicolons at beginning of headings because that already
  is the dominant number of semicolons for headings in these files.
- Prefix each heading with a ^L instead of randomly omitting it in
  front of some.
- Always prefix the line with the ^L with a completely empty line.
- Begin headings with a capital letter.
- Do not update complete headings.
- Do not end headings with a period.
- Remove a handful of section end markers.
- Address further inconsistencies.

3 years agoCleanup whitespace and comments in dired libraries
Jonas Bernoulli [Wed, 30 Jun 2021 18:10:30 +0000 (20:10 +0200)]
Cleanup whitespace and comments in dired libraries

* lisp/dired-aux.el: Cleanup whitespace and comments.
* lisp/dired-x.el: Cleanup whitespace and comments.
* lisp/dired.el: Cleanup whitespace and comments.

3 years ago; Mention the previous change in NEWS
Jonas Bernoulli [Wed, 30 Jun 2021 19:38:54 +0000 (21:38 +0200)]
; Mention the previous change in NEWS

3 years agoAdd new function lm-maintainers (bug#48592)
Jonas Bernoulli [Mon, 3 May 2021 21:22:47 +0000 (23:22 +0200)]
Add new function lm-maintainers (bug#48592)

* doc/lispref/tips.texi (Library Headers): Improve wording.
* lisp/emacs-lisp/lisp-mnt.el (lm-maintainers): New function.
(lm-maintainer): Make obsolete in favor of lm-maintainer.
(lm-verify): Use lm-maintainers.
(lm-report-bug): Use lm-maintainers.

3 years ago* lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name.
Jonas Bernoulli [Sat, 22 May 2021 19:58:53 +0000 (21:58 +0200)]
* lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Right-trim name.

The addresses might be aligned in which case we have to trim the
extra whitespace at the end of the names.

3 years agoAdjust docstring of lisp-mode (bug#49278)
João Távora [Wed, 30 Jun 2021 16:00:13 +0000 (17:00 +0100)]
Adjust docstring of lisp-mode (bug#49278)

* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Mention that this mode is
primarily for Common Lisp.

3 years agoAdd new user option to transform kill ring contents
Lars Ingebrigtsen [Wed, 30 Jun 2021 13:55:50 +0000 (15:55 +0200)]
Add new user option to transform kill ring contents

* doc/emacs/killing.texi (Kill Options): Document it.
* lisp/simple.el (kill-new): Use it.
(kill-transform-function): New user option (bug#29013).

3 years agoMake the minor mode doc strings say that they're minor modes
Lars Ingebrigtsen [Wed, 30 Jun 2021 13:31:26 +0000 (15:31 +0200)]
Make the minor mode doc strings say that they're minor modes

* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Mention that this is a minor mode (bug#20462).

3 years agoFrom .desktop files, reuse a frame or start a new Emacs as required
Peter Oliver [Wed, 30 Jun 2021 13:11:21 +0000 (15:11 +0200)]
From .desktop files, reuse a frame or start a new Emacs as required

* doc/emacs/misc.texi: (Using Emacs as a Server) Explain
emacsclient.desktop.
* etc/NEWS: (Emacs Server): Explain emacsclient.desktop.
* emacs-mail.desktop, etc/emacsclient.desktop: Automatically try to
reuse an existing frame, open a new frame, or start a new Emacs
daemon.  Add actions for specific behaviours (bug#49195).

3 years agoRevert more of a partially reverted emacsclient.desktop patch
Peter Oliver [Wed, 30 Jun 2021 13:01:46 +0000 (15:01 +0200)]
Revert more of a partially reverted emacsclient.desktop patch

* etc/emacsclient.desktop: Undo setting of StartupWMClass=Emacsd, since
this relies on a change to etc/emacs.service which was also undone.  See
bug#37847 for more explanation (bug#49259).

3 years agoFix problem when creating an .authinfo entry with an existing machine name
Lars Ingebrigtsen [Wed, 30 Jun 2021 12:27:49 +0000 (14:27 +0200)]
Fix problem when creating an .authinfo entry with an existing machine name

* lisp/auth-source.el (auth-source-netrc-create): Don't return the
incorrect data if there's a matching host entry but the wrong user
name (bug#49289).

3 years agoAdd new function file-name-with-extension
Colin Woodbury [Wed, 30 Jun 2021 12:07:29 +0000 (14:07 +0200)]
Add new function file-name-with-extension

* doc/lispref/files.texi (File Name Components): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Ditto.

* lisp/files.el (file-name-with-extension): New function.

3 years agoFix NS port built with gcc
Alan Third [Tue, 29 Jun 2021 21:17:20 +0000 (22:17 +0100)]
Fix NS port built with gcc

* src/nsterm.m (ns_relocate): The NSArray shorthand notation doesn't
work in GCC.

3 years ago* lisp/repeat.el (describe-repeat): New command (bug#49265).
Juri Linkov [Tue, 29 Jun 2021 20:36:16 +0000 (23:36 +0300)]
* lisp/repeat.el (describe-repeat): New command (bug#49265).

3 years agoSync with Tramp 2.5.1
Michael Albinus [Tue, 29 Jun 2021 15:15:55 +0000 (17:15 +0200)]
Sync with Tramp 2.5.1

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.1".

* lisp/tramp.el (tramp-handle-write-region):
* lisp/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/tramp-sh.el (tramp-sh-handle-write-region): Call local
`write-region' directly.

* test/lisp/net/tramp-tests.el (tramp--test-utf8): Adapt test for
MS Windows.

3 years agoIn read_minibuf_unwind don't try to select dead window (Bug#49248)
Martin Rudalics [Tue, 29 Jun 2021 07:21:22 +0000 (09:21 +0200)]
In read_minibuf_unwind don't try to select dead window (Bug#49248)

* src/minibuf.c (read_minibuf_unwind): Don't try to select dead
window (Bug#49248).

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 28 Jun 2021 14:50:45 +0000 (07:50 -0700)]
Merge from origin/emacs-27

ef5f3d5ee7 (origin/emacs-27) C++ Mode: Handle new keywords static_cas...

3 years ago* lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant.
Reuben Thomas [Sun, 27 Jun 2021 21:08:40 +0000 (22:08 +0100)]
* lisp/textmodes/ispell.el: Fix finding dictionaries for Enchant.

(ispell-find-enchant-dictionaries):

I originally copied this code from the equivalent code for
Aspell. Unfortunately it was wrong for the case of Enchant: it should
find only dictionaries that Enchant knows about, and not merge in
`ispell-dictionary-base-alist' or add a default element, as these
are dealt with in `ispell-set-spellchecker-params'.

This caused a bug where the correct `-d' argument would not be added
to the invocation of enchant, leading to the process not being
correctly started.

3 years ago* lisp/textmodes/ispell.el: Check process is live before interacting.
Reuben Thomas [Sun, 27 Jun 2021 21:07:06 +0000 (22:07 +0100)]
* lisp/textmodes/ispell.el: Check process is live before interacting.

Check that `ispell-process' is live before trying to read from or
write to it. This avoids a hang if the process has died.

3 years ago; * Makefile.in: Fix out-of-tree builds on NS
Mattias Engdegård [Mon, 28 Jun 2021 09:44:07 +0000 (11:44 +0200)]
; * Makefile.in: Fix out-of-tree builds on NS

3 years agoFix bug#49229 in shell.el
Michael Albinus [Mon, 28 Jun 2021 06:14:10 +0000 (08:14 +0200)]
Fix bug#49229 in shell.el

* lisp/shell.el (shell): Ensure, that a remote shell is remote.
(Bug#49229)

3 years ago* lisp/files.el (hack-one-local-variable): Allow `add-function` in `eval:`
Stefan Monnier [Sun, 27 Jun 2021 22:01:13 +0000 (18:01 -0400)]
* lisp/files.el (hack-one-local-variable): Allow `add-function` in `eval:`

Fixes: bug#49163
3 years ago* lisp/textmodes/flyspell.el: Fix bug#49104
Stefan Monnier [Sun, 27 Jun 2021 19:06:25 +0000 (15:06 -0400)]
* lisp/textmodes/flyspell.el: Fix bug#49104

(flyspell--prev-meta-tab-binding): Delete var.
(flyspell-prog-mode): Don't set it.
(flyspell-auto-correct-word): Lookup the "next" command dynamically.

3 years agoC++ Mode: Handle new keywords static_cast, etc., wrt angle brackets
Alan Mackenzie [Sun, 27 Jun 2021 12:59:18 +0000 (12:59 +0000)]
C++ Mode: Handle new keywords static_cast, etc., wrt angle brackets

* lisp/progmodes/cc-langs.el (c-<>-arglist-kwds): Add const_cast,
dynamic_cast, reinterpret_cast and static_cast into this lang const.

* lisp/progmodes/cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props)
(c-clear-<-pair-props-if-match-after, c-clear->-pair-props-if-match-before)
(c-forward-<>-arglist-recur):
Invalidate caches with c-trunctate-lit-pos-cache.
(c-forward-<>-arglist-recur): If in a matching <...> expression, the < has a
syntax-table property, but the > not, remove that property.

3 years ago* lisp/minibuffer.el (completion-in-region--single-word): Simplify
Stefan Monnier [Sat, 26 Jun 2021 16:29:52 +0000 (12:29 -0400)]
* lisp/minibuffer.el (completion-in-region--single-word): Simplify

Remove redundant args `collection` and `predicate` which were always
equal to `minibuffer-completion-table` and
`minibuffer-completion-predicate` anyway.

(minibuffer-complete-word):
* lisp/emacs-lisp/crm.el (crm-complete-word): Simplify accordingly.

3 years ago* lisp/minibuffer.el (minibuffer--completion-prompt-end): Rename
Stefan Monnier [Sat, 26 Jun 2021 16:22:22 +0000 (12:22 -0400)]
* lisp/minibuffer.el (minibuffer--completion-prompt-end): Rename

3 years ago* lisp/emacs-lisp/cl-macs.el: Fix test regression
Stefan Monnier [Sat, 26 Jun 2021 16:20:11 +0000 (12:20 -0400)]
* lisp/emacs-lisp/cl-macs.el: Fix test regression

(cl--alist-to-plist): New function.
(cl-struct-slot-info): Use it.

3 years agoFix Tramp bug#49229
Michael Albinus [Sat, 26 Jun 2021 14:26:02 +0000 (16:26 +0200)]
Fix Tramp bug#49229

* lisp/net/tramp.el (tramp-file-name-handler): Drop possible
volume letter when `expand-file-name' is called with a local
absolute file name as first argument.  (Bug#49229)

3 years ago* lisp/minibuffer.el (completion--prompt-end): New function (bug#30668)
Stefan Monnier [Sat, 26 Jun 2021 13:38:21 +0000 (09:38 -0400)]
* lisp/minibuffer.el (completion--prompt-end): New function (bug#30668)

(minibuffer-complete, minibuffer-force-complete-and-exit)
(minibuffer-force-complete, minibuffer-complete-and-exit)
(minibuffer-complete-word, minibuffer-completion-help): Use it.

3 years agoFix NS self-contained build configuration
Alan Third [Sat, 26 Jun 2021 11:46:43 +0000 (12:46 +0100)]
Fix NS self-contained build configuration

* configure.ac: When rebuilding epaths.h for NS check that we're
actually doing an NS build first.