1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00
Commit Graph

10272 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
2ad34bcea4 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.
2021-07-07 21:39:20 +02:00
Michael Albinus
d35868bec9 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.
2021-07-07 18:36:53 +02:00
Lars Ingebrigtsen
69f1bd38f0 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.
2021-07-06 18:56:51 +02:00
Protesilaos Stavrou
1431fd91b4 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.
2021-07-06 17:06:17 +02:00
Lars Ingebrigtsen
68276f6d30 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.
2021-07-05 16:56:07 +02:00
Lars Ingebrigtsen
26b9564bd5 Propagate :safe properties when autoloading defcustoms
* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe
property to the loaddefs file (bug#28104).
2021-07-05 15:55:38 +02:00
Amin Bandali
8d957f2dd8
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
2021-07-04 00:14:47 -04:00
Amin Bandali
348b2aed0c
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
2021-07-03 23:39:18 -04:00
Peter Oliver
38aa2074f8 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
2021-07-02 13:09:18 +02:00
Peter Oliver
b1b05c828d 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.
2021-07-02 13:09:08 +02:00
Martin Rudalics
f449890508 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'.
2021-07-02 10:55:42 +02:00
Peter Oliver
1a7c8f846e Fix copy/paste error in emacsclient.desktop
* etc/emacsclient.desktop: new-instance should read new-window.
2021-07-01 12:46:10 +02:00
Michael Albinus
fc3c00413a 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.
2021-07-01 10:19:48 +02:00
Jonas Bernoulli
4a3fc7179b ; Mention the previous change in NEWS 2021-06-30 21:40:07 +02:00
Lars Ingebrigtsen
bb56f6c768 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).
2021-06-30 15:55:50 +02:00
Peter Oliver
cbf220bc31 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).
2021-06-30 15:11:21 +02:00
Peter Oliver
f355f32e69 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).
2021-06-30 15:01:46 +02:00
Colin Woodbury
4f2765f6f1 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.
2021-06-30 14:07:29 +02:00
Stefan Kangas
f2729dd8ee ; * etc/NEWS: Re-arrange two items. 2021-06-25 22:10:28 +02:00
Stefan Kangas
db491e07a2 ; * etc/NEWS: Fix typo. 2021-06-25 18:31:26 +02:00
Lars Ingebrigtsen
8e6d6daacf Allow `C-u M-x dig' to ask for a query type
* lisp/net/dig.el (dig): Allow prompting for a query type
(bug#31810).
2021-06-24 18:51:38 +02:00
Alex McGrath
8db520837a Add SASL authentication to rcirc
* lisp/net/rcirc.el (rcirc-handler-AUTHENTICATE): New function
(bug#48601).
(rcirc-authenticate):
(rcirc-connect): Support sasl.
(rcirc-get-server-password, rcirc-get-server-method): New functions.
(rcirc-authinfo): Document it.
2021-06-24 18:45:08 +02:00
Protesilaos Stavrou
e4b9e1c66c Use named face for apropos-button
* etc/NEWS: Document new face.
* lisp/apropos.el (apropos-button): Define new face.
(apropos-face): Specify face instead of hardcoding
attributes (bug#49162).
2021-06-22 15:33:26 +02:00
Peter Oliver
57ec4aadc6 Advertise support for Startup Notification when built with GTK
* etc/emacsclient.desktop, etc/emacsclient.desktop: Specify
StartupNotify=true.
* configure.ac (USE_STARTUP_NOTIFICATION): New variable, yes iff
HAVE_GTK.
* Makefile.in (install-etc): Remove StartupNotify=true from
etc/*.desktop unless USE_STARTUP_NOTIFICATION (bug#48783).
2021-06-22 15:17:28 +02:00
Lars Ingebrigtsen
09f17ac475 NEWS for tool bar "X" in *Help* buffers change (bug#49139) 2021-06-21 15:16:50 +02:00
Robert Pluim
82551f243f ; Fix typo in NEWS 2021-06-20 17:11:44 +02:00
Grant Shangreaux
9bbdd3bac9 Add input methods for Lakota
The White Hat and Suggested Lakota Orthography are represented here
by three different input modes: A prefix and postfix mode for the SLO,
and a postfix mode for the White Hat orthography.
* lisp/leim/quail/latin-post.el (lakota-slo-postfix)
(lakota-white-hat-postfix):
* lisp/leim/quail/latin-pre.el (lakota-slo-prefix): New input methods.
* etc/HELLO: Call out the additions.
2021-06-20 14:04:21 +03:00
Juri Linkov
415143de47 Add new convenience command for *Help*
* doc/emacs/help.texi (Help Mode): Document it (bug#36767).

* lisp/help-mode.el (help-mode-map): Add 'c'.
(help-mode-menu): Add help-customize.
(help-customize): New command.
2021-06-20 02:14:29 +03:00
Alex Bochannek
1293ece461 New Gnus Summary buffer sort options for extra headers
* lisp/gnus/gnus-sum.el (gnus-article-sort-functions)
(gnus-thread-sort-functions, gnus-subthread-sort-functions)
(gnus-summary-mode-map, gnus-summary-make-menu-bar)
(gnus-article-sort-by-newsgroups)
(gnus-summary-sort-by-newsgroups, gnus-summary-sort-by-extra):
Sort by Newsgroups extra header. Prompt for header name for other
extra headers.

* doc/misc/gnus.texi (Summary Sorting): Document new sort functions

* etc/NEWS: New Gnus Summary buffer sort feature (bug#49081).
2021-06-19 15:13:12 +02:00
Lars Ingebrigtsen
6fc48df5ae Add new convenience commands for *Help*
* doc/emacs/help.texi (Help Mode): Document it (bug#36767).

* lisp/help-fns.el (help-fns-function-description-header)
(describe-variable, describe-face, describe-keymap)
(describe-mode): Add the required data.

* lisp/help-mode.el (help-mode-map): Add 'i' and 's'.
(help-mode--current-data): New variable.
(help-mode): Make it local.
(help-view-source, help-goto-info): New commands.
2021-06-15 20:51:00 +02:00
Eli Zaretskii
9dde254e96 ; * etc/NEWS: Fix a typo in the recent change. 2021-06-15 18:10:45 +03:00
Julian Scheid
8be9d4a156 Allow ERT tests to output the failure reasons, too
* lisp/emacs-lisp/ert.el (ert-reason-for-test-result): New function.
(ert-run-tests-batch): Output failure or skip reason  (bug#47071).
2021-06-15 17:01:57 +02:00
Lars Ingebrigtsen
81fd5603ce Add a new function syntax-class-to-char
* doc/lispref/syntax.texi (Syntax Table Internals): Document it.
* src/syntax.c (Fsyntax_class_to_char): New function (bug#37452).
2021-06-15 17:01:57 +02:00
Michael Albinus
6536112bdc Handle sensitive auto-save or backup remote files (Bug#45245)
* doc/misc/tramp.texi (Auto-save and Backup):
Describe tramp-allow-unsafe-temporary-files.
(Ad-hoc multi-hops): Use proper format.

* etc/NEWS: Mention confirmation for writing sensitive auto-save
or backup remote files to the local temporary directory..

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Strengthen test.

* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom.
(tramp-handle-find-backup-file-name)
(tramp-handle-make-auto-save-file-name): Don't expose sensible
auto-save or backup files on local temporary directory.  (Bug#45245)

* test/lisp/net/tramp-tests.el (tramp--test-always): New defalias.
(tramp-test10-write-region, tramp-test21-file-links)
(tramp--test--deftest-direct-async-process): Use it.
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name): Extend tests.
2021-06-14 11:25:13 +02:00
Eli Zaretskii
788e5cce4d Fix wording of recently added documentation
* etc/NEWS:
* lisp/simple.el (save-interprogram-paste-before-kill): Fix
wording of a recently added documentation.  (Bug#41168)
2021-06-13 15:47:31 +03:00
Lars Ingebrigtsen
407062c296 Allow save-interprogram-paste-before-kill to be a number
* doc/emacs/killing.texi (Clipboard): Document it.
* lisp/simple.el (save-interprogram-paste-before-kill): Extend
range (bug#41168).
(kill-new): Implement it (bug#41168).
2021-06-13 14:04:45 +02:00
Martin Rudalics
00140ca6bf Rename/rewrite recently added option and function in window.el
* lisp/window.el (window-at-x-y): Rename from `window-at-pos'.
Fix doc-string.
(delete-window-choose-selected): Rename from
`delete-window-set-selected'.  Fix doc-string.
(delete-window): Adjust to above renaming.
* doc/emacs/windows.texi (Change Window): Mention new option
`delete-window-choose-selected'.
* etc/NEWS:
* doc/lispref/windows.texi (Deleting Windows): Follow up on
above renamings.
2021-06-11 09:55:02 +02:00
Eli Zaretskii
0088cf4f93 ; * etc/NEWS: Rephrase the entry about 'grep-find-template'. 2021-06-11 09:29:37 +03:00
Martin Rudalics
b3dd0ce75b Provide new option `delete-window-set-selected' (Bug#47300)
When `delete-window' deletes its frame's selected window, this new
option allows to choose another window as replacement.

* lisp/window.el (get-lru-window, get-mru-window)
(get-largest-window): New optional argument NO-OTHER.
(window-at-pos): New function.
(delete-window-set-selected): New option.
(delete-window): Handle `delete-window-set-selected'.
* src/window.c (Fdelete_window_internal): Set the selected
window of WINDOW's frame to the first window on that frame and
let `delete-window' choose a more suitable window instead.
* doc/lispref/windows.texi (Deleting Windows): Describe new
option `delete-window-set-selected'.
(Cyclic Window Ordering): Describe new NO-OTHER argument for
`get-lru-window', `get-mru-window' and `get-largest-window'.
* etc/NEWS: Mention `delete-window-set-selected' and the NO-OTHER
argument.
2021-06-10 09:14:21 +02:00
Michael Albinus
a63587c546 * etc/NEWS: New user option 'shell-has-auto-cd'. 2021-06-09 13:01:09 +02:00
Utkarsh Singh
4a1e97bea9 New user option for Git log switches
* lisp/vc/vc-git.el (vc-git-diff-switches): New defcustom.
(vc-git-print-log): Use it.

* etc/NEWS: Announce the new option.

Copyright-paperwork-exempt: yes
2021-06-09 02:25:47 +03:00
Alex Bochannek
4888addd30 Change the Gnus default to use `#' to toggle the process mark
* doc/misc/gnus.texi (Marking Groups, Topic Commands):
(Setting Process Marks, Pick and Read): Document the new default.
* lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu.

* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu.

* lisp/gnus/gnus-topic.el (gnus-topic-make-menu-bar): Update menu.

* lisp/gnus/gnus.el (gnus-process-mark-toggle): Change default.
2021-06-08 13:34:24 +02:00
Alan Third
f7d98dbba0 Revert "src/nsterm.m: fix window tabbing on macOS"
This reverts commit 2207f9adcc.
2021-06-07 23:16:15 +01:00
Michael Albinus
fcc827619f Improve support of remote files in browse-url.el
* etc/NEWS: Mention support of remote file browsing.

* lisp/net/browse-url.el (browse-url-of-buffer): Revert last change.
(browse-url-of-file): Use temporary file in case of remote file.
(Bug#48397)
2021-06-07 20:41:30 +02:00
Michael Albinus
89f91e502e ; Fix typos in etc/NEWS 2021-06-07 20:36:57 +02:00
Dmitry Gutov
82ccc3afcf ; Mention the previous change in NEWS 2021-06-07 05:01:19 +03:00
Eli Zaretskii
6ef5760b10 Minor fixes for last change
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to added Mercury support.

* lib-src/etags.c (find_entries, test_objc_is_mercury):
* etc/NEWS: Fix punctuation and typos in last change.
2021-06-06 12:44:49 +03:00
Fabrice Nicol
5a8a5a990a Add support for Mercury (https://mercurylang.org) in 'etags'
Tag declarations starting lines with ':-'.
By default, all declarations are tagged.  Optionally, first
predicate or functions in clauses can be tagged as in Prolog
support using '--declarations'.  (Bug#47408).
* lib-src/etags.c (test_objc_is_mercury, Mercury_functions)
(mercury_skip_comment,  mercury_decl, mercury_pr):
Implement Mercury support.  As Mercury and Objective-C have
the same file extension .m, a heuristic test tries to detect
the language.

* doc/man/etags.1: Document the change.  Add Mercury-specific
 behavior for '--declarations'.  This option tags first
predicates or functions in clauses in addition to declarations.
2021-06-06 12:29:29 +03:00
Paul W. Rankin
2207f9adcc src/nsterm.m: fix window tabbing on macOS
* src/nsterm.m: remove NSWindowTabbingModeDisallowed to respect
  system-wide preferences
* etc/NEWS: add mention of native tab support in macOS and where
  to specify system-wide setting
2021-06-06 10:08:54 +01:00
Eli Zaretskii
58de11fe13 Document the last change
* doc/lispref/os.texi (Input Modes): Document the changes in the
values of the META flag.

* etc/NEWS: Call out the change in input-meta-mode.
2021-06-05 17:17:17 +03:00